Seg-Studio.

Installation in detail

Read this page when the “Try it” steps in the README were not enough. It covers what to check before installing, the steps for each OS, Docker, offline machines, and what runs where.

0. Install pre-flight — check these first

1. Get the code — no git required

Download the latest Source code (zip) from the Releases page (or use the green Code → Download ZIP button on the repository page) and extract it anywhere. If you prefer git: git clone https://github.com/segmen-pixel/seg-studio.git

No pre-built package is published for Windows or macOS: a release on that page is the source archive (with its SBOMs), so step 2 applies to everyone. A package can be built from a checkout with python scripts/build_installer.py; when one is published here it will be listed on the Releases page with SHA256SUMS.txt beside it to check the download against.

2. Install and start

Windows (NVIDIA GPU):

install-windows.bat
start-windows.bat

No terminal needed: double-click install-windows.bat, then start-windows.bat, right in the extracted folder. The installer auto-detects your GPU (pass cpu or cuda124 to override) and installs Python through winget if it is missing, printing step-by-step guidance if that is not possible. The start script opens the UI in your browser once the server is ready. After the install, the Seg-Studio shortcut does the same without a console window: see The Seg-Studio app below.

macOS (Apple Silicon / Intel):

bash install-macos.sh
bash start-macos.sh

Linux (NVIDIA GPU or CPU):

python3.11 -m venv .venv
.venv/bin/python scripts/install.py
bash scripts/start_local.sh

Python 3.11, Node.js 18 or later (22 LTS recommended) and git must already be installed (on Ubuntu: apt install python3.11 python3.11-venv git, Node.js from nodejs.org or your distribution). The script refuses to run outside a virtual environment and checks for those three before it downloads anything. It builds the same environment as the Windows installer – CUDA 12.8 PyTorch wheels, the CUDA ONNX Runtime, all five SAM models – and was verified on Ubuntu 22.04 with an RTX 3080 Ti: annotation, GPU training and CUDA inference.

Stop everything later with stop-windows.bat / bash stop-macos.sh / bash scripts/stop_local.sh.

The Seg-Studio app. The installers also create an app for the checkout: on Windows a Seg-Studio shortcut in the Start menu and on the desktop, on macOS Seg-Studio in ~/Applications. Opening it starts the trainer and serving APIs without a console window, opens the screen once the API is ready, and stays in the taskbar and the tray (Windows), or in the Dock and the menu bar (macOS), with Open Seg-Studio, Open the log folder and Stop and quit. Stop and quit runs the stop script, and asks first when a training, an inference or an AI support run is going, on any device; closing the taskbar button (Close window) on Windows, or quitting the app from the Dock or with Cmd-Q on macOS, does the same. Opening the app while it runs, or clicking its taskbar button or Dock icon, opens the screen. If a Seg-Studio from another folder, or an older version, is already running, the app asks whether to stop it and start its own. Stop and quit stops only this folder’s Seg-Studio, or what the app itself started: a program found on the port, or a Seg-Studio from another folder you chose to keep, is left running. The stop script stops whatever listens on ports 8002, 8001, 5173 and 8081, as stop-windows.bat does.

The app runs the same start and stop scripts as the .bat / .sh files, without the UI dev server. Its log is logs/windows/app.log (logs/macos/app.log on macOS), and the start script’s output goes to app_start.log beside it; on macOS the app’s launcher also writes app_console.log there. With LAN access on, the start script writes where the LAN token is kept (the api_token entry of runtime_settings.json in the projects folder), not the token itself.

Both are written on your machine by the installer, not downloaded, so Windows and macOS have no signature to check. Pass --no-shortcuts to install-windows.bat or --no-app to install-macos.sh to skip them. On macOS the Dock icon and the menu bar item use pyobjc (MIT), which the installer adds from apps/trainer_api/requirements-macos-app.txt; without it the app still starts and opens the screen, and asks with a dialog instead of a menu. The Dock says Seg-Studio when Python is a framework build (python.org or Homebrew); with another Python (pyenv, conda, uv) it says Python. If the checkout is in Desktop, Documents or Downloads, macOS asks once whether Seg-Studio may use that folder; if that is refused, the app says so when it opens (allow it in System Settings → Privacy & Security → Files & Folders, or move the folder). The app opens the checkout that installed it last; to remove it, delete the shortcuts or Seg-Studio.app. A Seg-Studio pinned to the taskbar keeps the folder it was pinned from: after installing a new version into a new folder, unpin it and pin it again. Without a built screen (--skip-ui, or a UI build that failed) the installers make neither, since the app serves the built screen.

On Windows, restart-windows.bat restarts just the trainer API on port 8002 – which is what a settings change that says “takes effect on next server restart” is waiting for. It reuses the LAN token, so browser sessions keep working, and the new server is detached, so a restart issued over SSH survives the session ending. It refuses while training is running or queued unless you pass --force; --dry-run shows what it would do. The serving API and the UI dev server are left alone – use stop + start for those.

On Windows the installer fetches what it needs: if Python, Node.js or git is missing it installs it for you through winget, so a machine with none of the three still gets a working setup from one double-click. Without winget (some Windows 10 installs lack the App Installer package) it stops and tells you where to get Python; Node.js and git only degrade – no Node.js means the UI is not rebuilt, no git means SAM click segmentation is unavailable. On macOS git is required up front: install-macos.sh stops without it. macOS uses MPS (Metal) automatically on Apple Silicon, for training as well as inference; object counting still needs an NVIDIA GPU. See Platform support for what runs where.

3. Open the UI

Open http://localhost:8002/ui/ in your browser — that is the whole install.

New to segmentation? Continue with the First Run Walkthrough: from opening the app to your first prediction in about 10 minutes.

Alternative: Docker (docker compose)

For a container: CPU only. Semantic training runs but is slow; object counting (instance) training needs a native NVIDIA install.

# Windows: use `python` instead of `python3`
python3 -c "import secrets; print('SEG_API_TOKEN=' + secrets.token_urlsafe(24))" >> .env
docker compose up --build

Then open http://localhost:5173/ — the UI container’s nginx proxies /api, /v2, and /ws to the trainer API. All ports are published on 127.0.0.1 only. The .env step is required, not optional: each container binds 0.0.0.0 inside its own network namespace, and the trainer refuses to start off-loopback without a token. The stack requests no GPU, so annotation, inference and the UI work, semantic training runs on the CPU (much slower), and object counting training is unavailable — details in Deployment.

Requirements

Platform support

  Windows + NVIDIA Linux + NVIDIA Apple Silicon (MPS) CPU only
Annotate, SAM assist Yes Yes Yes — 4 of the 5 SAM models (TinySAM is not installed on macOS) Yes
Semantic segmentation training Yes Yes Yes Yes, much slower
Object counting (instance) training Yes Yes No No
ONNX export Yes Yes Yes Yes
ONNX inference Yes (CUDA provider) Yes (CUDA provider) Yes (CPU provider) Yes (CPU provider)
Core ML export Only if coremltools is importable Only if coremltools is importable Yes Only if coremltools is importable
Apache-2.0 Source on GitHub Download Issues