Oriented Bounding Boxes Object Detection

Oriented Bounding Boxes Object Detection1. Model introduction2. Oriented bounding box object detection: imageEffect preview3. Directed border object detection: videoEffect preview4. Directed border object detection: real-time detection4.1. USB cameraEffect preview4.2, CSI cameraEffect previewReferences

Use Python to demonstrate the effect of Ultralytics: Oriented Bounding Boxes Object Detection in image, video, and real-time detection.

1. Model introduction

Oriented bounding box object detection, also known as oriented object detection, goes a step further than standard object detection. It introduces an additional angle to more accurately locate objects in the image.

The output of the oriented object detector is a set of rotated bounding boxes that accurately surround objects in the image, as well as the category label and confidence score of each bounding box. Oriented bounding boxes are particularly useful when objects appear at different angles, such as in aerial images, where traditional axis-aligned bounding boxes may include unnecessary background.

In short, oriented object detection can accurately surround tilted objects with tilted boxes, thereby reducing unnecessary background areas and improving detection accuracy.

2. Oriented bounding box object detection: image

Use yolo11n-obb.pt to predict images under the ultralytics project (not ultralytics built-in images).

Enter the code folder:

Run the code:

Effect preview

Yolo recognition output image location: /home/pi/ultralytics/ultralytics/output/

image-20241231094016499

Sample code:

3. Directed border object detection: video

Use yolo11n-obb.pt to predict the video under the ultralytics project (not the video that comes with ultralytics).

Enter the code folder:

Run the code:

Effect preview

Video location of yolo recognition output: /home/pi/ultralytics/ultralytics/output/

image-20241231104454064

Sample code:

4. Directed border object detection: real-time detection

4.1. USB camera

Use yolo11n-obb.pt to predict the USB camera screen.

Enter the code folder:

Run the code: Click the preview screen and press the q key to terminate the program!

Effect preview

Yolo recognizes the output video location: /home/pi/ultralytics/ultralytics/output/

image-20241231105721479

Sample code:

4.2, CSI camera

Use yolo11n-obb.pt to predict the CSI camera screen.

Enter the code folder:

Run the code: Click the preview screen, press the q key to terminate the program!

Effect preview

Yolo recognizes the output video location: /home/pi/ultralytics/ultralytics/output/

image-20241231110118541

Sample code:

References

https://docs.ultralytics.com/tasks/obb/