Skip to content

prepare_deep_counting_modelPrepareDeepCountingModelPrepareDeepCountingModelprepare_deep_counting_modelT_prepare_deep_counting_model๐Ÿ”—

Short description๐Ÿ”—

prepare_deep_counting_modelPrepareDeepCountingModelPrepareDeepCountingModelprepare_deep_counting_modelT_prepare_deep_counting_model โ€” Set templates of a Deep Counting model.

Signature๐Ÿ”—

prepare_deep_counting_model( image Templates, deep_counting DeepCountingHandle )void PrepareDeepCountingModel( const HObject& Templates, const HTuple& DeepCountingHandle )static void HOperatorSet.PrepareDeepCountingModel( HObject templates, HTuple deepCountingHandle )def prepare_deep_counting_model( templates: HObject, deep_counting_handle: HHandle ) -> None

Herror T_prepare_deep_counting_model( const Hobject Templates, const Htuple DeepCountingHandle )

void HDlModelCounting::PrepareDeepCountingModel( const HImage& Templates ) const

void HDlModelCounting.PrepareDeepCountingModel( HImage templates )

Description๐Ÿ”—

prepare_deep_counting_modelPrepareDeepCountingModel sets the templates of the objects that should be counted by the Deep Counting model DeepCountingHandledeepCountingHandledeep_counting_handle. When applying the Deep Counting model using apply_deep_counting_modelApplyDeepCountingModel, objects in the search images that are similar to the provided templates are detected and counted. Note that this operator overwrites any previously set templates.

To also count scaled and rotated variants of the provided templates, an automatic augmentation of the templates can be enabled by setting the parameters 'angle_start'"angle_start", 'angle_end'"angle_end", 'angle_step'"angle_step", 'scale_min'"scale_min", 'scale_max'"scale_max", and 'scale_step'"scale_step" using create_deep_counting_modelCreateDeepCountingModel or set_deep_counting_model_paramSetDeepCountingModelParam before calling apply_deep_counting_modelApplyDeepCountingModel.

When changing parameters of the Deep Counting model that influence the template creation, prepare_deep_counting_modelPrepareDeepCountingModel must be re-run before apply_deep_counting_modelApplyDeepCountingModel. The list of such parameters is provided in get_deep_counting_model_paramGetDeepCountingModelParam.

Attention๐Ÿ”—

System requirements: To run this operator on GPU (see get_deep_counting_model_paramGetDeepCountingModelParam), cuDNN and cuBLAS are required. For further details, please refer to the โ€œInstallation Guideโ€, paragraph โ€œRequirements for Deep Learning and Deep-Learning-Based Methodsโ€. Alternatively, this operator can also be run on CPU.

Execution information๐Ÿ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters๐Ÿ”—

Templatestemplatestemplates (input_object) (multichannel-)image(-array) โ†’ object (byte / real)HObject (byte / real)HImage (byte / real)HObject (byte / real)Hobject (byte / real)

Template image(s) with regions.

DeepCountingHandledeepCountingHandledeep_counting_handle (input_control, state is modified) deep_counting โ†’ (handle)HTuple (HHandle)HDlModelCounting, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the Deep Counting model.

Result๐Ÿ”—

If the handle of the model is valid, the operator prepare_deep_counting_modelPrepareDeepCountingModel 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, get_deep_counting_model_paramGetDeepCountingModelParam, read_deep_counting_modelReadDeepCountingModel

Possible successors

apply_deep_counting_modelApplyDeepCountingModel

Alternatives

read_deep_counting_modelReadDeepCountingModel

See also

apply_deep_counting_modelApplyDeepCountingModel

Module๐Ÿ”—

Matching