Add dota8.yaml and O tests (#7394)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>pull/7317/head^2
parent
d0562d7a2f
commit
a6a2c256d4
13 changed files with 176 additions and 16 deletions
@ -0,0 +1,81 @@ |
||||
--- |
||||
comments: true |
||||
description: Discover the versatile DOTA8 dataset, perfect for testing and debugging oriented detection models. Learn how to get started with YOLOv8-obb model training. |
||||
keywords: Ultralytics, YOLOv8, oriented detection, DOTA8 dataset, dataset, model training, YAML |
||||
--- |
||||
|
||||
# DOTA8 Dataset |
||||
|
||||
## Introduction |
||||
|
||||
[Ultralytics](https://ultralytics.com) DOTA8 is a small, but versatile oriented object detection dataset composed of the first 8 images of 8 images of the split DOTAv1 set, 4 for training and 4 for validation. This dataset is ideal for testing and debugging object detection models, or for experimenting with new detection approaches. With 8 images, it is small enough to be easily manageable, yet diverse enough to test training pipelines for errors and act as a sanity check before training larger datasets. |
||||
|
||||
This dataset is intended for use with Ultralytics [HUB](https://hub.ultralytics.com) and [YOLOv8](https://github.com/ultralytics/ultralytics). |
||||
|
||||
## Dataset YAML |
||||
|
||||
A YAML (Yet Another Markup Language) file is used to define the dataset configuration. It contains information about the dataset's paths, classes, and other relevant information. In the case of the DOTA8 dataset, the `dota8.yaml` file is maintained at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/dota8.yaml](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/dota8.yaml). |
||||
|
||||
!!! Example "ultralytics/cfg/datasets/dota8.yaml" |
||||
|
||||
```yaml |
||||
--8<-- "ultralytics/cfg/datasets/dota8.yaml" |
||||
``` |
||||
|
||||
## Usage |
||||
|
||||
To train a YOLOv8n-obb model on the DOTA8 dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model [Training](../../modes/train.md) page. |
||||
|
||||
!!! Example "Train Example" |
||||
|
||||
=== "Python" |
||||
|
||||
```python |
||||
from ultralytics import YOLO |
||||
|
||||
# Load a model |
||||
model = YOLO('yolov8n-obb.pt') # load a pretrained model (recommended for training) |
||||
|
||||
# Train the model |
||||
results = model.train(data='dota8.yaml', epochs=100, imgsz=640) |
||||
``` |
||||
|
||||
=== "CLI" |
||||
|
||||
```bash |
||||
# Start training from a pretrained *.pt model |
||||
yolo obb train data=dota8.yaml model=yolov8n-obb.pt epochs=100 imgsz=640 |
||||
``` |
||||
|
||||
## Sample Images and Annotations |
||||
|
||||
Here are some examples of images from the DOTA8 dataset, along with their corresponding annotations: |
||||
|
||||
<img src="https://github.com/Laughing-q/assets/assets/61612323/965d3ff7-5b9b-4add-b62e-9795921b60de" alt="Dataset sample image" width="800"> |
||||
|
||||
- **Mosaiced Image**: This image demonstrates a training batch composed of mosaiced dataset images. Mosaicing is a technique used during training that combines multiple images into a single image to increase the variety of objects and scenes within each training batch. This helps improve the model's ability to generalize to different object sizes, aspect ratios, and contexts. |
||||
|
||||
The example showcases the variety and complexity of the images in the DOTA8 dataset and the benefits of using mosaicing during the training process. |
||||
|
||||
## Citations and Acknowledgments |
||||
|
||||
If you use the DOTA dataset in your research or development work, please cite the following paper: |
||||
|
||||
!!! Quote "" |
||||
|
||||
=== "BibTeX" |
||||
|
||||
```bibtex |
||||
@article{9560031, |
||||
author={Ding, Jian and Xue, Nan and Xia, Gui-Song and Bai, Xiang and Yang, Wen and Yang, Michael and Belongie, Serge and Luo, Jiebo and Datcu, Mihai and Pelillo, Marcello and Zhang, Liangpei}, |
||||
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, |
||||
title={Object Detection in Aerial Images: A Large-Scale Benchmark and Challenges}, |
||||
year={2021}, |
||||
volume={}, |
||||
number={}, |
||||
pages={1-1}, |
||||
doi={10.1109/TPAMI.2021.3117983} |
||||
} |
||||
``` |
||||
|
||||
A special note of gratitude to the team behind the DOTA datasets for their commendable effort in curating this dataset. For an exhaustive understanding of the dataset and its nuances, please visit the [official DOTA website](https://captain-whu.github.io/DOTA/index.html). |
@ -0,0 +1,34 @@ |
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license |
||||
# DOTA8 dataset 8 images from split DOTAv1 dataset by Ultralytics |
||||
# Documentation: https://docs.ultralytics.com/datasets/obb/dota8/ |
||||
# Example usage: yolo train model=yolov8n-obb.pt data=dota8.yaml |
||||
# parent |
||||
# ├── ultralytics |
||||
# └── datasets |
||||
# └── dota8 ← downloads here (1MB) |
||||
|
||||
# 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/dota8 # dataset root dir |
||||
train: images/train # train images (relative to 'path') 4 images |
||||
val: images/val # val images (relative to 'path') 4 images |
||||
|
||||
# Classes for DOTA 1.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 |
||||
|
||||
# Download script/URL (optional) |
||||
download: https://github.com/ultralytics/yolov5/releases/download/v1.0/dota8.zip |
Loading…
Reference in new issue