get_dl_classifier_resultT_get_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result (Operator)
Name
get_dl_classifier_resultT_get_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result
— Retrieve classification results inferred by a deep-learning-based
classifier.
Warning
get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result
is obsolete and is only provided for
reasons of backward compatibility.
Signature
def get_dl_classifier_result(dlclassifier_result_handle: HHandle, index: Union[int, str], gen_result_name: MaybeSequence[str]) -> Sequence[Union[str, float, int]]
def get_dl_classifier_result_s(dlclassifier_result_handle: HHandle, index: Union[int, str], gen_result_name: MaybeSequence[str]) -> Union[str, float, int]
Description
get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result
allows the user to return
classification results. These results are stored in the handle
DLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandledlclassifier_result_handle
and have been obtained from
the operator apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierApplyDlClassifierapply_dl_classifier
.
The input parameter GenResultNameGenResultNameGenResultNameGenResultNamegenResultNamegen_result_name
names the sort of result asked
and IndexIndexIndexIndexindexindex
identifies for which image the result is to be returned.
The respective value is given in GenResultValueGenResultValueGenResultValueGenResultValuegenResultValuegen_result_value
.
Concretely, GenResultNameGenResultNameGenResultNameGenResultNamegenResultNamegen_result_name
can attain the following values:
- 'confidences'"confidences""confidences""confidences""confidences""confidences":
-
return the confidences values for the
selected image IndexIndexIndexIndexindexindex
.
- 'predicted_classes'"predicted_classes""predicted_classes""predicted_classes""predicted_classes""predicted_classes":
-
return the names of the inferred
classes for the selected image IndexIndexIndexIndexindexindex
.
- 'predicted_class_indices'"predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices":
return the indices of
the inferred classes for the selected image IndexIndexIndexIndexindexindex
.
The class indices correspond to the positions within the array of
classes (counting from 0).
The input parameter IndexIndexIndexIndexindexindex
can attain the value 'all'"all""all""all""all""all", in
which case get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_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, IndexIndexIndexIndexindexindex
must be an integer selecting one of the input
images in the batch, in which case get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_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, IndexIndexIndexIndexindexindex
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
DLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandledlclassifier_result_handle
(input_control) dl_classifier_result →
HDlClassifierResult, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the deep learning classification
results.
IndexIndexIndexIndexindexindex
(input_control) number →
HTupleUnion[int, str]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Index of the image in the batch.
Default:
'all'
"all"
"all"
"all"
"all"
"all"
GenResultNameGenResultNameGenResultNameGenResultNamegenResultNamegen_result_name
(input_control) attribute.name(-array) →
HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Name of the generic parameter.
Default:
'predicted_classes'
"predicted_classes"
"predicted_classes"
"predicted_classes"
"predicted_classes"
"predicted_classes"
List of values:
'confidences'"confidences""confidences""confidences""confidences""confidences", 'predicted_class_indices'"predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices", 'predicted_classes'"predicted_classes""predicted_classes""predicted_classes""predicted_classes""predicted_classes"
GenResultValueGenResultValueGenResultValueGenResultValuegenResultValuegen_result_value
(output_control) attribute.value(-array) →
HTupleSequence[Union[str, float, int]]HTupleHtuple (real / string / integer) (double / string / int / long) (double / HString / Hlong) (double / char* / Hlong)
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_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result
returns the value 2 (
H_MSG_TRUE)
. If
necessary, an exception is raised.
Possible Predecessors
apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierApplyDlClassifierapply_dl_classifier
Possible Successors
clear_dl_classifier_resultclear_dl_classifier_resultClearDlClassifierResultClearDlClassifierResultClearDlClassifierResultclear_dl_classifier_result
Module
Deep Learning Inference