ifzhang / ByteTrack

[ECCV 2022] ByteTrack: Multi-Object Tracking by Associating Every Detection Box
MIT License
4.46k stars 847 forks source link

DeepStream Multi-Class Tracking #314

Open mvidela31 opened 1 year ago

mvidela31 commented 1 year ago

Hi everyone,

I tried to perform multi-class tracking in DeepStream using the Byte-Track Integration with Deepstream and DeepStream-Yolo. However, when I tried to run a DeepStream application, the tracker element only tracked the first class (label=0) according to the detection algorithm (e.g., the class 'person' as it is the first class in DeepStream-Yolo/label.txt), completely ignoring the remaining classes. Unfortunately, it seems that ByteTrack doesn't currently support multi-class tracking (I found a ByteTrack extension that support multi-class tracking, however, it doesn't have a DeepStream deploy).

Is there a way to perform multi-class object tracking in DeepStream using ByteTrack as shown in the Byte-Track Integration with Deepstream example?

alt text

Many thanks.

0uterspaceguy commented 1 year ago

Hi everyone,

I tried to perform multi-class tracking in DeepStream using the Byte-Track Integration with Deepstream and DeepStream-Yolo. However, when I tried to run a DeepStream application, the tracker element only tracked the first class (label=0) according to the detection algorithm (e.g., the class 'person' as it is the first class in DeepStream-Yolo/label.txt), completely ignoring the remaining classes. Unfortunately, it seems that ByteTrack doesn't currently support multi-class tracking (I found a ByteTrack extension that support multi-class tracking, however, it doesn't have a DeepStream deploy).

Is there a way to perform multi-class object tracking in DeepStream using ByteTrack as shown in the Byte-Track Integration with Deepstream example?

alt text

Many thanks.

Just remove the condition here https://github.com/ifzhang/ByteTrack/blob/d1bf0191adff59bc8fcfeaa0b33d3d1642552a99/deploy/DeepStream/src/BYTETracker.cpp#L212

return track.associatedObjectIn != NULL && track.associatedObjectIn->classId == 0; like this return track.associatedObjectIn != NULL;

then rewrite this line

https://github.com/ifzhang/ByteTrack/blob/d1bf0191adff59bc8fcfeaa0b33d3d1642552a99/deploy/DeepStream/src/NvMOTContext.cpp#L39

trackedObj->classId = 0; like this: trackedObj->classId = sTrack.label;

colinleng commented 9 months ago

hello , i want to ask . if i have more than two models, how to use it . Or , how to get model id in code