Noureddine RAMDI / ALICE: a self-contained YOLO dataset management toolkit with a creative single-file Python builder

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

simoncirstoiu/alice

ALICE solves a real pain point for developers and hobbyists managing YOLO datasets from home camera feeds. What sets it apart is its unusual packaging: a custom Python builder that bundles the entire web-based annotation and training toolkit into a single self-contained file. This makes deployment and updates straightforward, bypassing the typical dependency headaches around PyTorch and GPU libraries.

What ALICE does and its architecture

At its core, ALICE is an AI-powered toolkit designed for managing YOLO-format datasets specifically sourced from home security cameras running Frigate NVR. It provides a full-featured web UI for browsing and annotating images, plus a full pipeline for training YOLO models tailored to your camera feeds.

The key components include:

  • Frigate integration: ALICE hooks directly into Frigate’s live snapshot exports and video frames, allowing users to browse real-world footage for annotation and dataset curation.
  • Dataset curation: It supports duplicate detection using perceptual hashing, which is crucial to avoid over-representing similar frames.
  • Teacher-student model pipeline: ALICE uses a “teacher model” to auto-annotate frames, which then feed into a fine-tuning process for a YOLO model customized to the user’s environment.
  • Training pipeline: The training process is integrated with real-time metrics and fine-tuning capabilities, all accessible via the web interface.
  • ONNX export: Trained models can be exported in ONNX format for deployment, with optimization steps included.

From a technical perspective, ALICE is a Python application with a web UI that runs as a single executable Python file (alice.py). This monolithic file is generated by a custom builder script that processes multiple source modules, resolves imports, and bundles CSS/JS/HTML assets inline. This design means users don’t have to deal with complex Python environment setup or multiple files.

The toolkit auto-detects your hardware — NVIDIA GPU or CPU — and configures PyTorch and ONNX runtimes accordingly, simplifying setup.

Technical strengths and design tradeoffs

The standout technical feature is the single-file Python builder. Shipping a complex Python web app as a single file is rare and challenging. ALICE’s builder script:

  • Parses and topologically sorts the Python import graph from the source modules.
  • Strips relative imports to flatten the codebase into one file.
  • Injects all static assets (CSS, JS, HTML) directly into the Python code.

This approach offers a clean DX: no pip installs for core functionality, fewer moving parts, and easy updates by regenerating the file.

The tradeoff is that debugging or extending the monolith can be tricky because all source code ends up in one large script. This bundling also means any dependency updates require rerunning the builder.

Another technical strength is the hardware auto-detection and dependency management. ALICE detects if an NVIDIA GPU is available and installs the appropriate PyTorch and ONNX runtime variants automatically, sparing users from manual CUDA setup. However, users must still install NVIDIA drivers and CUDA toolkit externally for GPU acceleration.

The integration with Frigate NVR is practical for home surveillance use cases, allowing seamless data ingestion without manual exports or conversions.

The perceptual hashing deduplication is a pragmatic choice for dataset quality, reducing redundant samples that could bias training.

Overall, the codebase prioritizes convenience and integration over modularity or plugin extensibility. It’s opinionated but serves its niche well.

Quick start

ALICE provides a straightforward way to build and deploy using Docker, tailored to your hardware:

python3 builder.py --no-venv

This command generates a docker-compose.yml file automatically, including GPU support if detected. You then edit volume paths to point to your Frigate dataset, models, clips, and exports.

Start the stack with:

docker compose up --build -d

This setup requires Python 3.8+ and installs the base dependency Pillow automatically via a .venv. Other dependencies like PyTorch, ONNX, and ultralytics YOLO are managed by ALICE itself and can be installed from the web UI.

Note that ALICE does not install NVIDIA drivers or CUDA — these must be pre-installed on your system for GPU training.

Verdict

ALICE is a well-crafted toolkit for home users and developers working with YOLO datasets from Frigate NVR camera systems. Its unique single-file Python builder is a clever packaging solution that reduces setup friction and simplifies deployment.

The integration with Frigate and the end-to-end training pipeline make it practical for personalized model training on realistic home camera data.

That said, the monolithic design and custom dependency management mean it’s less suited for users who want to extend or customize the internals heavily. It also assumes some familiarity with Docker and system-level GPU drivers.

If you’re looking for a self-contained, relatively easy-to-run YOLO dataset manager that plays nicely with Frigate and want to avoid Python dependency hell, ALICE is worth exploring. It’s a niche but solid tool that solves a real problem with a pragmatic codebase and deployment model.


→ GitHub Repo: simoncirstoiu/alice ⭐ 330 · JavaScript