Skip to content

get_deep_counting_model_paramGetDeepCountingModelParamGetDeepCountingModelParamget_deep_counting_model_paramT_get_deep_counting_model_paramπŸ”—

Short descriptionπŸ”—

get_deep_counting_model_paramGetDeepCountingModelParamGetDeepCountingModelParamget_deep_counting_model_paramT_get_deep_counting_model_param β€” Return the parameters of a Deep Counting model.

SignatureπŸ”—

get_deep_counting_model_param( deep_counting DeepCountingHandle, attribute.name GenParamName, out attribute.name GenParamValue )void GetDeepCountingModelParam( const HTuple& DeepCountingHandle, const HTuple& GenParamName, HTuple* GenParamValue )static void HOperatorSet.GetDeepCountingModelParam( HTuple deepCountingHandle, HTuple genParamName, out HTuple genParamValue )def get_deep_counting_model_param( deep_counting_handle: HHandle, gen_param_name: str ) -> Union[str, float, int]

Herror T_get_deep_counting_model_param( 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)

HTuple HDlModelCounting.GetDeepCountingModelParam( string genParamName )

DescriptionπŸ”—

The operator get_deep_counting_model_paramGetDeepCountingModelParam returns the parameter values of GenParamNamegenParamNamegen_param_name for the Deep Counting model DeepCountingHandledeepCountingHandledeep_counting_handle in GenParamValuegenParamValuegen_param_value.

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

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

In the following the parameters are described:

  • 'angle_start'"angle_start", 'angle_step'"angle_step", 'angle_end'"angle_end": Control the rotational augmentation. Templates passed to prepare_deep_counting_modelPrepareDeepCountingModel are rotated from 'angle_start'"angle_start" to 'angle_end'"angle_end" in steps of 'angle_step'"angle_step". This allows apply_deep_counting_modelApplyDeepCountingModel to better find rotated instances of the templates.

    The angles must be passed in radians.

    Suggested values: 00, -6.28-6.28, -3.14-3.14, 3.143.14, 6.286.28

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

    Restriction: \(-2\pi\) <= 'angle_start'"angle_start" <= 'angle_end'"angle_end" <= \(2\pi\), 'angle_step'"angle_step" > 00

  • 'backbone_model'"backbone_model": The backbone used for the detection of the templates. The backbone is automatically created by create_deep_counting_modelCreateDeepCountingModel. It can be obtained and written back in order to, for example, optimize it using optimize_dl_model_for_inferenceOptimizeDlModelForInference.

    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": Handle of the device on which the backbone will be executed.

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

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

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

  • '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", the one with lower confidence value gets suppressed. When set to 00, no overlap at all is allowed. We refer to the chapter Deep Learning / Object Detection for further explanations of the IoU.

    Suggested values: 0.30.3, 0.50.5, 0.70.7, 1.01.0

    Default: 'max_overlap'"max_overlap" = 0.50.5

    Restriction: 00 <= 'max_overlap'"max_overlap" <= 11

  • 'min_score'"min_score": This parameter determines the minimum similarity of detected instances to the original templates. In other words, apply_deep_counting_modelApplyDeepCountingModel ignores all detected instances with a similarity smaller than this value. The similarity computed by the Deep Counting model lies between 00 and 11, where 00 means no similarity and 11 is a very high similarity.

    Suggested values: 0.20.2, 0.30.3, 0.40.4, 0.50.5

    Default: 'min_score'"min_score" = 0.40.4

    Restriction: 00 < 'min_score'"min_score" <= 11

  • 'scale_min'"scale_min", 'scale_step'"scale_step", 'scale_max'"scale_max": Control the scale augmentation. Templates passed to prepare_deep_counting_modelPrepareDeepCountingModel are scaled from 'scale_min'"scale_min" to 'scale_max'"scale_max" in steps of 'scale_step'"scale_step". This allows apply_deep_counting_modelApplyDeepCountingModel to better find scaled instances of the templates.

    Suggested values: 0.90.9, 1.01.0, 1.11.1

    Default: 'scale_min'"scale_min" = 1.01.0, 'scale_max'"scale_max" = 1.01.0, 'scale_step'"scale_step" = 0.10.1

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

Execution informationπŸ”—

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πŸ”—

DeepCountingHandledeepCountingHandledeep_counting_handle (input_control) deep_counting β†’ (handle)HTuple (HHandle)HDlModelCounting, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the Deep Counting model.

GenParamNamegenParamNamegen_param_name (input_control) attribute.name β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the generic parameter.

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

GenParamValuegenParamValuegen_param_value (output_control) attribute.name β†’ (real / string / integer)HTuple (double / HString / Hlong)HTuple (double / string / int / long)Union[str, float, int]Htuple (double / char* / Hlong)

Value of the generic parameter.

ResultπŸ”—

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

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

create_deep_counting_modelCreateDeepCountingModel, set_deep_counting_model_paramSetDeepCountingModelParam, read_deep_counting_modelReadDeepCountingModel

Possible successors

apply_deep_counting_modelApplyDeepCountingModel

See also

set_deep_counting_model_paramSetDeepCountingModelParam

ModuleπŸ”—

Matching