nobg

Installation

Install nobg, pick a torch build, and add the optional extras.

Install the package

uv add nobg

Install torch yourself

nobg requires Python ≥ 3.10, torch ≥ 2.0 and torchvision ≥ 0.15 — and deliberately does not declare the last two as dependencies. Installing the package would otherwise resolve a torch build for you, which is the one choice that has to match your hardware (CPU wheel, CUDA, ROCm).

uv add torch torchvision

Picking a build

Follow pytorch.org for the index URL that matches your accelerator. nobg imports whatever is already in the environment.

Installed alongside the package: huggingface_hub (Hub integration and the model mixin), transformers (reusable building blocks such as SwinBackbone and Sam3Model, the TorchvisionBackend image-processor base), loadimg (the input loader) and datasets.

Optional extras

The ONNX export and its runtime are an extra, and are imported lazily — nothing in nobg touches onnx, onnxruntime or onnxscript at import time:

uv add "nobg[onnx]"

For GPU inference on an exported graph, install onnxruntime-gpu instead of onnxruntime; the loader defaults to every provider installed. See ONNX export.

From source

git clone https://github.com/feyninc/nobg.git
cd nobg
uv sync

uv sync installs the dev dependency group, which is where torch, torchvision and the ONNX extras live for the test suite — the package's own dependencies alone cannot run the tests. See Contributing.

Gated weights

nobg ships no model weights of its own; they come from the Hub on first load. FeyNobg and MultiMatte are nobg's own checkpoints.

Meta's upstream facebook/sam3 is gated — only needed if you convert it yourself with Sam3.from_origin. Accept the SAM License on the Hub, then log in so the download is authorized.

hf auth login

On this page