Deep Learning Model Package Inference (Mech-DLK 2.2.0+)

Mech-Vision 1.6.0 provides built-in environment for deep learning inference. With this Step, the deep learning inference can be enabled without installing Mech-Mind Software Environment.

The compatibility information of this Step is shown in the table below.

Function

This Step unpacks the DLKPACK model file exported by Mech-DLK, completes model inferencing, and filters the inferencing results based on the parameter settings.

../../../../_images/functional_description9.png

Sample Scenario

This Step is usually used for classification, object detection, defect detection, etc., and utilizes the deep learning model packages to infer the images to be detected.

Input and Output

  1. Classification

    ../../../../_images/input_and_output_1.png
  2. Instance Segmentation

    ../../../../_images/input_and_output_2.png
  3. Object Detection

    ../../../../_images/input_and_output_3.png
  4. Defect Segmentation

    ../../../../_images/input_and_output_4.png

Parameter Tuning

General Parameters

Model Package Path

Instruction: Click on the icon_file button and select the deep learning model package file that is in DLKPACK format.

Attention

When the model package is loaded for the first time, the model package will be optimized according to the PC used for deep learning inference, and the load time for the first time takes about 2 to 20 minutes. It is recommended not to load multiple model packages at the same time, and do not delete Steps, close the project, or exit the program while loading the model package.

ROI Settings

Instruction:

  1. Once the deel learning model is imported, a default ROI will be applied. If you need to edit the ROI, click Open an Editor.

    ../../../../_images/init_state.png
  2. Edit the ROI in the pop-up set ROI window.

    ../../../../_images/set_roi.png
  3. Enter an ROI Name, and then click OK.

    ../../../../_images/roi_file_name_1.png

    Note

    • If the size of the set ROI is larger than the image size, a Failed to save ROI error message as shown below will pop up.

      ../../../../_images/save_roi_fail.png
    • If ROI Name is left empty, a Failed to save ROI error message as shown below will pop up.

    ../../../../_images/save_roi_fail_1.png
  4. If the ROI is set successfully, the ROI file name will be displayed under the Open an Editor button, as shown below.

    ../../../../_images/roi_file_name.png
  5. If you would like to use the default ROI again, please delete the ROI File Name directly.

Font Settings

Customized Font Size
Default setting: Unselected
Instruction: Select to customize the font size.
Font Size (0~10)
Default setting: 3.0
Instruction: Set the font size according to actual situation.
Example: The figure below shows the font sizes set to 3.0 and 5.0 respectively in an instance segmentation project.
../../../../_images/font_size_comparison.png

Hint

This parameter is not available for defect segmentation models.

Module-Specific Parameters

Classification

Classification Confidence Threshold (0.0~1.0)

Default value: 0.7000

Description: The results above this threshold will be kept.

Instance Segmentation

Visualization Settings

Draw Objects on Image
Default setting: Unselected
Instruction: Select to display the masks and bounding boxes on the image.
Method to Visualize Objects
Default setting: Instances
Options: Threshold, Instances, Classes, CentralPoint
Instruction:
  • Threshold: If the computed confidence is above the threshold, the corresponding objects will be displayed in green, or else the objects will be displayed in red, as shown below.

../../../../_images/threshold_sample.png
  • Instances: Each detected object is displayed in an individual color, as shown below.

../../../../_images/instances_sample.png
  • Classes: Objects with the same label will be displayed in the same color, as shown below.

../../../../_images/classes_sample.png
  • CentralPoint: Display the original color of the object, as shown below.

../../../../_images/central_point_sample.png

Instance Segmentation Confidence Threshold (0.0~1.0)

Default value: 0.7000

Description: The results above this threshold will be displayed in green and the results below this threshold will be desplayed in red.

Object Detection

Visualization Settings

Draw Objects on Image
Default setting: Unselected
Instruction: Select to display the masks and bounding boxes on the image.
Method to Visualize Objects
Default setting: CentralPoint
Options: BoundingBox, CentralPoint
Instruction: Figure 1 is an example of visualization in BoundingBox method and Figure 2 is an example of visualization in CentralPoint method.
../../../../_images/box_and_central.png

Object Detection Confidence Threshold (0.0~1.0)

Default value: 0.7000

Description: The results above this threshold will be kept.

Defect Segmentation

Visualization Settings

Draw Defect Mask on Image
Default setting: Unselected
Instruction: Select to draw a mask on the input image. The figure below shows the result before and after selecting this option.
../../../../_images/draw_mask.png