Python
Predictions
Run inference on an image and retrieve predictions.
Epigos offers an API that allows you to make predictions from your model. This API is accessible within the Epigos Python SDK.
You’ll need to Create an API Key to Authentication with Epigos AI.
Image classification
You can predict the class or label of an image using the predict()
function when you load a classification model.
classification()
Loads classification model deployed on the platform.
Param | Type | Description |
---|---|---|
model_id | string | The unique ID of your model deployed on Epigos AI. |
predict()
Makes predictions for the classification model.
Param | Type | Description |
---|---|---|
image_path | string | Path to image (can be local file or remote url). |
confidence | float | Optional confidence threshold used to filter out predictions. |
Example using remote url
Example using image path
Object detection
You can detect objects in an image using the detect()
function when you load an object detection model.
object_detection()
Loads an object detection model deployed on the platform.
Param | Type | Description |
---|---|---|
model_id | string | The unique ID of your model deployed on Epigos AI. |
detect()
Makes detection for the object detection model.
Param | Type | Description |
---|---|---|
image_path | string | Path to image (can be local file or remote url). |
confidence | float | Optional confidence threshold used to filter out predictions. |
annotate | boolean | Optional annotate flag to specify whether to annotate the image or not. |
show_prob | boolean | Optional show_prob to specify whether detection confidence are shown on the labels. |
stroke_width | number | Optional stroke width to specify bounding box border width. |
Example using remote url
Example using image path
Example using annotation options
Checkout the code on Github
Was this page helpful?