Ask Your Question

Revision history [back]

How to train more accurate Haar Cascades?

I'm developing an app which detects plagues on the agave, and also detects some fungus in microscopic view, such as Fusarium Oxysporum. So, I want to detect small objects as you see (insects and fungus in microscopic view), and I would like to read some advice.

I've created one haar cascade to detect Fusarium Oxysporum, following Sentdex tutorial: https://pythonprogramming.net/haar-cascade-object-detection-python-opencv-tutorial/ but I didn't get good results... it sometimes detects objects in the background, or simply doesn't recognize the object which is supossed to detect.

1.- I've trained it with 17 stages, and with 4000 positive images, and 2000 negative, take into consideration that I only had 18 original positive images, so I created 4000 using create_samples, and I resize negative images to 100x100, and positives to 50x50.

2.-At the moment I used create_samples, I put -w 20 -h 20, and I'm not sure if I should've use higher values

Thank you all :) sorry if some parts are not understandable, I'm still learning English