Skip to main content

AnnoLabel by Andesprit

MIT-licensed software maintained by Andesprit. See the license, asset provenance, and compatibility policy.

A local image-labeling CLI for vision-capable agents. The agent inspects your image and chooses scene labels, bounding boxes, and segmentation polygons. AnnoLabel validates and saves annotations, renders review images, and exports COCO datasets.

The PyPI distribution, executable, and Python module are all annolabel.

Install

uv tool install annolabel
annolabel --version
annolabel --help

Or install into an existing Python environment:

python -m pip install annolabel

Requires Python 3.11 or later. Runtime dependencies are Pillow and Pydantic. AnnoLabel itself does not call LLMs, download models, or need API keys. Your chosen agent needs an image-viewing tool and shell access, and uses its own model-provider authentication.

Previously published as andesprit-labelkit. When upgrading, replace labelkit commands and Python imports with annolabel; the core facade is now AnnoLabel in annolabel.core.annolabel. Existing annotation sidecars and task handles remain compatible. Keep active task directories in place.

Label an image

annolabel task /data/photo.jpg --output /data/work/photo-task

Open the returned view using your agent's image tool. It has the source image's exact EXIF-oriented pixel dimensions with no padding, grid or resizing. The top-left corner is (0,0); x increases right and y increases down.

Ask the agent to write a complete JSON snapshot such as this, replacing every label and coordinate with its own visual interpretation:

{
  "classifications": [{"label": "outdoor"}],
  "objects": [
    {
      "key": "object-1",
      "label": "example object",
      "box": [50, 30, 250, 180],
      "polygon": [[50, 100], [120, 30], [250, 100], [200, 180], [50, 180]],
      "note": "Describe uncertain identity or boundary placement here."
    }
  ]
}

These are schema examples, not annotations for your image. Both classifications and objects arrays are required. Coordinates must stay within the original oriented image bounds. Polygons need at least three distinct vertices, no self-intersections, and no repeated closing vertex. The box must contain the polygon; omit box to derive it automatically from the polygon.

Submit all annotations together:

annolabel submit /data/work/photo-task/task.json --file /data/annotations.json

Open the returned review view. Check missing objects, class meaning, clipped contours, excess background, and coordinate shifts. If necessary, submit one corrected complete snapshot using the new task handle:

annolabel submit /data/work/photo-task/pass1/task.json --file /data/corrected.json

Retain stable object keys and every unchanged object/class. Each submission replaces the whole image snapshot; omitted objects and classes are removed. By default a task allows two successful submissions. Use --max-passes 1 when creating a task to allow one.

If output is lost, recover the latest handle and view:

annolabel task-status /data/work/photo-task/task.json

Invalid submissions preserve the existing annotations. Stale external edits are rejected. Keep a single writer per source image; revision checks are not a multi-process lock.

Choose the task

  • Whole-image classification: annolabel label IMAGE --label CLASS.
  • Boxes only: create a task with --geometry boxes and submit objects with box and no polygon.
  • Segmentation: the default requires a polygon per object, with a derived or explicit bounding box.
  • Restrict object labels: pass --categories categories.json, a JSON array such as ["car", "person"]. Scene labels are independent.
  • Save research instructions: pass --instructions instructions.txt when creating a task. Also supply those instructions directly to the agent; the compact response does not repeat them.

Export for training

annolabel export /data/photo.jpg --output /data/dataset
# Or export every annotated source discovered recursively:
annolabel export /data/images --output /data/dataset-all

COCO is the default and currently the only built-in training format. Export produces:

dataset/
  annotations/instances_default.json
  images/default/000001.png
  categories.json
  classifications.csv
  provenance.json
  README.txt

Use images/default/ as your COCO loader's image root. Each object has one record combining its box and optional polygon. COCO boxes use [x,y,width,height]; the CLI accepts [x1,y1,x2,y2]. Scene classifications and original IDs/notes are preserved separately. Provenance includes original source paths.

Reuse an ordered category vocabulary through export --categories categories.json across splits. AnnoLabel does not invent a train/validation split. Folder export skips images without annotation sidecars.

Give your agent this workflow

Use AnnoLabel to annotate IMAGE_PATH. Research task: YOUR_LABELS_AND_BOUNDARY_POLICY.
Create a task in NEW_OUTPUT_DIRECTORY. Open its returned view and use original
oriented pixels. Submit all scene labels and objects together. Review the returned
view once and, if needed, submit one corrected full snapshot with the new task
handle. Retain unchanged objects. Use your own vision; no detectors, segmentation
models, crop scripts or implementation inspection. Export COCO and report paths
and remaining uncertainty. Use task-status if a command response is lost.

Works with Codex, Claude Code, Gemini/Antigravity, or another image-capable agent with shell access. Folder traversal and batching are handled by the calling agent, with one task per image.

More tools and limitations

Run annolabel COMMAND --help for any of: task, submit, task-status, info, label, box, polygon, link, remove, render, mask, prepare, apply, review, and export.

prepare / apply / review support detailed packets and padded crop reviews when more inspection is needed. They use a full revision-aware snapshot instead of the short submit contract. Detailed ruler values are original coordinates, not PNG margin positions.

Annotations are stored beside the source as IMAGE.labels.json. Output directories must be new. Source images remain unchanged. Task handles contain absolute paths and should stay in place during active work; use COCO exports for portable datasets.

Supports single-frame raster images and simple single-component polygons. No polygon holes, multipart instances, keypoints, video, inference engine, or GUI. Geometry validation does not establish visual accuracy: the agent must review the pixels and report uncertainty.

Public source repository: Andesprit/annolabel.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

annolabel-0.5.1.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

annolabel-0.5.1-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file annolabel-0.5.1.tar.gz.

File metadata

  • Download URL: annolabel-0.5.1.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for annolabel-0.5.1.tar.gz
Algorithm Hash digest
SHA256 fcfb584f8deb79290749e1d09504498ae5f59104ca3c75ac6a00a96dc62434a4
MD5 798bd83565be0653cf5c439624619219
BLAKE2b-256 0021793fd9704fdca7fcef4a1091df7d286a3b3efac3aedb3438154dec85cea3

See more details on using hashes here.

File details

Details for the file annolabel-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: annolabel-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for annolabel-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a22ad686ba0d007b32c43efe61c920c52b94d6f86a9d81351f28229e7116d2af
MD5 75c595b435f3eff3552b5fd1b82859f0
BLAKE2b-256 023b3abbc0240bbed21db29c759750a1e01eb87f4e76e3ad69665856f25099b3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 files

0.5.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page