ultralytics / ultralytics

Ultralytics YOLO11 🚀
https://docs.ultralytics.com
GNU Affero General Public License v3.0
32.65k stars 6.29k forks source link

How do you combine yolov8 with tracking algorithms other than botsort and bytetrack? #14477

Open lmaple24327 opened 4 months ago

lmaple24327 commented 4 months ago

Search before asking

Question

yolov8 currently integrates botsort and bytetrack internally, but my latest project needs to be combined with other tracking algorithms. How should I combine with other tracking algorithms?

Additional

No response

github-actions[bot] commented 4 months ago

👋 Hello @lmaple24327, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

Y-T-G commented 4 months ago

That would depend on the tracker and their API. Usually they provide a way to pass the bounding boxes and then they return it with the track ids.

lmaple24327 commented 4 months ago

That would depend on the tracker and their API. Usually they provide a way to pass the bounding boxes and then they return it with the track ids.

Could you please provide a detailed answer?

pderrenger commented 4 months ago

@lmaple24327 certainly! To integrate YOLOv8 with other tracking algorithms, you typically need to extract the bounding boxes from YOLOv8's output and pass them to the tracking algorithm's API. The tracker will then return the bounding boxes with unique track IDs. Each tracker has its own method for handling this, so you'll need to refer to the specific tracker's documentation for precise implementation details. If you need further assistance with a specific tracker, feel free to ask!

lmaple24327 commented 4 months ago

@lmaple24327 certainly! To integrate YOLOv8 with other tracking algorithms, you typically need to extract the bounding boxes from YOLOv8's output and pass them to the tracking algorithm's API. The tracker will then return the bounding boxes with unique track IDs. Each tracker has its own method for handling this, so you'll need to refer to the specific tracker's documentation for precise implementation details. If you need further assistance with a specific tracker, feel free to ask!

I want to combine yolov8 algorithm with OCSORT tracking algorithm, but yolov8 is set to only support botsort and bytetrack, and errors will be reported when combined with ocsort. Could you please give me some specific solutions, such as modifying what files inside the ultralytics code can solve the problem.

pderrenger commented 4 months ago

To integrate YOLOv8 with OCSORT, you'll need to modify the Ultralytics code to include OCSORT as a supported tracker. This involves adding OCSORT to the list of available trackers and ensuring that the bounding boxes from YOLOv8 are correctly passed to OCSORT. You can start by looking into the trackers directory and adding a configuration file for OCSORT similar to the existing ones for BoT-SORT and ByteTrack. Additionally, you'll need to update the main tracking script to recognize and handle OCSORT. If you encounter specific issues or need further guidance on modifying the code, feel free to ask!

lmaple24327 commented 4 months ago

To integrate YOLOv8 with OCSORT, you'll need to modify the Ultralytics code to include OCSORT as a supported tracker. This involves adding OCSORT to the list of available trackers and ensuring that the bounding boxes from YOLOv8 are correctly passed to OCSORT. You can start by looking into the directory and adding a configuration file for OCSORT similar to the existing ones for BoT-SORT and ByteTrack. Additionally, you'll need to update the main tracking script to recognize and handle OCSORT. If you encounter specific issues or need further guidance on modifying the code, feel free to ask!trackers

Thank you very much for your reply. I will try it according to your advice first. If there are any problems later, I may need your further help.

pderrenger commented 4 months ago

You're welcome! Feel free to reach out if you encounter any issues or need further assistance with integrating OCSORT. Good luck with your project!

lmaple24327 commented 4 months ago

You're welcome! Feel free to reach out if you encounter any issues or need further assistance with integrating OCSORT. Good luck with your project!

Could you please provide your email address? Can I send you an email to communicate with you? In this way, I can timely consult you about my current problems, but it will take up your precious time. Thank you very much and thank you for your kind reply.

pderrenger commented 4 months ago

@lmaple24327 i'm glad to hear you're making progress! For support, please continue to use this GitHub thread. This ensures that all information is shared with the community and can help others facing similar issues. Feel free to ask any further questions here, and I'll be happy to assist you.

StephenZhao1 commented 3 weeks ago

@lmaple24327 i'm glad to hear you're making progress! For support, please continue to use this GitHub thread. This ensures that all information is shared with the community and can help others facing similar issues. Feel free to ask any further questions here, and I'll be happy to assist you.

I use bytetrack author's cpp code, then find the box is very wide totally different from the detection results.But in ultralytics tracking method, bytetrack object positions is the same as detections postions. why was that?