using trainCascadeObjectDetector for online game
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
Im trying to create a code for online game that detects specific objects from the image by using xml that created by training cascade to detect it.
I used the following example to train: https://www.mathworks.com/help/vision/ref/traincascadeobjectdetector.html
I inserted around 40 positive images where in each one I used ROI tool and around 500 negative.
Image for example (grey rocks, the image was taken from google):
The results were very bad and I tried using different numbers of stages.
Is there any limitations to trainCascadeObjectDetector for detecting objects?
If not what might be the reason for detecting around 400 objects in the picture instead on 3?
Thank you
0 件のコメント
回答 (1 件)
Florian Morsch
2018 年 8 月 7 日
編集済み: Florian Morsch
2018 年 8 月 7 日
This depends on the object you want to detect, 40 pictures might not nearly be enough. Cascade object detector can only detect objects to a certain angle and the width to heigth ratio shouldnt vary so much. For good results with the object detector you should consider a lot more positive and a even more negative images. And even then it depends on the object you want to detect, if the object is only a few pixels you wont have a good chance to get it to work.
If you can attach a example picture and the object you want to detect it would be easier to see, if it can be done.
EDIT: Since you now have a picture attached: The cascade object detector is meant to detect objects which doesnt vary much in ratio. Since the objects you want to detect have a variable ratio you will have a hard time to do so. Also there are not many significant points which could different the objects, so to get a reliable detector you would need a lot of positives and negatives, and even then you could get false detections. (by a lot i mean like 5000 positiv and 30000 or more negatives).
You also might want to try a different feature, cascade object detector can work with Haar, LBP or HOG features. https://de.mathworks.com/help/vision/ug/train-a-cascade-object-detector.html
If you change the detection feature you might get better results.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!