DOTA-Datensatz mit OBB
Der DOTA-Datensatz ist ein groß angelegter Benchmark für die Objekterkennung in Luftbildern. Er wurde in drei Versionen veröffentlicht (v1.0, v1.5, v2.0) und umfasst bis zu 1,7 Millionen Annotationen mit orientierten Begrenzungsrahmen (OBB) in 18 Kategorien. Die Aufnahmen stammen von verschiedenen Luftbildsensoren und Plattformen.
Entdecke die offiziell gehosteten Datensätze DOTA v1.5 und DOTA v1.0 auf der Ultralytics Platform. Dort kannst du dir die Annotationen mit orientierten Begrenzungsrahmen ansehen, Statistiken prüfen und die Datensätze zum Trainieren klonen.

Wichtige Funktionen#
Ansehen: So trainierst du Ultralytics YOLO mit dem DOTA-Datensatz für gedrehte Begrenzungsrahmen in Google Colab
- Die Sammlung stammt von verschiedenen Sensoren und Plattformen. Die Bildgrößen reichen von 800 × 800 bis 20.000 × 20.000 Pixel.
- Umfasst mehr als 1,7 Millionen orientierte Begrenzungsrahmen in 18 Kategorien.
- Ermöglicht die Objekterkennung auf verschiedenen Maßstabsebenen, da die Objektgrößen innerhalb der Bilder stark variieren.
- Experten annotieren die Instanzen mit frei geformten Vierecken (8 Freiheitsgrade), um Objekte unterschiedlicher Größe, Ausrichtung und Form zu erfassen.
Datensatzversionen#
DOTA-v1.0#
- Enthält 15 gängige Kategorien.
- Umfasst 2.806 Bilder mit 188.282 Instanzen.
- Aufteilung: 1/2 zum Trainieren (1.411 Bilder), 1/6 zur Validierung (458 Bilder) und 1/3 zum Testen (937 Bilder).
DOTA-v1.5#
- Enthält dieselben Bilder wie DOTA-v1.0.
- Auch sehr kleine Instanzen (unter 10 Pixeln) sind annotiert.
- Neue Kategorie: „Containerkran“.
- Insgesamt 403.318 Instanzen.
- Veröffentlicht für die DOAI Challenge 2019 zur Objekterkennung in Luftbildern.
DOTA-v2.0#
- Zusammengestellt aus Bildern von Google Earth, dem GF-2-Satelliten und weiteren Luftbildquellen.
- Enthält 18 gängige Kategorien.
- Umfasst 11.268 Bilder mit 1.793.658 Instanzen.
- Neue Kategorien: „Flughafen“ und „Hubschrauberlandeplatz“.
- Bildaufteilung:
- Training: 1.830 Bilder mit 268.627 Objektinstanzen.
- Validierung: 593 Bilder mit 81.048 Objektinstanzen.
- Test-dev: 2.792 Bilder mit 353.346 Objektinstanzen.
- Test-challenge: 6.053 Bilder mit 1.090.637 Objektinstanzen.
Datensatzstruktur#
DOTA weist eine strukturierte Aufteilung auf, die auf Herausforderungen bei der OBB-Objekterkennung zugeschnitten ist:
- Bilder: Eine umfangreiche Sammlung hochauflösender Luftbilder, die vielfältige Landschaften und Strukturen zeigen.
- Rotierte Begrenzungsrahmen: Annotationen in Form gedrehter Rechtecke, die Objekte unabhängig von ihrer Ausrichtung umschließen – ideal für die Erfassung von Objekten wie Flugzeugen, Schiffen und Gebäuden.
Anwendungsfälle#
DOTA dient als Benchmark zum Trainieren und Bewerten von Modellen für die Analyse von Luftbildern. Die Annotationen mit orientierten Begrenzungsrahmen machen den Datensatz zu einem anspruchsvollen Test für Objekterkennungsmodelle bei gedrehten, dicht angeordneten Objekten in Luftbildern. Der Datensatz wird häufig in der Fernerkundung, der Überwachung und der Umweltbeobachtung eingesetzt.
YAML-Datei des Datensatzes#
Eine YAML-Datei für einen Datensatz gibt Bild- und Label-Stammverzeichnisse, Klassennamen und weitere wichtige Metadaten an. Ultralytics pflegt offizielle YAML-Dateien für die beiden am häufigsten verwendeten Versionen:
Verwende die YAML-Datei, die zur heruntergeladenen Version passt, oder erstelle eine eigene YAML-Datei, wenn du mit DOTA-v2 oder einer anderen abgeleiteten Version arbeitest. Beide Versionen werden beim ersten Training automatisch (2 GB) von den Ultralytics-GitHub-Dateien heruntergeladen.
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# DOTA 1.0 dataset https://captain-whu.github.io/DOTA/index.html for object detection in aerial images by Wuhan University
# Documentation: https://docs.ultralytics.com/datasets/obb/dota-v2
# Example usage: yolo train model=yolov8n-obb.pt data=DOTAv1.yaml
# parent
# ├── ultralytics
# └── datasets
# └── DOTAv1 ← downloads here (2 GB)
# 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: DOTAv1 # 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 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/assets/releases/download/v0.0.0/DOTAv1.zipDOTA-Bilder aufteilen#
Die Rohbilder sind häufig mehr als 10.000 Pixel pro Seite groß. Daher empfiehlt es sich, sie vor der Verwendung mit YOLO in Kacheln aufzuteilen. Mit der folgenden Hilfsfunktion kannst du die Ausgangsbilder in überlappende Ausschnitte von 1024 × 1024 Pixeln mit mehreren Maßstäben aufteilen und dabei die Annotationen synchron halten.
from ultralytics.data.split_dota import split_test, split_trainval
# # Trainings- und Validierungsdatensatz mit Labels aufteilen.
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,
)
# # Testdatensatz ohne Labels aufteilen.
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,
)Sorge dafür, dass das Ausgabeverzeichnis der üblichen YOLO-Verzeichnisstruktur folgt (images/train, labels/train usw.), damit du direkt in der YAML-Datei des Datensatzes darauf verweisen kannst.
Verwendung#
Verwende die folgenden Codebeispiele, um ein YOLO26n-obb-Modell mit dem Datensatz DOTA v1 zu trainieren. Eine vollständige Liste der verfügbaren Argumente findest du in der Dokumentation deines Modells. Wenn du zuerst mit einer kleineren Teilmenge experimentieren möchtest, kannst du den DOTA8-Datensatz verwenden, der nur 8 Bilder für schnelle Tests enthält und auf der Ultralytics Platform durchsuchbar ist.
Alle Bilder und zugehörigen Annotationen im DOTAv1-Datensatz dürfen ausschließlich zu akademischen Zwecken verwendet werden; die kommerzielle Nutzung ist untersagt. Ultralytics legt diese Einschränkungen so aus, dass sie für den Quelldatensatz gelten, nicht jedoch für vortrainierte oder feinabgestimmte Modellgewichte. Lies die DOTA-Bedingungen, um zu prüfen, ob sie für deinen geplanten Verwendungszweck geeignet sind.
from ultralytics import YOLO
# Ein vortrainiertes YOLO26n-OBB-Modell laden
model = YOLO("yolo26n-obb.pt")
# Das Modell mit dem DOTAv1-Datensatz trainieren
results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=1024)Beispieldaten und Annotationen#
Das folgende Beispiel zeigt typische DOTA-Szenen und Annotationen:

- DOTA-Beispiele: Diese Momentaufnahme verdeutlicht die Komplexität von Luftbildszenen und die Bedeutung von Annotationen für rotierte Begrenzungsrahmen, die Objekte in ihrer natürlichen Ausrichtung erfassen.
Diese Szenen veranschaulichen die besonderen Herausforderungen bei der Erkennung in Luftbildern. DOTA-v2.0 wird dank seiner umfassenden Annotationen und vielfältigen Objektkategorien häufig für Projekte in der Fernerkundung und Luftüberwachung eingesetzt.
Zitate und Danksagungen#
Wenn du DOTA in deiner Arbeit verwendest, zitiere bitte die entsprechenden Forschungsarbeiten:
@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={2022},
volume={44},
number={11},
pages={7778-7796},
doi={10.1109/TPAMI.2021.3117983}
}Wir danken dem Team hinter den DOTA-Datensätzen für deren Zusammenstellung. Ausführliche Informationen zum Datensatz findest du auf der offiziellen DOTA-Website.
Häufig gestellte Fragen#
Der DOTA-Datensatz ist ein spezialisierter Datensatz für die Objekterkennung in Luftbildern. Er umfasst annotierte Bilder aus vielfältigen Luftbildszenen mit rotierenden Begrenzungsrahmen (OBB). Die Vielfalt der Objektausrichtungen, Maßstäbe und Formen in den 1,7 Mio. Annotationen und 18 Kategorien von DOTA macht den Datensatz ideal für die Entwicklung und Bewertung von Modellen zur Analyse von Luftbildern, etwa für Überwachung, Umweltbeobachtung und Katastrophenschutz.
DOTA verwendet zur Annotation orientierte Begrenzungsrahmen (OBB), die als gedrehte Rechtecke dargestellt werden, welche Objekte unabhängig von ihrer Ausrichtung umschließen. Mit dieser Methode werden Objekte präzise erfasst, auch wenn sie klein sind oder in unterschiedlichen Winkeln erscheinen. Die Bilder des Datensatzes liegen in verschiedenen Größen von 800 × 800 bis 20.000 × 20.000 Pixeln vor und ermöglichen so außerdem die zuverlässige Erkennung kleiner und großer Objekte. Dieser Ansatz ist besonders wertvoll bei Luftbildern, in denen Objekte in verschiedenen Winkeln und Größen erscheinen.
Um ein Modell mit dem DOTA-Datensatz zu trainieren, kannst du das folgende Beispiel mit Ultralytics YOLO verwenden:
Trainingsbeispielfrom ultralytics import YOLO # Ein vortrainiertes YOLO26n-OBB-Modell laden model = YOLO("yolo26n-obb.pt") # Das Modell mit dem DOTAv1-Datensatz trainieren results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=1024)Weitere Informationen zum Aufteilen und Vorverarbeiten der DOTA-Bilder findest du im Abschnitt zum Aufteilen von DOTA-Bildern.
- DOTA-v1.0: Umfasst 15 gängige Kategorien in 2.806 Bildern mit 188.282 Objektinstanzen. Der Datensatz ist in Trainings-, Validierungs- und Testdaten aufgeteilt.
- DOTA-v1.5: Baut auf DOTA-v1.0 auf, indem sehr kleine Objektinstanzen (unter 10 Pixel) annotiert und eine neue Kategorie „Containerkran“ hinzugefügt werden. Insgesamt umfasst die Version 403.318 Objektinstanzen.
- DOTA-v2.0: Erweitert den Datensatz um Annotationen von Google Earth und GF-2 Satellite und umfasst 11.268 Bilder sowie 1.793.658 Objektinstanzen. Zu den neuen Kategorien gehören „Flughafen“ und „Hubschrauberlandeplatz“.
Einen detaillierten Vergleich und weitere Informationen findest du im Abschnitt zu den Datensatzversionen.
DOTA-Bilder können sehr groß sein und werden daher für ein handhabbares Training in kleinere Ausschnitte aufgeteilt. Hier ist ein Python-Codebeispiel zum Aufteilen der Bilder:
Beispielfrom ultralytics.data.split_dota import split_test, split_trainval # # Trainings- und Validierungsdatensatz mit Labels aufteilen. 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, ) # # Testdatensatz ohne Labels aufteilen. 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, )Dieses Verfahren verbessert die Trainingseffizienz und die Modellleistung. Eine ausführliche Anleitung findest du im Abschnitt zum Aufteilen von DOTA-Bildern.
Kommentare17
Stell eine Frage, teile deine Ergebnisse oder hilf jemand anderem.
XWP-PPP
May I ask how you converted the inference results from YOLOV8 OBB into inference results that can be uploaded to DOTA's Task 1 server? I saved the final inference results of the model in the form of xyxyxy and uploaded them via email. However, the mAP results provided on YOLO's official website differ significantly. I would like to know the reason for this. Can you provide me with a conversion code to convert the test image set into a result that can be uploaded to DOTA's Task 1 server? Thank you very much for your help!
1
Paula DerrengerUltralytics(bearbeitet)@XWP-PPP hi there!
DOTA's Task 1 server expects a zip of one text file per class (
Task1_plane.txt,Task1_storage-tank.txt, ...), where each line isimgname score x1 y1 x2 y2 x3 y3 x4 y4, with the image name given without extension. OBB results are stored inresult.obb, notresult.boxes. Here is a snippet that builds those files:import shutil from collections import defaultdict from pathlib import Path from ultralytics import YOLO # Load your trained YOLO26-OBB model model = YOLO("path/to/your/yolo26n-obb.pt") # Collect one DOTA Task1 line per detection: imgname score x1 y1 x2 y2 x3 y3 x4 y4 (pixels) category_results = defaultdict(list) for r in model.predict(source="path/to/test/images", stream=True): img_name = Path(r.path).stem for cls, conf, pts in zip(r.obb.cls.int().tolist(), r.obb.conf.tolist(), r.obb.xyxyxyxy.flatten(1).tolist()): coords = " ".join(f"{p:.1f}" for p in pts) category_results[f"Task1_{model.names[cls].replace(' ', '-')}.txt"].append(f"{img_name} {conf:.6f} {coords}\n") # Save one file per category and zip the submission folder output_dir = Path("submission") output_dir.mkdir(exist_ok=True) for category_file, lines in category_results.items(): (output_dir / category_file).write_text("".join(lines)) shutil.make_archive("submission", "zip", output_dir)Upload
submission.zipto the DOTA Task 1 server. If your mAP differs from your local validation, check that image names match the test set and that the coordinates are in pixels of the original (unsplit) images. For more details, see the DOTA Dataset Documentation. Happy coding! 😊
Taufiq-Ahmed-pranto
Hi, I want to use the DOTA dataset only for YOLOv11 Nano. I don't want to use the model with oriented bounding boxes (OBB). What is the procedure?
Jie LiuI have download dotav1 form
https://github.com/ultralytics/assets/releases/download/v0.0.0/DOTAv1.zipand use script split dataset.from ultralytics.data.split_dota import split_test, split_trainval # split train and val set, with labels. split_trainval( data_root="/dataset/coco/DOTAv1", save_dir="/dataset/coco/DOTAv1.0-split/", rates=[0.5, 1.0, 1.5], # multiscale gap=500, ) # split test set, without labels. split_test( data_root="/dataset/coco/DOTAv1/", save_dir="/dataset/coco/DOTAv1.0-split/", rates=[0.5, 1.0, 1.5], # multiscale gap=500, )how to reproduce yolov11 obb result, please show me the command like
yolo train model=ultralytics-8.3.13/ultralytics/cfg/models/11/yolo11n-obb.yaml data=DOTAv1/DOTAv1.yaml epochs=500 batch=32*4 imgsz=640 device=4,5,6,7 cache=disk amp=True
Glenn JocherUltralytics(bearbeitet)@keeper-jie for training YOLO26-OBB on DOTAv1 after splitting, use this command with your 4 GPUs:
yolo obb train data=DOTAv1.yaml model=yolo26n-obb.pt epochs=500 imgsz=1024 batch=128 device=4,5,6,7Key parameters from our DOTA documentation:
imgsz=1024(matches dataset's multiscale split)- Use official model name
yolo26n-obb.ptrather than YAML path - Batch size 128 (32*4 GPUs) via
batch=128
Ensure your dataset YAML paths point to the split images directory.
huynhkhoa44
I have labeled data in YOLOv8 object detection format, our label data format is already rotated rectangles to the correct angle of the object, however since it is in YOLOv8 object detection format, the "angle" parameter is missing. I no longer keep the label folder on CVAT so I cannot export to a different label format. Is there a way to add the angle value from the 4 pre-existing <x_center> <y_center> values?
Glenn JocherUltralyticsTo add the angle value from your existing YOLOv8 labels, you'll need to calculate it based on the coordinates. Unfortunately, without the original CVAT labels, this requires manual computation or using a tool that supports angle annotations. For guidance on datasets with oriented bounding boxes, you can refer to the DOTA dataset documentation at https://docs.ultralytics.com/datasets/obb/dota-v2/.
jack-ready
Recently, I've been using YOLOv8 to train the DOTAv1 dataset and encountered some issues. I was wondering if I could seek advice. 1.To train the DOTA dataset, we split the original DOTA images with high-resolution into images with 1024x1024. I noticed that the provided segmentation code provides three sizes, rates=[0.5, 1.0, 1.5]. In order to obtain 1024×1024 images, it seems that we should choose rates=1, but I noticed that some images in the segmentation results of the validation set are smaller than 1024×1024, such as 1024×1023, 824*1024, etc. What is the reason for this?Will it affect the experiment? 2.Another issue arises during the training process. I noticed that the training process conducts validation after each epoch. I attempted to disable validation by setting val=False, but it seems to have no effect. What could be the reason for this? The training code snippet is as follows: results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=640, batch=10, workers=0, val=False). Additionally, during validation, it seems that the images are not being resized to 640. Printing the results in the code yields torch.Size([10, 3, 672, 672]), whereas during the training process, images are correctly resized to 640. Could someone help me understand this?
Glenn JocherUltralytics(bearbeitet)@jack-ready hi there!
Thank you for reaching out with your questions regarding training the DOTA dataset with YOLOv8. Let's address each of your concerns:
-
Image Splitting and Sizes: When splitting high-resolution DOTA images into 1024x1024 segments using
rates=[0.5, 1.0, 1.5], you might notice some resulting images are slightly smaller than 1024x1024 (e.g., 1024x1023 or 824x1024). This occurs due to the way the splitting algorithm handles the edges of the original images. If the original image dimensions are not perfectly divisible by 1024, the last segment in each row or column might be smaller. This should not significantly affect your experiment as long as the majority of your data maintains the expected size. However, you can ensure consistency by padding these smaller images to 1024x1024 if necessary. -
Disabling Validation: The
val=Falseargument should indeed disable validation during training. If it doesn't seem to work, please ensure you are using the latest version of the Ultralytics package. You can update it using:pip install --upgrade ultralyticsIf the issue persists, providing a minimum reproducible example would be very helpful for us to diagnose the problem. You can find guidance on creating one here: Minimum Reproducible Example.
-
Image Resizing During Validation: The discrepancy in image sizes during validation (e.g.,
torch.Size([10, 3, 672, 672])instead of 640) might be due to the model's internal resizing logic. Ensure that theimgszparameter is correctly set for both training and validation. Validation uses the sameimgszas training, so set it explicitly in your training script:results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=640, batch=10, workers=0, val=True)
I hope this helps! If you have any further questions or need additional assistance, feel free to ask. Happy training! 🚀
-
jack-ready
Thank you very much for your help. I have another question regarding the YOLOV8 training on the DOTA v1.0 dataset. I would like to know how to set the training parameters, such as learning rate, optimizer, and loss function. When I try to reproduce the results, my mAP50 is about 74%, but it does not reach 78%. I would greatly appreciate any assistance you can provide.Below is my training code. from ultralytics import YOLO model = YOLO("yolov8n-obb.yaml") model.load("yolov8n-obb.pt") model = YOLO("yolov8n-obb.yaml").load("yolov8n.pt") results = model.train(data="DOTAv1.yaml", epochs=100, imgsz=640, batch=48, workers=0,project="runs/DOTAV1.0",val=True,resume=True)
Glenn JocherUltralytics(bearbeitet)Hi there! Glad to help with your training setup. To fine-tune your training parameters for better mAP50 results, you can adjust the learning rate, optimizer, and loss function. For instance, you might try a lower learning rate or switch to a different optimizer like Adam. Here's a quick example:
from ultralytics import YOLO model = YOLO("yolo26n-obb.yaml").load("yolo26n-obb.pt") results = model.train( data="DOTAv1.yaml", epochs=100, imgsz=640, batch=48, workers=0, project="runs/DOTAV1.0", val=True, lr0=0.001, # Adjust learning rate optimizer='Adam' # Change optimizer )Ensure you're using the latest version of the Ultralytics package to avoid any bugs. If you still face issues, feel free to share more details. Happy training! 🚀
Tintin26100
How can I find the number of instances per class in DOTA v1.5 ? I've been searching for this information for a moment and I can't find any answers
Paula DerrengerUltralytics@Tintin26100 hello!
The number of instances per class in DOTA v1.5 isn't directly listed in the dataset's summary. However, you can obtain this information by analyzing the annotation files provided with the dataset. Each object instance in these files is labeled with a class, and you can count the number of times each class appears.
If you need further guidance on how to process these annotation files or any other assistance with the DOTA dataset, feel free to ask!
Happy coding! 😊
Tintin26100
Hi, thanks for your quick answer, I will gladly accept your help because I don't really know what to do to extract those informations, where do you find the annotation files ? Is it on the github ? If it is what's it's path ? Thanks for the time you spend helping
Paula DerrengerUltralytics@Tintin26100 hello!
The annotation files for the DOTA dataset are typically included within the dataset download itself. These files contain the details for each instance, including class labels and oriented bounding box coordinates.
For the DOTA v1.5 dataset, you can find these files in the dataset directory after you download it from the official DOTA dataset page or the provided download link in the dataset's YAML configuration file. The path to the annotations will usually be structured under the
labelsorannotationsdirectory within the main dataset folder.If you've already downloaded the dataset, you should look for
.txtor.jsonfiles corresponding to each image in the dataset, which contain the annotations. If you need further assistance navigating these files or extracting specific data, feel free to ask!Thank you for reaching out, and happy analyzing! 😊
hencai
how to test DOTA datatests online using YOLOv8-obb? somebody help me ?
Glenn JocherUltralytics(bearbeitet)Hey there! 😊 Testing the DOTA dataset online using YOLO26-obb is quite straightforward. If you've already prepared your dataset according to the Ultralytics guidelines and split the images, here's a simple example to get you started with training:
# Train a YOLO26n-OBB model on the DOTA v1 dataset yolo obb train data=DOTAv1.yaml model=yolo26n-obb.pt epochs=100 imgsz=640This command uses DOTA v1 and the corresponding
.yamlfile (DOTAv1.yaml) describing your dataset paths and classes. Adjustepochsandimgszbased on your needs.Just make sure to check out the DOTA dataset page on Ultralytics docs for more info on dataset preparation and additional configurations! Happy detecting! 🚀



