Inference output
Inference output examples
Let's first start with some examples of output which may be easier to understand than the exact specifications below.
A typical output for a classification algorithm will look like this:
Prediction are displayed as soon as the prediction score is above the indicated threshold. The predictions are sorted by decreasing confidence, so you may only be interested in the first prediction outputs[0]['labels']['predicted'][0]['label_name']
for a classification problem. For a multi-label classification problem (tagging), all the predicted labels are independent and may be of interest.
The output of a detection algorithm is almost the same, see just below. Please note the presence of the roi
field which indicate the location ("roi" stand for Region Of Interest) of the object in the image. The (xmin, ymin)
coordinate of the box corresponds to its top-left corner.
Inference output specification
The data returned by an inference request will contain the list of inference outputs:
outputs
An array of inference output objects. The i-th element of the array corresponds to the result of the i-th element of the specification outputs
field and version post_processings
field.
This object is directly related to the output object of the specification: they both have the same unique field. It stores the recognition inference output.
labels
An output of type labels
.
Inference labels output
predicted
An array of prediction object. This field stores the list of recognition hypotheses whose score is above the recognition threshold.
discarded
An array of prediction object. If you passed show_discared=true
in the inference request, this field will store the list of recognition hypotheses whose score did not reached the recognition threshold.
Prediction
Stores information related to an object hypothesis.
label_id
int
The recognized label ID from the specification's label object.
label_name
string
The recognized label name from the specification's label object.
score
float
The recognition score.
threshold
float
The recognition threshold that was defined by the recognition version post-processing.
roi
(optional) If the roi
field of the corresponding labels output object is not "NONE"
, this field will store a ROI object.
ROI Object
ROI stands for Region Of Interest and describes the position of an object.
region_id
int
The region ID. It might not be unique among all the returned prediction objects. It can be used in conjunction with show_discarded=true
to group the predicted
and discarded
fields by region_id
to identify alternate labels for a given region in case of ambiguity.
bbox
(optional) Present if and only if the region type is "BBOX".
Last updated