Yolo face detection and tracking in video

I am using yolov11 for face detection in a video stream, followed by DeepSORT for tracking unique faces by assigning individual track IDs. For example, input video length is 10 seconds(~300 frames), frame 1 has person A with track id 1. Person A appears till frame 10 and re-appear in frame 13. Till frame 10 Person A has track id as 1 and then from frame 13 track id for Person A is 2. Is there any solution or alternatives available for this issue?

Hello! Thanks for reaching out with your question about face tracking.

While DeepSORT is a popular tracker, the ultralytics package offers integrated tracking functionalities using BoT-SORT (default) and ByteTrack, which might handle re-identification differently. You can use these directly with your YOLO11 model using the model.track() method.

When processing video streams frame by frame, ensure you use the persist=True argument with model.track(). This helps maintain track continuity between frames, as shown in the Persisting Tracks Loop example in our documentation.

You can find more details and examples on how to implement tracking with different configurations in the Multi-Object Tracking with Ultralytics YOLO documentation. This guide covers selecting trackers like ByteTrack and configuring tracking parameters.

Let us know if switching to the integrated trackers helps with your ID persistence issue!

This was shared on our Reddit community and might be helpful