Can you elaborate your answer? I wonder how the second approach works, a link to an implementation would be helpful.
back
1 comments
Yes, of course!
Essentially centroid tracking works like this:
1. Detect objects (e.g. using TensorFlow) in each video frame
2. Initialize an incrementing ID for each object at the first frame
3. Compute the centroid of each object 4. For each object:
4.1. Compute the Euclidean distance to every object centroid in the previous frame. The nearest object from the previous frame is the candidate assignment.
4.2.a) If the distance is less than a hand-set threshold, use the object from the previous frame's ID for the object in the current frame.
4.2.b) If the distance is above the threshold, assign a new ID
I explained it during my PyConZA keynote a few weeks ago. The vid isn't out yet but the slides are available here and it's much easier to explain visually: http://bit.ly/pycon_keynote_slidesFeel free to email me if you get stuck or need some help implementing it :)