Use the Object-Bin Segmentation Module

You are currently viewing the documentation for the latest version (3.0.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Based on the Object-Bin Segmentation general model (click here to download). This topic will show you how to use the Object-Bin Segmentation module to train a model that can segments the target objects and the bin.

The overall process includes five steps: preparation, data labeling, model training, model validation, and model export.

You can also use your own data. The overall workflow is the same, but the labeling stage is different.

Preparation

  1. Create a new project and add the Object-Bin Segmentation module: Open Mech-DLK, click New Project in the interface, name the project, and select a directory to save the project. In the main interface, click the + button under the Input module, and select the Object-Bin Segmentation module in the Add Module window.

    example projects object bin segmentation
  2. Import general model package: In the pop-up Add General Model Package window, click the Select File button, select the model package file to import, and then click OK.

    If the Object-Bin Segmentation general model package is not available locally, click the download link to download it from Download Center.
    object bin segmentation general model
  3. Import image data: Import the acquired image data. You can use one of the following methods to import image data:

    • Method one

      Drag and drop images or files into the image list area to import them. Importing datasets by dragging is not supported.

    • Method two

      On the top of the image list, click the Import/Export button. Select the import method based on the data type:

      • Import from Previous Module: Import images from the previous module.

      • Import Images: Import one or more images.

      • Import Folder: Import all images in the folder (images in the subfolders are not included).

      • Import Dataset: Import datasets in the DLKDB format (.dlkdb), which are datasets exported from Mech-DLK.

    • When using the Object-Bin Segmentation module, the depth map and color image should be imported simultaneously. Please make sure that the two image folders are in the same directory, and the image files correspond and are of the same size. When importing any type of image, the system automatically imports the corresponding image of the other type.

    • The Input module can preprocess images for depth maps and color images separately. The preprocessing configuration takes effect for all images.

    After the images are imported successfully, you can view the image results by switching Depth map and Color image buttons in the visualization area.

    depth color switching
  4. Select an ROI: Click the ROI tool icon example projects icon roi and adjust the frame to select the bin in the image as an ROI. Then, click the application icon tools introduction OK in the lower right corner of the ROI to save the setting. Setting the ROI can avoid interferences from the background.

    object bin segmentation roi

Data Labeling

Please strictly follow the Data Labeling Standard when labeling.

  1. Labeling rules: By default, the object-Bin Segmentation module supports two labeling classes: Bin and Object. Custom labeling classes are not supported.

    Press and hold the Ctrl key and scroll the mouse wheel up to zoom in on the image for more precise labeling.
  2. Labeling data: use the Pre-trained Labeling Tool and Polygon Tool to label data. It is recommended to label all objects first and then the bin.

    1. In the labeling toolbar, right-click the smart labeling tool iconexample projects icon tool, select the pre-trained labeling tool, and then click Start Labeling.

      object bin segmentation label1
    2. After you finish the initial labeling, click the polygon tool icon example projects icon tool2 to further draw on and make local adjustments to the labeling results.

      object bin segmentation label2
    Please select the appropriate labeling tool according to the actual scenario. For more information about how to use labeling tools, see Introduction to Labeling Tools.
  3. Split training and validation sets: Move labeled images to the training set and split them for training and validation. Typically, 80% of the data is allocated for training and 20% for validation in common scenarios. The software will automatically split the labeled images that have been moved to the training set into 80% for training and 20% for validation. The validation set is not required during training in this module.

    object bin segmentation add set

Model Training

  1. Train the model: In the Training tab, set training parameters and click Train to start training the model. Usually, the default training parameters are sufficient. If you need to adjust parameters, please refer to Parameter Description.

    example projects training
  2. Monitor training progress through training information: On the Training tab, the training information panel allows you to view real-time model training details.

    example projects view training info
  3. View training progress through the Training Chart window: Click the Show chart button under the Training tab to view real-time changes in the model’s accuracy and loss curves during training. An overall upward trend in the accuracy curve and a downward trend in the loss curve indicate that the current training is running properly.

    example projects view training chart

Model Validation

  1. Validate the model: After training is completed or manually stopped, click the Validate button under the Validation tab to validate the model.

    example projects verify chart
  2. Check the model’s validation results in the training set: After validation is complete, you can view the validation result summary in the Validation statistics section under the Validation tab.

    • Click the View full report button to open the Detailed Report window for detailed validation statistics.

    • The Statistical matrix in the report shows the correspondence between the validated data and labeled data of the model, allowing you to assess how well each class is matched by the model.

    • In the matrix, the vertical axis represents labeled data, and the horizontal axis represents predicted results. Blue cells indicate matches between predictions and labels, while the other cells represent mismatches, which can provide insights for model optimization.

    • Clicking a value in the matrix will automatically filter the image list in the main interface to display only the images corresponding to the selected value.

    example projects detail report

    If the validation results on the training set show missed or incorrect detections, it indicates that the model training performance is unsatisfactory. Please check the labels, adjust the training parameter settings, and restart the training. You can also click the Export report button at the bottom-right corner of the Detailed Report window to choose between exporting a thumbnail report or a full-image report.

    example projects export report
    You don’t need to label and move all images with missed or incorrect detections in the test set into the training set. You can add labels to a portion of the images and include them in the training set to retrain and validate the model. Use the remaining images as a reference to observe the validation results and assess the performance of the model iteration.
  3. Restart training: After adding newly labeled images to the training set, click the Train button to restart training.

  4. Recheck model validation results: After training is complete, click the Validate button again to validate the model and review the validation results on each dataset.

  5. Continuously optimize the model: Repeat the above steps to continuously improve model performance until it meets the requirements.

Model Export

Click the Export button. In the pop-up dialog box, select a directory to save the exported model, and click Export.

example projects model files

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

Is this page helpful?

You can give a feedback in any of the following ways:

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.