create positive samples parseError [closed]

asked 2014-02-12 14:51:26 -0600

Gabriel Sina gravatar image

updated 2014-02-12 21:31:23 -0600

Hello,

I am trying to create positive samples, from 934 positive instances. I am using this command to do it:

opencv_createsamples -info info.dat -vec samples_output.vec -bg bgs.txt -num 934 -show -w 80 -h 80

For some reason, I can only create 788 samples, getting the following error message:

info.dat(489) : parse errorDone. Created 788 samples

As my positive instances come from 4 different videos, I tried to run the opencv_createsamples with all the images separated into the 4 groups, so I would be sure that all my coordinates were correct and this strange 788 successful samples were not because 146 out all my instances were incorrectly listed on my "info.dat". I had success in all of them, separately, so I guess that the images' coordinates are correct.

What else would be happening here?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2014-02-13 01:39:10.619928

Comments

1

Please add a link to a pastebin of the info.dat file. It seems he can only read 788 lines while there should be 934 entrences.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-02-12 14:57:13 -0600 )edit

Here it is, Steven: http://pastebin.com/8kgC9iLQ

Gabriel Sina gravatar imageGabriel Sina ( 2014-02-12 15:24:35 -0600 )edit

Actually if you look at your date, weird stuff happens. from line 237 and on, your numbers seem off compared to the others. Is it correct that there are 210 objects in that single image? Your iterator will ignore the line if there arent as much arguments as described in the second line. So it would be completely normal that some entries fail.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-02-12 15:42:44 -0600 )edit

Do you mean an entry such: img/vid2-11.jpg 2 204 197 66 61 214 266 69 66 ? I think that the tabulation makes it look like the entrance is "204" objects, while it is "2".

Gabriel Sina gravatar imageGabriel Sina ( 2014-02-12 16:11:03 -0600 )edit

Well, I had noticed that looking at the images (running with -show) that it was generating samples only for the first two groups of images (files with the prefix vid1- & vid2-, leaving out groups 3 and 4). So I tried to list the vid3 and vid4's before them in my info.dat file... Magically that happened to work. Thanks a lot for your attention, Steven.

Gabriel Sina gravatar imageGabriel Sina ( 2014-02-12 21:24:47 -0600 )edit

Ah didn't see the change in indentation ... you are welcome!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-02-13 01:36:48 -0600 )edit