Zum Inhalt springen

Oriented Bounding Boxes Object Detection

Die orientierte Objekterkennung geht einen Schritt weiter als die Objekterkennung und führt einen zusätzlichen Winkel ein, um Objekte in einem Bild genauer zu lokalisieren.

Die Ausgabe eines orientierten Objektdetektors ist eine Reihe von gedrehten Boundingboxen, die die Objekte im Bild genau umschließen, zusammen mit Klassenbeschriftungen und Vertrauenswerten für jede Box. Die Objekterkennung ist eine gute Wahl, wenn du interessante Objekte in einer Szene identifizieren musst, aber nicht genau wissen willst, wo sich das Objekt befindet oder welche Form es hat.

Tipp

YOLO11 OBB models use the -obb Suffix, d.h.. yolo11n-obb.pt und sind vorgebildet auf DOTAv1.



Pass auf: Object Detection using Ultralytics YOLO Oriented Bounding Boxes (YOLO-OBB)

Visuelle Muster

Schiffe aufspüren mit OBBFahrzeugerfassung mit OBB
Schiffe aufspüren mit OBBFahrzeugerfassung mit OBB

Modelle

YOLO11 pretrained OBB models are shown here, which are pretrained on the DOTAv1 dataset.

Die Modelle werden bei der ersten Verwendung automatisch von der neuestenVersion von Ultralytics heruntergeladen.

ModellGröße
(Pixel)
mAPtest
50
Geschwindigkeit
CPU ONNX
(ms)
Speed
T4 TensorRT10
(ms)
params
(M)
FLOPs
(B)
YOLO11n-obb102478.4117.6 ± 0.84.4 ± 0.02.717.2
YOLO11s-obb102479.5219.4 ± 4.05.1 ± 0.09.757.5
YOLO11m-obb102480.9562.8 ± 2.910.1 ± 0.420.9183.5
YOLO11l-obb102481.0712.5 ± 5.013.5 ± 0.626.2232.0
YOLO11x-obb102481.31408.6 ± 7.728.6 ± 1.058.8520.2
  • mAPtest Werte sind für Einzelmodell-Multiskala auf DOTAv1 Datensatz.
    Reproduzieren durch yolo val obb data=DOTAv1.yaml device=0 split=test und übermitteln Sie die zusammengeführten Ergebnisse an DOTA-Bewertung.
  • Geschwindigkeit gemittelt über DOTAv1-Val-Bilder unter Verwendung eines Amazon EC2 P4d Instanz.
    Reproduzieren durch yolo val obb data=DOTAv1.yaml batch=1 device=0|cpu

Zug

Train YOLO11n-obb on the DOTA8 dataset for 100 epochs at image size 640. For a full list of available arguments see the Configuration page.

Beispiel

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n-obb.yaml")  # build a new model from YAML
model = YOLO("yolo11n-obb.pt")  # load a pretrained model (recommended for training)
model = YOLO("yolo11n-obb.yaml").load("yolo11n.pt")  # build from YAML and transfer weights

# Train the model
results = model.train(data="dota8.yaml", epochs=100, imgsz=640)
# Build a new model from YAML and start training from scratch
yolo obb train data=dota8.yaml model=yolo11n-obb.yaml epochs=100 imgsz=640

# Start training from a pretrained *.pt model
yolo obb train data=dota8.yaml model=yolo11n-obb.pt epochs=100 imgsz=640

# Build a new model from YAML, transfer pretrained weights to it and start training
yolo obb train data=dota8.yaml model=yolo11n-obb.yaml pretrained=yolo11n-obb.pt epochs=100 imgsz=640



Pass auf: How to Train Ultralytics YOLO-OBB (Oriented Bounding Boxes) Models on DOTA Dataset using Ultralytics HUB

Format des Datensatzes

Das OBB-Datensatzformat findest du im Detail im Dataset Guide.

Val

Validate trained YOLO11n-obb model accuracy on the DOTA8 dataset. No arguments are needed as the model seine Ausbildung beibehält data und Argumente als Modellattribute.

Beispiel

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n-obb.pt")  # load an official model
model = YOLO("path/to/best.pt")  # load a custom model

# Validate the model
metrics = model.val(data="dota8.yaml")  # no arguments needed, dataset and settings remembered
metrics.box.map  # map50-95(B)
metrics.box.map50  # map50(B)
metrics.box.map75  # map75(B)
metrics.box.maps  # a list contains map50-95(B) of each category
yolo obb val model=yolo11n-obb.pt data=dota8.yaml  # val official model
yolo obb val model=path/to/best.pt data=path/to/data.yaml  # val custom model

Vorhersage

Use a trained YOLO11n-obb model to run predictions on images.

Beispiel

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n-obb.pt")  # load an official model
model = YOLO("path/to/best.pt")  # load a custom model

# Predict with the model
results = model("https://ultralytics.com/images/bus.jpg")  # predict on an image
yolo obb predict model=yolo11n-obb.pt source='https://ultralytics.com/images/bus.jpg'  # predict with official model
yolo obb predict model=path/to/best.pt source='https://ultralytics.com/images/bus.jpg'  # predict with custom model



Pass auf: How to Detect and Track Storage Tanks using Ultralytics YOLO-OBB | Oriented Bounding Boxes | DOTA

Siehe voll predict Modus Details in der Vorhersage Seite.

exportieren

Export a YOLO11n-obb model to a different format like ONNX, CoreML, etc.

Beispiel

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n-obb.pt")  # load an official model
model = YOLO("path/to/best.pt")  # load a custom trained model

# Export the model
model.export(format="onnx")
yolo export model=yolo11n-obb.pt format=onnx  # export official model
yolo export model=path/to/best.pt format=onnx  # export custom trained model

Available YOLO11-obb export formats are in the table below. You can export to any format using the format Argument, d.h. format='onnx' oder format='engine'. Du kannst exportierte Modelle direkt vorhersagen oder validieren, d.h. yolo predict model=yolo11n-obb.onnx. Nach Abschluss des Exports werden Anwendungsbeispiele für dein Modell angezeigt.

Formatformat ArgumentModellMetadatenArgumente
PyTorch-yolo11n-obb.pt-
TorchScripttorchscriptyolo11n-obb.torchscriptimgsz, optimize, batch
ONNXonnxyolo11n-obb.onnximgsz, half, dynamic, simplify, opset, batch
OpenVINOopenvinoyolo11n-obb_openvino_model/imgsz, half, int8, batch
TensorRTengineyolo11n-obb.engineimgsz, half, dynamic, simplify, workspace, int8, batch
CoreMLcoremlyolo11n-obb.mlpackageimgsz, half, int8, nms, batch
TF SavedModelsaved_modelyolo11n-obb_saved_model/imgsz, keras, int8, batch
TF GraphDefpbyolo11n-obb.pbimgsz, batch
TF Litetfliteyolo11n-obb.tfliteimgsz, half, int8, batch
TF Kante TPUedgetpuyolo11n-obb_edgetpu.tfliteimgsz
TF.jstfjsyolo11n-obb_web_model/imgsz, half, int8, batch
PaddlePaddlepaddleyolo11n-obb_paddle_model/imgsz, batch
NCNNncnnyolo11n-obb_ncnn_model/imgsz, half, batch

Siehe voll export Details in der exportieren Seite.

FAQ

Was sind Oriented Bounding Boxes (OBB) und wie unterscheiden sie sich von normalen Bounding Boxes?

Oriented Bounding Boxes (OBB) enthalten einen zusätzlichen Winkel, um die Genauigkeit der Objektlokalisierung in Bildern zu verbessern. Im Gegensatz zu normalen Bounding Boxes, die achsenausgerichtete Rechtecke sind, können OBBs gedreht werden, um sich besser an die Ausrichtung des Objekts anzupassen. Dies ist besonders nützlich für Anwendungen, die eine genaue Objektplatzierung erfordern, wie z. B. Luft- oder Satellitenbilder(Dataset Guide).

How do I train a YOLO11n-obb model using a custom dataset?

To train a YOLO11n-obb model with a custom dataset, follow the example below using Python or CLI:

Beispiel

from ultralytics import YOLO

# Load a pretrained model
model = YOLO("yolo11n-obb.pt")

# Train the model
results = model.train(data="path/to/custom_dataset.yaml", epochs=100, imgsz=640)
yolo obb train data=path/to/custom_dataset.yaml model=yolo11n-obb.pt epochs=100 imgsz=640

Weitere Argumente für die Ausbildung findest du im Abschnitt Konfiguration.

What datasets can I use for training YOLO11-OBB models?

YOLO11-OBB models are pretrained on datasets like DOTAv1 but you can use any dataset formatted for OBB. Detailed information on OBB dataset formats can be found in the Dataset Guide.

How can I export a YOLO11-OBB model to ONNX format?

Exporting a YOLO11-OBB model to ONNX format is straightforward using either Python or CLI:

Beispiel

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n-obb.pt")

# Export the model
model.export(format="onnx")
yolo export model=yolo11n-obb.pt format=onnx

Weitere Exportformate und Details findest du auf der Seite Export.

How do I validate the accuracy of a YOLO11n-obb model?

To validate a YOLO11n-obb model, you can use Python or CLI commands as shown below:

Beispiel

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n-obb.pt")

# Validate the model
metrics = model.val(data="dota8.yaml")
yolo obb val model=yolo11n-obb.pt data=dota8.yaml

Alle Details zur Validierung findest du im Abschnitt Val.

📅 Created 9 months ago ✏️ Updated 11 days ago

Kommentare