Skip to main content

🚀 What is inference-models?

inference-models is the library to make predictions from computer vision models provided by Roboflow — designed to be fast, reliable, and user-friendly. It offers:

  • Multi-Backend Support: Run models with PyTorch, ONNX, TensorRT, or Hugging Face backends
  • Automatic Model Loading: Smart model resolution and backend selection
  • Minimal Dependencies: Composable extras system for installing only what you need
  • Behavior-Based Interfaces: Models with similar behavior share consistent APIs; custom models can define their own
  • Full Roboflow Platform Support: Run any model trained on Roboflow

Visit our documentation for more information.

🛣️ Roadmap

With release 0.19.0, we have reached the first stable release of inference-models and fully integrated the package to inference - our main inference package, making it selectable backend for running predictions from models.

We are still making changes to add new features and models. API should be fairly stable already, but the problems may still occur. If you encounter any issues, please report them.

💻 Installation

CPU installation:

uv pip install inference-models
# or with pip
pip install inference-models

inference-models can be installed with CUDA and TensorRT support - see Installation Guide for more options.

🏃‍➡️ Usage

Pretrained Models

Load and run a pretrained model:

import cv2
import supervision as sv
from inference_models import AutoModel

# Load pretrained model from Roboflow
model = AutoModel.from_pretrained("rfdetr-base")

# Run inference (works with numpy arrays or torch.Tensor)
image = cv2.imread("<path-to-your-image>")
predictions = model(image)

# Use with supervision
annotator = sv.BoxAnnotator()
annotated = annotator.annotate(image, predictions[0].to_supervision())

Your Roboflow Models

Load and run models trained on the Roboflow platform:

import cv2
import supervision as sv
from inference_models import AutoModel

# Load your custom model from Roboflow
model = AutoModel.from_pretrained(
    "<your-project>/<version>",
    api_key="<your-api-key>"  # model access secured with API key
)

# Run inference (works with numpy arrays or torch.Tensor)
image = cv2.imread("<path-to-your-image>")
predictions = model(image)

# Use with supervision
annotator = sv.BoxAnnotator()
annotated = annotator.annotate(image, predictions[0].to_supervision())

🧠 Supported Model Architectures

  • RFDetr
  • SAM models family
  • Vision-Language Models (Florence, PaliGemma, Qwen, SmolVLM, Moondream)
  • OCR (DocTR, EasyOCR, TrOCR)
  • YOLO
  • and many more

For detailed model documentation, see Supported Models.

🔧 Run your local models

Load your own model implementations from a local directory - models with architectures not in the main inference-models package. This is especially valuable for production deployment of custom models.

from inference_models import AutoModel

model = AutoModel.from_pretrained(
    "/path/to/my_custom_model",
    allow_local_code_packages=True
)

See Load Models from Local Packages for complete details on creating custom model packages.

📄 License

The inference-models package is licensed under Apache 2.0. Individual models may have different licenses - see the Supported Models for details.


Ready to get started? Head to the Quick Overview

Release files for inference-models 0.37.3

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

Source distribution (sdist)

Source distribution for inference-models 0.37.3
File Size Uploaded
inference_models-0.37.3.tar.gz 1.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for inference-models 0.37.3
File Interpreter ABI Platform
inference_models-0.37.3-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 MB

Release files / inference_models-0.37.3.tar.gz

Download URL inference_models-0.37.3.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
c68e85acf587157cab5a41061d2af0665dcb0d6ba54d5b4523eca9d50156d835
BLAKE2b-256 checksum
How to use checksums
06465b15bec65f3053f571b59c82a261f5cb6f8445ee0cc3516da0345399934c
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 Sep 18, 2026.

Transparency log

Release files / inference_models-0.37.3-py3-none-any.whl

Download URL inference_models-0.37.3-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6ddbdbebfcdb621a6076f20d1037b16bb40059ac657d9fae118bff73a4de169d
BLAKE2b-256 checksum
How to use checksums
6bfe67f1a675f2413aaa0e6676fa7643cd4f96538dbfabedc015cd5919722d51
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 Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.38.0

2 release files

0.37.4

2 release files

This release

0.37.3 This release

2 release files

0.37.2

2 release files

0.37.1

2 release files

0.36.1

2 release files

0.36.0

2 release files

0.35.3

2 release files

0.35.2

2 release files

0.35.1

2 release files

0.35.0

2 release files

0.34.6

2 release files

0.34.4

2 release files

0.34.3

2 release files

0.34.2

2 release files

0.34.1

2 release files

0.34.0

2 release files

0.33.0

2 release files

0.32.3

2 release files

0.32.2

2 release files

0.32.1

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.30.1

2 release files

0.30.0

2 release files

0.29.7

2 release files

0.29.6

2 release files

0.29.5

2 release files

0.29.4

2 release files

0.29.3

2 release files

0.29.2

2 release files

0.28.7

2 release files

0.28.6

2 release files

0.28.5

2 release files

0.28.4

2 release files

0.28.3

2 release files

0.28.2

2 release files

0.28.1

2 release files

0.28.0

2 release files

0.27.2

2 release files

0.27.1

2 release files

0.27.0

2 release files

0.26.1

2 release files

0.26.0

2 release files

0.25.2

2 release files

0.25.1

2 release files

0.25.0

2 release files

0.24.4

2 release files

0.24.3

2 release files

0.24.2

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.23.0

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.1

2 release files

0.21.0

2 release files

0.20.2

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.5

2 release files

0.18.4

2 release files

0.18.3

2 release files

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