inference-models-0.27.2
توضیحات
The new inference engine for Computer Vision models
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | inference-models-0.27.2 |
| نام | inference-models |
| نسخه کتابخانه | 0.27.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/inference-models/ |
| مجوز | - |
# 🚀 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](https://roboflow.com)
Visit our [documentation](https://inference-models.roboflow.com/) 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]((https://github.com/roboflow/inference/issues)).
# 💻 Installation
**CPU installation:**
```bash
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](https://inference-models.roboflow.com/getting-started/installation/) for more options.
# 🏃➡️ Usage
## Pretrained Models
Load and run a pretrained model:
```python
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](https://roboflow.com):
```python
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](https://inference-models.roboflow.com/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.
```python
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](https://inference-models.roboflow.com/how-to/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](https://inference-models.roboflow.com/models/) for details.
---
Ready to get started? Head to the [Quick Overview](https://inference-models.roboflow.com/getting-started/overview/) →
نیازمندی
| مقدار | نام |
|---|---|
| - | numpy |
| - | torch<3.0.0,>=2.0.0 |
| - | torchvision |
| - | opencv-python>=4.8.1.78 |
| - | requests<3.0.0,>=2.32.0 |
| - | supervision>=0.26.0 |
| - | backoff~=2.2.0 |
| - | transformers~=5.5 |
| - | timm<2.0.0,>=1.0.0 |
| - | accelerate<2.0.0,>=1.0.0 |
| - | einops<1.0.0,>=0.7.0 |
| - | peft>=0.18.1 |
| - | num2words~=0.5.14 |
| ys_platfor | bitsandbytes<0.48.0,>=0.46.1; |
| - | pyvips<3.0.0,>=2.2.3 |
| - | rf-clip==1.1 |
| - | python-doctr[torch]>=1.0.0 |
| - | packaging>=24.0.0 |
| - | rich<15.0.0,>=13.0.0 |
| - | pydantic<3.0.0,>=2.11.7 |
| - | filelock<4.0.0,>=3.12.0 |
| - | rich<15.0.0,>=14.1.0 |
| - | segmentation-models-pytorch<1.0.0,>=0.5.0 |
| - | scikit-image<0.26.0,>=0.24.0 |
| - | easyocr~=1.7.2 |
| - | sentencepiece<0.3.0,>=0.2.0 |
| - | rf_groundingdino==0.3.0 |
| - | tldextract~=5.1.2 |
| - | pybase64~=1.0.0 |
| - | rf-segment-anything==1.0 |
| - | rf-sam-2==1.0.3 |
| - | pycocotools<2.1.0,>=2.0.10 |
| xtr | torch<3.0.0,>=2.0.0; |
| xtr | torchvision; |
| xtr | torch<3.0.0,>=2.0.0; |
| xtr | torchvision; |
| platform_syste | pycuda<2026.0.0,>=2025.0.0; |
| xtr | torch<3.0.0,>=2.0.0; |
| xtr | torchvision; |
| platform_syste | pycuda<2026.0.0,>=2025.0.0; |
| xtr | torch<3.0.0,>=2.0.0; |
| xtr | torchvision; |
| platform_syste | pycuda<2026.0.0,>=2025.0.0; |
| xtr | torch<3.0.0,>=2.0.0; |
| xtr | torchvision; |
| platform_syste | pycuda<2026.0.0,>=2025.0.0; |
| xtr | torch<3.0.0,>=2.0.0; |
| xtr | torchvision; |
| platform_syste | pycuda<=2026.1.0,>=2025.0.0; |
| xtr | numpy<2.0.0; |
| xtr | torch<3.0.0,>=2.0.0; |
| xtr | torchvision; |
| xtr | pycuda<2026.0.0,>=2025.0.0; |
| xtr | onnxruntime<1.23.0,>=1.15.1; |
| latform_syste | onnxruntime-gpu<1.23.0,>=1.15.1; |
| latform_syste | pycuda<2026.0.0,>=2025.0.0; |
| latform_syste | onnxruntime-gpu<1.23.0,>=1.17.0; |
| latform_syste | pycuda<2026.0.0,>=2025.0.0; |
| platform_syste | numpy<2.0.0; |
| platform_syste | onnxruntime-gpu<1.24.0,>=1.17.0; |
| platform_syste | pycuda<2026.0.0,>=2025.0.0; |
| xtr | rf-mediapipe<0.11.0,>=0.9; |
| platform_syste | tensorrt-cu12<11.0.0,>=10.0.0; |
| platform_syste | tensorrt-lean-cu12<11.0.0,>=10.0.0; |
| platform_syste | pycuda<2026.0.0,>=2025.0.0; |
| xtr | pytest>=8.0.0; |
| xtr | pytest-timeout==2.4.0; |
| xtr | pytest-xdist>=3.0.0; |
| xtr | pytest-timeout; |
| xtr | requests-mock>=1.12.1; |
| xtr | mkdocs-material[imaging]>=9.5.5; |
| xtr | mkdocstrings<0.31.0,>=0.25.2; |
| xtr | mkdocstrings-python<2.0.0,>=1.10.9; |
| xtr | mike>=2.0.0; |
| xtr | mkdocs-jupyter>=0.24.3; |
| python_versio | mkdocs-git-committers-plugin-2>=2.4.1; |
| xtr | mkdocs-git-revision-date-localized-plugin>=1.2.4; |
| xtr | mkdocs-literate-nav~=0.6.2; |
| xtr | mkdocs-gen-files~=0.6.0; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <3.13,>=3.10 | Python |
نحوه نصب
نصب پکیج whl inference-models-0.27.2:
pip install inference-models-0.27.2.whl
نصب پکیج tar.gz inference-models-0.27.2:
pip install inference-models-0.27.2.tar.gz