JSON
object containing an array of predictions. Each prediction has the following properties:x
= the horizontal center point of the detected objecty
= the vertical center point of the detected objectwidth
= the width of the bounding boxheight
= the height of the bounding boxclass
= the class label of the detected objectconfidence
= the model's confidence that the detected object has the correct label and position coordinatesmodel
, version
and api_key
. These will be pre-filled for you after training completes if you click through via the web UI under your versions "Training Results" section.Choose File
. After you have chosen the settings you want, click Run Inference
. your-dataset-slug/your-version
. You can easily find your dataset's identifier by looking at the curl
command shown in the Roboflow web interface after your model has finished training.YOUR_IMAGE.jpg
:curl
and base64
command line tools when you select "Use Git and optional Unix tools from the Command Prompt" during installation.pip install requests pillow
pip install requests pillow
npm install axios
to install the dependency.ffmpeg
and the Roboflow Inference API:format=image
in the query string the inference API will return a base64 encoded string of your image with the inference detections drawn on top. You can decode this with your favorite image processing library - here we provide an example with cv2
and numpy
JSON
object's properties, a bounding box can always be drawn using some combination of the following rules:x
,y
)(x1, y1)
and (x2, y2)
can be found using:x1
= x - (width/2)
y1
= y - (height/2)
x2
= x + (width/2)
y2
= y + (height/2)
Pillow
when building the box
object to render bounding boxes within an Image
. predictions
!