RTrees/DTrees model save/load broken (may apply to other ML models too) (Bug #4402)


Added by Boris Daskalov over 9 years ago. Updated over 9 years ago.


Status:New Start date:2015-06-12
Priority:Normal Due date:
Assignee:Maksim Shabunin % Done:

0%

Category:ml
Target version:3.1
Affected version:branch 'master' (3.0-dev) Operating System:Any
Difficulty: HW Platform:Any
Pull request:

Description

In 3.0.0 Algorithm::save() adds"format: 3" to indicated the format version. Instead ::save()/::load() I used ::write()/::read() to store/restore and RTrees model.
DTreesImpl::readParams() checks for the format version and assumes legacy format if it isn't present. This may apply to other algorithms that check for a specific version too.

Currently I worked around this problem by adding "format: 3" from my code like:

storage << "format" << 3;
model->write(storage);


History

Updated by Maksim Shabunin over 9 years ago

  • Target version set to 3.1
  • Assignee changed from Vadim Pisarevsky to Maksim Shabunin
  • Category changed from core to ml

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/5015

Also available in: Atom PDF