wkentaro/labelme

Image annotation with Python. Supports polygon, rectangle, circle, line, point, and AI-assisted annotation.

labelme – graphical image annotation tool

What it is – A desktop application (written in Python + Qt) for drawing bounding boxes, polygons, circles, lines, points and classification flags on images or video frames. Annotations are saved as simple JSON files that can be directly consumed by machine‑learning pipelines.

Why it matters – High‑quality labeled data is the bottleneck for computer‑vision models (semantic/instance segmentation, object detection, classification, etc.). labelme provides a free, cross‑platform way to create those labels and can export them in the VOC or COCO formats that most training frameworks expect.

Key features

  • Polygon, rectangle, circle, line, point drawing; flag‑based classification.
  • Video frame annotation.
  • GUI customization (pre‑defined label lists, auto‑save, validation).
  • Export to VOC‑style datasets (semantic/instance segmentation) and COCO‑style datasets (instance segmentation).
  • Recent AI‑assisted helpers: SAM/EfficientSAM for point‑to‑mask, YOLO‑World/SAM‑3 for text‑to‑annotation.
  • Multilingual UI (≈20 languages).
  • Stand‑alone executable (no Python/Qt needed) and pip installable package.

Installation

  1. pippip install labelme (or pip install git+https://github.com/wkentaro/labelme.git for the latest code). Works on Python 3.12‑3.14 with Qt6 (PySide6).
  2. Standalone app – download a pre‑built binary from the project site (one‑time payment, no dependencies).
  3. Linux packages – many distributions ship labelme via their native package manager (see the Repology badge).

Typical workflow

# open the GUI on a single image
labelme my_image.jpg

# annotate a whole folder
labelme data_folder/ --labels labels.txt

# include the raw image data inside the JSON (useful for sharing)
labelme img.png --with-image-data

The resulting <image>.json contains the shapes, their labels, and optional image data. Example utilities in examples/utils.py show how to read these JSON files into NumPy arrays for training.

Export – After annotation you can run the built‑in exporters (or the helper scripts in the examples/ directories) to produce VOC or COCO dataset structures ready for frameworks like PyTorch‑Vision, Detectron2, or TensorFlow.

Community & support – The project has CI badges, a Discord server, and a public issue tracker. The README notes that the public interface is limited to the CLI, the JSON format, and the ~/.labelmerc config file; the Python import surface is internal and may change.


All information above is taken directly from the repository’s README.

Related

  • Project
  • Project
  • Project
  • Project
  • Project