Skip to main content

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

You can also use data.yaml instead of classes.txt for class names.

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 the published package directly with:

python3 -m pip install annoviz

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.

On Ubuntu and other Linux desktops, pywebview also needs system GUI libraries:

sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.1

If you run Anno Viz from a virtualenv on Ubuntu, create the virtualenv with access to system packages so it can import gi:

python3 -m venv --system-site-packages .venv

Configure Dataset Directory

If you run annoviz inside a folder that already has this layout:

images/
labels/
classes.txt or data.yaml

Anno Viz will use the current directory as the dataset automatically. No anno_viz_config file is needed for that case.

Otherwise, 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.

When you use a saved workspace dataset, Anno Viz also remembers the last image index you were viewing and resumes from there on the next launch.

You can also use the underscore alias:

annoviz --set_dataset_dir /path/to/dataset

The slideshow delay defaults to 50 ms. To save a different delay for the current workspace:

annoviz set slideshow delay 75
annoviz --set-slideshow-delay 75

Run

After setting the dataset directory, or from inside a dataset folder that matches the default layout:

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 or data.yaml 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
annoviz --browser

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

Play/Pause

Start or pause slideshow playback

Space

Hold to play slideshow playback; release to pause

<, > direction button

Toggle slideshow direction

Any other key during slideshow

Stop slideshow playback

a

Toggle add-annotation mode

p

Toggle draw mode for painting over the current image

u

Undo the last unsaved drawing stroke

Shift+u

Clear unsaved drawing strokes on the current image

Drag box

Move or resize an annotation

Tab

Select next box

Shift+click list item

Select every annotation from the selected box to the clicked item in the annotation list

Cmd/Ctrl+click list item

Add or remove one annotation from the selection

+, -

Change selected/add class (applies to all selected boxes)

0 to 9

Set selected/add class id (applies to all selected boxes)

Delete, Backspace

Remove all selected boxes from the label

s

Save label and drawing edits

d

Toggle current image in the pending-delete list, or all selected timeline images when a selection exists

Shift+click timeline thumbnail

Select every image from the current image to the clicked thumbnail

Cmd/Ctrl+click timeline thumbnail

Add or remove one image from the timeline selection

Escape with a timeline selection

Clear the timeline selection

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, or press d again to undo it. Marked thumbnails are shown in red, and the current marked image gets a translucent red overlay.

To mark many images at once, Shift+click a thumbnail in the timeline to select every image from the current image to that one (you can scroll the timeline first). Shift+click again to change the end of the range. Selected thumbnails get a white outline. Press d or Mark Delete to mark them all; if they are all already marked, the same key unmarks them. A plain click on the timeline clears the selection.

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",
  "last_index": 42,
  "slideshow_delay_ms": 50
}

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 you are already inside the dataset folder, make sure it contains images/, labels/, and either classes.txt or data.yaml. In that case annoviz will use the current directory automatically without creating anno_viz_config.

If pywebview is missing, run:

python3 -m pip install .

If the native window does not open on Ubuntu and the error mentions No module named 'gi', install the GTK/WebKit packages listed above and make sure your virtualenv can import gi. You can also run:

annoviz --browser

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.

Metadata

Release files for annoviz 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for annoviz 0.2.7
File Size Uploaded
annoviz-0.2.7.tar.gz 47.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for annoviz 0.2.7
File Interpreter ABI Platform
annoviz-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 91.5 kB

Release files / annoviz-0.2.7.tar.gz

Download URL annoviz-0.2.7.tar.gz
Size 47.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5375f5f3717876dcd90ca4349f7c6e0042078e6f987b045a56444eca64c99a63
BLAKE2b-256 checksum
How to use checksums
5e537974ec11715c448b924acea2ec4b3442abd3f0f648614e3c32a8f971d7e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / annoviz-0.2.7-py3-none-any.whl

Download URL annoviz-0.2.7-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4376a5306988df1c7dccb94d7d534404457588ead7b4472a3cc740d986516250
BLAKE2b-256 checksum
How to use checksums
973d68c01bb9be906278d7232ceedc40681a3e41514b8f08afe9ec5fee517010
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

0.2.8

2 release files

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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