supervision icon indicating copy to clipboard operation
supervision copied to clipboard

Class ID 0 missing after using tracking

Open LintonAchmad opened this issue 1 year ago • 2 comments

Search before asking

  • [X] I have searched the Supervision issues and found no similar bug report.

Bug

I've noticed that class_id 0 gets removed after using update_with_detections .. I'm not sure what's going on.

Screenshot 2023-12-21 at 21 44 59

Environment

No response

Minimal Reproducible Example

import supervision as sv self.tracker = sv.ByteTrack()

def process_frame(self, frame: np.ndarray, frame_id, file_name): results = self.model( frame, verbose=False, conf=self.conf_threshold, iou=self.iou_threshold )[0] detections = sv.Detections.from_ultralytics(results) print(detections.class_id) detections = self.tracker.update_with_detections(detections) print(detections.class_id)

Additional

No response

Are you willing to submit a PR?

  • [ ] Yes I'd like to help by submitting a PR!

LintonAchmad avatar Dec 21 '23 19:12 LintonAchmad

mmm actually has something to do with confidence threshold. Why would that remove detections out though? Shouldn't the detections be kept?

LintonAchmad avatar Dec 21 '23 20:12 LintonAchmad

Hi, @LintonAchmad 👋🏻 ! Thanks for your interest in supervision. I am sorry that I have not been responsive for the last few days. Before Christmas, I was busy with duties unrelated to supervision, and I was off for the last few days.

I think this issue is unrelated to class ID, especially 0. We use people in most of our demos, and this class has ID = 0 in the COCO dataset. Our tracker is based on ByteTrack, and there is definitely some confidence filtering logic inside.

Could you share some information regarding the confidence values of detections that are being removed?

SkalskiP avatar Dec 28 '23 12:12 SkalskiP

@LintonAchmad, in case you would like to continue this conversation in the future, I'm converting this issue into a discussion and placing it in the QA section.

SkalskiP avatar Jan 26 '24 12:01 SkalskiP