Is it possible to restart HaarTraining using previous data folder?

asked 2013-06-05 01:10:13 -0600

vinayverma gravatar image

Well I can clearly see in the Haartraining documentation that if it is interrupted, it has to be started from stage 0 again. However, by mistake when I re-started my HaarTraining, I forgot to change the data folder name, and the training actually got started from stage 20 (the previous data folder already had training data upto 19 stages).

Now the question is, if I continue that training would the classifier be usable or I am wasting time and should restart training with new data folder with stage 0.

edit retag flag offensive close merge delete



imho, that's ok. should be no problem stopping / restarting it.

where did you read, that you have to restart from 0 ?

berak gravatar imageberak ( 2013-06-05 01:18:24 -0600 )edit

Thanks Berak. My bad. I mis-interpreted the following:

"opencv_haartraining can not load (import) a classifier in another format for the futher training after interruption"

One more thing, can we add more negatives and change the negatives collection file and restart the training too?

vinayverma gravatar imagevinayverma ( 2013-06-05 02:12:56 -0600 )edit

not really sure, but probably not (same for tweaking other params in the midrun)

berak gravatar imageberak ( 2013-06-05 02:33:33 -0600 )edit

You can adapt the amount of training data when needed, even in between stages, only that's not recommended, since you are actually changing your conditions that define the stage classifiers. On a side note, when restarting a process, I always delete the last stage. Basically something went wrong there and you do not want a classifier that crashes due some stupid errors. It saves you the processing time of all previous stages however!

StevenPuttemans gravatar imageStevenPuttemans ( 2013-06-05 02:43:42 -0600 )edit

Thanks Steven. It means if my training is hung (in my case mostly due to in-adequate negative files) I can add/change negative files, change nneg parameter, delete the last stage data and start the training again?

vinayverma gravatar imagevinayverma ( 2013-06-05 05:01:42 -0600 )edit

yes that is exactly what you can do. However, I think it is better to decide wisely on how to create your negative set and lower the number of negatives. Adding negatives will have a much smaller influence than adding positives I guess.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-06-05 05:49:51 -0600 )edit

Hi Steven, You are right. Adding negatives and restarting the training does not improve it much. Can we change the positives as well while restarting the training?

vinayverma gravatar imagevinayverma ( 2013-06-27 01:09:45 -0600 )edit

Yes in fact you can, but I have no exact idea if it is a good choice. I think you should restart the complete training, since the first stages will definately react different on the new positive data set.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-06-28 02:48:12 -0600 )edit