Is Haar cascade classifier suitable for bottle label detection?

asked 2019-09-19 07:10:02 -0500

dkprog gravatar image

Can OpenCV's Haar feature-based cascade classifiers be trained to detect labels in the bottle's body?

I've been struggling to create my own detector heuristically by using edge detectors such as Canny, Sobel, Laplacian and HED.

But I've found that a bottle's labels isn't so trivial to describe by its edges as I have imagined, neither I can trust edge detectors since most of them is dependent upon hysteresis thresholding values.

image description

image description

So I was wondering whether I should try another approach using Haar cascade.

I have never trained a Haar classifier by myself. I've been told that it might work well for blocky objects.

How many positives and negatives samples do I need?

edit retag flag offensive close merge delete

Comments

I doubt it even if you want to detect (and not recognize) them. I think there are just too many different bottles and labels. Especially labels can look like virtually anything. Deep networks would do it better, but still you would need many images (I don't know how many - 10 per bottle for a start?)

Witek gravatar imageWitek ( 2019-09-19 11:38:55 -0500 )edit

I agree that haarcascade most likely wont perform well. A common formula i use for neuronal networks is classes * 2000 images as data basis.

But keep in mind that these images should represent different : rotations, object sizes, lumination, backgrounds. So just copy one image 2000 times wont work well :-)

holger gravatar imageholger ( 2019-09-19 16:26:02 -0500 )edit