get_dl_classifier_resultT_get_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result (算子名称)
名称
get_dl_classifier_resultT_get_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result — Retrieve classification results inferred by a deep-learning-based
classifier.
警告
get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result is obsolete and is only provided for
reasons of backward compatibility.
参数签名
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]
描述
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
该算子 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.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
参数表
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.
结果
如果参数均有效,算子
get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result 返回值 2 (
H_MSG_TRUE)
. If
necessary, an exception is raised.
可能的前置算子
apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierApplyDlClassifierapply_dl_classifier
可能的后置算子
clear_dl_classifier_resultclear_dl_classifier_resultClearDlClassifierResultClearDlClassifierResultClearDlClassifierResultclear_dl_classifier_result
模块
Deep Learning Inference