Smorodov / Multitarget-tracker

Multiple Object Tracker, Based on Hungarian algorithm + Kalman filter.
Apache License 2.0
2.19k stars 651 forks source link

The position of the tracking box and the target does not match #282

Open one-cai-ji opened 3 years ago

one-cai-ji commented 3 years ago

1

Hi, I used my training weight to replace the weight in the carscounting example, but the position deviation between the tracking box and the target object is large, and It performed well when using yolov4 (Darknet) detection. What can I do to improve the corresponding relationship between the tracking box and the target object

Nuzhny007 commented 3 years ago

Hi! Do you can show a small video with detection and tracking that I will understand the problem? The first idea - changing Kalman filter settings but I don't sure.

one-cai-ji commented 3 years ago

Hi, I updated the video demo of detection and tracking

https://user-images.githubusercontent.com/63446384/104865835-07fe8380-5978-11eb-856d-df806ebc246c.mp4

https://user-images.githubusercontent.com/63446384/104866208-f23d8e00-5978-11eb-90a3-4e237c78b4d0.mp4

Nuzhny007 commented 3 years ago

hm, it need some experiments....

  1. Try to increase dt parameter in Kalman Filter: settings.m_dt = 0.4f; // Delta time for Kalman filter

  2. Change IsRobust criteria: if (track.IsRobust(cvRound(2), // Minimal trajectory size 0.5f, // Minimal ratio raw_trajectory_points / trajectory_lenght cv::Size2f(0.1f, 8.0f))

one-cai-ji commented 3 years ago

Hi, can I use real-time video captured by camera instead of local video

Nuzhny007 commented 3 years ago

Yes. Just set ip-address or web camera index instead path to video file

one-cai-ji commented 3 years ago

Your reply has helped me a lot. I want to change the weight and configuration file in CarCounting to yolov4tiny version. However, there is an error in CreateDetector. What can I do to solve this problem

one-cai-ji commented 3 years ago

sorry,I found It is my problem. The problem caused by one more space in the modified path ,it is not the source code problem

one-cai-ji commented 3 years ago

Hello, I try to use the algorithm to test the video. The algorithm performs well for objects with low density, but for objects with high density, the matching error rate is very high. What can I do to improve this phenomenon

Nuzhny007 commented 3 years ago

So, detector works good but the tracker can't work accuracy? The objects ids "jumping" from one object to another when objects are occluded?

one-cai-ji commented 3 years ago

t d I uploaded two images, as shown in the picture. I think the detector works well, but some targets with more overlapped are not tracked

Nuzhny007 commented 3 years ago

A classic way to resolve this problem - using re-identification. For example DeepSORT or any similar. So are some pretrained models for faces or pedestrians or vehicles. In this project this case can work with model from OpenVINO: https://github.com/Smorodov/Multitarget-tracker/blob/master/example/examples.h#L683 We add model for calculate embeddings and set object type: m_trackerSettings.m_embeddings.emplace_back(...) I'm tested this code for pedestrians and vehicles. But I don't sure how this approach will work for fishes. And you need train re-id model for fishes...

May be we can use visual objects tracker on each frame for more robust tracking. So I'll write test for this case in the coming days.