Classification
Run inference on classification models hosted on Roboflow.
Last updated
Was this helpful?
Run inference on classification models hosted on Roboflow.
Last updated
Was this helpful?
The hosted API inference route returns a JSON
object containing an array of predictions. Each prediction has the following properties:
time
= total time, in seconds, to process the image and return predictions
image
= an object that holds information about the image width
and height
width
the height of the predicted image
height
= the height of the predicted image
predictions
= collection of all predicted classes and their associated confidence values for the prediction
class
= the label of the classification
confidence
= the model's confidence that the image contains objects of the detected classification
top
= highest confidence predicted class
confidence
= highest predicted confidence score
image_path
= path of the predicted image
prediction_type
= the model type used to perform inference, ClassificationModel
in this case
POST
https://classify.roboflow.com/:datasetSlug/:versionNumber
You can POST a base64 encoded image directly to your model endpoint. Or you can pass a URL as the image
parameter in the query string if your image is already hosted elsewhere.
datasetSlug
string
The url-safe version of the dataset name. You can find it in the web UI by looking at the URL on the main project view.
string
The version number identifying the version of your dataset.
api_key
string
Your API key (obtained via your workspace API settings page)