I successfully trained and predicted with SVM. The results are great with Windows OpenCV C++ versions 4.1 and 4.8.
Parameters:
Type: C_SVC
Kernel: RBF
C: 1.0
Gamma: 0.5
TermCriteria: EPS, 1000, 1e-6
I save the model (SVM::save). I then quite my application and restart. I use SVM::load to reload the model. The function returns true. But SVM::isTrained returns false, and SVM::predict has an error.
From what I understand SVM::load recreates the loaded model and is ready for prediction. I predict with the same trained data.
I read somewhere OPENCV 3.x had an error with reloading SVM models with non-linear kernels. But couldn’t find anything else on the issue.
Please offer potential problems and solutions.