Skip to main content

Local YOLO annotation viewer and editor

Project description

Anno Viz

Anno Viz is a local YOLO annotation viewer and editor for image datasets. It opens a native desktop window backed by a web UI, shows the current image with editable bounding boxes, and includes a thumbnail timeline for moving through the dataset quickly.

Screenshot

Anno Viz screenshot

Dataset Layout

Anno Viz expects a dataset directory with this structure:

dataset/
  images/
    image_001.jpg
    image_002.jpg
  labels/
    image_001.txt
    image_002.txt
  classes.txt

Labels use standard YOLO text format:

class_id x_center y_center width height

The coordinate values are normalized from 0 to 1.

Install

Create and activate a virtual environment if you want to keep dependencies isolated:

python3 -m venv .venv
source .venv/bin/activate

Install Anno Viz and its dependencies from the project root:

python3 -m pip install .

This installs the annoviz command. If you install outside a virtual environment and your shell cannot find annoviz, add your Python user scripts directory to PATH. On macOS with the system/Xcode Python this is often:

export PATH="$HOME/Library/Python/3.9/bin:$PATH"

For active development, install it in editable mode:

python3 -m pip install -e .

pywebview is required because the editor opens in a native desktop window. On macOS with Python 3.9, requirements.txt pins the PyObjC packages below version 12 because PyObjC 12 may try to build from source and fail on that toolchain.

Configure Dataset Directory

Set the default dataset directory for the current workspace:

annoviz --set-dataset-dir /path/to/dataset

This creates a local workspace config file named anno_viz_config. It is ignored by git, so each workspace can point at its own dataset.

You can also use the underscore alias:

annoviz --set_dataset_dir /path/to/dataset

Run

After setting the dataset directory:

annoviz

You can also run from source without installing through the compatibility wrappers:

python3 app.py
python3 anno_viz.py
python3 -m annoviz

To temporarily open a different dataset without changing the saved workspace config:

annoviz --dataset-dir /path/to/other/dataset
annoviz -dataset_dir /path/to/other/dataset

Optional Paths

Use these when your dataset does not follow the default images/, labels/, classes.txt layout:

annoviz \
  --images-dir /path/to/images \
  --labels-dir /path/to/labels \
  --classes-file /path/to/classes.txt

Other useful options:

annoviz --start-index 25
annoviz --port 8765
annoviz --save-dir /path/to/rendered/previews

Controls

Control

Action

n, Right Arrow

Next image

b, Left Arrow

Previous image

c

Move back 5 images

v

Move forward 2 images

x

Move back 10 images

a

Toggle add-annotation mode

Drag box

Move or resize an annotation

Tab

Select next box

+, -

Change selected/add class

0 to 9

Set selected/add class id

Delete, Backspace

Remove selected box from the label

s

Save label edits

d

Mark current image for deletion

Click a red thumbnail

Undo pending delete for that image

Apply Deletes

Delete all marked images and matching label files

q, Escape, Close

Close the editor

Delete Flow

Press d to mark the current image for deletion. Marked thumbnails are shown in red.

Deletion is not applied immediately. You can undo a pending delete by clicking the red thumbnail. To permanently remove all marked images and their label files, click Apply Deletes.

When closing from q, Escape, or the Close button with pending deletes, Anno Viz asks whether to apply the pending deletes before closing.

Config

The workspace config file is:

anno_viz_config

It stores JSON like:

{
  "dataset_dir": "/path/to/dataset"
}

This file is intentionally ignored by git because it is machine/workspace-specific.

Troubleshooting

If the editor says the dataset directory is not set, run:

annoviz --set-dataset-dir /path/to/dataset

If pywebview is missing, run:

python3 -m pip install .

If no images appear, check that your image files are inside the configured images/ directory. Supported extensions are handled by the local image collector in io_utils.py.

Project details


Download files

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

Source Distribution

annoviz-0.1.0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

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

annoviz-0.1.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file annoviz-0.1.0.tar.gz.

File metadata

  • Download URL: annoviz-0.1.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for annoviz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 01ea25ef596d7a60a44ebebf1a97bd7ac0fb78cdc6299515ca656c6093142c80
MD5 eab1f0a2062c40221ca59901cc209df8
BLAKE2b-256 f3d5727210f3af8242ef4b9651bbeade23f9c17b78f98013a46b6613fd595e40

See more details on using hashes here.

File details

Details for the file annoviz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: annoviz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for annoviz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70980a9f8559edf678e10b6ee07ec1365ca47a0518b27bfe6ff182f2eeda6c89
MD5 ef8a9deb6bef63d47879a389f0ee23a5
BLAKE2b-256 5ce015f12fd90d21cf1b4d0a34b04cd1b6f7443881af606c9291f6a71d1f4489

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page