Handling rotated bounding boxes when exporting from Label Studio to COCO or YOLO


How can I maintain the rotated bounding box orientation when I export my annotated data from Label Studio into COCO or YOLO formats? The bounding boxes are always exported as non-rotated boxes.


The YOLO and COCO dataset formats typically only support axis-aligned bounding boxes and do not account for rotation information. As a result, when you export rotated bounding boxes from Label Studio into these formats, they are converted back to axis-aligned boxes without rotation.

To preserve the rotation information, you must use a format that supports it, such as the Label Studio JSON format. If using YOLO or COCO is a necessity, consider implementing custom extensions or post-processing scripts to handle rotation data separately, as this is beyond the standard export functionality.

For tasks requiring rotation data preservation, it’s advisable to utilize models capable of interpreting rotated bounding boxes and to develop or seek out an annotation export format that keeps the rotational attributes.