12.07.2015 Views

Object Tracking and Face Recognition in Video Streams

Object Tracking and Face Recognition in Video Streams

Object Tracking and Face Recognition in Video Streams

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14 Chapter 3. Implementationstrict mode, Wawo only outputs the PID if the similarity is above a given threshold; it willotherwise output unknown. The threshold is a float<strong>in</strong>g-po<strong>in</strong>t number from 0 to 1.3.3 The reference implementationThe reference system performs two tasks: face detection <strong>and</strong> face identification. For eachframe, a set of faces is detected us<strong>in</strong>g OpenCV. Each face is identified us<strong>in</strong>g Wawo. Perform<strong>in</strong>gthe two tasks produces a set of face states that are reported immediately.3.4 Integrat<strong>in</strong>g <strong>Face</strong>clipThe <strong>Face</strong>clip <strong>in</strong>tegration was performed by replac<strong>in</strong>g the relevant calls to OpenCV with thecorrespond<strong>in</strong>g calls to <strong>Face</strong>clip.Us<strong>in</strong>g <strong>Face</strong>clip turned out not to be feasible when tra<strong>in</strong><strong>in</strong>g Wawo, as it found some falsefaces <strong>in</strong> the tra<strong>in</strong><strong>in</strong>g pictures. For this reason, the old detection code is still used for the<strong>in</strong>itial tra<strong>in</strong><strong>in</strong>g stage.3.5 Integrat<strong>in</strong>g object track<strong>in</strong>gIn this implementation, there are two components that may report face positions: the facedetector <strong>and</strong> the object tracker. The system also tries to identify faces detected by the facedetector, as <strong>in</strong> the reference implementation. This means that the output from the facedetector is both a position <strong>and</strong> a PID, while the output from the object tracker is just aposition.The implementation is based around face trajectories. The basic idea is that once theface detector has found a new face, the face detector <strong>and</strong> the object tracker together try tokeep track of that face <strong>in</strong> subsequent frames. Sav<strong>in</strong>g the face states to a s<strong>in</strong>gle trajectoryproduces a history of states for that face.When the face has been out of picture for some frames <strong>and</strong>/or at the end of the videostream, the trajectory will be amended <strong>and</strong> reported. States are dropped from the trajectoryonce they have been reported, <strong>and</strong> will therefore have no effect on future amendmentprocesses.Each trajectory has its own object tracker. The trajectory <strong>and</strong> the correspond<strong>in</strong>g trackerare used <strong>in</strong>terchangably <strong>in</strong> this report. When the detector f<strong>in</strong>ds a face that does not have atrajectory, both a trajectory <strong>and</strong> a tracker are created.A counter C pt counts how many times there has been a detection with PID p that hasoverlapped with the tracker t. This <strong>in</strong>cludes when the tracker is first created. Only def<strong>in</strong>edvalues of p are counted, i.e. not unknown.S<strong>in</strong>ce there are two components that may each f<strong>in</strong>d a set of face positions <strong>in</strong> a givenframe, the two sets must be comb<strong>in</strong>ed to give a mean<strong>in</strong>gful result. The procedure first f<strong>in</strong>dsthe set of overlapp<strong>in</strong>g positions, where a detection d overlaps with a tracker t. Each suchposition is added to the trajectory t, us<strong>in</strong>g the PID <strong>and</strong> exact coord<strong>in</strong>ates from d. Each t<strong>and</strong> d can occur <strong>in</strong> at most one such overlap. The tracker positions that did not overlapwith a detection are added to their respective trajectories, us<strong>in</strong>g the unknown PID.The detections that did not overlap with a tracker are saved, given certa<strong>in</strong> conditions.If the PID p is unknown, or if there is no C pt def<strong>in</strong>ed yet, a new trajectory is created, <strong>and</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!