Module Cascading

The module cascading function is used to cascade two or more algorithm modules to train a model with multiple recognition functions.

When to Use Module Cascading

When two or more identification requirements need to be met, module cascading can be used. For example, when both object defect segmentation and defect classification are required, the “Defect Segmentation” module and the “Classification” module can be cascaded.

With module cascading, there is no need to create multiple projects, which saves training and deployment time.

Please see Train the First Model for instructions on using module cascading.

Methods of Cascading

../../_images/concatenation.png

Create a Cascading Project

The following instructions show how to create a cascading project for recognizing object defects and classifying the defects.

The function is achieved by cascading two algorithm modules.

  1. Create the project

    Click New Project on the main window, select the project path and enter the project name to create a new project.

    ../../_images/new_project.png
  2. Add the “Defect Segmentation” module

    Click on icon_add in the module section on the right part of the main window, select the Defect Segmentation module and click on Confirm .

    ../../_images/add_new_module.png
  3. Import image data

    Click Import in the upper left, and select how to import the image data.

    ../../_images/import_images.png
  4. Select ROI

    Click on icon_roi to select the region of interest from the image. The purpose is to reduce the interference of irrelevant background information and reduce the image processing time.

    ../../_images/roi.png
  5. Label the images

    Please label the OK images and the NG images that contain defects in each dataset. For NG images, please right-click on icon_tool on the left-side toolbar of the image, select the appropriate tools according to the shape of the defects, and select all defect regions in the images.

    Click icon_eraser to use the eraser tool for adjusting the selected regions.

    ../../_images/label_data.png

    For an image that contains no defect, please select the image in the image list on the left, right-click, and select Set to OK .

    ../../_images/label_ok.png
  6. Train the model

    Click train at the bottom right to start training.

    ../../_images/training_chart.png
  7. Validate the training effect

    After the model training is completed, please click on Validate Result to see the model effect.

    ../../_images/result_verification.png
  8. Add the “Classification” module

    After validating the training effect of the trained defect segmentation model and confirming that the recognition performance meets the requirement, please click + in the “Module” section at the upper right of the window to add a “Classification” module.

    ../../_images/add_module.png
  9. Import data into the “Classification” module

    The above defect segmentation training results will be imported into the image classification module as a data source. Please click on Import , select the required data, and click on Confirm .

    ../../_images/data_source.png
  10. Create image classification labels and start labeling

    Before labeling the Classification module, please click on + in the “Label” section on the right to create different labels according to the classes of the target objects. Then click a label on the left side of the “Label” section to label the images.

    ../../_images/label.png
  11. Train the model

    Click Train to start training the model with default parameters.

    ../../_images/training_chart_classification.png
  12. Validate the model

    After training, click Validate to see the model’s performance.

    ../../_images/validation.png
  13. Export the model file

    After the model training is completed, please click on Export model on the right to export the optimal model to the project folder.

    ../../_images/model_files.png