Start Using the “Defect Segmentation” Module¶
Please click here to download an image dataset of connectors. In this section, we will use a Defect Segmentation module and train a model to detect the defects such as deformations and fractures on the connectors.
Create a new project and add the defect segmentation module
Import the image dataset of connectors
Decompress the downloaded dataset file. Click on the Import button in the upper left corner, select Folder, and import the image dataset. The connector pins in the images can be deformed, fractured, or intact.
Select an ROI
Label images
In this section, you will need to label the OK images and NG images in each dataset. OK means that the connectors meet quality requirements and NG means that there are defects such as deformations and fractures on the connectors.
For NG images, Right-click on the Polygon Tool and select a proper tool to select the defect area. Please select the defect as precisely as possible with the tools, and avoid including irrelevant regions.
Hint
The quality of labeling is the most important factor affecting the performance of the model. Please refer to Ensure Labeling Quality for detailed instructions on image labeling.
For OK images that do not contain any defect, select the image and then right-click and select Set to OK in the context menu.
Split the dataset into the training set and validation set
Please make sure that both the training set and validation set include images with all types of defects, which will guarantee that the algorithm can learn all different types of defects and validate the images with different defects properly. If the default training set and validation set cannot meet this requirement, please right-click the individual image and switch it to the training/validation set manually.
Train the model
Keep the default training parameter settings and click on Train to start training the model.
Validate the model
After the training is completed, click on Validate to validate the model and check the results. You can also use the Set Defect Judgment Rules to adjust the criteria for evaluating defects.
Export the model
Click on Export and select a directory to save the exported model. You can deploy the model according to actual needs.