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_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result is obsolete and is only provided for reasons of backward compatibility.

Signature

get_dl_classifier_result( : : DLClassifierResultHandle, Index, GenResultName : GenResultValue)

Herror T_get_dl_classifier_result(const Htuple DLClassifierResultHandle, const Htuple Index, const Htuple GenResultName, Htuple* GenResultValue)

void GetDlClassifierResult(const HTuple& DLClassifierResultHandle, const HTuple& Index, const HTuple& GenResultName, HTuple* GenResultValue)

HTuple HDlClassifierResult::GetDlClassifierResult(const HTuple& Index, const HTuple& GenResultName) const

HTuple HDlClassifierResult::GetDlClassifierResult(const HString& Index, const HString& GenResultName) const

HTuple HDlClassifierResult::GetDlClassifierResult(const char* Index, const char* GenResultName) const

HTuple HDlClassifierResult::GetDlClassifierResult(const wchar_t* Index, const wchar_t* GenResultName) const   ( Windows only)

static void HOperatorSet.GetDlClassifierResult(HTuple DLClassifierResultHandle, HTuple index, HTuple genResultName, out HTuple genResultValue)

HTuple HDlClassifierResult.GetDlClassifierResult(HTuple index, HTuple genResultName)

HTuple HDlClassifierResult.GetDlClassifierResult(string index, string genResultName)

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_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result allows the user to return classification results. These results are stored in the handle DLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandledlclassifier_result_handle and have been obtained from the operator apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierapply_dl_classifier.

The input parameter GenResultNameGenResultNameGenResultNamegenResultNamegen_result_name names the sort of result asked and IndexIndexIndexindexindex identifies for which image the result is to be returned. The respective value is given in GenResultValueGenResultValueGenResultValuegenResultValuegen_result_value.

Concretely, GenResultNameGenResultNameGenResultNamegenResultNamegen_result_name can attain the following values:

'confidences'"confidences""confidences""confidences""confidences":

return the confidences values for the selected image IndexIndexIndexindexindex.

'predicted_classes'"predicted_classes""predicted_classes""predicted_classes""predicted_classes":

return the names of the inferred classes for the selected image IndexIndexIndexindexindex.

'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 IndexIndexIndexindexindex. The class indices correspond to the positions within the array of classes (counting from 0).

The input parameter IndexIndexIndexindexindex can attain the value 'all'"all""all""all""all", in which case get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_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, IndexIndexIndexindexindex must be an integer selecting one of the input images in the batch, in which case get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_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, IndexIndexIndexindexindex 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

Parameters

DLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandledlclassifier_result_handle (input_control)  dl_classifier_result HDlClassifierResult, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the deep learning classification results.

IndexIndexIndexindexindex (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"

GenResultNameGenResultNameGenResultNamegenResultNamegen_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"

List of values: 'confidences'"confidences""confidences""confidences""confidences", '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"

GenResultValueGenResultValueGenResultValuegenResultValuegen_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_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result returns the value 2 ( H_MSG_TRUE) . If necessary, an exception is raised.

Possible Predecessors

apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierapply_dl_classifier

Possible Successors

clear_dl_classifier_resultclear_dl_classifier_resultClearDlClassifierResultClearDlClassifierResultclear_dl_classifier_result

Module

Deep Learning Inference