Repository navigation
Installation and Setup
Tested on Windows 11 and Ubuntu 22.04 / 24.04.
| Requirement | Recommended Specification |
|---|---|
| Python | 3.10 – 3.12 |
| GPU | NVIDIA GPU with CUDA 12.x (CPU-only inference works, but is far too slow for real video) |
| RAM | 16 GB+ |
| Disk Space | ~20 GB (model checkpoints + extracted working frames) |
| Git LFS |
git-lfs.com — only needed if pulling or contributing bundled .mp4 videos |
Use the full repository checkout if you want the bundled cat / road demos, the YOLO Dataset Manager, the offline Synthetic Engine, or plan to modify code.
Cloning with --recursive pulls the vendored co-tracker git submodule (SAM2 is tracked directly in external/segment_anything_2/):
git clone --recursive https://github.com/thippeswammy/AutoSegmentor.git
cd AutoSegmentorIf you cloned without --recursive, initialize the submodule afterward:
git submodule update --init --recursiveWindows (PowerShell):
python -m venv .venv
.\.venv\Scripts\Activate.ps1Ubuntu / Linux:
python3 -m venv .venv
source .venv/bin/activatepython install.pyinstall.py performs the complete cross-platform setup:
- Checks your Python version.
- Initializes git submodules (
external/co-tracker). - Installs dependencies from
requirements-core.txt. - Downloads the SAM2 (
sam2_hiera_large.pt) and CoTracker3 (scaled_offline.pth) checkpoints. - Runs a GPU / CUDA diagnostic so you know immediately whether GPU inference is active.
Optional step-specific flags:
python install.py --cuda # also install optional flash-attn speedup
python install.py --checkpoints-only # download missing model checkpoints only
python install.py --checkpoints-only --check # verify checkpoints without downloading
python install.py --gpu-check-only # run GPU / CUDA system check onlypython run_main.py --version # AutoSegmentor 3.0.1
python run_main.py --demo list # cat, roadIf you only need the core annotation engine (SAM2 mask generation + CoTracker3 pose tracking) without cloning the repo:
pip install autosegmentorBoth sam2 and cotracker are bundled inside the PyPI package. Model checkpoints are downloaded into a platform-appropriate user cache directory (via platformdirs) when running:
python install.py --checkpoints-only
autosegmentor- Drop your video(s) into
workspace/VideoInputs/(e.g.Video1.mp4). - Launch without
--demo:
python run_main.py- The Setup Launchpad (
SetupDialog) opens so you can configure video template/range, SAM2 & CoTracker3 settings, batch size, FPS, and custom pose keypoints. - Click ▶ Launch Pipeline to open the Annotation Studio.
Tip: Setup Launchpad reads and writes
workspace/inputs/config/default_config.yamlandworkspace/inputs/config/session_state.json, which you can also edit directly for repeatable scripting.
python -m pip install --upgrade pip
pip install -r requirements-core.txtDownload the checkpoints manually:
| Model | File | Upstream Repo |
|---|---|---|
| SAM2 | sam2_hiera_large.pt |
facebookresearch/segment-anything-2 |
| CoTracker3 | scaled_offline.pth |
facebookresearch/co-tracker |
Place them at:
external/segment_anything_2/checkpoints/sam2_hiera_large.pt
external/co-tracker/checkpoints/scaled_offline.pth
Optionally install in editable mode to register the autosegmentor and autosegmentor-demo CLI commands:
pip install -e .Hit an error during setup? See Troubleshooting & FAQ.
AutoSegmentor • Live Demo Showcase (github.io) • Repository • PyPI