Unsupervised Segmentation
Function
Use the unsupervised segmentation model package for inference of input images. The model learns normal patterns exclusively from OK samples, eliminating the need for defect annotation. It automatically classifies images as OK, NG, or Unknown and generates heatmaps and masks for defect regions.
Applicable to industrial quality inspection scenarios where defect shapes, positions, and sizes are unpredictable, but OK images exhibit minimal variation.
Input and Output
After you import the model package in the Deep Learning Model Package Inference Step, the following input and output ports are displayed.
Input
| Input Port | Data Type | Description |
|---|---|---|
Image |
Image/Color |
Image input to this port will be used for deep learning model package inference. Displays when the Input Data Type is 2D image. |
Surface Data |
Surface |
Surface data input to this port will be used for deep learning model package inference. Displays when the Input Data Type is Surface data. |
Output
| Output Port | Data Type | Description |
|---|---|---|
Visualization Output |
Image/Color |
Visualized results. |
Segmentation Result |
String |
The label indicating the existence of defects. |
Segmentation Mask |
Image/Color/Mask |
Mask the segmentation result. Regions with non-zero pixel values represent the mask. This port is displayed when the Input Data Type is 2D image. |
Segmentation Mask Contours |
Shape2D/Contour[] |
A list of pixel coordinates for the segmentation mask vertices. This port is displayed when the Input Data Type is 2D image. |
Segmented Surface Data |
Surface |
The surface data of the segmentation result. Regions with non-zero pixel values represent the mask. This port is displayed when the Input Data Type is Surface data. |
Parameter Description
When importing the Unsupervised Segmentation model package, configure the following parameters in this Step.
Model Package Settings
| Parameter | Description |
|---|---|
Model Manager Tool |
Parameter description: This parameter is used to open the deep learning model package management tool and import the deep learning model package. The model package file is a .dlkpack file exported by Mech-DLK.
|
Model Name |
Parameter description: After a Deep Learning Model Package is imported, this parameter is used to select the imported model package for this step.
|
Release Original Model Package After Switching |
Parameter description: Controls whether the resources used by the original model package are released upon the switch.
|
Model Package Type |
Parameter description: Once a Model Name is selected, the Model Package Type will be filled automatically. |
Input Batch Size |
Parameter description: The number of images processed during each inference. |
GPU ID |
Parameter description: This parameter is used to select the device ID of the GPU that will be used for the inference.
|
Input Data Type |
Parameter description: This parameter is used to specify the type of input data. The corresponding input ports will be displayed after the parameter is selected. It supports 2D image and surface data input. |
Preprocessing
| Parameter | Description | ||||
|---|---|---|---|---|---|
ROI File |
Parameter description: This parameter is used to set or modify the ROI of the input image. Tuning instruction: Once the deep learning model is imported, a default ROI will be applied. If you need to edit the ROI, click the Open the editor button. Edit the ROI in the pop-up Set ROI window, and fill in the ROI name. Instructions for Setting ROI: Hold down the left mouse button and drag to select an ROI, and then click the left mouse button again to confirm. If you need to re-select the ROI, please click the left mouse button and drag again. The coordinates of the selected ROI will be displayed in the “ROI Properties” section. Click the OK button to save and exit.
|
Postprocessing
| Parameter | Description |
|---|---|
Inference Configuration |
Parameter description: Configures the inference settings for an Unsupervised Segmentation model package. Click Open the editor to open the inference configuration window.
|
Visualization Settings
| Parameter | Description |
|---|---|
Draw Result on Image |
Parameter description: Once enabled, the detection results will be displayed on the image.
|
Customize Font Size |
Parameter description: This parameter determines whether to customize the font size in the visualized outputs. Once this option is selected, you should set the Font Size (0–10). The default value is 1.5.
|