corfyi / UCMCTrack

[AAAI 2024] UCMCTrack: Multi-Object Tracking with Uniform Camera Motion Compensation. UCMCTrack achieves SOTA on MOT17 using estimated camera parameters.
https://ojs.aaai.org/index.php/AAAI/article/download/28493/28960
MIT License
276 stars 26 forks source link

UCMCTrack in YOLOV8-OBB #33

Open yuanzd123 opened 3 months ago

yuanzd123 commented 3 months ago

Hello Kefu,

Thank you for your excellent paper, and this open source project. I really want to try it on my YOLOv8-OBB. However, with built-in tracker of the YOLO model, there are only two choice BOTSORT and BYTETRACK. I cannot find any instruction to integrate a custom tracker into YOLOv8. May you kindly provide some steps of using UCMCTrack+ in YOLOv8-OBB? Thank you! 中文的指引也可以,谢谢

currently I am using botsort to track:

model = YOLO("best.pt").to('cuda:0')
results = model.track(frame, persist=True, tracker="botsort.yaml", conf=0.691, iou=0.25)
if results[0].obb is not None:
            boxes = results[0].obb.xyxyxyxy.cpu().numpy()
            clss = results[0].obb.cls.cpu().tolist()
            track_ids = results[0].obb.id.int().cpu().tolist() if results[0].obb.id is not None else [None] * len(clss)
            confs = results[0].obb.conf.cpu().tolist()

            detections = []
            for box, cls, track_id, conf in zip(boxes, clss, track_ids, confs):
                # Process box data
                box = np.array(box).reshape(-1, 2)
                center_x = box[:, 0].mean()
                center_y = box[:, 1].mean()
                width = box[:, 0].max() - box[:, 0].min()
                height = box[:, 1].max() - box[:, 1].min()
                detections.append((int(center_x), int(center_y), int(width), int(height), int(cls), track_id, conf, box))

            frame = process_frame(frame, detections, track_ids)
        cv2.imshow("YOLOv10 OBB Detection", frame)
yuanzd123 commented 2 months ago

@corfyi Hello, can you provide some guidelines please? I would really appreciate