<p>Although YOLOv4 can detect people in an image/video stream, I think it might be too general in your case. When a person leaves the frame and comes back, ideally the model should remember seeing that person before.</p>
<p>One way to tackle this is to train on images of the people you want to detect.</p>
<p>E.g. in a system like yours, you could take multiple images of the people you want to track from different angles and label them using their unique identifiers. Afterwards you could train the model using this data (for your downstream task). This will ideally give more specific results for detecting and tracking people with their unique identifiers as opposed to the general people detection when using YOLOv4 as is..</p>
<p>That said, I understand that taking lots of images of people may not be practical in certain scenarios. In that case you may want to look at techniques that produce accurate results with minimal data such as domain adaptation (<a href="https://arxiv.org/abs/1812.11806" rel="nofollow noreferrer">https://arxiv.org/abs/1812.11806</a>). However in an application for tracking and detecting people, I'm assuming you want minimal misclassifications.. Hence you could say it's always a tradeoff.</p>
<p>You can find out more about dealing with lack of data in this article: (<a href="https://www.kdnuggets.com/2019/06/5-ways-lack-data-machine-learning.html" rel="nofollow noreferrer">https://www.kdnuggets.com/2019/06/5-ways-lack-data-machine-learning.html</a>)</p>
<p>However I think this is a better place to start for a re-identification model: (<a href="https://github.com/KaiyangZhou/deep-person-reid" rel="nofollow noreferrer">https://github.com/KaiyangZhou/deep-person-reid</a>)
It has ample documentation to get you started..</p>
How to create a people tracking with reidentification model?
<p>I am currently working on a project where I want to build a model which can detect and track people with a unique ID. The main issue is when a person leaves the frame and comes back after some time. Currently, I am working with yolov4 and Deepsort to detect and track. But it is failing in this situation.</p>
<p>Please suggest some approach where we can do detection, reidentification and tracking of people or cars or any other object.</p>
<p>Thank you :)</p>