Common objects
Last updated
Last updated
The input object describes the data to send as input to the network. You must specify exactly one key among the possible input types. Currently only the image inputs are supported.
A point is usually used to define a polygon in order to delimitate a non rectangle sub-part of the image. Coordinates are normalised to the image width and height. Origin is at the top-left corner.
A bounding box is a rectangle used to delimitate a sub-part of an image. Coordinates are normalised to the image width and height. Origin is at the top-left corner.
Parameter
Type
Default
Description
image
An image input.
video
A video input.
Attribute
Type
Description
source
string
May have various forms:
The URL of the image
The base64 encoded content of the image prefixed by data:image/{:format};base64,
.
The binary content of the image prefixed by data:image/{:format};binary,
In the two last cases, {:format}
is the image format (jpeg, png, etc...). If you don't know about the format just use *
.
bbox
object
A bounding box object to crop the image.
polygon
array(object)
An array of point objects of size at least 3 to crop the image.
Attribute
Type
Description
source
string
May have various forms:
The URL of the image
The base64 encoded content of the image prefixed by data:image/{:format};base64,
.
The binary content of the image prefixed by data:image/{:format};binary,
In the two last cases, {:format}
is the image format (jpeg, png, etc...). If you don't know about the format just use *
.
process_fps
float
The number of inference per second requested. Defaults to 1. Use a float number lower than one if you want to process less than one frame per second (e.g. passing 0.5 will result in a inference every 2 seconds).
Attribute
Type
Description
x
float
x-coordinate of the point
y
float
y-coordinate of the point
Attribute
Type
Description
xmin
float
x-coordinate of the top of the bounding box
ymin
float
y-coordinate of the left of the bounding box
xmax
float
x-coordinate of the bottom of the bounding box
ymax
float
y-coordinate of the right of the bounding box