Use the Classification Module

Please click here to download an image dataset of condensers, an example project in Mech-DLK. In this section, we will use the Classification module to train a model that can distinguish between the front and back sides of the condensers.

You can also use your own data. The usage process is overall the same, but the labeling part is different.

Workflow

  1. Create a New Project and add the Classification module: Click New Project in the interface, name the project, and select a directory to save the project. Click example projects icon create in the upper right corner of the Modules panel and add the Classification module.

    example projects add project
  2. Import the image data of condensers: Unzip the downloaded file. Click the Import/Export button in the upper left corner, select Import Folder, and import the image folder.

    When you select Import Dataset, you can only import datasets in the DLKDB format (.dlkdb), which are datasets exported from Mech-DLK.
    example projects import images
  1. Create Labels: Select Labeling and click the + button to create labels based on the type or feature of different objects. In this example, the labels are named front and back to distinguish between the front and back sides of the condenser.

    When you select a label, you can right-click the label and select Merge Into to change the class of the current data into another class. If you perform the Merge Into operation after you trained the model, it is recommended that you train the model again.
  2. Label images: Classify the images with corresponding labels. You can select multiple images and label them together. Please make sure that you have labeled the images accurately.

    example projects classification label
    The Classification module supports selecting multiple images for labeling in batches.
  3. Split the dataset into the training set and validation set: By default, 80% of the images in the dataset will be split into the training set, and the rest 20% will be split into the validation set. Please make sure that both the training set and validation set include images in all different classes, which will guarantee that the model can learn all the different features and validate the images of different classes properly. If the default training set and validation set cannot meet this requirement, please right-click the name of the image and then click Switch to training set or Switch to validation set to adjust the set to which the image belongs.

    example projects move image
  4. Train the model: Keep the default training parameter settings and click Train to start training the model.

    example projects training chart
  5. Validate the model: After the training is completed, click Validate to validate the model and check the results. You can also click process filter images > Wrong results > OK to filter the results and check the wrong ones.

    After you validate a model, you can import new image data to the current module and use the pre-labeling feature to perform auto-labeling based on this model. For more information, see Pre-labeling.

    example projects training verify
  6. Export the model: Click Export, set the Class activation mapping (CAM) option of the model to be exported in the pop-up window, and then click 1Export and select a directory to save the exported model.

    By default, the Class activation mapping (CAM) option is disabled. The inference will slow down when the model saved with CAMs is used in Mech-Vision.
    example projects model files

    The exported model can be used in Mech-Vision and Mech-DLK SDK. Click here to view the details.

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.