supervision
supervision copied to clipboard
Class ID 0 missing after using tracking
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.
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!
mmm actually has something to do with confidence threshold. Why would that remove detections out though? Shouldn't the detections be kept?
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?
@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.