Skip to main content

LAI: a platform to train and deploy AI vision models — datasets, annotation, training, and evaluation.

Project description

LAI

CI PyPI Docker

laivision.dk — project site, workflow overview, and tutorials.

Self-hosted computer vision studio: datasets, SAM-assisted annotation, training (YOLO / MMYOLO / RT-DETR), evaluation, and export.

Install a small CLI from PyPI, pull pre-built images from Docker Hub, and run everything with lai. No git clone required.

Tested on: Linux (Ubuntu) and Windows 10/11 (Docker Desktop + WSL2).


Requirements

Requirement Notes
OS Linux or Windows 10/11 (see platform notes below)
Docker Engine + Compose v2.24+ docker compose version must work
Python 3.10–3.12 For the lai CLI only — not for running the app itself
RAM 8 GB minimum · 16 GB+ recommended (32 GB with GPU tier)
Disk ~5 GB (CPU stack) · ~20–30 GB (GPU images + models)
Browser For lai install-gui and the studio UI
NVIDIA GPU (optional) Training, auto-annotate, SAM — GPU tier + Container Toolkit (Linux) or WSL2 GPU passthrough (Windows)

You do not need Node.js, a git checkout, or local image builds for the quick start.

Linux

  • Docker Engine + Compose plugin
  • Install CLI with pipx or a venv (recommended on Debian/Ubuntu — do not use system pip; PEP 668)

Windows

  • Docker Desktop with WSL2 backend
  • lai install-gui works in any browser; terminal lai install needs Git Bash or WSL
  • GPU tier: enable WSL2 integration in Docker Desktop and install NVIDIA drivers for WSL

Quick start

flowchart LR
  A["① pip install laivision"] --> B["② lai install-gui"]
  B --> C["③ lai up"]
  C --> D["④ lai download-models"]
  D --> E["Open localhost:8089"]

① Install the CLI

pip install laivision
# recommended:  pipx install laivision

Installs the lai command and embeds Docker Compose files inside the package. Your settings live in ~/.config/lai/.env (not in site-packages), so upgrades do not overwrite them.


② First-time setup

lai install-gui

Opens a browser wizard on http://127.0.0.1:… where you choose:

Setting Default Purpose
Data directory ~/lai-data Databases, datasets, projects, model cache
Web port 8089 UI in your browser
GPU tier off Enables worker-gpu + sam_service (NVIDIA required)
SAM 3 folder ~/lai-data/sam3-models Optional checkpoint path (SAM 2 works without it)

Terminal alternative: lai install or lai install --yes for non-interactive defaults.


③ Start the stack

lai up
  • Pulls images from Docker Hub (luluray/lai-*) if they are not local yet
  • Starts database, API, workers, and web UI
  • First run may take several minutes while images download

Then run step ④ (lai download-models) before training or auto-annotate. You can open http://localhost:8089 (or the port you chose) while weights download.

lai down          # stop containers
lai doctor        # version, Docker checks, bundle path
lai upgrade       # after pip install -U laivision

④ Download foundation models (required — run after lai up)

lai download-models

Downloads the weights LAI needs for training, auto-annotate, and related workflows into your data directory ($LAI_DATA_DIR/models and ai_models/). The studio is not fully usable until this finishes — without these files, training and auto-annotate will fail or hang waiting for models.

Run it once after the stack is up (containers must be running). You can narrow what is fetched:

lai download-models --yolo yolov8n.pt      # single Ultralytics weight
lai download-models --mmyolo minimal         # MMYOLO pretrained checkpoints
lai download-models --depth minimal          # depth estimation ONNX

Use lai download-models --help for the full matrix. Re-run anytime to add more weights.


Optional extras

SAM 3 — SAM 2 is included. For SAM 3, place a checkpoint (e.g. from Hugging Face) at the path from the wizard, then:

lai restart sam_service

GPU check (if GPU tier is enabled):

docker compose exec worker-gpu nvidia-smi

Where things live

Path Contents
~/.config/lai/.env Ports, data dir, Docker image tags
~/lai-data/ (default) Postgres/Redis/Mongo data, projects, models
PyPI package lai/bundle/ Read-only compose files (do not edit)

Advanced setup

Git checkout, building images locally, running tests, maintainer releases → see README_advanced.md.


License

AGPL-3.0 — bundled ML runtimes (YOLO, MMYOLO, SAM) have additional upstream licenses. Details in README_advanced.md#license.

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

laivision-0.1.4.tar.gz (62.9 kB view details)

Uploaded Source

Built Distribution

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

laivision-0.1.4-py3-none-any.whl (68.4 kB view details)

Uploaded Python 3

File details

Details for the file laivision-0.1.4.tar.gz.

File metadata

  • Download URL: laivision-0.1.4.tar.gz
  • Upload date:
  • Size: 62.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for laivision-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ae1cfbd8283c1a76308f5abbf9e6c73cfbe17af12db8c35952630b805adcbce2
MD5 2cfaec5120670c0aea3e1b109ff50364
BLAKE2b-256 f584baa781fdafaf775f80fe861d49b7e4a6f213c7d5c4ad5ba750da1c7bba81

See more details on using hashes here.

File details

Details for the file laivision-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: laivision-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 68.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for laivision-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c38f450de41460f1d3817795d25ef71620a6be2f4c8d5d21677be9be20df8360
MD5 628b8e991be28fd5efcefb4e0aa6082b
BLAKE2b-256 5bad64d7e61a42c684cda736e3e9bd496eabc20e2bba84a3a24c258818f166bd

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