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.5.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.5-py3-none-any.whl (68.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: laivision-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 578b72665210b13e049bee6c0d7cb6d8d40476c3af4427e237496f5aee52e8bc
MD5 d7d404aa460b818afacbb1c34dcc51ee
BLAKE2b-256 fbd388432ec7921f011fc110ac658b96b981e416f29a7ecf47a3ba45949e4846

See more details on using hashes here.

File details

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

File metadata

  • Download URL: laivision-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6ffa1775aa208f7191dd3e3357782e7f5142d5396ebfeb9c923b9a7ac3532233
MD5 e0aece9b3e308cffa87b625b590e123d
BLAKE2b-256 bd7626c0f8b5746e9d5433da24847648a7c37d8523ed8806faadd882f03bb40a

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