Semi-automatic image annotation tool with AI-assisted object detection
Project description
Anno-Mage: A Semi Automatic Image Annotation Tool
Semi-automatic image annotation toolbox powered by PyTorch object detection models. Available as both a desktop app (Tkinter) and a web app (FastAPI + React).
Interfaces
Desktop App
A Tkinter GUI that runs locally. Annotate images from a directory with keyboard navigation and a precision zoom panel.
Web App
A browser-based interface with a modern dark/light UI, REST API, and dataset directory browsing. See web/README.md for full documentation.
Desktop App
Dependencies
- Python 3.12
- PyTorch + Torchvision (for RetinaNet inference)
- Pillow, pascal-voc-writer
Custom snapshots from legacy Keras (.h5) or TensorFlow (frozen_inference_graph.pb) models can be placed in snapshots/keras/ and snapshots/tensorflow/ respectively and will be listed in the model menu.
Installation
-
Clone this repository.
-
Create and activate a virtual environment:
python -m venv my_venv source my_venv/bin/activate # On Windows: my_venv\Scripts\activate
-
Install dependencies:
pip install torch torchvision pillow pascal-voc-writer
-
Run the app:
python main.py
The default model (RetinaNet ResNet50 FPN V2) downloads its weights automatically from the PyTorch model hub on first run.
Usage
- Click Open Dir to select a folder of images, or Open for a single image.
- Use Add All Classes to load all 80 COCO labels, or pick individual ones from the dropdown.
- Select Auto suggestion mode and click Detect to run object detection.
- To annotate manually, select a class from the list, then drag a bounding box on the canvas.
- Use ← → arrow keys to move between images. Annotations save automatically on navigation.
- Final annotations are written to:
annotations/annotations.csvannotations/annotations_voc/<image>.xml(Pascal VOC)
To annotate a custom (non-COCO) dataset, update the label map in config.py before running.
Tested on
- Windows 10
- Ubuntu 16.04
- macOS High Sierra
Web App
See web/README.md for installation, usage, and API reference.
Quick start:
# Backend (port 8000)
cd web/backend && python main.py
# Frontend (port 3000)
cd web/frontend && npm install && npm run dev
Or use the convenience script:
cd web && bash start.sh
PyPI Distribution
Install from PyPI
pip install anno-mage
anno-mage
The app opens in your browser automatically. Annotations are saved to ~/.anno-mage/annotations/.
Publish a Release
Releases publish automatically to PyPI when a version tag is pushed. GitHub Actions builds the frontend, packages everything, and publishes via PyPI Trusted Publishers (no tokens required).
One-time PyPI setup:
- Go to your PyPI project → Manage → Publishing → Add a new publisher
- Set: GitHub repo
virajmavani/semi-auto-image-annotation-tool, workflowrelease.yml, environmentpypi
To release:
git tag v2.0.1
git push origin v2.0.1
That's it — the workflow in .github/workflows/release.yml handles the rest.
Build Locally
To build the package without publishing:
Prerequisites:
pip install build
npm install # inside web/frontend if not already done
bash build_release.sh
This compiles the React frontend, copies the build into anno_mage/static/, and produces wheel and sdist artifacts in dist/.
Output Formats
Both interfaces produce identical output:
| Format | Location | Description |
|---|---|---|
| CSV | annotations/annotations.csv |
image_path,x1,y1,x2,y2,label per row |
| Pascal VOC XML | annotations/annotations_voc/ |
One XML file per image |
Acknowledgments
- Meditab Software Inc.
- PyTorch / Torchvision for the RetinaNet implementation
- Computer Vision Group, L.D. College of Engineering
Join the developers channel
Slack: https://join.slack.com/t/annomage/shared_invite/zt-dh4ca9du-4VOcwUMCSNA6lmyG~tNUPg
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anno_mage-2.0.1.tar.gz.
File metadata
- Download URL: anno_mage-2.0.1.tar.gz
- Upload date:
- Size: 182.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91a89b7f7e41959cf11c382d79d8f9b1976b99bd4eaa8ee698abdfde805dee98
|
|
| MD5 |
f376479678d869c4f32ddb0da5b8cf13
|
|
| BLAKE2b-256 |
8dbc21a8d7e11806fbc46f26d36af782335c7e65ba0c8a9514a6bf413ac0c5a3
|
Provenance
The following attestation bundles were made for anno_mage-2.0.1.tar.gz:
Publisher:
release.yml on virajmavani/semi-auto-image-annotation-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anno_mage-2.0.1.tar.gz -
Subject digest:
91a89b7f7e41959cf11c382d79d8f9b1976b99bd4eaa8ee698abdfde805dee98 - Sigstore transparency entry: 1313766295
- Sigstore integration time:
-
Permalink:
virajmavani/semi-auto-image-annotation-tool@55d19f116e646a8ef0c44b162583f7e9eeaf2786 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/virajmavani
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@55d19f116e646a8ef0c44b162583f7e9eeaf2786 -
Trigger Event:
push
-
Statement type:
File details
Details for the file anno_mage-2.0.1-py3-none-any.whl.
File metadata
- Download URL: anno_mage-2.0.1-py3-none-any.whl
- Upload date:
- Size: 181.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea12df062e21200a56493c1e28dd24519e3da9dde5fb3455de3fe6980b4ce223
|
|
| MD5 |
5a76ed5b0ae47998044fb232c74f2aec
|
|
| BLAKE2b-256 |
da93cd2908e291bcb29c4b41313136ce7b7a4322e9a60923510257961b48bb83
|
Provenance
The following attestation bundles were made for anno_mage-2.0.1-py3-none-any.whl:
Publisher:
release.yml on virajmavani/semi-auto-image-annotation-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anno_mage-2.0.1-py3-none-any.whl -
Subject digest:
ea12df062e21200a56493c1e28dd24519e3da9dde5fb3455de3fe6980b4ce223 - Sigstore transparency entry: 1313766381
- Sigstore integration time:
-
Permalink:
virajmavani/semi-auto-image-annotation-tool@55d19f116e646a8ef0c44b162583f7e9eeaf2786 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/virajmavani
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@55d19f116e646a8ef0c44b162583f7e9eeaf2786 -
Trigger Event:
push
-
Statement type: