The new inference engine for Computer Vision models
Project description
🚀 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 →
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inference_models-0.28.1.tar.gz.
File metadata
- Download URL: inference_models-0.28.1.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fecea6557d66bdcc74dfa8a6124f50bd709c94669ef115a84a9a9fc7ce2e84db
|
|
| MD5 |
c23b802e6908a889a64541c3258152a0
|
|
| BLAKE2b-256 |
78942ebdc2454d65d61f75d6cd82245e5bfb52d88017d523dd76f8d6bebd5e99
|
Provenance
The following attestation bundles were made for inference_models-0.28.1.tar.gz:
Publisher:
publish.pypi.inference_exp.yml on roboflow/inference
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inference_models-0.28.1.tar.gz -
Subject digest:
fecea6557d66bdcc74dfa8a6124f50bd709c94669ef115a84a9a9fc7ce2e84db - Sigstore transparency entry: 1536144047
- Sigstore integration time:
-
Permalink:
roboflow/inference@516a2ebc8ed727a4a95844fe1456916914973ace -
Branch / Tag:
refs/heads/fix/yolos-clamp-boxes-to-image-dims - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
publish.pypi.inference_exp.yml@516a2ebc8ed727a4a95844fe1456916914973ace -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file inference_models-0.28.1-py3-none-any.whl.
File metadata
- Download URL: inference_models-0.28.1-py3-none-any.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0993c6a5ccbe71c3eadc84cd398a30ba01589c78b31b6c5af45023e2303a6d18
|
|
| MD5 |
9bd834c41d0e72c0517136a48e34e2ef
|
|
| BLAKE2b-256 |
6aa36e47792e9c1622e22643bae3fb210fc24f7230e9526adc567b89cb72af6d
|
Provenance
The following attestation bundles were made for inference_models-0.28.1-py3-none-any.whl:
Publisher:
publish.pypi.inference_exp.yml on roboflow/inference
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inference_models-0.28.1-py3-none-any.whl -
Subject digest:
0993c6a5ccbe71c3eadc84cd398a30ba01589c78b31b6c5af45023e2303a6d18 - Sigstore transparency entry: 1536144126
- Sigstore integration time:
-
Permalink:
roboflow/inference@516a2ebc8ed727a4a95844fe1456916914973ace -
Branch / Tag:
refs/heads/fix/yolos-clamp-boxes-to-image-dims - Owner: https://github.com/roboflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
publish.pypi.inference_exp.yml@516a2ebc8ed727a4a95844fe1456916914973ace -
Trigger Event:
workflow_dispatch
-
Statement type: