ultralytics / ultralytics

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

'yolov8n-obb.yaml' does not exist #5183

Closed Yousra442-sheikh closed 1 year ago

Yousra442-sheikh commented 1 year ago

Search before asking

YOLOv8 Component

No response

Bug

I am working on dota2 dataset and facing this issue : FileNotFoundError: 'yolov8n-obb.yaml' does not exist

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 year ago

👋 Hello @Yousra442-sheikh, thank you for your interest in YOLOv8 🚀! We recommend a visit to the YOLOv8 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.

glenn-jocher commented 1 year ago

@Yousra442-sheikh thank you for bringing this issue to our attention and for your willingness to contribute to the YOLOv8 project.

Based on the error you've posted, it seems like the file 'yolov8n-obb.yaml' doesn't exist in your current directory. This YAML file is typically used for model configuration, and the 'FileNotFoundError' indicates that the program can't locate this file in the specified path.

To fix this issue, please ensure the following:

  1. Check that the file 'yolov8n-obb.yaml' actually exists in your working directory.

  2. If the file exists, confirm that the filename is correctly spelled and matches exactly what is used in your script. Remember, filenames are case sensitive.

  3. Verify the provided path in your script or command. If 'yolov8n-obb.yaml' is not in the same location as your script, you need to provide the full path to the file.

I hope these suggestions assist you in resolving this issue. If these checks don't solve your problem or if you face any other issues, please do not hesitate to describe them here along with any changes you made to our recommended solutions. We appreciate your contribution to the project!

RizwanMunawar commented 1 year ago

@Yousra442-sheikh, thank you for the information. It appears that the yolov8n-obb.yaml file is not present in your current working directory. To resolve this, you can follow these steps:

Step 1: Copy the provided YAML content:

# Ultralytics YOLO 🚀, AGPL-3.0 license
# DOTA 2.0 dataset https://captain-whu.github.io/DOTA/index.html for 
# object detection in aerial images by Wuhan University
# Example usage: yolo train model=yolov8n-obb.pt data=DOTAv2.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── dota2  ← downloads here (2GB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) 
# list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/DOTAv2  # dataset root dir
train: images/train  # train images (relative to 'path') 1411 images
val: images/val  # val images (relative to 'path') 458 images
test: images/test  # test images (optional) 937 images

# Classes for DOTA 2.0
names:
  0: plane
  1: ship
  2: storage tank
  3: baseball diamond
  4: tennis court
  5: basketball court
  6: ground track field
  7: harbor
  8: bridge
  9: large vehicle
  10: small vehicle
  11: helicopter
  12: roundabout
  13: soccer ball field
  14: swimming pool
  15: container crane
  16: airport
  17: helipad

# Download script/URL (optional)
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/DOTAv2.zip

Step 2: Save the copied content as a YAML file named "yolov8n-obb.yaml" in your working directory.

Step 3: After saving the file, you can proceed with running the DOTAv2 training using this newly created YAML file.

This should help you set up the necessary configuration for your training. If you encounter any further issues or have additional questions, please feel free to ask.

Thanks

Yousra442-sheikh commented 1 year ago

@RizwanMunawar I followed all these steps but still not working can you please explain me more how I can train my model. On simple yolov8 my notebook is working but my I am working on dota 2.0 and it contains obb annotations and yolo doesn't works on labels which contain obb annotation labels

glenn-jocher commented 1 year ago

Hello @Yousra442-sheikh, thank you for your patience. I understand your situation.

YOLOv8, as it stands, is built to handle bounding box (BB) annotation format for object detection tasks. The BB annotation format assumes objects as rectangles, which might result in inefficiency when dealing with certain object datasets that fit better with Oriented Bounding Box (OBB) annotations.

Your DOTA 2.0 dataset's annotations are in the form of Oriented Bounding Boxes (OBB), which might be the reason why training with YOLOv8 is not working as expected. YOLOv8 is not originally designed to handle OBB annotations out of the box.

However, there are some options you can consider:

  1. Preprocessing: You could potentially write a preprocessing script to convert your OBB annotations into a format that YOLOv8 can handle.

  2. Model Modification: Alternatively, you might need to modify the YOLOv8 model to handle OBB annotations. This will involve altering the architecture and possibly the loss function of the model, based on how your annotations are formatted. It's a more complex route requiring a good understanding of the model and the coding ability to make substantial changes.

Choosing the right route will largely depend on your specific needs, your timeline, and your resources.

Keep in mind that working with OBB annotations is a relatively more complex task than working with axis-aligned BB annotations. Patience and perseverance will be required. I hope it works out for you.

github-actions[bot] commented 1 year ago

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐