change random choice of background images for the 'opencv_createsamples' command [closed]
I'm creating samples from multiple images of the thing I'm trying to detect. I have 54 images of that object, and 10,000 background images. When I run the 'opencv_createsamples' command, it chooses 'random' images from the set of background images (negatives) that I have.
My problem is that on running this command multiple times it always chooses the same 'random' background images to overlay the sample on.
I'm assuming that there is a parameter for the RNG that I can change... if so, how do I do this? If not... how can I change this behaviour?
you're obviously trying to "synthesize" positive images here. don't do that, it will never lead to a good classifier. for real world problems, you need real world images, and tons of them, 54 simply are not enough.
also note, that the whole cascade based object detection is deprecated, and current opencv does no more have those tools to train it.
Thanks for your advice. Given that this functionality is deprecated, what should I be looking into instead to train and use a model with opencv? I'm using Python 3.6 on a Windows 10 machine. In my searching I've only found information pointing towards cascade based detection.
WHAT are you trying to detect ?
is there any chance, you can get more images ?
I'm trying to detect fish, multiple species. I do have 700 pictures with fish in them, from the 'Open Images v4' dataset. The fish are of various sizes and locations and numbers though.
yea, then cascades are the wrong idea anyway. (they don't handle variations in shape or pose nicely.)
probably re-training an existing object detection cnn, like SSD-mobilenet might be a better idea.
Alright, thanks, I'll check that out. I appreciate your help :)