Skip to content

Concept – Deep Counting🔗

This chapter explains how to use Deep Counting.

Deep Counting is used to find objects in images and returns the number of objects.

A possible example for a Deep Counting application: Objects in an image are counted and the object quantity is returned.

Deep Counting uses user-defined templates to prepare a Deep Counting model. This model can be used to count objects that resemble the templates.

The general workflow is described in the following section.

General Workflow🔗

This paragraph describes how to obtain the number from objects of a kind in images using a Deep Counting model. An application scenario can be seen in the HDevelop example deep_counting_workflow.hdev

  1. Create a Deep Counting model by using

  2. Query the available DL devices for inference by using

  3. Set the model parameters, the used devices or augmentation parameters for the templates using

  4. Draw templates for the preparation of the model. This can be done using the procedure

    • draw_deep_counting_templates.

    The drawn templates are needed for the operator prepare_deep_counting_modelPrepareDeepCountingModel.

  5. Prepare the model for the inference using

    Note that when changing parameters that influence the template creation, or when other templates should be used, prepare_deep_counting_modelPrepareDeepCountingModel must be called again, before the model can be applied with apply_deep_counting_modelApplyDeepCountingModel.

  6. Apply the model using the operator

    The result will be saved in DeepCountingResultdeepCountingResultdeep_counting_result.

  7. Visualize the Deep Counting results from DeepCountingResultdeepCountingResultdeep_counting_result using the procedure

    • dev_display_deep_counting_results.