Registry / ai-ml / inference-models

inference-models

JSON →
library0.27.2pypypiunverified

The new inference engine for Computer Vision models, providing fast, optimized inference for object detection, classification, and segmentation. Current version 0.27.2, under active development.

pip install inference-models
INSTALL
IMPORT
SIG · INFERENCE-MODELS
I
inference-models
ai-mlpythonv0.27.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InferencePipeline
from inference_models import InferencePipeline
from inference_models.pipeline import InferencePipeline
InferencePipeline is exposed at package level; submodule import may break.
load_model
from inference_models import load_model
import inference_models.load_model
load_model is a function, not a module.

Load a model and run inference on an image.

import os from inference_models import InferencePipeline, load_model # Replace with your model path or Hugging Face ID model = load_model('facebook/detr-resnet-50') # Create pipeline pipeline = InferencePipeline(model) # Run inference image_path = 'path/to/image.jpg' results = pipeline(image_path) print(results)
Debug
Known issues
breakingIn version 0.20.0, the 'inference' top-level module was renamed to 'inference_models'. Old imports like 'import inference' will fail.
fix
Use 'from inference_models import ...' instead.
affects: >=0.20.0
deprecatedThe function 'run_inference()' is deprecated since 0.25.0 and will be removed in 0.30.0. Use 'InferencePipeline' instead.
fix
Replace with: pipeline = InferencePipeline(model); results = pipeline(image)
affects: >=0.25.0, <0.30.0
gotchaThe library requires Python >=3.10 and <3.13. It does not support Python 3.9 or earlier, and will not install on Python 3.13+.
fix
Ensure your Python version is 3.10, 3.11, or 3.12.
affects: all
Upgrade
Version history
0.27.2latest on PyPI · released Apr 24, 2026
Audit
Dependencies
torchrequiredRequired for model inference
PillowrequiredImage loading and preprocessing
numpyrequiredArray operations
Agent activity
11 hits · last 30 days
node
10
Bingbot
1
Resources