Metadata-Version: 2.5
Name: visionset
Version: 0.1.0
Summary: Open-source, local-first tool for creating, curating, and versioning computer-vision training datasets — with a Physical AI roadmap.
Project-URL: Homepage, https://github.com/Robomous/VisionSet
Project-URL: Issues, https://github.com/Robomous/VisionSet/issues
Author: Robomous
License-Expression: Apache-2.0
License-File: LICENSE
License-File: THIRD-PARTY-NOTICES.md
Keywords: annotation,computer-vision,datasets,labeling,physical-ai
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.141.1
Requires-Dist: mcp>=2.0.0
Requires-Dist: packaging>=24.0
Requires-Dist: pillow-heif>=1.5.0
Requires-Dist: pillow>=11.0
Requires-Dist: pydantic-settings>=2.4
Requires-Dist: pydantic>=2.7
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: typer>=0.12
Requires-Dist: uvicorn>=0.52.0
Provides-Extra: local-inference
Requires-Dist: accelerate>=0.33; extra == 'local-inference'
Requires-Dist: huggingface-hub>=0.24; extra == 'local-inference'
Requires-Dist: torch>=2.4; extra == 'local-inference'
Requires-Dist: torchvision>=0.19; extra == 'local-inference'
Requires-Dist: transformers>=5.0; extra == 'local-inference'
Provides-Extra: mlflow
Requires-Dist: mlflow-skinny>=3.18.0; extra == 'mlflow'
Description-Content-Type: text/markdown

<img src="https://cdn.robomous.ai/public-images/robomous-banner.svg" alt="Robomous.ai" width=300 />

-----

# Robomous VisionSet

[![CI](https://img.shields.io/github/actions/workflow/status/Robomous/VisionSet/ci.yml?branch=main&logo=github&label=CI)](https://github.com/Robomous/VisionSet/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/visionset.svg?logo=pypi&logoColor=white)](https://pypi.org/project/visionset/)
[![Python versions](https://img.shields.io/badge/python-3.11_%7C_3.12_%7C_3.13_%7C_3.14_%7C_3.15-3776AB.svg?logo=python&logoColor=white)](https://pypi.org/project/visionset/)
[![Downloads](https://img.shields.io/pypi/dm/visionset.svg)](https://pypistats.org/packages/visionset)
[![License](https://img.shields.io/pypi/l/visionset.svg)](https://github.com/Robomous/VisionSet/blob/main/LICENSE)

**VisionSet** is an open-source tool by [Robomous](https://robomous.ai) for creating, curating,
and versioning computer-vision training datasets. Annotate images, video frames, and point-cloud
scans in a local workspace. The browser app, REST API, CLI, and MCP server all use the same Python
SDK and ship in one installable package.

**[Website](https://www.visionset.org/)** · [Quickstart](#quickstart) · [Documentation](#documentation) · [PyPI](https://pypi.org/project/visionset/)

## See it

The shots below are the app on a local workspace: frames cut from a traffic clip and labeled with
boxes, and three point-cloud maps ingested as scans.

![The project list: image projects and a point-cloud project side by side, with each one's progress](https://raw.githubusercontent.com/Robomous/VisionSet/main/docs/public/screenshots/projects.png)

![A project's overview: a clip's frames as one batch, 100% labeled, with the class mix and an image grid](https://raw.githubusercontent.com/Robomous/VisionSet/main/docs/public/screenshots/project-overview.png)

![The annotator on a video frame: boxes for cars, a truck, a motorcycle and a pedestrian, with the objects panel beside them](https://raw.githubusercontent.com/Robomous/VisionSet/main/docs/public/screenshots/annotator-image.png)

![The annotator on a point-cloud scan: 439,800 of 2,638,798 points drawn, colored by height, in the lidar_flu frame, with the 3D editing tools](https://raw.githubusercontent.com/Robomous/VisionSet/main/docs/public/screenshots/annotator-point-cloud.png)

## What it does

Bring in raw media or an existing labeled dataset, review the annotations, and export a version
for training. Open the browser app for video import and interactive annotation. The REST API and
MCP can also write annotations. Use the CLI to ingest media, manage work, and publish or export a
release. See the [interface comparison](docs/content/surfaces.md) for the full list.

| | |
| --- | --- |
| **Ingest** | Add folders of images or PCD and PLY scans. Import video frames in the browser, or ingest a clip with an installed FFmpeg. VisionSet stores identical media bytes once. |
| **Import labels** | Bring in an existing dataset through the CLI or MCP. The import creates an approved batch with provenance so you can review it before promotion. See [supported formats](docs/content/import.md#formats). |
| **Annotate** | Draw boxes, oriented boxes, polygons, polylines and class tags on images and video frames, and 3D cuboids and paths on point-cloud scans, with keyboard shortcuts and undo and redo. The browser cannot draw masks or place keypoints; those labels come from an import, REST, MCP or the SDK. See [supported geometries](docs/content/annotations.md). |
| **Version** | Each label records the schema version it was validated against. Publishing a release freezes the dataset in an immutable manifest. |
| **Split** | A seeded recipe keeps identical assets in the same split. Assets with the same imported group label can also be kept together. See [releases](docs/content/releases.md). |
| **Export** | Pick a [training target](docs/content/releases.md#export-targets) or format. The compatibility report shows which annotations or assets it would drop before writing files. |
| **Pre-process** | Use a [recipe](docs/content/preprocessing.md) to resize images and create augmented variants for the training split. The export report records the recipe. |
| **Auto-label** | Configure a model for [interactive suggestions or batch pre-labeling](docs/content/inference.md). Accepted suggestions record model provenance. |
| **Automate** | Use the Python SDK, REST API, CLI, or MCP server to manage the workflow. |

The [release acceptance matrix](docs/content/support-matrix.md) rates each labeling task, surface, and platform and names the evidence behind each rating. The maintainer ratified it on 2026-12-01. [Limitations](docs/content/limitations.md) lists what is not supported.

## Quickstart

```bash
uv tool install visionset

visionset init ~/datasets/road-signs     # a workspace, here and nowhere else
cd ~/datasets/road-signs
visionset server                         # API at http://127.0.0.1:8000, app at /app
```

Open `http://127.0.0.1:8000/app`. The [tutorial](docs/content/tutorial.md) takes you from source
images to a YOLO export. The examples and feature descriptions follow `main`. See the
[installation guide](docs/content/install.md) to build a wheel from the current checkout.

To connect an MCP client to a workspace, add this configuration:

```json
{ "mcpServers": { "visionset": {
    "command": "visionset", "args": ["mcp"],
    "env": { "VISIONSET_WORKSPACE": "/path/to/workspace" } } } }
```

See the [MCP setup guide](docs/content/mcp.md), [tool reference](docs/content/mcp-tools.md), and
[end-to-end walkthrough](docs/content/mcp-walkthrough.md).

### Use VisionSet from your coding agent

The [agent plugin](agent-plugins/README.md) gives Claude Code, Codex CLI and Gemini CLI the
VisionSet MCP server and six skills (`setup`, `ingest`, `annotate`, `explore`, `export`,
`release`). It launches a compatible installed `visionset`, or builds its own runtime on first
start. Run `visionset init` first: the server does not start without a workspace.

| Agent | Install |
| --- | --- |
| Claude Code | `claude plugin marketplace add Robomous/VisionSet`<br>`claude plugin install visionset@visionset` |
| Codex CLI | `codex plugin marketplace add Robomous/VisionSet`<br>`codex plugin add visionset@visionset` |
| Gemini CLI | `gemini extensions install https://github.com/Robomous/VisionSet --ref v<version>` |

Then ask the agent in plain language, for example:

> Use VisionSet to make a YOLO dataset of vehicles. The frames are in `/path/to/frames`. Create a
> project with one `vehicle` bbox class, ingest the folder, and pre-label every frame with a text
> model. Stop when the pre-labels are ready and tell me to review them in the browser. When I
> confirm, complete the batch, release the dataset and export it as YOLO.

MCP ingests folders of images only. A video is a browser import (`visionset server`, then
`/app`), so import the video there or extract frames first. Pre-labeling needs an inference
connection to a text-capable model, which may download weights, and the model's labels are
reviewed by a person in the browser before release. Running a model locally is not supported on macOS
Intel (x86_64). See the [MCP walkthrough](docs/content/mcp-walkthrough.md).

Replace `<version>` with a published release, such as `0.1.0`. Skills are `/visionset:<name>`
in Claude Code and `$visionset:<name>` in Codex, and appear in `gemini extensions list` in Gemini.
Codex does not search for a workspace, so set `VISIONSET_WORKSPACE` to its absolute path in the
environment Codex runs in. Gemini installs from the archive attached to the GitHub Release, does
not support Windows, and starts no extension server in an untrusted folder. The marketplaces pin the
`VERSION` on `main`, so an install between a version bump and the PyPI upload cannot bootstrap.

You can also manage the workflow from the terminal and label the images in the browser:

```bash
visionset project create road-signs
visionset schema apply schema.json --project road-signs
BATCH=$(visionset ingest ./incoming --project road-signs)
visionset batch approve "$BATCH" --jobs-of 100 --start
# …label in the app, then…
visionset batch finish "$BATCH" --promote
visionset release publish --tag v1.0 --project road-signs --split 0.7,0.15,0.15
visionset export --project road-signs --release v1.0 --target yolo11 --check
# --check exits 1 when consent is needed. Only if the reported losses are acceptable:
visionset export --project road-signs --release v1.0 --target yolo11 --out ../road-signs-yolo --allow-lossy
```

`--check` reports what this release would lose in this format: the dropped or degraded classes, and
how many annotations. A format that declares itself lossy, such as YOLO, still needs `--allow-lossy`
when this release loses nothing, and a format that is not lossy by declaration needs it when this
release would lose something. Pass the flag as a decision after reading the report, not by default.

Commands with structured output accept `--json` and use the same field names as the API. See
[docs/content/cli.md](docs/content/cli.md), or [`examples/cli_end_to_end.sh`](examples/cli_end_to_end.sh) for that
walk with its assertions still in it.

Prefer to see the SDK first? [`examples/sdk_end_to_end.py`](examples/sdk_end_to_end.py) drives an
empty directory to a hash-verified release in one pass, generating its own images — no server,
no CLI, nothing to download. Run it with `uv run python examples/sdk_end_to_end.py`; the
walkthrough is in [docs/content/examples.md](docs/content/examples.md).

For where the assets themselves come from,
[`examples/ingest_end_to_end.py`](examples/ingest_end_to_end.py) turns a folder of generated stills
into 50 deduplicated assets in an approved batch, then shows a re-run creating nothing. It needs
nothing on the host. Starting from a video is a browser capability and has no script form: see
[docs/content/ingest.md](docs/content/ingest.md).

The same cycle runs over each of the other two surfaces, and both start the shipped command for
real: [`examples/http_end_to_end.py`](examples/http_end_to_end.py) starts `visionset server` on a
free port and drives the API with `urllib` and a bearer token — multipart upload, 202-and-poll
ingest, hash-checked manifest and a 401 it asserts — while
[`examples/mcp_end_to_end.py`](examples/mcp_end_to_end.py) spawns `visionset mcp` and talks
JSON-RPC down its pipe, scaling every box out of the preview it saw and into the asset's own
pixels.

## Monorepo map

```
src/visionset/          Single Python distribution (one wheel, one import namespace)
  kernel/               Hexagonal core: domain + ports + default adapters (framework-free)
  wire/                 The JSON shapes the CLI and MCP publish (gated against the REST models)
  server/               FastAPI — exposes the SDK via REST; openapi.json is a committed contract
  cli/                  Typer CLI (`visionset` console script)
  mcp/                  MCP server (stdio) — agent tools over the same SDK; the four destructive
                        tools only under `--allow-destructive` (see the generated tool reference)
  formats/              Format plugins (entry-point group `visionset.formats`): ultralytics, yolov5-yaml,
                        darknet, yolo-obb, dota, coco, coco-panoptic, segmentation-png, voc, labelme,
                        createml, open-images, tfrecord, classification, classification-dir, the lane
                        formats (tusimple, culane, curvelanes, bdd100k-lane, openlane-2d), mot,
                        cvat-images, cvat-video and kitti. All write; all read except tusimple, culane,
                        curvelanes and bdd100k-lane. nuscenes is import-only.
                        `visionset format matrix` lists each direction and its evidence
  preprocessing/        Pre-processing drivers: Pillow resize and augmentation behind the
                        `PreprocessingDriver` port (entry-point group `visionset.preprocessing`)
  tracking/             Optional MLflow experiment tracking (the `mlflow` extra)
  jobs/                 Handlers for work that outlives a request: ingest, export, weights
  inference/            Where a model connection becomes a running model (optional runtime)
  _static/              Compiled UI bundle lands here at build time (ships in the wheel)
frontend/
  annotator/            @visionset/annotator — headless annotation engine (no React in core/)
  media/                @visionset/media — browser video import and sampling
  browser-inference/    @visionset/browser-inference — ONNX execution in a browser worker (bundled, never published)
  ui-core/              @visionset/ui-core — domain components, tokens, generated API contract
  app/                  @visionset/app — OSS product shell (Vite + React, never published)
agent-plugins/          Client manifests, launcher, and end-user skills
tests/                  Python tests, incl. machine-enforced architecture contracts
examples/               Six runnable end-to-end scripts, all exercised in CI
docs/                   Documentation: content/ is the Markdown (user and contributor docs, one page per
                        subsystem); the rest is the Astro + Starlight site that renders it — a view, never a second copy
docker/                 Dev-only compose environment (never the release artifact)
scripts/                Repo automation (OpenAPI export, version sync, bundling, dist build)
.agents/skills/         Coding-agent skills, tool-agnostic (see AGENTS.md)
```

`ui-core` reaches data through a small contract rather than any particular transport, so its
screens are mountable by a host other than this application — the OSS app you see here is one
implementation of that host, not the only one there could be.

## Documentation

The project website is at [www.visionset.org](https://www.visionset.org/). Start with [docs/content/install.md](docs/content/install.md) and [docs/content/tutorial.md](docs/content/tutorial.md).
[docs/content/README.md](docs/content/README.md) indexes the rest — one page per subsystem, each written to
explain the decisions rather than restate the code.

**`docs/content/` is the source of truth**, and it is plain Markdown so that it reads on GitHub with
nothing installed. [`docs/`](docs/README.md) renders the same files as a searchable
website; it adds no content of its own. To read it locally:

```bash
docker compose -f docker/compose.yaml up docs    # http://localhost:4321
```

or, without Docker, `pnpm --dir docs install && pnpm --dir docs dev`. Editing anything
under `docs/content/` reloads the page.

## Development setup

```bash
uv sync         # Python env + dev tools
pnpm install    # frontend workspace
```

Then `uv run visionset server` and `pnpm --filter @visionset/app dev`. Or run the whole thing in
containers instead, with nothing installed on the host and nothing built.

### Run it with Docker, and sign in with nothing

```bash
docker compose -f docker/compose.yaml up
```

**Open http://localhost:8080. There is no token to find and nothing to paste** — the app opens on
the project list. The server signs in the browser it served itself, over an `HttpOnly` cookie it
sets on the first request the page makes; [docs/content/auth.md](docs/content/auth.md#the-browser-session) has the
mechanism and the reasoning.

One port, nginx in front of both services. The first run builds two images, every later one just
starts them; dependencies are installed at build time, so starting the stack downloads nothing.

A token is still minted on first boot and printed in the `api` logs, because `curl`, the SDK and
other HTTP clients have no session and never will (MCP needs no token at all):

```bash
docker compose -f docker/compose.yaml logs api | grep vst_    # if you scrolled past it
docker compose -f docker/compose.yaml exec api \
  visionset token create --name <name>                        # or mint another
```

The browser never needs either. If the page *does* ask for a token, the stack is not the one this
README describes — check that `VISIONSET_UI_SESSION: always` is set on the `api` service and that
you are reaching it through port 8080.

> **Why `always` here, and what it costs.** The default, `VISIONSET_UI_SESSION=auto`, issues a
> session only to a client on this machine — and behind a proxy no request ever looks like one,
> because the peer is nginx. So the compose stack says `always`. The front door on 8080 is
> published on every interface, so another device on your network — a phone, a tablet — can open
> the dev stack at `http://<your address>:8080`; the api and vite publish no host port at all. The
> consequence is that whoever reaches 8080 is signed in, so the stack trusts the network it runs
> on. On one that is not yours, set `VISIONSET_UI_SESSION: never` to go back to typing a token,
> or bind the nginx port to `127.0.0.1` in `docker/compose.yaml`.

Everything it stores lands in **`workspace-data/`** (git-ignored): SQLite for metadata, a local
directory for the files, one workspace holding both — the shape MLflow's default mode has, and the
only shape VisionSet has. Put it elsewhere with `VISIONSET_DATA=/path docker compose …`; it is a
bind mount, so `down -v` does not take your data with it. Model weights are not data: the api
keeps them in its standard Hugging Face cache on the `hf-cache` volume, outside the workspace, which
`down -v` does delete; they are fetched again on the next set-up. Point `VISIONSET_HF_CACHE` in
`docker/.env` at a host directory to use that instead ([details](docs/content/inference.md#running-a-model-here-needs-the-local-inference-extra)).

The containers run as you rather than as root, so everything they write there — and every
`__pycache__` and generated page elsewhere in the checkout — belongs to the account that started
them, and a later `pnpm -r build` or `git worktree remove` is not blocked by a file it cannot
touch. That is the uid the stack finds at 1000, which is the first account on a Linux
workstation. If yours is another number, tell it once and rebuild:

```bash
printf 'VISIONSET_UID=%s\nVISIONSET_GID=%s\n' "$(id -u)" "$(id -g)" > docker/.env
docker compose -f docker/compose.yaml up --build
```

On macOS and Windows the defaults are already right — Docker Desktop translates ownership itself.
Under rootless Docker, set both to `0`: there the daemon maps the container's root onto you
already.

Dev only — the release artifact is always the pip package.

The inner loop while iterating: `uv run pytest <path>`, `uv run lint-imports`,
`uv run mypy src/visionset/kernel` (the kernel only — CI checks all of `src/visionset`),
`pnpm -r build`, `pnpm test` (no browser — the two Playwright suites sit outside it). Each is a
subset of what CI runs, which skips the jobs a change cannot affect; the full list, with what each command does not
cover, is in [CONTRIBUTING.md](CONTRIBUTING.md#checks-that-must-stay-green).

## Releases

[CHANGELOG.md](CHANGELOG.md) — what each version added, and the six milestones that got here.
[docs/content/releasing.md](docs/content/releasing.md) is the runbook for cutting one.

## License

Apache-2.0 — copyright Robomous. See [LICENSE](LICENSE).

The wheel ships a compiled browser bundle, so it redistributes its dependencies too;
[THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md) records the notices that owes.

## VisionSet 0.1.0 scope and limitations

The 0.1.0 target is local-first, SDK-first computer-vision dataset engineering: ingest and
annotation or review, through curated, versioned releases, to export for external consumers. This
section describes that target. The docs in this repository follow `main`, so a feature described
here may not be in the published package once `main` moves past it. The
statuses below are the ratified decisions in the [support matrix](docs/content/support-matrix.md),
which names the evidence behind each one and is the authoritative list.

**Stable:** bounding-box detection, instance segmentation with polygons, keypoints and
pose, classification, and video tracking, each with an export that an independent reader loads in
CI. On the platform side: Linux, Chromium, browser video import with WebCodecs, and local
inference on CPU (with stand-in models; see below). See the [tutorial](docs/content/tutorial.md) and
[releases](docs/content/releases.md) for the workflow.

**Conditional (limited), unverified or unsupported:**

- Oriented boxes, semantic and panoptic segmentation, 2D lanes, 3D cuboids on point-cloud scans,
  3D paths and calibrated-image 3D cuboids are Conditional: they work, but the path is
  incomplete or no independent reader has checked the output. Depth is not implemented.
- The browser cannot draw masks or place keypoints, and the surfaces differ on purpose; see
  [surfaces](docs/content/surfaces.md#intended-limits).
- `nuscenes` is import-only, and fidelity to real KITTI and nuScenes data is not claimed.
- A declared model family is not a verified model. Local inference runs in CI only on CPU, with
  stand-in models and no real forward pass; `cuda` and `mps` are unverified. Browser inference runs
  one model.
- macOS, Windows, Firefox and Safari are unverified.
- VisionSet prepares data for training. It does not train models or control robots.

**Possible future work**, not supported today and not committed to any release: ROS 2 and MCAP,
synchronized multisensor data, LeRobot, RLDS and VLA formats, dataset embeddings for similarity
search and curation, and advanced 3D segmentation.

**Approved future work**, deferred past 0.1.0 by the maintainer: Mosaic (#1250), MixUp, CutMix and
Copy-Paste (#1251), advanced geometric augmentation (#1252) and plugin directory submissions (#1269).

Read the [limitations](docs/content/limitations.md) for the full list.
