svm: different results between iOS simulator & iPhone (Bug #3308)
Description
Hello,
It seems there is a bug when SVM classifier is executed on a real iPhone. We do not get the same results than when it is executed on iOS simulator (or MacOSX or Linux).
The attached program should show the bug.
The attached program load two files : an SVM model and a data file [also attached to this bug].
The data file contains both data and results of classification for this data with this SVM model (computed on linux).
The program load the model, load the data, classify the data with the model and check if the results are the same than those expected (loaded from file).
Once compiled, the program is launched liked this :
./test data.yml model.xml
The program executed on linux, mac, or iOS simulator gives the same results (as those obtained on linux).
But when executed on a real iPhone, the results are different than those expected.
We use the same version of OpenCV on all platforms : 2.4.6
Linux platform is : Intel Xeon, Fedora 19, g++ 4.8.1
MacOSX platform is : Intel, MacOSX 10.8.5, Xcode 5 (5A1413) + associated iOS simulator
iPhone platform is iPhone 5 with iOS 7, or iPhone 5S with iOS 7.0.2
We also tested on a MacBookPro, Intel Core2Duo, MacOSX 10.7.4, Xcode 4.6.3, with OpenCV 2.4.3 and we get the expected results.
On a real iPhone, we tested 2.4.6 (downloaded framework or compiled from source) & current git version, and in all cases we get different results than under the simulator.
Let me know if you need more details or to test certain things on these configurations.
Boris.
Associated revisions
Merge pull request #3308 from edgarriba:master
History
Updated by Kirill Kornyakov over 11 years ago
Thank you for this great report, but please do not expect fast response... Nobody is maintaining the iOS port at the moment, so if you really need the fix soon (and send the pull request), I would suggest to debug the issue yourself or workaround it somehow.
- Status changed from New to Open
- Difficulty set to Medium
Updated by Alexander Smorkalov over 11 years ago
@Alexander Shishkov, any comments from your side?
- Affected version changed from 2.4.6 (latest release) to 2.4.0 - 2.4.6
Updated by Alexander Smorkalov over 11 years ago
- Target version changed from 2.4.7 to 2.4.8
Updated by Alexander Smorkalov about 11 years ago
- Target version changed from 2.4.8 to 2.4.9
Updated by Adam Lang about 11 years ago
I have the same problem, SVM classification works in Simulator but not on the iPhone. On iPhone i get always the max float value as the distance result. Is there any solution yet or any news?
Updated by Andreas Hörsken almost 11 years ago
I tested the sample above with an iPad 4 and iPad Air (x64) under both, iOS 7 and iOS 7.1 and got no errors (wether with the simulator nor the device). Is it solved or does it just not work with the iphone? Did you test it with a current device?
Updated by Alexander Smorkalov almost 11 years ago
- Target version changed from 2.4.9 to 2.4.10
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4635