FEATUREToolkit v0.3.01 min read

YOLO-OBB export and import in the Toolkit

Oriented rectangles landed in the annotation app in v6.2. LabelMe Toolkit v0.3.0 makes them useful end to end: you can now move oriented boxes between LabelMe and the YOLO-OBB format that YOLOv8-OBB trains on, in both directions.

What shipped

export-to-yolo-obb turns a LabelMe dataset into a YOLO-OBB dataset. Each oriented_rectangle is written out as its four corners verbatim, and each axis-aligned rectangle is expanded to its four corners, so a zero-rotation box is still a valid OBB. Polygons, circles, and masks are skipped with a warning rather than being approximated by a fitted box, because a min-area-rect guess would silently change your annotations.

labelmetk export-to-yolo-obb dogs_rectangle.json --class-names dog

import-from-yolo-obb does the reverse: it reads a YOLO-OBB dataset and writes LabelMe JSON, with each label line becoming an editable oriented_rectangle shape you can open and adjust in the app.

labelmetk import-from-yolo-obb dogs_rectangle.export/

Each label line is the class index followed by four normalized corners:

<class_id> <x1> <y1> <x2> <y2> <x3> <y3> <x4> <y4>

Where to find it

Update to LabelMe Toolkit v0.3.0 from the install page. Full usage lives in the toolkit docs: export-to-yolo-obb and import-from-yolo-obb.

If anything behaves oddly, ask on Discord.

LabelMe 是一款内置 AI 的离线优先标注工具。

免费试用 LabelMe