Prevent detecting object inside object

asked 2018-02-28 21:04:45 -0500

pedrorissato gravatar image

Hello there!

I trained a model to detect a kiss inside a face, it's not finished yet. As most of us, when the kiss is found i draw a square/rectangle around it.

But i'm facing a problem, sometimes when it detects the kiss in the picture or even live webcam, it draws another square/tectangle around it, making it double on same site, like the same object is being recognized two times.

Is there a way to prevent that, without changing dectecMultiScale parameters? The problem is that i usually change minNeighbors to prevent this "same object double detection", raising it's value, but, when i do that, other pics that were being recognized before, won't be anymore.

edit retag flag offensive close merge delete

Comments

why not detech the live image and draw the result on the image.clone()?

jsxyhelu gravatar imagejsxyhelu ( 2018-03-01 02:14:01 -0500 )edit

You need to apply Non-Maximum Suppression after the detection as mentioned [here] (https://www.pyimagesearch.com/2014/11...)

Balaji R gravatar imageBalaji R ( 2018-03-01 03:01:50 -0500 )edit