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 Node 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 |
---|---|---|
payload | dict | Dictionary containing prediction parameters |
Payload
Param | Type | Description |
---|---|---|
imageUrl | string | Optional remote url pointing to image the |
imageBase64 | string | Optional Base64-encoded string of the image |
confidence | number | Optional confidence threshold used to filter out predictions. |
The function expects either imageUrl
or imageBase64
to provided else it
will raise validation errors.
Example prediction
Object detection
You can detect objects in an image using the detect()
function when you load an object detection model.
objectDetection()
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 |
---|---|---|
payload | dict | Dictionary containing prediction parameters |
Payload
Param | Type | Description |
---|---|---|
imageUrl | string | Optional remote url pointing to image the |
imageBase64 | string | Optional Base64-encoded string of the image |
confidence | number | Optional confidence threshold used to filter out predictions. |
options | object | Optional options to customize image annotation. |
Options
Param | Type | Description |
---|---|---|
annotate | boolean | Optional annotate flag to specify whether to annotate the image or not. |
showProb | boolean | Optional show_prob to specify whether detection confidence are shown on the labels. |
strokeWidth | number | Optional stroke width to specify bounding box border width. |
The function expects either imageUrl
or imageBase64
to provided else it
will raise validation errors.
Example detection
Example detection with annotation options
Checkout the code on Github
Was this page helpful?