opencv: Algorithm::load() not available for script wrappers
Transferred from http://code.opencv.org/issues/4279
|| be rak on 2015-04-14 14:32
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: ml
|| Tracker: Bug
|| Difficulty:
|| PR:
|| Platform: Any / Any
Algorithm::load() not available for script wrappers
while trying to fix the ml-related python samples, i found
that it's impossible to load a serialized state from python atm.
adding a respective method like:
CV_WRAP static Ptr<SVM> load(const String &fn)
{
return Algorithm::load<SVM>(fn);
}
to each of the ml classes would fix it, but hopefully there might be a better way (without changing the interface)
History
Vadim Pisarevsky on 2015-04-27 11:12
- Category set to ml
Maksim Shabunin on 2015-04-29 09:21
- Target version set to 3.0
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 24 (4 by maintainers)
Commits related to this issue
- Python samples adapted for Python3 compatibility Common fixes: - print function - int / float division - map, zip iterators in py3 but lists in py2 Known bugs with opencv 3.0.0 - digits.py, called v... — committed to bastelflp/opencv by bastelflp 9 years ago
- Added weston_save and weston_load to work around #4969 and #5894 — committed to westonpace/opencv by westonpace 9 years ago
- fixing issue #4969 of Itseez/opencv. Someone forgot to wrap the load function for SVMs in the corresponding ml python module. Fixed that. — committed to DarwinsBuddy/opencv by deleted user 8 years ago
- fixing issue #4969 of Itseez/opencv. Someone forgot to wrap the load function for SVMs in the corresponding ml python module. Fixed that. — committed to Aravind-Suresh/opencv-1 by deleted user 8 years ago
I found that you can use
instead.
What about KNN_load() which is still missing in opencv-python (3.2.0.7)?
Can someone please solve this bug? it’s kind of urgent
Has anyone fixed this??
I’m still having this issue on 3.3 (Mac, installed via Homebrew,
cv2.__version__
reports 3.3.0).cv2.face.LBPHFaceRecognizer_create().load
doesn’t exist.Apparently they just never ended up writing the wrapper for this. My vote, use sci-kit. I ended up doing this and it worked a lot better anyways. I also used PIL for the loading and saving of the trained network.
Could anyone share the current status of this issue?