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
[!NOTE] Roadmap for
inference-modelsWe are still making changes to the API and adding new features. API should be fairly stable already, but it is advised to pin to specific version if you are using it in production and review our roadmap.
🛣️ Roadmap
We're actively working toward stabilizing inference-models and integrating it into the main inference package. The plan is to:
- Stabilize the API - Finalize the core interfaces and ensure backward compatibility
- Integrate with
inference- Makeinference-modelsavailable as a selectable backend in theinferencepackage - Production deployment - Enable users to choose between the classic inference backend and the new
inference-modelsbackend - Gradual migration - Provide a smooth transition path for existing users
We're sharing this preview to gather valuable community feedback that will help us shape the final release. Your input is crucial in making this the best inference experience possible!
💻 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.
Find more information in Load Models from Local Packages.
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.18.6rc2.tar.gz.
File metadata
- Download URL: inference_models-0.18.6rc2.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
263831e51f4b8414256b23c9752d92ccc0e306beeb3c8e0e31c6920fc23a402c
|
|
| MD5 |
d0146fcec15a2d33e55d6ccf21575420
|
|
| BLAKE2b-256 |
8d16005977bd01293a41a8a666bfb004869ccb0226fe0856bbebe0fb48c07cef
|
File details
Details for the file inference_models-0.18.6rc2-py3-none-any.whl.
File metadata
- Download URL: inference_models-0.18.6rc2-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85802d4d8a724f0488f5140ba9d41674ea604d22c9a67800cfa3c6bd4b849004
|
|
| MD5 |
8092921635fcebaa7c682dd8d1498edf
|
|
| BLAKE2b-256 |
675e53e12975ac5e96f4812570f8e2543f5c9431a2364f48f7ae424c3824143d
|