Operator Reference
get_dl_classifier_result (Operator)
get_dl_classifier_result — Retrieve classification results inferred by a deep-learning-based
classifier.
Warning
get_dl_classifier_result is obsolete and is only provided for
reasons of backward compatibility.
The operator will be removed with HALCON 25.05.
Signature
get_dl_classifier_result( : : DLClassifierResultHandle, Index, GenResultName : GenResultValue)
Description
get_dl_classifier_result allows the user to return
classification results. These results are stored in the handle
DLClassifierResultHandle and have been obtained from
the operator apply_dl_classifier.
The input parameter GenResultName names the sort of result asked
and Index identifies for which image the result is to be returned.
The respective value is given in GenResultValue.
Concretely, GenResultName can attain the following values:
- 'confidences':
-
return the confidences values for the selected image
Index. - 'predicted_classes':
-
return the names of the inferred classes for the selected image
Index. - 'predicted_class_indices':
return the indices of the inferred classes for the selected image
Index. The class indices correspond to the positions within the array of classes (counting from 0).
The input parameter Index can attain the value 'all', in
which case get_dl_classifier_result returns the confidence value,
respectively class, for the best candidate (prediction with the
highest confidence value) for each image of the input batch.
Otherwise, Index must be an integer selecting one of the input
images in the batch, in which case get_dl_classifier_result returns
all output classes, respectively, confidences sorted by decreasing
confidence value. This is useful in order to retrieve the best K candidates
for a given input. As we start indexing at 0, Index must
have a value between 0 and the size of the batch of input images
minus one.
For an explanation of the concept of deep-learning-based classification see the introduction of chapter Deep Learning / Classification. The workflow involving this legacy operator is described in the chapter Legacy / DL Classification.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
DLClassifierResultHandle (input_control) dl_classifier_result → (handle)
Handle of the deep learning classification results.
Index (input_control) number → (string / integer)
Index of the image in the batch.
Default: 'all'
GenResultName (input_control) attribute.name(-array) → (string)
Name of the generic parameter.
Default: 'predicted_classes'
List of values: 'confidences', 'predicted_class_indices', 'predicted_classes'
GenResultValue (output_control) attribute.value(-array) → (real / string / integer)
Value of the generic parameter, either the confidence values, the class names or class indices.
Result
If the parameters are valid, the operator
get_dl_classifier_result returns the value 2 (
H_MSG_TRUE)
. If
necessary, an exception is raised.
Possible Predecessors
Possible Successors
Module
Deep Learning Enhanced