ifzhang / ByteTrack

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

Need help with API / How to get id of bbox? #420

Open ViktorPavlovA opened 2 months ago

ViktorPavlovA commented 2 months ago

My test code looks like this:

include

include

include

include <Eigen/Dense>

include "BYTETracker.h"

int main() { BYTETracker tracker;

Eigen::MatrixXf detections(3, 5); detections << 10, 10, 20, 20, 0.9, 30, 30, 40, 40, 0.8, 50, 50, 60, 60, 0.7; std::vector tracked_objects = tracker.process_frame_detections(detections);

for (size_t i = 0; i < tracked_objects.size(); i++){ auto tlwh = tracked_objects[i].tlwh(); auto track_id = tracked_objects[i].track_id; std::cout << "tlwh:" << tlwh<< std::endl; std::cout << "Track_id:" << track_id << std::endl;

}

return 0; }