eduardolundgren / tracking.js

A modern approach for Computer Vision on the web
http://trackingjs.com
Other
9.44k stars 1.45k forks source link

Face Detection - Eyes - Multiple detections #133

Open mokargas opened 8 years ago

mokargas commented 8 years ago

My familiarity with facial recognition is pretty low, so not sure if this is an issue with the library or my limited understanding.

I've run this picture through the exact same code as on the face detection page, and I get the eyes recognised twice. For what I want to do, I need at most one set of detections. How would I go about achieving this, given all images I wish to use are at the same position?

screen shot 2015-09-14 at 10 00 58

Also, if you have a tracker that tracks mouth, eyes and face, how can you determine which object is being rendered in the plot function? (ie if it's an eye, mouth etc). If I wanted to track these things separately, would I need a tracker for each object ?

thiago-rocha commented 8 years ago

This two rectangle matching the same object is a bug. What you can do to handle this problem is "join" these rectangle with a intercession area, you can create a new rectangle around or or choose one of these rectangles and ignore the other.

Sandersd commented 8 years ago

+1 for the second question Is there a way to track two things separately or to somehow get the matching object? i.e. I want to track the eyes and mouth but do one thing for the eyes and another for the mouth. I've tried using two separate trackers but it only seems to work for one at a time

eduardolundgren commented 8 years ago

@Sandersd Adding two separate trackers should work. I just looked the code and we could change tracking.js to add the information about the classifier on the result object, although it would cause an extra loop and potentially a small api change to keep the classifier type stored into the instance. It will be available on the next version.

rosariogueli commented 8 years ago

@eduardolundgren yes please, that would be great! I was trying to reverse engineer the library as I could not find this particular function in the documentation (and that is being able to get grouped sets of data by tracker type all in the same on track event callback), and I wasn't able to find it in the code either, so I came to the conclusion that this is not in the code yet. Do you know when the next release which will include this will be available? Thanks so much guys.

eliteproxy7 commented 7 years ago

anything on this?

BhavitChhatralia commented 5 years ago

@Sandersd Adding two separate trackers should work. I just looked the code and we could change tracking.js to add the information about the classifier on the result object, although it would cause an extra loop and potentially a small api change to keep the classifier type stored into the instance. It will be available on the next version.

Any news regarding this?