Add FAQs to Docs Datasets and Help sections (#14211)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
64862f1b69
commit
d5db9c916f
73 changed files with 3296 additions and 110 deletions
|
|
@ -154,3 +154,79 @@ For those leveraging DOTA in their endeavors, it's pertinent to cite the relevan
|
|||
```
|
||||
|
||||
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).
|
||||
|
||||
## FAQ
|
||||
|
||||
### What is the DOTA dataset and why is it important for object detection in aerial images?
|
||||
|
||||
The [DOTA dataset](https://captain-whu.github.io/DOTA/index.html) is a specialized dataset focused on object detection in aerial images. It features Oriented Bounding Boxes (OBB), providing annotated images from diverse aerial scenes. DOTA's diversity in object orientation, scale, and shape across its 1.7M annotations and 18 categories makes it ideal for developing and evaluating models tailored for aerial imagery analysis, such as those used in surveillance, environmental monitoring, and disaster management.
|
||||
|
||||
### How does the DOTA dataset handle different scales and orientations in images?
|
||||
|
||||
DOTA utilizes Oriented Bounding Boxes (OBB) for annotation, which are represented by rotated rectangles encapsulating objects regardless of their orientation. This method ensures that objects, whether small or at different angles, are accurately captured. The dataset's multiscale images, ranging from 800 × 800 to 20,000 × 20,000 pixels, further allow for the detection of both small and large objects effectively.
|
||||
|
||||
### How can I train a model using the DOTA dataset?
|
||||
|
||||
To train a model on the DOTA dataset, you can use the following example with Ultralytics YOLO:
|
||||
|
||||
!!! Example "Train Example"
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Create a new YOLOv8n-OBB model from scratch
|
||||
model = YOLO("yolov8n-obb.yaml")
|
||||
|
||||
# Train the model on the DOTAv1 dataset
|
||||
results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=640)
|
||||
```
|
||||
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Train a new YOLOv8n-OBB model on the DOTAv1 dataset
|
||||
yolo obb train data=DOTAv1.yaml model=yolov8n-obb.pt epochs=100 imgsz=640
|
||||
```
|
||||
|
||||
For more details on how to split and preprocess the DOTA images, refer to the [split DOTA images section](#split-dota-images).
|
||||
|
||||
### What are the differences between DOTA-v1.0, DOTA-v1.5, and DOTA-v2.0?
|
||||
|
||||
- **DOTA-v1.0**: Includes 15 common categories across 2,806 images with 188,282 instances. The dataset is split into training, validation, and testing sets.
|
||||
|
||||
- **DOTA-v1.5**: Builds upon DOTA-v1.0 by annotating very small instances (less than 10 pixels) and adding a new category, "container crane," totaling 403,318 instances.
|
||||
|
||||
- **DOTA-v2.0**: Expands further with annotations from Google Earth and GF-2 Satellite, featuring 11,268 images and 1,793,658 instances. It includes new categories like "airport" and "helipad."
|
||||
|
||||
For a detailed comparison and additional specifics, check the [dataset versions section](#dataset-versions).
|
||||
|
||||
### How can I prepare high-resolution DOTA images for training?
|
||||
|
||||
DOTA images, which can be very large, are split into smaller resolutions for manageable training. Here's a Python snippet to split images:
|
||||
|
||||
!!! Example
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
from ultralytics.data.split_dota import split_test, split_trainval
|
||||
|
||||
# split train and val set, with labels.
|
||||
split_trainval(
|
||||
data_root="path/to/DOTAv1.0/",
|
||||
save_dir="path/to/DOTAv1.0-split/",
|
||||
rates=[0.5, 1.0, 1.5], # multiscale
|
||||
gap=500,
|
||||
)
|
||||
# split test set, without labels.
|
||||
split_test(
|
||||
data_root="path/to/DOTAv1.0/",
|
||||
save_dir="path/to/DOTAv1.0-split/",
|
||||
rates=[0.5, 1.0, 1.5], # multiscale
|
||||
gap=500,
|
||||
)
|
||||
```
|
||||
|
||||
This process facilitates better training efficiency and model performance. For detailed instructions, visit the [split DOTA images section](#split-dota-images).
|
||||
|
|
|
|||
|
|
@ -79,3 +79,46 @@ If you use the DOTA dataset in your research or development work, please cite th
|
|||
```
|
||||
|
||||
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).
|
||||
|
||||
## FAQ
|
||||
|
||||
### What is the DOTA8 dataset and how can it be used?
|
||||
|
||||
The DOTA8 dataset is a small, versatile oriented object detection dataset made up of the first 8 images from the DOTAv1 split set, with 4 images designated for training and 4 for validation. It's ideal for testing and debugging object detection models like Ultralytics YOLOv8. Due to its manageable size and diversity, it helps in identifying pipeline errors and running sanity checks before deploying larger datasets. Learn more about object detection with [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics).
|
||||
|
||||
### How do I train a YOLOv8 model using the DOTA8 dataset?
|
||||
|
||||
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 comprehensive argument options, 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
|
||||
```
|
||||
|
||||
### What are the key features of the DOTA dataset and where can I access the YAML file?
|
||||
|
||||
The DOTA dataset is known for its large-scale benchmark and the challenges it presents for object detection in aerial images. The DOTA8 subset is a smaller, manageable dataset ideal for initial tests. You can access the `dota8.yaml` file, which contains paths, classes, and configuration details, at this [GitHub link](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/dota8.yaml).
|
||||
|
||||
### How does mosaicing enhance model training with the DOTA8 dataset?
|
||||
|
||||
Mosaicing combines multiple images into one during training, increasing the variety of objects and contexts within each batch. This improves a model's ability to generalize to different object sizes, aspect ratios, and scenes. This technique can be visually demonstrated through a training batch composed of mosaiced DOTA8 dataset images, helping in robust model development. Explore more about mosaicing and training techniques on our [Training](../../modes/train.md) page.
|
||||
|
||||
### Why should I use Ultralytics YOLOv8 for object detection tasks?
|
||||
|
||||
Ultralytics YOLOv8 provides state-of-the-art real-time object detection capabilities, including features like oriented bounding boxes (OBB), instance segmentation, and a highly versatile training pipeline. It's suitable for various applications and offers pretrained models for efficient fine-tuning. Explore further about the advantages and usage in the [Ultralytics YOLOv8 documentation](https://github.com/ultralytics/ultralytics).
|
||||
|
|
|
|||
|
|
@ -83,3 +83,62 @@ Transitioning labels from the DOTA dataset format to the YOLO OBB format can be
|
|||
This conversion mechanism is instrumental for datasets in the DOTA format, ensuring alignment with the Ultralytics YOLO OBB format.
|
||||
|
||||
It's imperative to validate the compatibility of the dataset with your model and adhere to the necessary format conventions. Properly structured datasets are pivotal for training efficient object detection models with oriented bounding boxes.
|
||||
|
||||
## FAQ
|
||||
|
||||
### What are Oriented Bounding Boxes (OBB) and how are they used in Ultralytics YOLO models?
|
||||
|
||||
Oriented Bounding Boxes (OBB) are a type of bounding box annotation where the box can be rotated to align more closely with the object being detected, rather than just being axis-aligned. This is particularly useful in aerial or satellite imagery where objects might not be aligned with the image axes. In Ultralytics YOLO models, OBBs are represented by their four corner points in the YOLO OBB format. This allows for more accurate object detection since the bounding boxes can rotate to fit the objects better.
|
||||
|
||||
### How do I convert my existing DOTA dataset labels to YOLO OBB format for use with Ultralytics YOLOv8?
|
||||
|
||||
You can convert DOTA dataset labels to YOLO OBB format using the `convert_dota_to_yolo_obb` function from Ultralytics. This conversion ensures compatibility with the Ultralytics YOLO models, enabling you to leverage the OBB capabilities for enhanced object detection. Here's a quick example:
|
||||
|
||||
```python
|
||||
from ultralytics.data.converter import convert_dota_to_yolo_obb
|
||||
|
||||
convert_dota_to_yolo_obb("path/to/DOTA")
|
||||
```
|
||||
|
||||
This script will reformat your DOTA annotations into a YOLO-compatible format.
|
||||
|
||||
### How do I train a YOLOv8 model with oriented bounding boxes (OBB) on my dataset?
|
||||
|
||||
Training a YOLOv8 model with OBBs involves ensuring your dataset is in the YOLO OBB format and then using the Ultralytics API to train the model. Here's an example in both Python and CLI:
|
||||
|
||||
!!! Example
|
||||
|
||||
=== "Python"
|
||||
|
||||
```python
|
||||
from ultralytics import YOLO
|
||||
|
||||
# Create a new YOLOv8n-OBB model from scratch
|
||||
model = YOLO("yolov8n-obb.yaml")
|
||||
|
||||
# Train the model on the custom dataset
|
||||
results = model.train(data="your_dataset.yaml", epochs=100, imgsz=640)
|
||||
```
|
||||
|
||||
|
||||
=== "CLI"
|
||||
|
||||
```bash
|
||||
# Train a new YOLOv8n-OBB model on the custom dataset
|
||||
yolo detect train data=your_dataset.yaml model=yolov8n.pt epochs=100 imgsz=640
|
||||
```
|
||||
|
||||
This ensures your model leverages the detailed OBB annotations for improved detection accuracy.
|
||||
|
||||
### What datasets are currently supported for OBB training in Ultralytics YOLO models?
|
||||
|
||||
Currently, Ultralytics supports the following datasets for OBB training:
|
||||
|
||||
- [DOTA-v2](dota-v2.md): This dataset includes 1.7 million instances with oriented bounding boxes and 11,268 images, primarily focusing on aerial object detection.
|
||||
- [DOTA8](dota8.md): A smaller, 8-image subset of the DOTA dataset used for testing and continuous integration (CI) checks.
|
||||
|
||||
These datasets are tailored for scenarios where OBBs offer a significant advantage, such as aerial and satellite image analysis.
|
||||
|
||||
### Can I use my own dataset with oriented bounding boxes for YOLOv8 training, and if so, how?
|
||||
|
||||
Yes, you can use your own dataset with oriented bounding boxes for YOLOv8 training. Ensure your dataset annotations are converted to the YOLO OBB format, which involves defining bounding boxes by their four corner points. You can then create a YAML configuration file specifying the dataset paths, classes, and other necessary details. For more information on creating and configuring your datasets, refer to the [Supported Datasets](#supported-datasets) section.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue