CanonCV is a universal computer vision data preparation engine and interactive Annotation Studio designed to handle the complete dataset lifecycle before model training.
It solves the fundamental challenge of turning raw, multi-source, inconsistently-labeled object detection datasets into clean, canonically-mapped, quality-audited, and versioned datasets ready for high-performance AI training.
Real-time project overview, dataset stats, normalization progress, and class distribution breakdown.

Define, edit, and freeze standardized class categories, supercategories, and keyboard shortcuts.

Interactive bounding box canvas with AI auto-labeling, crop tools, and class mapping support.

Automated sanity checks for zero-area boxes, out-of-bounds coordinates, aspect ratio anomalies, and near-duplicate detection.

Seed-reproducible train/validation/test splitting with stratification and group isolation.

Versioned dataset snapshot exports in YOLO, COCO, Pascal VOC, and TensorFlow Record formats.

Human-in-the-loop review queue for ambiguous source labels, preventing silent misclassifications.

- Pluggable Ingestion Adapters: Ingest datasets in COCO JSON, YOLO txt, Pascal VOC XML, and folder-classification formats seamlessly.
- Canonical Taxonomy Management: Define, edit, and freeze custom project taxonomies dynamically through the UI.
- Label Mapping Engine: Build reviewed
source_label -> canonical_class_idmapping tables with support for many-to-one remapping. - Zero-Guessing Review Queue: Ambiguous source labels are automatically flagged for manual human review rather than silently guessed.
- Unmapped Label Safety: Unmapped labels default to logged drops to prevent dataset poisoning.
- Bounding Box Editor: Interactive visual editor to draw, adjust, and delete bounding boxes on raw image folders or pre-labeled structured exports (
train/valid/test). - Smart Label Translation: Translates existing bounding boxes into the project's canonical taxonomy automatically when class names match, flagging mismatches for manual review.
- YOLO26 Auto-Labeling: Leverage YOLO26 backend integration for AI-assisted bounding box detection and auto-labeling.
- Crop & Augmentation: Interactive visual cropping, image processing, and data augmentation workflows.
- Near-Duplicate Detection: Identify redundant images across datasets to avoid overfitting.
- Bounding Box Sanity Checks: Audit zero/negative-area boxes, out-of-bounds coordinates
[0,1], and aspect-ratio outliers. - Image Quality Scoring: Automatic detection of blur, exposure anomalies, and corrupted files.
- Class Balance Reporting: Real-time per-class distribution stats pre- and post-normalization.
- Grouped & Stratified Splits: Seed-reproducible train/val/test splitting algorithms that preserve rare-class balance and prevent data leakage across image variants.
- Traceable Provenance: Every exported image and label is traceable back to its original source dataset, mapping version, and split assignment.
- Versioned Snapshots: Export standardized, immutable YOLO training snapshots (
data.yaml+ manifest) with complete historical audit trails.
┌────────────────────────────────┐ ┌────────────────────────────────┐
│ Frontend Studio │ REST │ Backend Engine │
│ React + Vite + Tailwind (SPA) │◄──────►│ FastAPI + SQLAlchemy (Py) │
│ │ │ │
│ - Project & Taxonomy Manager │ │ - Ingestion Adapters (COCO/ │
│ - Annotation Studio │ │ YOLO/VOC/Classification) │
│ - Mapping Builder & Review │ │ - Mapping & Normalization ETL │
│ - Quality & Duplicate Dash │ │ - YOLO26 Auto-Label & CV Ops │
│ - Splits & Lineage Explorer │ │ - Quality Audit & BBox Sanity │
└────────────────────────────────┘ └────────────────────────────────┘
- Backend: FastAPI + SQLAlchemy + SQLite/PostgreSQL (ETL pipeline, image processing, mapping engine, quality checks).
- Frontend: React + Vite + Tailwind CSS SPA (Interactive Annotation Studio, Taxonomy Editor, Quality Dashboard, Lineage Explorer).
- AI/CV Layer: PyTorch / YOLO26 backend integration for automated inference and auto-labeling.
backend/ FastAPI service & ETL engine — see backend/README.md
frontend/ React + Vite SPA — see frontend/README.md
models/ YOLO model weights — see models/README.md
data/ Generated application database and state
normalization datases/ Raw source dataset storage directory
normalization.md Complete architectural & design specification
docker-compose.yml Multi-service orchestrator (backend :8000, frontend :5173)
-
Download Model Weights (for AI-assisted auto-labeling):
python -c "from ultralytics import YOLO; YOLO('yolo26s-seg.pt')" mv yolo26s-seg.pt models/yolo26s-seg.pt -
Build and Run Services:
docker compose build docker compose up -d
-
Initialize App State:
docker compose exec backend python -m app.seed
- Frontend Studio: http://localhost:5173
- Backend API Docs: http://localhost:8000/docs
cd backend
python -m venv .venv
./.venv/Scripts/python.exe -m pip install -r requirements.txt
./.venv/Scripts/python.exe -m app.seed
./.venv/Scripts/python.exe -m uvicorn app.main:app --reloadcd frontend
npm install
npm run dev # http://localhost:5173, proxies /api to localhost:8000- Zero Silent Assumptions: Ambiguous source labels are routed to a human review queue.
- Unmapped Labels Dropped Safely: Unmapped class IDs are logged and dropped rather than forced into arbitrary fallback classes.
- Mandatory Bounding Box Auditing: Every normalized label undergoes strict coordinate check (
0 <= x, y, w, h <= 1) and aspect ratio validation. - Immutable Raw Data: Raw input datasets are strictly read-only; normalized exports are written as versioned output artifacts.
This project is licensed under the MIT License.