Train a Model

You are currently viewing the documentation for the latest version (2.6.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.

You can get started with model training upon labeling. This topic describes how to configure training parameters, train models, and view training information in the Training tab.

Configure Training Parameters

Before you start the training, you should configure the training parameters for the deep learning model. You can click the Parameter Settings button to open the Training Parameter Settings window, and configure Data augmentation, Training Parameters, and Model finetuning (Developer Mode only) parameters.

Fine-tuning the parameters of a deep learning model to achieve high performance can be an elaborate work. It is recommended that you use the default values provided by Mech-DLK for the initial training, which are suitable for most application scenarios.
training parameters configuration

Data Augmentation

The data for training the model needs to contain as much as possible all situations that may actually occur. If the site does not have the corresponding data-acquiring conditions, you can adjust the Data Enhancement parameters to prepare data that can not be acquired, thus enriching the training data. It must be ensured that the augmented image data should conform to the on-site situation. If there are no rotations on the site, then there is no need to adjust the parameter “Rotation”; otherwise, the model’s performance may be affected.

Hover the mouse cursor over train ask icon to view the adjustment effect of each parameter.
  • Brightness

    It refers to how much light is present in the image. When the on-site lighting changes greatly, by adjusting the brightness range, you can augment the data to have larger variations in brightness.

  • Contrast

    Contradiction in luminance or color. When the objects are not obviously distinct from the background, you can adjust the contrast to make the object features more obvious.

  • Translation

    Add the specified horizontal and vertical offsets to all pixel coordinates of the image. When the positions of on-site objects (such as bins and pallets) move in a large range, by adjusting the translation range, you can augment the data in terms of object positions in images.

  • Rotation

    Rotate an image by a certain angle around a certain point to form a new image. In general, keeping the default parameters can meet the requirements. When the object orientations vary greatly, by adjusting the rotation range, you can augment the image data to have larger variations in object orientations.

  • Scale

    Shrink or enlarge an image by a certain scale. When object distances from the camera vary greatly, by adjusting the scale range parameter, you can augment the data to have larger variations in object proportions in the images.

  • Flip horizontally

    Flips the image 180° left to right. If the objects to be recognized have left-right symmetry, you can select the Flip horizontally check box.

    developer mode flip vertically
  • Flip vertically

    Flips the image 180° upside down. If the objects to be recognized have vertical symmetry, you can select the Flip vertically check box.

    developer mode flip horizontally

Training Parameters

  • Model type

    Defect Segmentation

    High-speed

    Suitable for scenarios that require high training speed.

    High-accuracy

    Suitable for scenarios that require high accuracy. This mode may result in slower training speed.

  • Input image size

    The pixel-wise height and width of the image input to the neural network for training. It is recommended to use the default setting, but if the objects or defect regions in the images are small, you need to increase the input image size. The larger the image size, the higher the model accuracy, but the lower the training speed.

  • Batch size

    The number of samples selected for each time of neural network training. It is recommended to use the default settings; if you need to increase the training speed, you can appropriately increase the batch size. If the batch size is set too large, memory usage will increase.

  • Eval. interval

    The number of epochs for each evaluation interval during model training. It is recommended to use the default setting. Increasing the Eval. interval can increase the training speed. The larger the parameter, the faster the training; the smaller the parameter, the slower the training, but a smaller value helps select the optimal model.

  • Epochs

    The total number of epochs of model training. It is recommended to use the default setting. If the features of objects to be recognized are complex, it is necessary to increase the number of training epochs appropriately to improve the model performance, but increasing the number of epochs will lead to longer training time.

    It is not true that the bigger the number of epochs, the better. When the total number of epochs is set to be large, the model will continue to be trained after the accuracy stabilizes, which will result in a longer training time and the risk of overfitting.
  • Learning rate

    The learning rate sets the step length for each iteration of optimization during neural network training. It is recommended to use the default setting. When the loss curve shows a slow convergence, you can appropriately increase the learning rate; if the accuracy fluctuates greatly, you can appropriately decrease the learning rate.

  • GPU ID

    Graphics card information of the model deployment device. If multiple GPUs are available on the model deployment device, the training can be performed on a specified GPU.

  • Max num of training objects

    This option is to limit the maximum number of objects that can be recognized during training. It is not checked by default. In general, setting this parameter can speed up inference. Under certain circumstances, setting this parameter can help reduce GPU usage.

Model Finetuning (Visible under Developer Mode)

When a model is put into use for some time, you can use this feature to iterate the model that does not cover certain scenarios.

For more information, see Iterate a Model.

Start Training

After you confirm the parameter settings, you can click Train on the lower part of the Training tab to start training the model.

Training Center

You can view the training progress and memory usage in the Training Center.

If there is already a training task in progress, other training tasks will enter a waiting queue.

training center
  • Click train center stop to terminate the training task in progress.

  • Click train center delete to remove the training task from the waiting queue.

  • Click train center change to stick the training task to the top of the waiting queue.

View Training Information

  • The Training tab displays real-time training information and the optimal results achieved during the training task.

  • In the Training tab, you can click the Show chart button to switch to the training chart. The chart dynamically displays changes in training accuracy and loss parameters as training epochs progress. Click the Show chart button again to switch to the image.

view training info

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.