1 | initial version |
Actually what happens is quite normal. Using such a large large resolution (w and h parameters), is actually not possible with the OpenCV implementation. Internally it stores all the integral images for the different scales of the scale pyramid, which would grow exponentially large with larger resolution.
Try to reduce your sample set to a smaller size, take for example a 10x smaller resolution and then just rescale your input data to match that. The size of your model only defines the smallest possible object that can be detected, not the larger ones, since these can be easily downsampled.
Another note, please do not use the createsamples tool for anything else than grouping input images. The tool creates unrealistic data, which results in training images that are actually impossible. It is better to get a training set of real images covering all possible situations that your number plate can be in. Yes this can be a quite exhaustive work, knowing that good numberplate detectors are easily trained on datasets with 100.000 images!
Also, creating a detector with 200 stages (not that it will ever reach there) is basically insane. It would take ages to go through all these stages just to say if a patch is a possible detection candidate.
I think you should look deeper into the traincascade documentation, search around on this forum a bit (since there have been TONS of topics before you discussing this) and try to get a feeling with correct parameters.