Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv_traincascade "-baseFormatSave" flag for legacy XML file format error #4428

Closed
opencv-pushbot opened this issue Jul 27, 2015 · 1 comment

Comments

@opencv-pushbot
Copy link
Contributor

Transferred from http://code.opencv.org/issues/2387

|| Joel Mckay on 2012-09-25 17:35
|| Priority: Normal
|| Affected: branch '2.4'
|| Category: objdetect
|| Tracker: Bug
|| Difficulty: None
|| PR: 
|| Platform: None / None

opencv_traincascade "-baseFormatSave" flag for legacy XML file format error

The legacy format is still used for various examples.

opencv_traincascade "-baseFormatSave" flag currently outputs a legacy format XML with the tag:
<pre>
<cascade>
...
</cascade>
</pre>

This will cause an error like:
<pre>
 3 34.0
OpenCV Error: Unspecified error (The node does not represent a user object (unknown type?)) in cvRead, file /home/yourmom/SDK/opencv/trunk/opencv/modules/core/src/persistence.cpp, line 4996
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/yourmom/SDK/opencv/trunk/opencv/modules/core/src/persistence.cpp:4996: error: (-2) The node does not represent a user object (unknown type?) in function cvRead
</pre>

To ensure compatibility the tag must be formatted as the following:
<pre>
<output type_id="opencv-haar-classifier">
...
</output>
</pre>


The opencv version used was: OpenCV 2.4.9 commit:ce4ac2d

Additionally, a newly trained "lost" cascade.xml may be manually edited with this specific tag to enable backward compatibility for GPU examples etc. I am regression testing the cascade, and so far it appears to behave itself amicably. 

Cheers,
J

History

Alexander Smorkalov on 2012-10-03 08:17
-   Target version set to 2.4.3
-   Assignee set to Vadim Pisarevsky
Andrey Kamaev on 2012-10-31 14:09
-   Target version changed from 2.4.3 to 3.0
Marina Kolpakova on 2012-11-02 09:59
-   % Done changed from 80 to 0
-   Assignee changed from Vadim Pisarevsky to Marina Kolpakova
-   Estimated time deleted (1.00)
Marina Kolpakova on 2013-04-05 23:31
-   Affected version set to branch '2.4'
-   Assignee deleted (Marina Kolpakova)
@StevenPuttemans
Copy link

This was solved by me and @Dikay900
--> correct models for GPU processing where added in seperate module
--> all the other samples and modules work with the new train cascade format

It can thus be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants