Skip to main content

SOTA unsupervised auto-annotation SDK for image classification

Project description

AutoAnnotate-Vision 🎯

State-of-the-art unsupervised auto-annotation SDK for image classification with GUI

Tests Python 3.10+ License: MIT Code style: black

AutoAnnotate-Vision automatically clusters and organizes unlabeled image datasets using cutting-edge vision models (CLIP, DINOv2, SigLIP2). Features a graphical user interface for easy use and HTML preview for visual cluster inspection.

✨ Features

  • 🎨 Graphical User Interface: Easy folder browsers and visual controls
  • 🖼️ HTML Image Preview: View cluster samples in browse before labeling
  • 🤖 SOTA Vision Models: CLIP, DINOv2, DINOv2-Large, SigLIP2
  • 🔬 Multiple Clustering: K-means, Spectral, DBSCAN
  • 📁 Smart Organization: Preserves original filenames
  • ✂️ Auto Splits: Train/val/test dataset splitting
  • 💾 Export: CSV, JSON formats
  • 🔌 Python API: Full programmatic control

🚀 Installation

pip install autoannotate-vision

Or from source:

git clone https://github.com/Metamind-Innovations/autoannotate-vision.git
cd autoannotate-vision
pip install -e .

🎨 Quick Start - GUI

The easiest and most simplified way to use AutoAnnotate-Vision:

autoannotate-images

Note: Windows users need to have the latest C++ Redistributable installed which can be found here

Workflow:

  1. 📁 Select input folder with images
  2. 📂 Select output folder
  3. 🔢 Set number of classes
  4. 🤖 Choose model (SigLIP2 or DINOv2 recommended)
  5. ▶️ Click "Start Auto-Annotation"

The app will cluster images and open HTML previews in your browser showing sample images from each cluster for easy labeling!

💻 CLI Usage

For extra commands and utilities.

autoannotate-images-cli annotate /path/to/images /path/to/output \
    --n-clusters 10 \
    --method kmeans \
    --model siglip2 \
    --create-splits

Available models: clip, dinov2, dinov2-large, siglip2

🐍 Python API

from autoannotate import AutoAnnotator

annotator = AutoAnnotator(
    input_dir="./images",
    output_dir="./output",
    model="siglip2",  # or "dinov2", "dinov2-large", "clip"
    clustering_method="kmeans",
    n_clusters=5,
    batch_size=32
)

result = annotator.run_full_pipeline(create_splits=True)
print(f"Processed {result['n_images']} images into {result['n_clusters']} classes")

Available models: clip, dinov2, dinov2-large, siglip2 Available clustering methods: kmeans, hdbscan, spectral, dbscan

📁 Output Structure

output/
├── metadata.json
├── labels.csv
├── cats/              # Your class names
│   ├── IMG_001.jpg   # Original filenames preserved!
│   └── ...
├── dogs/
└── splits/            # train/val/test
    ├── train/
    ├── val/
    └── test/

🧠 Model Comparison

Model Speed Quality Notes
CLIP ⚡⚡ ⭐⭐⭐ General-purpose, good for diverse datasets
DINOv2 ⚡⚡⚡ ⭐⭐⭐⭐ Fast, self-supervised, excellent for objects
DINOv2-Large ⭐⭐⭐⭐⭐ Best quality, slower, great for fine details
SigLIP2 ⚡⚡⚡ ⭐⭐⭐⭐⭐ Latest Google model - Recommended 🌟

Recommendation: Start with SigLIP2 for best results, or DINOv2 for faster processing.

🔧 Features & Improvements

  • Fast Image Processing: All models use optimized processors (use_fast=True) for better performance
  • Normalized Embeddings: All embeddings are L2-normalized for consistent similarity measurements
  • Batch Processing: Efficient batch processing with configurable batch sizes
  • GPU Support: Automatic GPU detection and usage when available
  • Progress Tracking: Real-time progress bars for all operations
  • HTML Previews: Interactive HTML preview for visual cluster inspection before labeling

🔍 Pre-Push Checklist

Before pushing code:

# Format code
black src/autoannotate tests

# Run tests
pytest tests/ -v

# Typing
mypy src/autoannotate --ignore-missing-imports

🤝 Contributing

  1. Fork the repository
  2. Create feature branch
  3. Format with Black: black src/autoannotate tests
  4. Check typing with mypy: mypy src/autoannotate --ignore-missing-imports
  5. Run tests: pytest tests/ -v
  6. Push and create PR

📄 License

MIT License - see LICENSE file.

🙏 Acknowledgments

Built with PyTorch, Transformers, scikit-learn. Vision models: CLIP, DINOv2, SigLIP2.

Made for the RAIDO Project, from MetaMind Innovations

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

autoannotate_vision-0.1.0.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

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

autoannotate_vision-0.1.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for autoannotate_vision-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e9a4eb934fcdc86a9a64602c488fc4f6e8041f2701fc1bfa64d95f982fe65ba
MD5 9d0d5f41757b4c148b060f336580b0b3
BLAKE2b-256 7f2c2656d302610f6a41a9fed264091db5a4227c147e537d4ec3fbcf6e6e61f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for autoannotate_vision-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 372025243c9ec79068661de2d403f7553fa21bbf53020ab26cf5fec2b2fe7756
MD5 36812edffebe2133aebf9591f79d4767
BLAKE2b-256 cfb431f398e143b92a66fce75fd4fe673bb61bddda5e0f92eec70b63869af0ee

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