Pixano-Inference is an inference library for Pixano.
Under active development, subject to API change
Pixano-Inference
An inference server for the Pixano annotation tool. It runs models on Ray Serve and exposes them through a REST API and a Python client.
Each model lives in its own Python package. Install the ones you need and the server finds them.
Quickstart
This runs SAM2 and segments an object from a single click. You need Python 3.10 to 3.13.
pip install "pixano-inference[sam]"
pip install "sam-2 @ git+https://github.com/facebookresearch/sam2.git"
Write the server configuration in models.py:
from pixano_inference.configs import DeploymentConfig, ModelConfig
from pixano_inference_sam import Sam2ImageParams
models = [
ModelConfig(
name="sam2-image",
model_class="Sam2ImageModel",
model_params=Sam2ImageParams(path="facebook/sam2-hiera-base-plus"),
deployment=DeploymentConfig(num_gpus=1), # 0 to run on CPU
),
]
Start the server. The first start downloads the weights.
pixano-inference --config models.py
When http://localhost:7463/v1/ready answers "ready": true, run this from another terminal:
from pixano_inference.client import SyncPixanoInferenceClient
from pixano_inference.schemas import SegmentationRequest
client = SyncPixanoInferenceClient("http://localhost:7463")
result = client.segmentation(
SegmentationRequest(
model="sam2-image",
image="https://raw.githubusercontent.com/pixano/pixano-inference/main/docs/assets/examples/sam2/truck.jpg",
points=[[[500, 375]]], # one click, in pixels
labels=[[1]], # 1: the click is on the object
)
)
scores = result.data.scores.to_numpy().ravel()
best = scores.argmax()
mask = result.data.masks[0][best].to_mask()
print(f"score {scores[best]:.2f}, mask of {mask.sum()} pixels")
Models
| Install | Models |
|---|---|
pip install "pixano-inference[sam]" |
SAM2 image segmentation and video tracking |
pip install "pixano-inference[clip]" |
Image and text embeddings (MobileCLIP2) |
Each package has its own README in packages/.
An application that only sends requests to a server needs pip install pixano-inference, which
installs the client without the server.
Your own model
A model is a small Python package. The YOLO example shows a detector and a tracker, and the numpy detector a model with no ML framework at all. The custom models guide explains the rest.
Development
git clone https://github.com/pixano/pixano-inference.git
cd pixano-inference
uv sync
uv run pytest -m "not integration" tests/
Each package under packages/ has its own environment and tests, for example:
uv run --project packages/pixano-inference-sam pytest packages/pixano-inference-sam/tests
The documentation covers the API, Docker deployment and autoscaling.
License
Pixano-Inference is released under the terms of the CeCILL-C license.
Metadata
Release files for pixano-inference 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pixano_inference-0.7.0.tar.gz | 78.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pixano_inference-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 184.3 kB
Release files / pixano_inference-0.7.0.tar.gz
| Download URL | pixano_inference-0.7.0.tar.gz |
|---|---|
| Size | 78.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2797cc947ba48bfa57cc0d481906ddc4b704baa4d8967397b4f1223aa769dd8f
|
|
BLAKE2b-256 checksum How to use checksums |
22ed73e241e38218477f0e88cc876db4ac2cc6253ebda74148dfe079d53dbeb1
|
| 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 6, 2026.
Transparency logRelease files / pixano_inference-0.7.0-py3-none-any.whl
| Download URL | pixano_inference-0.7.0-py3-none-any.whl |
|---|---|
| Size | 106.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
412580f6e138b814f01726814a4edca5d553c2e2faa7cfc8e856e436eb2d0d8d
|
|
BLAKE2b-256 checksum How to use checksums |
fa3b9d42767b312287970070e503757f4e94c901bc801cd111e311b7456aaa63
|
| 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 6, 2026.
Transparency log