SegCraft
Train, evaluate, and run semantic segmentation from one YAML configuration.
SegCraft uses the same YAML setup for training, evaluation, image prediction, and video prediction. Choose a preset, run it through the CLI, Python API, or web app, and keep the same configuration across the workflow.
SegCraft is alpha software. Its Python API and configuration schema can still change.
Quick start
pip install "segcraft[web]"
segcraft-web # open http://127.0.0.1:8000
Upload a video or provide a YouTube URL, choose a preset, and download the
original, overlay, and side-by-side output videos. By default,
runtime.device: auto uses an NVIDIA GPU when a CUDA-enabled PyTorch build is
available and falls back to CPU otherwise.
From a checkout, the launchers set up the environment and open the app:
./run.sh # Linux; macOS: ./run.command
On Windows, use .\run.bat. When it finds an NVIDIA GPU it installs the matching
CUDA build of PyTorch for you (a large download the first time; set
SEGCRAFT_CPU_ONLY=1 to keep the CPU build). With pip, install the
CUDA-enabled PyTorch wheel that matches your system first. Run segcraft doctor
to confirm what Torch and CUDA can see.
What it does
- Train, evaluate, and predict with one configuration merge order: base YAML, optional preset, then optional local overrides.
- Use TorchVision, segmentation-models-pytorch, or Hugging Face SegFormer models through one interface.
- Run image or video prediction. Video output includes
original.mp4,overlay.mp4,comparison.mp4, andsummary.json. - Use the same presets in the CLI, Python API, and web app.
- Validate configuration and inspect the actual Torch, CUDA, and device state
with
segcraft validateandsegcraft doctor.
Common commands
segcraft validate
segcraft predict --preset cityscapes_video --local configs/local.yaml
segcraft train --preset fast_dev --local configs/local.yaml
segcraft evaluate --preset quality --local configs/local.yaml
configs/local.yaml is for machine-specific paths and is ignored by Git.
Start from configs/local.example.yaml.
Useful presets include fast_dev for a small CPU training run,
binary_quickstart for foreground/background work, and the Cityscapes,
ADE20K, PASCAL VOC, and SMP examples. task.num_classes controls the
trainable model head; task.class_names only controls display labels.
Python and notebooks
from segcraft import load_config
from segcraft.prediction import run_prediction
config = load_config("configs/base.yaml", preset_path="cityscapes_video")
summary = run_prediction(config)
The notebooks provide a quick start, configuration and API guide, and web-app guide.
For optional model extras, Docker, presets, output formats, and development setup, see the installation and reference guide. Changes are recorded in the Changelog.
MIT licensed. Built by Oney Erge.
Metadata
Release files for segcraft 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| segcraft-0.1.7.tar.gz | 52.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| segcraft-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 108.3 kB
Release files / segcraft-0.1.7.tar.gz
| Download URL | segcraft-0.1.7.tar.gz |
|---|---|
| Size | 52.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16156b6360da10b6d2a97cec37a9882dcbebd844f1011c09eedbe74dd3ea63b0
|
|
BLAKE2b-256 checksum How to use checksums |
442e07fb0ea6d778966587b32518d4cfd5c9de19ecc9d6c260b10184454f1575
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / segcraft-0.1.7-py3-none-any.whl
| Download URL | segcraft-0.1.7-py3-none-any.whl |
|---|---|
| Size | 55.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce41875c27e0d4a89690ba9e408e89f5511e1fe8bf29bc5e7f59e6df8cc6ca21
|
|
BLAKE2b-256 checksum How to use checksums |
873402dddf4d158a52183c35f388deb11c5597ec66afb0956840df62c2a14981
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for segcraft 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for segcraft-0.1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.