Train a High-Quality Model

You are currently viewing the documentation for version 2.5.1. To access documentation for other versions, click the "Switch Version" button located in the upper-right corner of the page.

■ To use the latest version, visit the Mech-Mind Download Center to download it.

■ If you're unsure about the version of the product you are using, please contact Mech-Mind Technical Support for assistance.

This section introduces the factors that most affect the model quality and how to train a high-quality instance segmentation model.

Ensure Image Quality

Single Module

Please pay attention to the following suggestions so as to train a high-quality text recognition model:

  • Avoid overexposure, dimming, blur, occlusion, etc. These conditions can lead to the loss of features that the deep learning model relies on, which will affect the model training effect.

    Poor images: The texts in the images are partially occluded, which affects recognition performance.

    improve model accuracy occlusion 1

    improve model accuracy occlusion 2

    Suggestion: Make sure that the text areas are clear and complete.

    Poor image: overexposure Poor image: underexposure

    improve model accuracy overexposure

    improve model accuracy underexposure

    Suggestion: You can avoid overexposure by methods such as shading and avoid dimming by methods such as supplemental light.

  • The texts in the imported images should be oriented toward the positive direction (0°). If the text orientations vary greatly, it is recommended to add a Text Detection module before this module. When importing data, select Import  Import from previous module and make sure the Rectify image(s) function is enabled to rectify images to 0°.

Cascaded Modules

The Text Detection or Object Detection module can precede the Text Recognition module for better recognition results. Note that the Text Recognition module cannot be followed by any other modules.

  • If a Text Detection module precedes it, select Import  Import from previous module when importing data and make sure the Rectify image(s) function is enabled to rectify images to 0°.

    Typically, the Rectify image(s) function reliably carries out its designated task. However, occasionally, few images oriented at 0° may inadvertently undergo rectification to 180°. In such situations, it is advisable to exercise discretion in practical applications.
    Before rectification After rectification

    rectify image before

    rectify image after

Ensure Data Quality

The Text Recognition module can recognize the characters in the selected text area of an image and automatically generate the recognition result. Manual checking is required for the result. The used data should be as consistent with the actual scenarios as possible for the training of a high-quality model.

Select Appropriate Data

  • Control the image quantity of training set

    When you first use the Text Recognition module, it is recommended to use 20 to 30 images as a training set for model training. If the validation results are not up to standard, you can then add more data.

  • Balance data proportion

    In the training set, the images with different text types should be balanced. Using diverse data can help improve model performance.

    improve model accuracy diversity
  • Reduce inadequate data

    High-quality images can ensure better model training. Poor images or irrelevant images may do damage to model training.

It is not true that the larger the number of images the better. Adding a large number of inadequate images in the early stage is not conducive to model improvement later and will slow down the training process.

Ensure Labeling Quality

When the Text Recognition Tool is used to make a selection, the recognition result will automatically appear right under the selection frame. Manual verification and confirmation are required. Therefore, making a valid selection and confirming a correct recognition result in time are conducive to improving model quality.

Make Valid Selection

If the target text is not covered completely by the selection frame, the labeling will interfere with model training and thus affect model performance. Therefore, the frame should cover the whole target text.

Incorrect example Correct example

bad example 1

good example 1

Confirm Correct Recognition Result

It is possible that the automatic recognition result is incorrect. If so, please correct it first and then click the OK button. Confirming an incorrect result may detrimentally impact the recognition accuracy of the trained model.

Incorrect example Correct example

bad example 2

good example 2

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.