How to draw a path of a moving object?

Hi all,

Recently I have been looking to build a model to feed in a video stream and draw a path of moving objects (say walking pedestrians). Detecting an object on a single frame is not a problem but in order to draw a path I don’t know whether it is the right approach to process a frame by frame and draw the lines that connect the rectangles for each object on neighboring frames or is there any better approach.

A long time ago I came across Zdenek Kalal’s algorithm but as the field is evolving very fast I don’t know if it makes sense to combine this approach with object detection. Anyway, for single object tracking I think it would be enough to just use object detection and draw the line that connects the centers of bounding boxes on each frame, but in case of multiple objects, I think there are some edge cases that require different approach (for example if two bounding boxes are overlapped, how to avoid possible path switching).

If anyone worked on any similar task or came across any resource related to motion path analysis, I would be glad if you could share any guidelines or resources.

Best regards,