Ask Your Question
0

cascade classifier cannot open file

asked 2015-03-26 11:41:20 -0600

MrBlueskies gravatar image

I have followed the generally-accepted methods in the tutorial, and created a set of positive and negative images to train the classifier against. The trouble is, that each time I run the command line script to create a .vec file, I get an error stating that creatsamples cannot read the text file containing the positive images data. I am at a complete loss as to what I'm doing wrong. Any ideas? I have tried with/without specifying directory address, I have tried fully-qualified addresses, and I have tried with/without specifying bg.txt address. I'm stuck. Nothing seems to work

command line error text

edit retag flag offensive close merge delete

Comments

1

if you run that from inside the training folder, it should be positive/positive.txt, etc. without the leading \training .

also, this will not create directories !

berak gravatar imageberak ( 2015-03-26 11:46:20 -0600 )edit
1

And maybe you should try using double backslashes, because in Windows as backslash is an escape character. So try changing to positive\\positives.txt, negative\\negatives.txt and vector\\horses.vec and indeed without the training like @berak said.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-27 04:50:02 -0600 )edit

Thanks guys, that solved that particular issue, but I get parseError instead now. All part of the fun!

MrBlueskies gravatar imageMrBlueskies ( 2015-03-30 06:13:21 -0600 )edit

parse errorDone was caused by a spurious entry in the positives.txt file. I removed it and the matching image file and the process worked a treat!

MrBlueskies gravatar imageMrBlueskies ( 2015-03-30 08:03:31 -0600 )edit

@MrBlueskies as to the parse error Done, do not worry about that one. It is more like a warning to say that less elements were generated than requested with the num parameter and that to know the cause, you need to investigate the positives.txt file.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-31 01:29:40 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-30 08:06:33 -0600

MrBlueskies gravatar image

Problem solved, thanks to suggestions from @berak and @StevenPuttemans. Removing the 'training/' folder from the address and using either single forward slash or double backslash, I was able to successfully create the .vec file

edit flag offensive delete link more

Comments

You are welcome!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-31 01:31:10 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-26 11:41:20 -0600

Seen: 520 times

Last updated: Mar 30 '15