Inference SDK
HTTP client for the Roboflow Inference Server, with local, hosted, async, and batch inference from Python.
pip install inference-sdkQuickstart
from inference_sdk import InferenceHTTPClient
import os
image_url = "https://media.roboflow.com/inference/soccer.jpg"
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["API_KEY"],
)
results = client.infer(image_url, model_id="soccer-players-5fuqs/1")
print(results)from inference_sdk import InferenceHTTPClient
import cv2
import os
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["API_KEY"],
)
numpy_image = cv2.imread("path/to/local/image.jpg")
results = client.infer(numpy_image, model_id="soccer-players-5fuqs/1")
print(results)Self-hosted server
AsyncIO client
Parallel and batch inference
What is actually returned as a prediction?
Next steps
Last updated
Was this helpful?