Issue with my train cascade

asked 2019-10-13 15:21:50 -0500

I have recently trained my own cascade classifier to detect bricks using the opencv traincascade application, following all the relevant steps. After the training, I took the generated cascade.xml file and put it in my code. The code gets stuck at the "detectMultiScale" function when it is called using the trained cascade (Using a video). When a test with other cascades like After the training, haarcascade_frontalface_default.xml or haarcascade_eye.xml it has no problem.

System information (version) OpenCV => 4.1.0 Operating System / Pla => Centos 7 Python 3.6

edit retag flag offensive close merge delete


own cascade classifier to detect bricks

that was already a broken idea, it won't work ever.

berak gravatar imageberak ( 2019-10-13 23:42:46 -0500 )edit

Why? The idea is to build a model in a brick factory that detects defective bricks. But first I need to generate a cascade to recognize the object it self

jpmoraga gravatar imagejpmoraga ( 2019-10-14 09:23:01 -0500 )edit

Hes referring to the technical idea how to solve this(brick detectionusing cascade classifiers). I read this - Its stated there "Instead of applying all 6000 features on a window, the features are grouped into different stages of classifiers and applied one-by-one". This sounds similar to the convolution step in a neuronal network. The thing is that 6000 Features is very very smalll number. In the end you will most likely have accuracy prolems.

The thing you want to do is called "object detection". Most likely using a CNN (Convolutionary Neuronal Network) like Tensorflow SSD or Yolo V3 (I know -- all these funny word) Check the dnn module for making predictions(training is not supported).

holger gravatar imageholger ( 2019-10-14 15:58:12 -0500 )edit

By the way dont feel down i also started there. Until i realized cascade classifiers are not the thing you want to use in modern times ^^ (again - use a neuronal network for object detection).

These things are not sooooo easy to learn and will take time. I can live from it now :-)

holger gravatar imageholger ( 2019-10-14 16:00:47 -0500 )edit