Train a High-Quality Model

You are currently viewing the documentation for version 2.4.2. To access documentation for other versions, click the "Switch Version" button located in the upper-right corner of the page.

■ To use the latest version, visit the Mech-Mind Download Center to download it.

■ If you're unsure about the version of the product you are using, please contact Mech-Mind Technical Support for assistance.

Industrial quality inspections usually have strict limits on false negative and false positive rates. Therefore, the quality of a defect segmentation model is very important. This section introduces the factors that most affects the model quality and how to train high-quality defect segmentation models.

Ensure Labeling Quality

Labeling quality is one of the most significant factors affecting model performance. In actual projects, low labeling quality accounts for the reasons for more than 90% of poor model performance cases. Therefore, if the model is not performing well, solving labeling quality issues should be prioritized.

Labeling quality involves consistency, completeness, accuracy, and certainty:

  1. Consistency: Ensure the consistency of defect labeling methods, and avoid using different labeling methods for the same type of defects.

    improve model accuracy label consistency
  2. Completeness: Ensure that all regions that should be considered as defect regions according to the user-defined standard are selected, and avoid any missed selections.

    improve model accuracy label completeness
  3. Accuracy: Make the region selection as fine as possible to ensure the selected regions’ contours fit the actual defects’ contours and avoid bluntly covering the defects with coarse large selections.

    improve model accuracy label accuracy
  4. Certainty: For ambiguous defects, when it is impossible to judge whether the defect judgment criteria are met, the mask polygon tool can be used to cover the defect regions.

    improve model accuracy certainty
When there are multiple defects in the image, if it is impossible to judge whether each defect meets the defect judgment criteria, you can delete the current image to avoid affecting the model training effect.

Set the Proper Region of Interest (ROI)

Setting the ROI can effectively eliminate the interference of the background, and the ROI boundary should be as close to the outer contours of the objects as possible.

improve model accuracy roi
The same ROI setting will be applied to all images, so it is necessary to ensure that objects in all images are located within the ROI, especially in scenarios where the object positions/sizes are not fixed.

Select the Right Dataset

  • Control dataset image quantities For the first-time model building of the Defect Segmentation module, capturing 20 to 30 images is recommended. It is not true that the larger the number of images the better. Adding a large number of inadequate images in the early stage is not conducive to model improvement later, and will make the training time longer.

  • Collect representative data The datasets should contain NG images covering all the defect types with all defect features, in terms of shape, background, color, size, etc. When the features in OK images do not differ across images, the number of OK images can be relatively small.

  • Balance data proportion The number of images of different conditions/object classes in the datasets should be proportioned according to the actual project; otherwise, the training effect will be affected.

  • Images should be consistent with the application site The factors that need to be consistent include lighting conditions, object features, background, field of view, etc.

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.