Skip to content

What is Inference?

Roboflow Inference banner

Roboflow Inference is an open-source platform designed to simplify the deployment of computer vision models. It enables developers to perform object detection, classification, instance segmentation and keypoint detection, and utilize foundation models like CLIP, Segment Anything, and YOLO-World through a Python-native package, a self-hosted inference server, or a fully managed API.

Explore our enterprise options for advanced features like server deployment, device management, active learning, and commercial licenses for YOLOv5 and YOLOv8.

Get started with our "Run your first model" guide

Here is an example of a model running on a video using Inference:

πŸ’» installΒΆ

Inference package requires Python>=3.8,<=3.11. Click here to learn more about running Inference inside Docker.

pip install inference
πŸ‘‰ running on a GPU To enhance model performance in GPU-accelerated environments, install CUDA-compatible dependencies instead:
pip install inference-gpu
πŸ‘‰ advanced models Inference supports multiple model types for specialized tasks. From Grounding DINO for identifying objects with a text prompt, to DocTR for OCR, to CogVLM for asking questions about images - you can find out more in the [Foundation Models](/foundation/about) page.

Note that `inference` and `inference-gpu` packages install only the minimal shared dependencies. **Instead**, install model-specific dependencies to ensure code compatibility and license compliance.

The `inference` and `inference-gpu` packages install only the minimal shared dependencies. Install model-specific dependencies to ensure code compatibility and license compliance. Learn more about the [models](#extras) supported by Inference.
pip install inference[yolo-world]

πŸ”₯ quickstartΒΆ

Use Inference SDK to run models locally with just a few lines of code. The image input can be a URL, a numpy array, or a PIL image.

from inference import get_model

model = get_model(model_id="yolov8n-640")

results = model.infer("")
πŸ‘‰ roboflow models
Set up your `ROBOFLOW_API_KEY` to access thousands of fine-tuned models shared by the [Roboflow Universe]( community and your custom model. Navigate to πŸ”‘ keys section to learn more.
from inference import get_model

model = get_model(model_id="soccer-players-5fuqs/1")

results = model.infer(
πŸ‘‰ foundational models - [CLIP Embeddings](/foundation/clip) - generate text and image embeddings that you can use for zero-shot classification or assessing image similarity.
from inference.models import Clip

model = Clip()

embeddings_text = clip.embed_text("a football match")
embeddings_image = model.embed_image("")
- [Segment Anything](/foundation/sam) - segment all objects visible in the image or only those associated with selected points or boxes.
from inference.models import SegmentAnything

model = SegmentAnything()

result = model.segment_image("")
- [YOLO-World](/foundation/yolo_world) - an almost real-time zero-shot detector that enables the detection of any objects without any training.
from inference.models import YOLOWorld

model = YOLOWorld(model_id="yolo_world/l")

result = model.infer(
    text=["person", "backpack", "dog", "eye", "nose", "ear", "tongue"],

πŸ“Ÿ inference serverΒΆ

You can also run Inference as a microservice with Docker.

deploy serverΒΆ

The inference server is distributed via Docker. Behind the scenes, inference will download and run the image that is appropriate for your hardware. Here, you can learn more about the supported images.

inference server start

run clientΒΆ

Consume inference server predictions using the HTTP client available in the Inference SDK.

from inference_sdk import InferenceHTTPClient

client = InferenceHTTPClient(
with client.use_model(model_id="soccer-players-5fuqs/1"):
    predictions = client.infer("")

If you're using the hosted API, change the local API URL to Accessing the hosted inference server and/or using any of the fine-tuned models require a ROBOFLOW_API_KEY. For further information, visit the πŸ”‘ keys section.

πŸŽ₯ inference pipelineΒΆ

The inference pipeline is an efficient method for processing static video files and streams. Select a model, define the video source, and set a callback action. You can choose from predefined callbacks that allow you to display results on the screen or save them to a file.

from inference import InferencePipeline
from import render_boxes

pipeline = InferencePipeline.init(


πŸ”‘ keysΒΆ

Inference enables the deployment of a wide range of pre-trained and foundational models without an API key. To access thousands of fine-tuned models shared by the Roboflow Universe community, configure your API key.


πŸ“š documentationΒΆ

Visit our documentation to explore comprehensive guides, detailed API references, and a wide array of tutorials designed to help you harness the full potential of the Inference package.

Β© licenseΒΆ

The Roboflow Inference code is distributed under the Apache 2.0 license. However, each supported model is subject to its licensing. Detailed information on each model's license can be found here.