my own cascade not detecting object?
i have 8 positives and 2100 negatives for that i creates sample for
1840 samples ...after that i created vec file....after that train my cascade all done well
but when i check my cascade its not even detecting object from image also....? any one knows wat is the problem
i am going to create cascade for that can detect one object(lock) for that one object this is enough positives from my opinion. ...i followed the following tutorial to create cascade "https://memememememememe.me/post/trai..."
use docs , not silly blogs, they're all lying.
Thanks....but...can u sugges me...how many samples i need to detect the object from real time...?
as many as you can get
Like @berak said, the ratio 8 - 2100 is simply terrible and will result in overfitting on those 8 samples. As you clearly saw, I already ignored the 1840 artificial samples, please stay away from that if you want a robust solution. I would say, go for 250-2100 ratio for a starter and see where that gets you!
hi all...
i have 32 positive image that contain my object and 900 negative pictures do not contain my object for that i am created sample for all the 32 positive , each positive contain 125 sample like wise 125 *32 =4000 sample file i created..
opencv_createsamples -img train/1.png \ -bg test_neg.txt \ -info sample_test/pos1.txt \ -num 125 -maxxangle 0.0 -maxyangle 0.0 \ -maxzangle 0.3 -bgcolor 255 -bgthresh 8 \ -w 20 -h 20 (1.png ,1.png,2.png........32.png)
after that i merged that all the positive text file to one main file for that i am created the vector file as follows opencv_createsamples \ -info sample_test/pos_test.txt \ -bg test_neg.txt \ -vec test_pos.vec \ -num 4000 -w 20 -h 20 with numpos 2500 numNeg 700 stil not getting out?
after that train the cascade
@StevenPuttemans For the 8 positive i created 1840 samples .....here we use sample file and neg file for the train what is the problem in it?
The
-maxxangle 0.0 -maxyangle 0.0 \ -maxzangle 0.3 -bgcolor 255 -bgthresh 8
create artificial samples that are in my opinion unrelated to real world samples and hence destroy the effectiveness of your classifier. That is why we suggest to use pure samples only. Again have a look at the official documentation and read it step by step!@StevenPuttemans from ur idea ....instead of creating artificial sample......v have to directly pos the original object file for the training right?
in that documentation heading "Positive Samples" said to create the artificial images using opencv_createsample command? here