Train haar cascade using all images [closed]
Hi,
I've downloaded and edited a lot of images. Currently I have about 70k face images and 70k non-face images. The training I'm going to do is described here: link text
I decided to use the above method as the standard opencv documentation requires vec files. The face images I have are already cropped, so I skipped the annotation step and thus no vec files were created.
In the parameters, you need to specifiy the amount of positive samples and the amount of negatives. What does this say? Should I denote 70k for those two parameters or more/less?
What's the impact of these parameters? I'd appreciate any explanation and tips for training.
Thanks in advance.
please do not use outdated, 3rd party advice on this, but official docs
(and in general, if there will be any variation of what you're trying to detect in the real world -- forget about "synthesizing" positives at all)
btw, what is it, youre trying to find ? (is the idea of using a cascade classifier even feasible ?)
Thanks for your answer. The reason I stick to the outdated 3rd party is that the official documentation doesn't mention how to work with already cropped images. I tried the createsamples.exe as followed:
"opencv_createsamples.exe -vec samples -info X:\pics\positives.txt -bg X:\pics\negatives.txt -num 5000 -...." but its giving following error: "X:\pics\positives.txt(1) : parse errorDone. Created 0 samples" I want to detect faces. In my opinion, the face detector coming with the opencv installation is not really reliant. Currently I'm working on a seminar and I want to improve the face detection for real life scenarios, side-face views included.
Edit: I will write a short Java program to load the images and create a *.dat file, substracting 1 from x,y,width and height.
sure, ok with faces.
what's the reason for "substracting 1 from x,y,width and height." ? assuming, your images are already cropped to 24x24, your info file should have lines like:
" I want to improve the face detection for real life scenarios, side-face views included." -- mixing front and side views might be a bad idea. it's not the "same pattern"
Youre right in both arguments. My idea was to create a robust classifier as using multiple classifiers reduce the performance dramatically. Robust due to face rotation (frontal to total right or left view) and anything in between. I don't know if it would work out though. Maybe I should use some heuristic tools to improve face detection like extracting the skin color and track these colours although it doesn't appear to me as a robust addition (because of lightning changes)