2017-12-04 07:01:29 -0600 | received badge | ● Popular Question (source) |
2015-11-06 07:13:54 -0600 | received badge | ● Nice Answer (source) |
2015-11-06 05:54:51 -0600 | received badge | ● Teacher (source) |
2015-11-06 05:54:42 -0600 | received badge | ● Nice Question (source) |
2015-07-01 07:32:39 -0600 | received badge | ● Self-Learner (source) |
2015-07-01 07:22:11 -0600 | answered a question | SVM save/load problems Hi all, I'll give the answer myself: The problem is the already mentioned difference between the support vector indices. Within the implementation of the SVMs write and read methods (modules/ml/src/svm.cpp, lines 2022 ff and 2139 ff), the author makes the assumption, that support vector indices are not required in 2-class problems. That is probably correct if a linear kernel is used (i.e., when you have only one support vector). But with other kernels (in my case with an RBF kernel), the support vector indices are definitly required. I've added a git diff where I commented this questionable conditions out. Now everything works fine! IMHO the lines should be removed. I posted a bug report on this issue right now. Btw.: That new users must wait 2 days to answer their own questions sucks!!! Jens |
2015-06-29 06:56:22 -0600 | asked a question | SVM save/load problems Hi all, I'm currently working with am SVM in OpenCV 3.0.0. When I train a C_SVC-SVM with RBF kernel I'll get good classification results of about 90-95%. These results are really good, in the problem case I'm working on. Now I save the SVM to a file (in my case I use YML, but I think it doesn't matter): classifier->save(filename); ... where classifier is of type cv::Ptr<cv::ml::svm>. The next time I start the program, I'll load the SVM again: classifier = cv::Algorithm::load<cv::ml::svm >(filename);<="" p=""> ... but now I get recognition rates of 0-36% with exactly the same dataset. I dumped all parameters, the decision function, and all other values to console and compared them manually. Except for the support vector indices of the decision function they do not differ before save, after load, and in comparison to the saved files. What's going on here? Any ideas? Cheers, Jens |
2015-06-03 10:54:14 -0600 | commented question | Bug - OpenCV 3.0.0-rc1 - cv::Mat memory reallocation using push_back fails Hi Guanta, no problem, I'll fill a bug report, too. However, I am not sure if I'll manage it today. Concerning the work-arounds: I don't know the number of rows in advance. But I implemented a word-around in a similar manner (using a float array). But I had to implement my own memory management. ;-) |
2015-06-03 10:10:06 -0600 | received badge | ● Student (source) |
2015-06-03 09:24:58 -0600 | asked a question | Bug - OpenCV 3.0.0-rc1 - cv::Mat memory reallocation using push_back fails Hi all, I am currently working with huge matrices and get into trouble when the matix reaches a size of approximately 5GB while using successive push_back()-calls from cv::Mat. At a given point the resident memory shown for my app drops from approximately 5GB to a approximately 0.5GB. This is exactly at the same time, when a resize of the matrix is performed. Now the data within the matrix is corrupted. Interestingly I can make further push_back() calls without any problems. With the exception, that the memory size of the program is 5GB to low, the memory size increases as if nothing has happend. Then, when the matrix reaches the point where the next resize of the matrix is required, i.e., at approximately 8GB, the resident memory flips back to the right size. But the data remains invalid, of course. Here are some facts:
You should be able to reproduce this behaviour with the following toy code:
The method
The critical lines from output are:
I hope that helps to find the Bug. Cheers, Jens |