Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCMCTrack in YOLOV8-OBB #33

Open
yuanzd123 opened this issue Aug 2, 2024 · 1 comment
Open

UCMCTrack in YOLOV8-OBB #33

yuanzd123 opened this issue Aug 2, 2024 · 1 comment

Comments

@yuanzd123
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant