Use the Text Recognition Module
Taking an image dataset of numbers (download) as an example, this topic will show you how to use the Text Recognition module to recognize and output the characters in an image. The characters that can be recognized include numbers, letters, and some special symbols.
You can also use your own data. The usage process is overall the same, but the labeling part is different. |
-
Create a new project and add the Text Recognition module: Click New Project after you opened the software, name the project, and select a directory to save the project. Then, click in the upper-right corner and add the Text Recognition module.
-
Import the image data of identification numbers: Unzip the downloaded data file. Click the Import/Export button in the upper left corner, select Import Folder, and import the image data.
-
The texts in the imported images should be oriented toward the positive direction (0°).
-
The Text Detection or Object Detection module can precede the Text Recognition module for better recognition results. In this case, you can select
to import data.-
If a Text Detection module precedes it, 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.
-
-
When you select Import Dataset, you can only import datasets in the DLKDB format (.dlkdb), which are datasets exported from Mech-DLK.
-
-
Select an ROI: Click the ROI Tool button and adjust the frame to set an ROI that covers the text areas of all images. Then, click the button in the lower right corner of the ROI to save the setting. Setting the ROI can avoid interferences from the background.
-
Label the images: Select the Text Recognition Tool from the toolbar to label the images. 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.
-
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. You can click and drag the slider to adjust the proportion. Please make sure that both the training set and validation set include all kinds of texts to be detected. 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.
-
Train the model: Keep the default training parameter settings and click on Train to start training the model.
-
Validate the model: After the training is completed, click Validate to validate the model and check the results.
-
Export the model: Click Export and select a directory to save the trained model.
The exported model can be used in Mech-DLK SDK. Click here to view the details.