Skip to main content
Pixano

Pixano-Inference is an inference library for Pixano.

Under active development, subject to API change

GitHub version PyPI version Tests Documentation Python version License


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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pixano-inference 0.7.1
File Size Uploaded
pixano_inference-0.7.1.tar.gz 82.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pixano-inference 0.7.1
File Interpreter ABI Platform
pixano_inference-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 193.6 kB

Release files / pixano_inference-0.7.1.tar.gz

Download URL pixano_inference-0.7.1.tar.gz
Size 82.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7ea9152ef3ca8d1316ac550ff5d6e96f1195cd25877ab68da3f09a31def94e05
BLAKE2b-256 checksum
How to use checksums
998ce6e68a7194096463141512fc27210b654c9a27775cb39610272d03d46ec3
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 8, 2026.

Transparency log

Release files / pixano_inference-0.7.1-py3-none-any.whl

Download URL pixano_inference-0.7.1-py3-none-any.whl
Size 111.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
664a9ea1b135d5e99cf1c128723c7cde80e14637e5fa04ea196124b3b7f9a063
BLAKE2b-256 checksum
How to use checksums
4f99e73bef89c7e04e5c2b90af0a7ab96893332cb12c7f75fae2f0e01f44f19d
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 8, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page