Deepstream IOU

I am currently using DeepStream with the IOU tracking algorithm, and my detection model is YOLOv8. However, I have noticed frequent occurrences of tracking ID switching or inheritance in the inference results. Below are the relevant parameter settings for the IOU tracking algorithm:
BaseConfig:
minDetectorConfidence: 0 # If the confidence of a detector bbox is lower than this, then it won’t be considered for tracking

TargetManagement:
maxTargetsPerStream: 5000 # Max number of targets to track per stream. Recommended to set >10. Note: this value should account for the targets being tracked in shadow mode as well. Max value depends on the memory capacity

[Creation & Termination Policy]

minIouDiff4NewTarget: 0.4 # If the IOU between the newly detected object and any of the existing targets is higher than this threshold, this newly detected object will be discarded.
probationAge: 2 # If the target’s age exceeds this, the target will be considered to be valid.
maxShadowTrackingAge: 50 # Max length of shadow tracking. If the shadowTrackingAge exceeds this limit, the tracker will be terminated.
earlyTerminationAge: 15 # If the shadowTrackingAge reaches this threshold while in TENTATIVE period, the target will be terminated prematurely.

TrajectoryManagement:
useUniqueID: 0 # Use 64-bit long Unique ID when assignining tracker ID.

DataAssociator:
dataAssociatorType: 0 # the type of data associator among { DEFAULT= 0 }
associationMatcherType: 1 # the type of matching algorithm among { GREEDY=0, GLOBAL=1 }
checkClassMatch: 1 # If checked, only the same-class objects are associated with each other. Default: true

[Association Metric: Thresholds for valid candidates]

minMatchingScore4Overall: 0.0 # Min total score
minMatchingScore4SizeSimilarity: 0.0 # Min bbox size similarity score
minMatchingScore4Iou: 0.0 # Min IOU score

[Association Metric: Weights]

matchingScoreWeight4SizeSimilarity: 0.4 # Weight for the Size-similarity score
matchingScoreWeight4Iou: 0.6 # Weight for the IOU score

Could you please advise what might be causing this issue and suggest how I could optimize the parameters or the configuration to reduce these ID inconsistencies?

Thank you for your support!

Here is the comparisons and tradeoffs of nvtracker: Gst-nvtracker — DeepStream documentation. Can you have a try with /opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml?

Thank you for your recovery. I have tried NvDCF_comcuraty.yml under deepstream-6.0, and the effect is better than IOU. I have another question, why can’t I track the license plate of a moving vehicle? Whether I use IOU or NVDCF, it doesn’t work, but my detection model can detect it

Are you put nvtracker after the nvinfer which detect the license plate?

Yes, I have done it. Currently, I can track the license plate of the vehicle when it is stationary, but I can hardly track the license plate when it is in motion

Can you share video to show the issue? Which application are you using? Which model are you using?


This is my reasoning video. The detection model I used is YOLOv8n, and the tracking model is nvdcf. I have also tried the IOU tracking model, but it doesn’t work

Seems the YOLOv8n failed to detect the license plate when the car is moving as I can’t see bboxes on the license plate when the car is moving.


This is based solely on YOLOv8n for inference, and the license plate can be detected. However, with the addition of tracking, the license plate of a moving car cannot be detected

Can you have a try to set "probationAge: " to 0 in: /opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml? Is it possible to reproduce the issue with NV DeepStream samples?

Okay, I’ll try to modify it to 0. thank you