Use Labeling Tools
Mech-DLK provides a variety of image labeling tools for different algorithm modules. This topic introduces how to use these labeling tools to label targets in images, providing the necessary information for training deep learning models.
|
Labeling Tool
Polygon Tool
Supported modules: Instance Segmentation, Defect Segmentation, Object Detection, Text Detection
The Polygon Tool can draw polygon labels with more vertices, which is suitable for targets of complex shapes or those near the image edges.
-
Click (or press P on the keyboard).
-
Click the first position (vertex) in the selection region, then click the second one, third one, etc., to draw the labels, and right-click to finish. (At least three vertices are required.)
-
If multiple label classes are created, colors corresponding to different label classes should be selected.
After labeling, use the Select Tool to select a label and adjust the label by the following methods.
-
Click the label edges to increase the number of vertices.
-
Right-click a vertex to delete it.
-
Long press the left mouse button and drag the vertex in any direction to modify the label shape.
Ellipse Tool
Supported modules: Instance Segmentation, Object Detection
Use more vertices to make elliptical selections. This tool is suitable for elliptical objects.
-
Right-click and then click (or press L on the keyboard).
-
Click the first position (vertex) in the selection region, and then continue clicking. An elliptical label should have at least six vertices.
-
If multiple label classes are created, colors corresponding to different label classes should be selected.
After labeling, use the Select Tool to select the label and then long press the left mouse button to drag the vertex in any direction and thus modify the label shape.
Rectangle Tool
Supported modules: Instance Segmentation, Object Detection
The Rectangle Tool can be used to draw rectangular labels, which is suitable for rectangular objects.
-
Right-click and then click (or press R on the keyboard).
-
Long press the left mouse button in the selection region, move it in any direction, and then release the left mouse button to finish the rectangular selection.
-
If multiple label classes are created, colors corresponding to different label classes should be selected.
Free Rectangle Tool
Supported module: Text Detection
The Free Rectangle Tool can be used to draw a rectangle around the text area. Therefore, it is recommended to select this tool for rectangular text areas.
-
Click (or press D on the keyboard).
-
Move the crosshair cursor in the selection region and left-click to select the starting point of the area you want to outline. Then, move the cursor and left-click again to select the second point to define the range you want to outline. At this point, a straight line will be created, forming one side of the rectangular selection frame.
-
Moving the cursor to either side of the straight line will allow you to create a rectangle. Click the left mouse button to complete the labeling.
During the process, you can click the right mouse button to cancel the labeling. |
Brush Tool
Supported module: Defect Segmentation
Use the Brush Tool to draw labels of any shape. This tool is suitable for defects with complex shapes.
-
Right-click and then click (or press B on the keyboard).
-
Adjust the slider to set the thickness of lines according to the size of defects.
-
Long press the left mouse button in the selection area, move in any direction, and then release the left mouse button to finish the drawing.
Autofill Lasso Tool
Supported module: Defect Segmentation
Draw arbitrarily shaped labels by forming closed shapes with brush paths. This tool is used for defects with complex shapes.
-
Right-click and then click (or press A on the keyboard).
-
Long press the left mouse button in the selection area and move in any direction.
Smart Labeling Tool
Supported modules: Instance Segmentation, Defect Segmentation, Object Detection
The Smart Labeling Tool can be used to automatically select the objects in the image.
When multiple objects in an image have large color differences and are scattered, you can use the Smart Labeling Tool to conveniently label the objects in the image.
-
Click (or press M on the keyboard).
-
Move the cursor in the selection region and then click the object to be labeled.
-
If the selection cannot completely cover the object, click the uncovered part to expand the selection area.
-
If the selection covers the areas outside the object, right-click these areas to reduce the selection area.
-
-
Click Apply in the upper-left corner of the selection region.
You can use the Select Tool to fine-tune the labeled contour by the following steps:
-
Use the Select Tool to select the label to be adjusted.
-
Adjust the contour in one of the following three ways according to actual situation. Please ensure that the selected area closely aligns with the object contour.
-
Place the mouse cursor on a vertex of the contour. When the cursor turns into , long-press the left mouse button and drag the vertex to adjust the contour.
-
Place the mouse cursor on a vertex of the contour. When the cursor turns into , click the right mouse button to delete the vertex.
-
Place the mouse cursor on the contour. When the cursor turns into , click the left mouse button to add a vertex.
-
When the objects differ greatly in colors and have clear contours, it is recommended that you label multiple objects at a time and click Apply. If the objects are not obviously distinct, it is recommended to label one at a time. |
Currently, the Smart Labeling Tool can work in two modes, and it will automatically switch between them according to the actual situation. Users do not need to manually select a mode.
-
Standard mode (GPU): In this mode, the Smart Labeling Tool has robust labeling capabilities. This tool will automatically switch to the standard mode if the running device has a GPU, with available GPU memory of at least 2.5 GB, and there is no project undergoing training or validation.
-
Lite mode (CPU): In this mode, the Smart Labeling Tool has basic labeling capabilities. This tool will automatically switch to the lite mode if the running device has no GPU, or the available GPU memory is less than 2.5 GB, or there is a project undergoing training or validation.
Pre-labeling Tool
Supported modules: Instance Segmentation, Defect Segmentation, Classification, Object Detection, Text Detection
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.
The pre-labeling feature is available only when the current module contains validated models. |
The pre-labeling feature can be performed only on the following three types of data:
-
Unlabeled data
-
Automatically labeled data (images with a yellow triangle at the front of the image number)
-
Manually fine-tuned data after automatic labeling (images with a yellow triangle at the front of the image number)
The Pre-labeling Tool can only label images that are not manually labeled. If you need to use the Pre-labeling Tool on manually labeled images, you must clear these labels first. The pre-labeling feature can outstandingly reduce the cost of manual labeling. However, the accuracy of the results depends on the model that you use. We recommend that you train a high precision model before you use the pre-labeling feature.
You can use the Pre-labeling Tool in one of the following three methods.
-
Method 1: Pre-label button
-
On the upper part of the image list, click the Pre-label button. All images in the image list will be pre-labeled.
-
After the labeling process is finished, you can view a yellow triangle in the upper left corner of the sequence number of the labeled images.
-
-
Method 2: Pre-label option
-
In the image list, select one or more images that you need to label.
-
Right-click the images and select Pre-label, the labeling process starts. After the labeling process is finished, you can view a yellow triangle in the upper left corner of the sequence number of the labeled images.
-
-
Method 3: Pre-labeling Tool
-
In the labeling toolbar, right-click , then click (or press T on the keyboard) to select the Pre-labeling Tool.
-
On the upper part of the image, click Start labeling, and the Pre-labeling Tool will start to label the image. After the labeling process is finished, you can view a yellow triangle in the upper left corner of the sequence number of the image.
-
A yellow triangle will be displayed at the front of the sequence number of each pre-labeled image. If you fine-tune the results of pre-labeling, these images are still considered as pre-labeled, and the yellow triangles do not disappear.
|
Super-labeling Tool
Supported modules: Instance Segmentation, Object Detection
Mech-DLK incorporates the super models developed by Mech-Mind. You can use the Super-labeling Tool powered by super models to quickly label datasets.
The Super-labeling Tool can be used only on the following three types of data:
-
Unlabeled data
-
Automatically labeled data (images with a yellow triangle at the front of the image number)
-
Manually fine-tuned data after automatic labeling (images with a yellow triangle at the front of the image number)
|
You can use the Super-labeling Tool in one of the following three methods.
-
Method 1: Super-label button
-
On the upper part of the image list, click the Super-label button. All images in the image list will be super-labeled.
-
After the labeling process is finished, you can view a yellow triangle in the upper left corner of the sequence number of the labeled images.
-
-
Method 2: Super-label option
-
In the image list, select one or more images that you need to label.
-
Right-click the images and select Super-label, the labeling process starts. After the labeling process is finished, you can view a yellow triangle in the upper left corner of the sequence number of the labeled images.
-
-
Method 3: Super-labeling Tool
-
In the labeling toolbar, right-click , then click (or press H on the keyboard) to select the Super-labeling Tool.
-
On the upper part of the image, click Start labeling, and the Super-labeling Tool will start to label the image. After the labeling process is finished, you can view a yellow triangle in the upper left corner of the sequence number of the image.
-
After the labeling is completed, Mech-DLK will generate a label class named "model_label" for the labels created by the super model.
Quick Template Tool
Supported module: Fast Positioning
By the Quick Template Tool, you can apply the labeling template to the current image. Click (or press F on the keyboard), click the image at any point, and then use the Select Tool to adjust the template to cover the features of the current image.
Mask Tool
If there are some irrelevant parts that may interfere with model training/inference, you can use the Mask Tool to cover such parts. The masked parts will not be involved in training/inference.
You can choose among the following three mask tools built in the software according to actual needs.
|
Mask Polygon Tool
Supported modules: Instance Segmentation, Unsupervised Segmentation, Defect Segmentation, Object Detection
-
Click (or press Shift + P on the keyboard)
-
Set Mask Type and Mask fill.
-
Click the first position (vertex) in the selection area, then click the second one, third one, etc., to draw the labels, and right-click to finish.
Mask Brush Tool
Supported modules: Instance Segmentation, Unsupervised Segmentation, Defect Segmentation, Object Detection
-
Right-click and then click (or press Shift + B on the keyboard)
-
Set Mask Type, Mask fill, and Brush size.
-
Long press the left mouse button in the selection area, move in any direction, and then release the left mouse button to finish the drawing.
Eraser Tool
Labeling Eraser Tool
Supported module: Defect Segmentation
The Labeling Eraser Tool can be used to erase the labeled region.
-
Click (or press E on the keyboard)
-
Long press the left mouse button in the selection area and move in any direction.
Adjust the slider to change the eraser size.
Mask Eraser Tool
Supported modules: Instance Segmentation, Unsupervised Segmentation, Defect Segmentation, Object Detection
The Mask Eraser Tool can be used to erase the masks.
-
Right-click and then click (or press Shift + E on the keyboard)
-
Long press the left mouse button in the selection area and move in any direction.
Adjust the slider to change the eraser size.
Grid Tool
Grid Cutting Tool
Supported module: Defect Segmentation
In industrial inspection scenarios, if the size of images captured by the camera is large, smaller defects may be inconspicuous. If training in such a case is performed, defects are difficult to detect. You can use the Grid Cutting Tool to cut the large images into cell images of the same size according to the set dimension. Defect labeling should be completed for all images before the application of this tool.
-
Click (or press U on the keyboard).
-
Set Rows and Columns and then click Apply.
-
Place the cursor in the parameter boxes and then scroll the mouse wheel.
-
Enter values in the parameter boxes.
Note that the number of rows and columns should not be too large, or else the number of cell images after cutting is great, which slows down subsequent inference.
-
Grid Selection Tool
Supported module: Defect Segmentation
Right-click and then click (or press I on the keyboard) to open the Grid Selection Tool. By default, the cell images with defect labels are checked, which will be added into the training/validation set. You can select cell images with and without defects on demand. Click the Preview button in the upper right corner of the selected image to preview the cell images.
-
Select defects: Select all the cell images containing defects to put into the training/validation set.
-
Select all: Select all the produced cell images into the training/validation set, and set those containing no defects to OK.
-
Clear selection: Clear the selections on cell images.
Text Recognition Tool
Supported module: Text Recognition
The Text Recognition Tool can be used to define the text recognition range and automatically generate the recognition result.
-
Click (or press G on the keyboard).
-
Long press the left mouse button in the selection region and move the cursor to draw a rectangle. Release the mouse button to confirm the selection.
-
The automatically recognized characters will be displayed right under the selection frame. If the recognition result is correct, click OK to confirm it; otherwise, please correct the result first and then click the OK button.
If Unconfirmed is displayed right under the selection frame, click the frame and then confirm the recognition result. |
Template Tool
Supported modules: Instance Segmentation, Object Detection, Text Detection
You can use the Template Tool to set an existing selection as a template. After setting, you can use this template to rapidly label contours and objects with the same pose.
It is suitable for scenarios where there are multiple neatly arranged objects of the same type in an image, which can improve labeling efficiency.
-
Click (or press C on the keyboard).
-
Click the region that needs to be set as the template.
-
Move the template to the object that you need to select, adjust the angle of the template to make it fit the object, and then click it.
-
Coarse adjustment: Press and hold the Shift key and then scroll the mouse wheel.
-
Fine adjustment: Adjust the Rotation angle parameter.
-
During labeling, press and hold the Ctrl key and click the selection to switch the template. You can also click Replace template and then click the selection to achieve the same purpose. |
ROI Tool
Supported modules: Instance Segmentation, Defect Segmentation, Classification, Object Detection, Text Detection, Text Recognition, Unsupervised Segmentation
You can use the ROI Tool to set the region of interest.
Setting the ROI can avoid interferences from the background.
-
Click (or press O on the keyboard).
-
Adjust the ROI frame in the selection region.
-
Click to the lower-right corner of the ROI to apply the current ROI or click to disable the ROI Tool.
-
Click the Reset button in the upper left corner of the image to reset the ROI.
Select Tool
Supported modules: Instance Segmentation, Defect Segmentation, Classification, Object Detection, Fast Positioning, Text Detection, Text Recognition, Unsupervised Segmentation
You can use the Select Tool to select, move, and adjust the selections.
-
In the labeling toolbar, click (or press S on the keyboard) to select the Select Tool.
-
Place the cursor in the labeling area of the image and use the mouse wheel to scroll forward to zoom in and scroll backward to zoom out.
-
Move the cursor in the selection region and then click the selection to be processed. Select multiple selections by pressing and holding the Ctrl key.
Adjust size |
|
Rotation |
|
Move |