Operator Reference

get_deep_counting_model_paramT_get_deep_counting_model_paramGetDeepCountingModelParamGetDeepCountingModelParamget_deep_counting_model_param (Operator)

get_deep_counting_model_paramT_get_deep_counting_model_paramGetDeepCountingModelParamGetDeepCountingModelParamget_deep_counting_model_param — Return the parameters of a Deep Counting model.

Signature

get_deep_counting_model_param( : : DeepCountingHandle, GenParamName : GenParamValue)

Herror T_get_deep_counting_model_param(const Htuple DeepCountingHandle, const Htuple GenParamName, Htuple* GenParamValue)

void GetDeepCountingModelParam(const HTuple& DeepCountingHandle, const HTuple& GenParamName, HTuple* GenParamValue)

HTuple HDlModelCounting::GetDeepCountingModelParam(const HString& GenParamName) const

HTuple HDlModelCounting::GetDeepCountingModelParam(const char* GenParamName) const

HTuple HDlModelCounting::GetDeepCountingModelParam(const wchar_t* GenParamName) const   ( Windows only)

static void HOperatorSet.GetDeepCountingModelParam(HTuple deepCountingHandle, HTuple genParamName, out HTuple genParamValue)

HTuple HDlModelCounting.GetDeepCountingModelParam(string genParamName)

def get_deep_counting_model_param(deep_counting_handle: HHandle, gen_param_name: str) -> Union[str, float, int]

Description

The operator get_deep_counting_model_paramget_deep_counting_model_paramGetDeepCountingModelParamGetDeepCountingModelParamget_deep_counting_model_param returns the parameter values of GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name for the Deep Counting model DeepCountingHandleDeepCountingHandleDeepCountingHandledeepCountingHandledeep_counting_handle in GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value.

Note that when changing parameters that influence the template creation, prepare_deep_counting_modelprepare_deep_counting_modelPrepareDeepCountingModelPrepareDeepCountingModelprepare_deep_counting_model must be called again before the model can be applied with apply_deep_counting_modelapply_deep_counting_modelApplyDeepCountingModelApplyDeepCountingModelapply_deep_counting_model. The following table gives an overview, which parameters can be set using set_deep_counting_model_paramset_deep_counting_model_paramSetDeepCountingModelParamSetDeepCountingModelParamset_deep_counting_model_param or create_deep_counting_modelcreate_deep_counting_modelCreateDeepCountingModelCreateDeepCountingModelcreate_deep_counting_model (set), which can be retrieved using get_deep_counting_model_paramget_deep_counting_model_paramGetDeepCountingModelParamGetDeepCountingModelParamget_deep_counting_model_param (get), and which require re-running prepare_deep_counting_modelprepare_deep_counting_modelPrepareDeepCountingModelPrepareDeepCountingModelprepare_deep_counting_model after changing them (prepare).

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name set get Requires prepare
'angle_start'"angle_start""angle_start""angle_start""angle_start" x x x
'angle_step'"angle_step""angle_step""angle_step""angle_step" x x x
'angle_end'"angle_end""angle_end""angle_end""angle_end" x x x
'backbone_model'"backbone_model""backbone_model""backbone_model""backbone_model" x x x
'device'"device""device""device""device" x x x
'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap" x x
'min_score'"min_score""min_score""min_score""min_score" x x
'scale_max'"scale_max""scale_max""scale_max""scale_max" x x x
'scale_min'"scale_min""scale_min""scale_min""scale_min" x x x
'scale_step'"scale_step""scale_step""scale_step""scale_step" x x x

In the following the parameters are described:

'angle_start'"angle_start""angle_start""angle_start""angle_start", 'angle_step'"angle_step""angle_step""angle_step""angle_step", 'angle_end'"angle_end""angle_end""angle_end""angle_end":

Control the rotational augmentation. Templates passed to prepare_deep_counting_modelprepare_deep_counting_modelPrepareDeepCountingModelPrepareDeepCountingModelprepare_deep_counting_model are rotated from 'angle_start'"angle_start""angle_start""angle_start""angle_start" to 'angle_end'"angle_end""angle_end""angle_end""angle_end" in steps of 'angle_step'"angle_step""angle_step""angle_step""angle_step". This allows apply_deep_counting_modelapply_deep_counting_modelApplyDeepCountingModelApplyDeepCountingModelapply_deep_counting_model to better find rotated instances of the templates.

The angles must be passed in radians.

Suggested values: 0, -6.28, -3.14, 3.14, 6.28

Default: 'angle_start'"angle_start""angle_start""angle_start""angle_start" = 0, 'angle_end'"angle_end""angle_end""angle_end""angle_end" = 0, 'angle_step'"angle_step""angle_step""angle_step""angle_step" = 'rad(30)'"rad(30)""rad(30)""rad(30)""rad(30)"

Restriction: <= 'angle_start'"angle_start""angle_start""angle_start""angle_start" <= 'angle_end'"angle_end""angle_end""angle_end""angle_end" <= , 'angle_step'"angle_step""angle_step""angle_step""angle_step" > 0

'backbone_model'"backbone_model""backbone_model""backbone_model""backbone_model":

The backbone used for the detection of the templates. The backbone is automatically created by create_deep_counting_modelcreate_deep_counting_modelCreateDeepCountingModelCreateDeepCountingModelcreate_deep_counting_model. It can be obtained and written back in order to, for example, optimize it using optimize_dl_model_for_inferenceoptimize_dl_model_for_inferenceOptimizeDlModelForInferenceOptimizeDlModelForInferenceoptimize_dl_model_for_inference.

Note that the Deep Counting model will automatically set the input size of the backbone according to the template and image sizes. It has therefore no effect to change the backbone's input size, and it is not recommended to do so. Also note that the backbone can not be used for any other deep learning methods besides Deep Counting.

'device'"device""device""device""device":

Handle of the device on which the backbone will be executed.

If the backbone was already optimized for a device, setting 'device'"device""device""device""device" might not be necessary anymore, see optimize_dl_model_for_inferenceoptimize_dl_model_for_inferenceOptimizeDlModelForInferenceOptimizeDlModelForInferenceoptimize_dl_model_for_inference for details.

To get a tuple of handles of all available potentially deep-learning capable hardware devices use query_available_dl_devicesquery_available_dl_devicesQueryAvailableDlDevicesQueryAvailableDlDevicesquery_available_dl_devices.

Default: Handle of the default device, thus the GPU with index 0. If not available, this is an empty tuple.

'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap":

The maximum allowed intersection over union (IoU) for two detected templates during counting. When two templates have an IoU higher than 'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap", the one with lower confidence value gets suppressed. When set to 0, no overlap at all is allowed. We refer to the chapter Deep Learning / Object Detection and Instance Segmentation for further explanations of the IoU.

Suggested values: 0.3, 0.5, 0.7, 1.0

Default: 'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap" = 0.5

Restriction: 0 <= 'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap" <= 1

'min_score'"min_score""min_score""min_score""min_score":

This parameter determines the minimum similarity of detected instances to the original templates. In other words, apply_deep_counting_modelapply_deep_counting_modelApplyDeepCountingModelApplyDeepCountingModelapply_deep_counting_model ignores all detected instances with a similarity smaller than this value. The similarity computed by the Deep Counting model lies between 0 and 1, where 0 means no similarity and 1 is a very high similarity.

Suggested values: 0.2, 0.3, 0.4, 0.5

Default: 'min_score'"min_score""min_score""min_score""min_score" = 0.4

Restriction: 0 < 'min_score'"min_score""min_score""min_score""min_score" <= 1

'scale_min'"scale_min""scale_min""scale_min""scale_min", 'scale_step'"scale_step""scale_step""scale_step""scale_step", 'scale_max'"scale_max""scale_max""scale_max""scale_max":

Control the scale augmentation. Templates passed to prepare_deep_counting_modelprepare_deep_counting_modelPrepareDeepCountingModelPrepareDeepCountingModelprepare_deep_counting_model are scaled from 'scale_min'"scale_min""scale_min""scale_min""scale_min" to 'scale_max'"scale_max""scale_max""scale_max""scale_max" in steps of 'scale_step'"scale_step""scale_step""scale_step""scale_step". This allows apply_deep_counting_modelapply_deep_counting_modelApplyDeepCountingModelApplyDeepCountingModelapply_deep_counting_model to better find scaled instances of the templates.

Suggested values: 0.9, 1.0, 1.1

Default: 'scale_min'"scale_min""scale_min""scale_min""scale_min" = 1.0, 'scale_max'"scale_max""scale_max""scale_max""scale_max" = 1.0, 'scale_step'"scale_step""scale_step""scale_step""scale_step" = 0.1

Restriction: 0 < 'scale_min'"scale_min""scale_min""scale_min""scale_min" <= 'scale_max'"scale_max""scale_max""scale_max""scale_max", 'scale_step'"scale_step""scale_step""scale_step""scale_step" > 0

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

DeepCountingHandleDeepCountingHandleDeepCountingHandledeepCountingHandledeep_counting_handle (input_control)  deep_counting HDlModelCounting, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the Deep Counting model.

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the generic parameter.

Default: 'angle_start' "angle_start" "angle_start" "angle_start" "angle_start"

List of values: 'angle_end'"angle_end""angle_end""angle_end""angle_end", 'angle_start'"angle_start""angle_start""angle_start""angle_start", 'angle_step'"angle_step""angle_step""angle_step""angle_step", 'backbone_model'"backbone_model""backbone_model""backbone_model""backbone_model", 'device'"device""device""device""device", 'max_overlap'"max_overlap""max_overlap""max_overlap""max_overlap", 'min_score'"min_score""min_score""min_score""min_score", 'scale_max'"scale_max""scale_max""scale_max""scale_max", 'scale_min'"scale_min""scale_min""scale_min""scale_min", 'scale_step'"scale_step""scale_step""scale_step""scale_step"

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (output_control)  attribute.name HTupleUnion[str, float, int]HTupleHtuple (real / string / integer) (double / string / int / long) (double / HString / Hlong) (double / char* / Hlong)

Value of the generic parameter.

Result

If the handle of the model is valid, the operator get_deep_counting_model_paramget_deep_counting_model_paramGetDeepCountingModelParamGetDeepCountingModelParamget_deep_counting_model_param returns the value 2 ( H_MSG_TRUE) . If necessary an exception is raised.

Possible Predecessors

create_deep_counting_modelcreate_deep_counting_modelCreateDeepCountingModelCreateDeepCountingModelcreate_deep_counting_model, set_deep_counting_model_paramset_deep_counting_model_paramSetDeepCountingModelParamSetDeepCountingModelParamset_deep_counting_model_param, read_deep_counting_modelread_deep_counting_modelReadDeepCountingModelReadDeepCountingModelread_deep_counting_model

Possible Successors

apply_deep_counting_modelapply_deep_counting_modelApplyDeepCountingModelApplyDeepCountingModelapply_deep_counting_model

See also

set_deep_counting_model_paramset_deep_counting_model_paramSetDeepCountingModelParamSetDeepCountingModelParamset_deep_counting_model_param

Module

Matching