Image preparation for haartraining - correct method
I think the previous question I asked has been forgotten about, so re-posting here:
link to original thread: http://answers.opencv.org/question/23307/correct-image-preparation-for-haartraining/
My final comment/question relating to this:
Hi - OK - I removed the negative description file from the create samples stage and then did another training session. It went very quickly and the result is even worse - no detection at all. Here is link to terminal output: https://www.dropbox.com/s/6hkz6fzja3g2lcn/Traininattempt.rtf Please let me know if you see anything strange? If not, perhaps you can assist by telling me a better way to prepare images that I may not be aware of. Thanks in advance.
Please can anyone advise me?
Which are the rest of your parameters?
The link to the terminal output shows my parameters. Pls have a look and if you see anything strange pls comment. Tks
I'll give it a look later
@ Median - have you perhaps had a chance to have a look at the terminal export? Pls let me know - tks!
I am really not sure what might be wrong. I can tell you that I twisted my nose at your detection window size. I tried to train a non-square detection windowed cascaded classifier but never had success. One thing you could try is to run this command /opencv-createsamples -vec vecfile.vec -show to check if everything is OK with your positive samples in the vecfile. One thing that can be happening is that the positive samples are all twisted and the classifier can achieve the parameters you specified very early in the training, thus ending quickly. Also, are you running a 64-bit version of the haarclassifier? If not, there is no use in setting memory as 4000 RAM, since 32--bit applications only go as far as 2GB.
Tks for your reply. I have included a link to a screen grab of the bounding box stage in the process to help clarify how I am doing that stage. How does one actually do this for fingers then if you take into consideration what you suggest that it should be "non-square"? Bounding the entire hand would be contrary to my intentions and making a square bounding box seems difficult, unless I create images of only ONE finger?
https://www.dropbox.com/s/6eet0sfgmlhszt0/Boundingbox.png
Opening the .vec file does show each finger as bound in the bounding stage correctly. I hope I don't need to collect 1000's of different finger shots. Here I am using 4 different hands, each filmed for about 20-30s and frames extracted as images.
Think I have 64 Bit version installed - will check later
Well, obviously a non-square detection window will not work for you. Do one thing: open your task manager before start training the classifier. Then run the command to start training and go to the task manager and check how the memory usage going up. A 70170 detection window probably needs a LOT of memory. I know that a 7070 DW needs around 2 GB.
It climbed progressively over the last 6 minutes from just under 1 GB usage to 5,45 GB and then stopped climbing, with fluctuation between the upper limit and 5,31 GB so far...
well, that makes sense, it i weird that the application allows more than 2 GB of RAM, it probably is 64-bit already
I've left it training now in this session and then will test the classifier's xml output as soon as it is finished and re-post a comment to let you know if the accuracy is different from the previous attempt.
BTW - I checked - it is 64-BIT application
In the meantime, if you can think of any other reason why this was not accurate let me know. Tks