docs/en/platform/integrations/labelme.md
LabelMe is an offline image annotation tool with an open-source Python application. There is no live LabelMe connection or API key to configure in Ultralytics Platform. The complete integration is a local workflow: annotate in LabelMe, convert the LabelMe JSON annotations to YOLO format with the LabelMe Toolkit, and upload the resulting ZIP as a Platform dataset.
Install LabelMe using the desktop app or the open-source Python package, then open the directory containing your images. LabelMe saves each image's annotations in a matching JSON file.
For the YOLO detection workflow in this guide, draw rectangles around each object and assign a class name. The LabelMe starter guide covers opening images, drawing shapes, and saving annotations, while the LabelMe dataset guide covers reviewing and preparing a complete annotated dataset.
Your source directory should contain the images and LabelMe JSON files:
your_dataset/
├── image_001.jpg
├── image_001.json
├── image_002.jpg
└── image_002.json
Install the LabelMe Toolkit by following LabelMe's toolkit installation guide. The toolkit and its exports run locally.
!!! info "LabelMe Pro is required for the export"
`export-to-yolo` is part of the LabelMe Pro Toolkit, and downloading its installer requires a LabelMe sign-in.
This is a LabelMe product requirement; the resulting ZIP can be uploaded on any Platform plan.
Verify the installation, then list every label found in the source dataset:
labelmetk --version
labelmetk list-labels your_dataset/
Review the output before exporting. Labels omitted from --class-names are skipped, and the order you provide becomes
the YOLO class ID order.
Run export-to-yolo with the source directory and a comma-separated list of
class names:
labelmetk export-to-yolo your_dataset/ --class-names crack,normal
Replace crack,normal with the labels returned by list-labels. LabelMe writes the result to
your_dataset.export/:
your_dataset.export/
├── classes.txt
├── images/
│ ├── image_001.jpg
│ └── image_002.jpg
└── labels/
├── image_001.txt
└── image_002.txt
classes.txt preserves the class names in the same order used by the YOLO label files. Keep it at the root of the
export.
!!! note "This workflow creates a detection dataset"
LabelMe Toolkit exports rectangles as YOLO bounding boxes. It also reduces polygons and masks to their
axis-aligned bounding boxes, so `export-to-yolo` does not preserve segmentation geometry. Draw rectangles when
preparing a detection dataset with this workflow.
Compress the contents of your_dataset.export/, not the directory around them. On macOS or Linux:
cd your_dataset.export
zip -r ../your_dataset.zip classes.txt images labels
On Windows PowerShell:
Compress-Archive -Path .\your_dataset.export\* -DestinationPath .\your_dataset.zip
Open the ZIP before uploading and confirm that classes.txt, images/, and labels/ are at its root. An extra
your_dataset.export/ wrapper prevents Platform from finding the root class list.
your_dataset.zip and finish creating the dataset.<!-- screenshot -->
LabelMe and the YOLO export remain entirely offline. Only the ZIP file you select in the upload dialog is sent to Platform.
class0, class1, and so on: confirm that classes.txt is present at the root of the ZIP.labelmetk list-labels your_dataset/ again and include every required label in
--class-names.export-to-yolo; it converts non-rectangle
shapes to bounding boxes.images/ directory is included in the ZIP.classes.txt, images/, and
labels/ are the top-level entries.For the complete local workflow, see LabelMe's
YOLO training guide and
export-to-yolo reference.