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

How to improve the accuracy of yolov8-obb in detecting large targets #12785

Open
1 task done
kyoryuuu opened this issue May 18, 2024 · 2 comments
Open
1 task done

How to improve the accuracy of yolov8-obb in detecting large targets #12785

kyoryuuu opened this issue May 18, 2024 · 2 comments
Labels
question Further information is requested

Comments

@kyoryuuu
Copy link

Search before asking

Question

I tried to train yolov8-obb with a dataset that has 2500 images with both large and small targets in the dataset. But when I was trying to detect a 30,0005600 target in an image with a resolution of 35,00015,000 the target was detected as small ones. How can I fix it?
image

Additional

No response

@kyoryuuu kyoryuuu added the question Further information is requested label May 18, 2024
Copy link

👋 Hello @kyoryuuu, 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.

@kyoryuuu kyoryuuu reopened this May 18, 2024
@glenn-jocher
Copy link
Member

@kyoryuuu hello! It sounds like you're facing an issue with detecting large targets using YOLOv8-obb. Here are a couple of suggestions that might help improve the detection accuracy for large objects:

  1. Increase the Input Image Size: When training your model, consider increasing the imgsz parameter to a higher resolution. This allows the model to better capture the details of larger objects. For example, you could try setting imgsz=1280 or higher, depending on your GPU capabilities.

  2. Adjust Anchor Boxes: If the predefined anchor boxes are too small for your large targets, consider customizing them. You can use the autoanchor feature to recalibrate anchors based on your specific dataset.

  3. Data Augmentation: Enhance your training dataset with augmentation techniques that focus on large objects, such as random scaling and cropping in ways that retain the integrity of larger objects.

  4. Fine-tuning: If you started with a pretrained model, ensure that you fine-tune it on a dataset that includes representative examples of the large targets.

Here's an example of how you might adjust your training command:

yolo obb train data=your_dataset.yaml model=yolov8n-obb.pt epochs=100 imgsz=1280 autoanchor=true

These adjustments should help the model better learn and detect large-scale objects. Let us know how it goes! 🚀

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

No branches or pull requests

2 participants