Haar Cascade to detect "ObjectX"

Disclaimer: I am a newbie to openMV, taking baby steps but not afraid to make bigger strides.

My Objective is to detect ObjectX using the openMV Cam.

I am trying to understand the process of detecting random objects that has already been trained/available in OpenCV. I went thorough the docs & other forums but they did not provide much insights, so any help will be greatly appreciated. Imagine, there is a haar cascade written for ObjectX in github.

The docs mentioned : class image.HaarCascade(path[, stages=Auto])

Correct me if I am wrong, the path is the filepath to the SD card containing the ObjectX.xml. So all I need to do is copy and paste the xml file into the SD card and write its filepath into the argument and I am good to go. Is there anything else I need?

Looking forward to your help. Thanks a ton in advance.

Hi, we’re rolling out much better documentation and a bunch of example CNNs very soon for object detection. Haar Cascades will not be getting much support beyond face detection very soon.

Um, I’m almost done with the PR for the better documentation. I should finish I think by tonight for it. Check up on the OpenMV GitHub activity for when I push it.

Oh…Then I would need a little help here. I am trying to implement a project where in the camera is needed to detect the Changes in number of Car in a road. I am not fixated on the number but more on the change itself ( if change then Flag = True else False). I am trying to avoid Frame differentiation & that would be my last resort. Is there anyway I could achieve this? Any pointers would be of great help.

Thanks in advance,

I kinda understand what you want. But, it’s vague in the sense of what you want to happen given a scenario. Can you think about what in particular you want the camera to detect? CNNs classify images. So, unless you can break it down into something of that nature I can’t help you.

What I am basically trying to do is replace vehicle loop detectors. Vehicle loop detectors are those loops that you see on intersection and on your driveway. Imagine you live down an alley and the alley does not have much of a traffic, where as the road to which the alley merges (forms a T- intersection) has pretty heavy traffic. Suppose there is traffic light at the intersection. The problem I am trying to solve the problem where in the M7 detects prescence of car in the alley, stops the cross traffic and allows the car in the alley to merge on to the main road. This is my problem. Could you please help me out here?

I see, for this a CNN will be the best. You just need a training dataset of images taken from the position of where the camera is of a car being in the area and a car not being in the area.

Without collecting the training data this is very hard.

Oh ok. So how do I do that? Are there any documentation to help me train my own dataset in M7 or are there any tutorials available. Any pointers to where I can get that would be immensely helpful.

Thanks a lot in advance.

Yes, I will be updating it tonight and sending out an email blast. We finally got the last bug out.