Ask Your Question
0

Problem: haartraining.exe crashes while training

asked 2013-08-06 05:14:04 -0500

Sander gravatar image

updated 2013-08-07 05:57:40 -0500

Hello,

I have a small problem. I already did many cascade but this is my first error which I dont know how to solve. I have 1048 positive and 2068 negative images. I prepared everthing for the haartraining and this are my commands:

C:\Users\sander.buchheim\Desktop\test4\temp\createsamples.exe -info positive/info.txt -vec data/vector.vec -num 1048 -w 24 -h 24

C:\Users\sander.buchheim\Desktop\test4\temp\haartraining.exe -data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 1048 -nneg 2068 -nstages 30 -mem 1000 -mode ALL -w 24 -h 24 -nonsym

I used this tutorial: http://nayakamitarup.blogspot.de/2011/07/how-to-make-your-own-haar-trained-xml.html

The program crahs in stage 16 when it tried to load the background.

At excatly 67% a windows window open and says that the program is crashed. Do you have a solution for it?

Here a picture:

image description

Already tried this possible solutions with the old folders:

Run with this command: C:\Users\sander.buchheim\Desktop\test4\temp\haartraining.exe -data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 1048 -nneg 2068 -nstages 30 -mem 1000 -mode ALL -w 24 -h 24 -nonsym -minhitrate 0.9 -maxfalsealarm 0.5 - does not work

Run with this command: C:\Users\sander.buchheim\Desktop\test4\temp\haartraining.exe -data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 900 -nneg 1950 -nstages 30 -mem 1000 -mode ALL -w 24 -h 24 -nonsym - does not work

Already tried this possible solutions with new setup:

Run with this command: C:\Users\sander.buchheim\Desktop\test4\temp\haartraining.exe -data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 900 -nneg 1950 -nstages 30 -mem 1000 -mode ALL -w 24 -h 24 -nonsym - does not work

Thanks in advance.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-08-07 06:54:31 -0500

edit flag offensive delete link more

Comments

Do you have something with java examples? The problem is that I write with java on eclipse. Or is C++ important for that?

Sander gravatar imageSander ( 2013-08-07 07:00:22 -0500 )edit

There are no standard Java examples for openCV, which is indeed a pitty. The detection part is included, as seen in documents I guess the functionality is quite similar. You could work with the C++ examples as a base.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-07 07:05:07 -0500 )edit

Ok ty alot.

Sander gravatar imageSander ( 2013-08-07 07:10:35 -0500 )edit
1

answered 2013-08-06 07:29:38 -0500

vinayverma gravatar image

updated 2013-08-06 07:36:36 -0500

Try to run it with lesser number of npos (say 1000-1020). There must be some images in your vec file which cannot be used for training. So if the parameter is less than the actual number of images in vec file, you still have some buffer images to use (in case of non-usable pos images).

When the error window opens, also look at the console to see the exact error.

edit flag offensive delete link more

Comments

Ty alot I gonna try it and if the error comes again I will post the exact error.

Sander gravatar imageSander ( 2013-08-06 07:34:53 -0500 )edit
1

I usually do the actual numbers * 0.9 and use that amount for npos. This makes sure that the problem doesn't occur anymore.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-06 07:57:27 -0500 )edit

Okay I got the same error with this command: C:\Users\sander.buchheim\Desktop\test4\temp\haartraining.exe -data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 1000 -nneg 2068 -nstages 30 -mem 1000 -mode ALL -w 24 -h 24 -nonsym

The Problem is that I can't see the exact error code. I just put a picture in the post aswell.

Sander gravatar imageSander ( 2013-08-06 08:05:59 -0500 )edit
1

I'll try it with 900 npos. Hopefully it will run.

Sander gravatar imageSander ( 2013-08-06 08:07:23 -0500 )edit

Still does not run. Just tried with 900npos and with -minhitrate 0.9 -maxfalsealarm 0.5. Both are getting the error. Should I restart whole process or can I start with the old folders?

Sander gravatar imageSander ( 2013-08-07 01:08:21 -0500 )edit
1

Hmm you do have to restart the whole process, not just the last stage. Because the lower amount of images can trigger another configuration, since the difference of about 100 images can contain many outliers without you even knowing it.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-07 01:40:33 -0500 )edit

Ok ty alot. I gonna try it. I gonna say if this run ;)

Sander gravatar imageSander ( 2013-08-07 01:45:17 -0500 )edit

C:\Users\sander.buchheim\Desktop\test4\temp\haartraining.exe -data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 900 -nneg 1950 -nstages 30 -mem 1000 -mode ALL -w 24 -h 24 -nonsym

Still does not work. I deleted the stages before and started a new one. Some other possible solutions?

Sander gravatar imageSander ( 2013-08-07 05:56:06 -0500 )edit
2

I do not like the haartraining executable, switched to the train_cascade exe a long time ago, so my inspiration is practically gone :D

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-07 06:12:38 -0500 )edit

It is actually an improved training system, capable of training a cascade classifier based on HAAR, LBP or HOG.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-07 06:36:52 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-08-06 05:14:04 -0500

Seen: 1,260 times

Last updated: Aug 07 '13