You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using ByteTrack tracker with YOLOv8 for object tracking and have encountered the below ID-switching issues
ID Reassignment for overlapping objects:
When one object appears in place of another (occlusion or overlapping), the ID of the first object gets reassigned to the second object, and the first object gets a new ID.
ID Switch when objects pass each other:
IDs get swapped when two objects pass one another.
Current pseudo code for detection + tracking setup:
// initialize the ByteTrack tracker
byte_track::BYTETracker tracker(40, 30);
// preprocess the input frame
cv::Mat preprocessed_frame = preprocess_frame(input_frame);
// run YOLOv8 model for object detection
std::vector<Detections> detections = run_yolov8(preprocessed_frame);
// push the detections to bytetrack objects
std::vector<byte_track::Object> objects;
for (auto &det : detections) {
// Prepare bounding box and object for tracking
byte_track::Rect<float> rect(det.x, det.y, det.width, det.height);
byte_track::Object obj(rect, 0, det.confidence);
objects.push_back(obj);
}
// update tracker with objects
std::vector<std::shared_ptr<STrack>> tracked_objects = tracker.update(objects);
// Annotate the frame with tracking results
for (const auto &track : tracked_objects) {
auto rect = track->getRect();
draw_bounding_box_with_id(input_frame, rect, track->track_id_);
}
// display the annotated frame
return input_frame;`
Tried adjusting the tracker parameters, frame_rate, match_threshold, track_buffer, but did not solve the issue completely.
If anyone has faced similar issues or has any kind of insights into improving the tracking, I'd appreciate your insights.
Thank you.
The text was updated successfully, but these errors were encountered:
I've been using ByteTrack tracker with YOLOv8 for object tracking and have encountered the below ID-switching issues
ID Reassignment for overlapping objects:
When one object appears in place of another (occlusion or overlapping), the ID of the first object gets reassigned to the second object, and the first object gets a new ID.
ID Switch when objects pass each other:
IDs get swapped when two objects pass one another.
Current pseudo code for detection + tracking setup:
Tried adjusting the tracker parameters, frame_rate, match_threshold, track_buffer, but did not solve the issue completely.
If anyone has faced similar issues or has any kind of insights into improving the tracking, I'd appreciate your insights.
Thank you.
The text was updated successfully, but these errors were encountered: