nnInteractive/ contains the main inference package.
nnInteractive/inference/: session-based inference API and CVPR baseline wrappernnInteractive/interaction/: interaction primitives (for example points)nnInteractive/utils/: crop, bbox, morphology, and OS utility helpersnnInteractive/trainer/: lightweight trainer stub used for checkpoint reconstruction
Top-level metadata and packaging live in pyproject.toml, setup.py, and readme.md.
nnInteractive/supervoxel/ is an optional subproject with its own pyproject.toml and CLI entry points.
pip install -e .: editable install for core package developmentpip install -e ".[dev]": install formatter/linter toolingblack nnInteractive/: format Python coderuff check nnInteractive/ --fix: run lint checks and auto-fix where possiblecodespell --skip='.git,*.pdf,*.svg': check spelling in source/docspre-commit run --all-files: run all configured hooks locally
Supervoxel module (optional):
cd nnInteractive/supervoxel/src/sam2 && pip install -e .cd nnInteractive/supervoxel && pip install -e .
Use Python 3.10+ for the main package (3.9+ in supervoxel).
Follow Black formatting defaults (4-space indentation, standardized wrapping) and Ruff guidance before opening a PR.
Naming patterns in this repository:
- modules/functions/variables:
snake_case - classes:
PascalCase - constants:
UPPER_SNAKE_CASE
There is currently no dedicated automated test suite in this repository.
For changes, add a minimal reproducible validation path:
- run lint/format commands above
- run a smoke inference flow using
nnInteractiveInferenceSession(seereadme.mdexample) - for supervoxel changes, validate CLI execution with a small sample volume
Recent history uses short, imperative commit subjects (for example fix CPU inference, bbox sanity checks, bump to 1.1.4). Prefer:
- one focused change per commit
- concise subject line in imperative mood
- include context in the body for behavior, compatibility, or dependency changes
For pull requests, include:
- what changed and why
- how to validate (exact commands)
- related issues/links
- notes on GPU/PyTorch assumptions when relevant (Torch
<2.9.0for current compatibility)