In this contest, in order to count number of cars in the video, I used Yolov4 to detect car’s location and send the corresponding bounding box to the tracker. I used Correlation tracker, which is in Dlib library, to track cars while the detection model isn’t running in a number of frames (it can help the program run slightly faster than running object detection on every frame). I used Centroid Tracker, which is based on euclidean distance, to give each car a specific ID and determine if it’s the same car from last frame in current frame. The Centroid Tracker will help the program avoid counting the same car again (if the yolov4 fails to detect cars in some frames, the tracker still keep their ID and wait for N frames after that. While in N frames, if the yolov4 detects that car again centroid tracker will re-assign the old ID to that car instead of assigning a new one). Rather than training the feature extractor on custom dataset in Deepsort, I used this simple approach. The Centroid Tracker will fail if there are objects that overlap each other but in this case, it gives pretty good result. If you like this project, please vote for me. Thank you.

Leave a Reply

Your email address will not be published.