ByteTrack icon indicating copy to clipboard operation
ByteTrack copied to clipboard

DeepStream Multi-Class Tracking

Open mvidela31 opened this issue 2 years ago • 2 comments

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.

mvidela31 avatar Feb 17 '23 22:02 mvidela31

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;

0uterspaceguy avatar Mar 01 '23 10:03 0uterspaceguy

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

colinleng avatar Oct 07 '23 13:10 colinleng