Haar Cascade to detect "ObjectX"

Discussion related to "under the hood" OpenMV topics.
aritra.rcc07
Posts: 6
Joined: Mon Oct 08, 2018 1:16 pm

Haar Cascade to detect "ObjectX"

Postby aritra.rcc07 » Mon Oct 08, 2018 10:50 pm

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.
User avatar
kwagyeman
Posts: 2462
Joined: Sun May 24, 2015 2:10 pm

Re: Haar Cascade to detect "ObjectX"

Postby kwagyeman » Mon Oct 08, 2018 11:52 pm

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.
Nyamekye,
aritra.rcc07
Posts: 6
Joined: Mon Oct 08, 2018 1:16 pm

Re: Haar Cascade to detect "ObjectX"

Postby aritra.rcc07 » Tue Oct 09, 2018 1:44 am

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,
Aritra
User avatar
kwagyeman
Posts: 2462
Joined: Sun May 24, 2015 2:10 pm

Re: Haar Cascade to detect "ObjectX"

Postby kwagyeman » Tue Oct 09, 2018 12:23 pm

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.
Nyamekye,
aritra.rcc07
Posts: 6
Joined: Mon Oct 08, 2018 1:16 pm

Re: Haar Cascade to detect "ObjectX"

Postby aritra.rcc07 » Tue Oct 09, 2018 9:38 pm

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?
User avatar
kwagyeman
Posts: 2462
Joined: Sun May 24, 2015 2:10 pm

Re: Haar Cascade to detect "ObjectX"

Postby kwagyeman » Tue Oct 09, 2018 10:33 pm

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.
Nyamekye,
aritra.rcc07
Posts: 6
Joined: Mon Oct 08, 2018 1:16 pm

Re: Haar Cascade to detect "ObjectX"

Postby aritra.rcc07 » Wed Oct 10, 2018 3:00 am

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.
Aritra
User avatar
kwagyeman
Posts: 2462
Joined: Sun May 24, 2015 2:10 pm

Re: Haar Cascade to detect "ObjectX"

Postby kwagyeman » Thu Oct 11, 2018 12:27 am

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

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests