Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is not easy to say for sure what is wrong with the cascade you built. Here are some questions that might help you fix the issue. (1) Is the star in the search image /test image roughly the same size as the star in the positive set? I think the boosted cascade is only good until certain amount of scaling. Try making the star in your test image the same size as the stars in your training set. (2) Try fewer cascade stages when training your cascade. You should get a result where you see a lot of "false positive" detections in your test image. If you see this, then you can start increasing the number of stages. Now you should see some false detections vanish. (3) Try to place the star on one of your negative images and see what you get. (4) Boosting is good when you train it properly. The negative images are important too. It is good if they should represent the negative instances you are likely to come across in your test set.

I have not used createsamples to generate positive samples automatically (with the -img option). I have used manually marked positive samples (-info option). I would try creating a positive set of 20-30 stars by hand and then creating a vec file using -info option. http://docs.opencv.org/doc/user_guide/ug_traincascade.html#positive-samples

I would not suggest using haartraining. train_cascade is the new version of training and should give you the same results as haartraining, but with more options for improving.

It is not easy to say for sure what is wrong with the cascade you built. Here are some questions that might help you fix the issue. (1) Is the star in the search image /test image roughly the same size as the star in the positive set? I think the boosted cascade is only good until certain amount of scaling. Try making the star in your test image the same size as the stars in your training set. (2) Try fewer cascade stages when training your cascade. You should get a result where you see a lot of "false positive" detections in your test image. If you see this, then you can start increasing the number of stages. Now you should see some false detections vanish. (3) Try For testing, try to place the star on one of your negative images (instead of a white background) and see what you get. get as results. (4) Boosting is good when you train it properly. The negative images are important too. It is good if they should represent the negative instances you are likely to come across in your test set.

I have not used createsamples to generate positive samples automatically (with the -img option). I have used manually marked positive samples (-info option). I would try creating a positive set of 20-30 stars by hand and then creating a vec file using -info option. http://docs.opencv.org/doc/user_guide/ug_traincascade.html#positive-samples

I would not suggest using haartraining. train_cascade is the new version of training and should give you the same results as haartraining, but with more options for improving.

Boosting is great when the object does not change much in appearance. It should certainly work for logos on a piece of paper. Whether it will work for logos that are seen from different angles or not is questionable. Boosting also needs lots of training data (both positive and negative) to do a good job. It is certainly a good algorithm that is worth pursuing. It works, as many face detection researchers will tell you.