Training method, tracing method, character recognition method and device, and storage medium

By preprocessing and segmenting product images to generate segmented image sets and performing data augmentation, combined with deep learning models and network parameter transfer, the accuracy and efficiency issues of character recognition models under different manufacturing processes are solved, achieving efficient character recognition and model adaptation.

CN115588203BActive Publication Date: 2026-03-31FUTAIHUA PRECISION ELECTRONICS (ZHENGZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing character recognition models have low accuracy when faced with blurry handwriting and limited training sample data. Furthermore, they require retraining when character libraries differ across manufacturing processes, leading to inefficiency.

Method used

By acquiring images of processed products, preprocessing and segmenting are performed to generate segmented image sets. Data augmentation is then carried out, and deep learning models such as GANs are used to generate more samples. These samples are then trained using image sets from different manufacturing processes to generate a character recognition model. During the training process, network parameters are transferred to adapt to different manufacturing processes.

Benefits of technology

It improves the accuracy and training efficiency of character recognition, can quickly adapt to changes in character libraries for different manufacturing processes, and reduces training workload and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115588203B_ABST
    Figure CN115588203B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a training method, a tracing method, a character recognition method and device for generating a character recognition model and a storage medium. The training method comprises: obtaining an original image of a processed product; pre-processing the original image; segmenting the pre-processed original image to generate a segmented image; inputting the segmented image into a character recognition model to generate character information in the original image. In the technical solution provided by the embodiments of the present application, the segmented image generated by segmenting the pre-processed original image is input into the trained character recognition model, and the character information in the original image can be generated. The character recognition model can effectively improve the accuracy of character recognition.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the field of character recognition technology, and in particular to a training method, a tracing method, a character recognition method and apparatus, and a storage medium. [Background Technology]

[0002] Optical character recognition (OCR) technology uses optical techniques to scan and recognize characters in images, ultimately converting the characters into text format. Currently, OCR technology has a wide range of applications, such as text recognition in various printed materials, document images, and photographs.

[0003] However, due to factors such as blurred characters in some images and insufficient training sample data, existing character recognition models suffer from low accuracy and fail to recognize some characters. Furthermore, in the manufacturing industry, images from different processes may contain the same character library, while images from other processes may have different character libraries. Currently, when performing character recognition on images from different processes regardless of the character library, the character recognition model needs to be retrained, leading to low efficiency. [Summary of the Invention]

[0004] In view of this, embodiments of the present invention provide a training method, a tracing method, a character recognition method and apparatus, and a storage medium to improve the accuracy of character recognition.

[0005] On one hand, embodiments of the present invention provide a training method for generating a character recognition model, comprising:

[0006] Obtain the original image of the processed product;

[0007] The original image is preprocessed;

[0008] The preprocessed original image is segmented to generate a segmented image;

[0009] The segmented images are augmented to generate a segmented image set;

[0010] The segmented image set is input into a preset model for training to generate the character recognition model.

[0011] Optionally, the step of performing data augmentation on the segmented image to generate a segmented image set includes:

[0012] The segmented images are processed by at least one of the following methods: blurring, translation, scaling, rotation, and inputting into a deep learning model to generate a segmented image set.

[0013] Optionally, the step of inputting the segmented image set into a preset model for training to generate a character recognition model includes:

[0014] Combine segmented image sets corresponding to different products or processes;

[0015] The combined segmented image set is input into a preset model for training to generate a character recognition model.

[0016] Optionally, the step of inputting the combined segmented image set into a preset model for training to generate a character recognition model includes:

[0017] When the characters in the segmented image set corresponding to the different products or processes remain unchanged, all network parameters of the character recognition model for one of the products or processes are transferred, and the combined segmented image set is used as input to the character recognition model for training to generate an updated character recognition model.

[0018] Optionally, it also includes:

[0019] When the characters in the segmented image set corresponding to different products or processes change, some network parameters of the character recognition model for one of the products or processes are transferred, and the combined segmented image set is used as input to the character recognition model for training to generate an updated character recognition model.

[0020] Optionally, the preprocessing of the original image includes:

[0021] The original image is converted into a three-channel image, the three-channel image including a saturation channel image;

[0022] The saturation channel image is processed to extract the target region;

[0023] Target recognition is performed on the target region corresponding to the original image for preprocessing.

[0024] Optionally, the step of performing image processing on the saturation channel image and extracting the target region includes:

[0025] The saturation channel image is subjected to median filtering, noise removal, and dilation erosion to generate the target image;

[0026] The target image is converted into a binary image, and the target region is extracted from the binary image.

[0027] Optionally, segmenting the preprocessed original image to generate a segmented image includes:

[0028] Obtain pixel value data from the preprocessed original image;

[0029] When the pixel value data in the preprocessed original image is a set value, the target region of the preprocessed original image is segmented line by line to generate a segmented image.

[0030] On the other hand, embodiments of the present invention provide a character recognition method, including:

[0031] Obtain the original image of the processed product;

[0032] The original image is preprocessed;

[0033] The preprocessed original image is segmented to generate a segmented image;

[0034] The segmented image is input into a character recognition model to generate character information in the original image, wherein the character recognition model is obtained by the training method described above for generating the character recognition model.

[0035] On the other hand, embodiments of the present invention provide a method for tracing processing quality defects, including:

[0036] Obtain character information of the processed product, wherein the character information is obtained from characters recognized by the aforementioned character recognition method;

[0037] Extract feature information based on the character information;

[0038] Obtain processing information during product processing;

[0039] The feature information is correlated with the acquired processing information to generate a processing quality defect factor.

[0040] On the other hand, embodiments of the present invention provide a character recognition device, including:

[0041] The acquisition module is used to acquire the original image of the processed product;

[0042] The preprocessing module is used to preprocess the original image;

[0043] The segmentation module is used to segment the preprocessed original image to generate a segmented image;

[0044] The recognition module is used to input the segmented image set into the trained character recognition model and recognize the character information in the original image, wherein the character recognition model is obtained by the training method for generating the character recognition model according to any one of claims 1-8.

[0045] On the other hand, embodiments of the present invention provide a storage medium, characterized in that it includes: the storage medium includes a stored program, wherein, when the program is running, it controls the device where the storage medium is located to execute the above-mentioned training method for generating a character recognition model; or, the above-mentioned character recognition method; or, the above-mentioned method for tracing processing quality defect factors.

[0046] The technical solution provided in this embodiment of the invention involves acquiring an original image of the processed product; preprocessing the original image; segmenting the preprocessed original image to generate a segmented image; and inputting the segmented image into a character recognition model to generate character information from the original image. In this technical solution, by inputting the segmented image generated from the preprocessed original image into a trained character recognition model, character information from the original image can be generated. This character recognition model effectively improves the accuracy of character recognition. Furthermore, based on whether the characters contained in different processes are the same, network parameters are quickly transferred to obtain the corresponding character recognition model, thereby improving training efficiency. [Attached Image Description]

[0047] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 A flowchart illustrating a training method for generating a character recognition model, provided in an embodiment of the present invention;

[0049] Figure 2 for Figure 1 A schematic diagram illustrating the preprocessing of the original image.

[0050] Figure 3 for Figure 1 This is a schematic diagram illustrating the segmentation of the preprocessed original image to generate segmented images.

[0051] Figure 4 for Figure 1 The diagram illustrates the generation of a segmented image after segmenting another preprocessed original image.

[0052] Figure 5 This is a schematic diagram of the model architecture of the character recognition model provided in an embodiment of the present invention;

[0053] Figure 6 A schematic diagram illustrating a migration strategy provided in an embodiment of the present invention;

[0054] Figure 7 A schematic diagram illustrating another migration strategy provided in an embodiment of the present invention;

[0055] Figure 8 A flowchart of a character recognition method provided in an embodiment of the present invention;

[0056] Figure 9 A flowchart illustrating a method for tracing processing quality defects provided in an embodiment of the present invention;

[0057] Figure 10 This is a schematic diagram of the structure of a training device for generating a character recognition model, provided in an embodiment of the present invention.

[0058] Figure 11 A schematic diagram of the structure of a character recognition device provided in an embodiment of the present invention;

[0059] Figure 12 This is a schematic diagram of the structure of a traceability device for processing quality defects provided in an embodiment of the present invention;

[0060] Figure 13 This is a schematic diagram of a computer device provided in an embodiment of the present invention.

Detailed Implementation Methods

[0061] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0062] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0063] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0064] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0065] This invention provides a training method for generating a character recognition model. Figure 1A flowchart of a training method for generating a character recognition model is provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes:

[0066] Step 102: Obtain the original image of the processed product.

[0067] In this embodiment of the invention, each step is performed by a computer device, such as a computing server.

[0068] For example, after a welding machine welds a product, a charge-coupled device (CCD) inside the welding machine captures a welding image of the product and saves it in a specified image directory. The image acquisition program in the image acquisition server sends the welding image to the computing server. Since this welding image is the original image, the computing server obtains the original image of the product.

[0069] Step 104: Preprocess the original image.

[0070] In one embodiment, after receiving the original image, the computing server preprocesses the original image using the color recognition method in OpenCV to confirm the position of the characters in the original image.

[0071] Specifically, step 104 includes:

[0072] Step A1: Convert the original image into a three-channel image, which includes a saturation channel image.

[0073] In this embodiment of the invention, the three-channel image includes a hue channel image, a saturation channel image, and a value channel image.

[0074] Step A2: Perform image processing on the saturation channel image and extract the target region.

[0075] Specifically, step A2 includes:

[0076] Step A21: Perform median filtering, noise removal, and dilation erosion processing on the saturation channel image to generate the target image.

[0077] Step A22: Convert the target image into a binary image and extract the target region from the binary image.

[0078] As an alternative, bright areas can be extracted from the binary image as the target region.

[0079] Step A3: Perform target recognition on the target region corresponding to the original image for preprocessing.

[0080] As an alternative approach, characters can be used as targets to perform target recognition on the target regions corresponding to the original image for preprocessing.

[0081] Figure 2 for Figure 1 A schematic diagram of preprocessing the original image is shown below. Figure 2 As shown, there are characters in the upper left and upper right corners of the original image. The original image is preprocessed to obtain a preprocessed original image with the character regions selected.

[0082] Step 106: Segment the preprocessed original image to generate segmented images.

[0083] In one embodiment, specifically, step 106 includes:

[0084] Step B1: Obtain pixel value data from the preprocessed original image.

[0085] Step B2: When the pixel value data in the preprocessed original image is the set value, the target region of the preprocessed original image is segmented line by line to generate a segmented image.

[0086] In this embodiment of the invention, a setting value can be set according to the actual situation, for example, the setting value is 255. When the setting value is 255, red recognition is performed on the target area of ​​the preprocessed original image, and red characters are identified to segment the character parts line by line to generate a segmented image.

[0087] In this embodiment of the invention, if the pixel value data of 255 appears multiple times in several consecutive rows, it is considered to be the region where the characters in the same row are located. The rest are similar. Each row of characters is cut out and saved as an image to facilitate model training or prediction.

[0088] In this embodiment of the invention, the image size of the segmented image can be uniformized.

[0089] Figures 3-4 for Figure 1 The process involves segmenting the preprocessed original image to generate a schematic diagram of the segmented image, as shown below. Figures 3-4 As shown, the dark regions of the preprocessed original image are segmented to generate a segmented image. For example, as... Figure 4As shown, a complete image is segmented into multiple segmented images, each of which includes a set of independent character information: arc finding [1] NG, arc finding

[11] NG, value determination

[12] NG, arc finding [7] NG, concentricity: 0.145911 mm, spacing: 0.341792 mm, and distance between two circles: 0.293277 mm. Therefore, the purpose of segmenting the preprocessed original image to form segmented images is to segment the original image into multiple segmented images with independent character information, so as to facilitate subsequent recognition of the segmented images to identify the independent character information in the segmented images.

[0090] Step 108: Perform data augmentation on the segmented images to generate a segmented image set.

[0091] Specifically, in one embodiment, a segmented image set is generated by blurring, translating, scaling, rotating, and inputting the segmented image into a deep learning model. Blurring, translating, scaling, and rotating a segmented image can yield multiple similar segmented images; for example, scaling an image can produce multiple segmented images of different sizes. This enhances the segmented images and increases the number of samples used to train the character recognition model.

[0092] In this embodiment of the invention, the deep learning model includes a Generative Adversarial Network (GAN). By inputting a segmented image into the GAN model, multiple similar segmented images can be obtained. Similarly, image augmentation can be performed on the segmented images to increase the number of samples used to train the character recognition model.

[0093] Step 110: Input the segmented image set into the preset model for training to generate a character recognition model.

[0094] Figure 5This is a schematic diagram of the model architecture of the character recognition model provided in an embodiment of the present invention. In one embodiment, the preset model is a Gated Recurrent Unit (GRU) model. When training the preset model, "3×3 convolution" indicates the use of a 3×3 convolution kernel size for feature extraction; then, "Batch Normalization" is performed on each segmented image in the segmented image set to unify its metrics; next, "Activation" is performed, using an activation function to determine which data to retain; finally, "MaxPooling2D" is performed, where the sliding window size can be set to 3×3 to return the maximum value within the window. This processing of the segmented image data reduces computation and saves resources. The processed data is then input into the preset model, i.e., the GRU model, and combined with the CTC (Connectionist Temporal Classification) loss function to construct and train the character recognition model architecture.

[0095] like Figure 5 As shown, the characters in the segmented image have a spacing of 0.341792. The segmented image is input into a character recognition model, which includes 3x3 convolution kernels, batch normalization, activation functions, max pooling (MaxPooling2D), GRU, and connectionist temporal classification (CTC). The convolution kernels are used to extract features from the segmented image. Batch normalization subtracts the mean of the input segmented image data and divides it by the standard deviation, accelerating the model's convergence and preventing gradient vanishing. The activation function determines which data points are retained; non-linear activation functions are used by neural networks to approximate arbitrarily complex functions. Max pooling uses a 3x3 sliding window to return the maximum value within the window. CTC is used to solve classification problems for temporal data.

[0096] In some embodiments, the characters to be recognized may differ due to variations in the reasons for material rejection in different products or processes. To meet customer needs, training models separately for different products or processes would increase the training workload and time. Therefore, in some embodiments, data from different products or processes can be combined to construct training data and train the base model. When new data is added, an appropriate transfer strategy is used to quickly complete the model training.

[0097] Therefore, specifically, the training method for generating a character recognition model may further include:

[0098] Step S1: Combine the segmented image sets corresponding to different products or processes.

[0099] In an embodiment of the present invention, the processes include different processing types such as polishing, electroplating, cleaning, and welding.

[0100] Step S2: Input the combined segmented image set into a preset model for training to generate a character recognition model.

[0101] For example, in the welding camera (Rcam) process data, there are multiple Rcam original images and 65 characters contained in these images, while in the stud (Nuts) process data, there are multiple Rcam original images and 35 characters contained in these images. Combine the two process data to generate a mixed data set. Among them, the mixed data set includes all the original images of the Rcam + Nuts process data. For the combined characters, duplicate removal processing needs to be performed to obtain 71 characters. Then, the combined segmented image set obtained by preprocessing, segmenting images, and data augmentation of all the original images of the Rcam + Nuts process data, and the corresponding characters (a total of 71) in the above segmented image set are input into a preset model for training, and a character recognition model applicable to the above two processes can be obtained.

[0102] It should be noted that the above "for the combined characters, duplicate removal processing needs to be performed" means that the characters contained in the two processes may be repeated, and at this time, the repeated characters need to be removed. For example, in process A, the characters are "Concentricity: 0.3", which contains a total of 7 characters, namely "同", "心", "度", ":", "0", ".", "3". In process B, the characters are "Coaxiality: 0.23", which contains 8 characters, namely "同", "轴", "度", ":", "0", ".", "2", "3". After the two processes are combined, "同", "度", ":", "0", ".", "3" are repeated. Therefore, after removing the repeated characters, there are a total of 9 characters, namely "同", "心", "度", ":", "0", ".", "3", "轴", "2".

[0103] In an embodiment, when the characters in the segmented image sets corresponding to different products or processes are the same, that is, when the characters in the segmented image sets corresponding to different products or processes are identical, all the network parameters of the character recognition model for one of the products or processes are migrated, and the combined segmented image set is input into the character recognition model for training to generate an updated character recognition model.

[0104] Specifically, such as Figure 6 This is a schematic diagram of a migration strategy provided in an embodiment of the present invention, such as... Figure 6 As shown, the network parameters include: Convolutional Neural Network (CNN), matrix transformation (Reshape), GRU, fully connected layer (Dense), and normalized exponential function (Softmax). When the characters in the segmented image set corresponding to different products or processes remain unchanged, all network parameters of the character recognition model are transferred, and the entire network is quickly optimized with the new dataset.

[0105] As an alternative, when the characters in the segmented image set corresponding to different products or processes change, some network parameters of the character recognition model for one of the products or processes are transferred, and the combined segmented image set is used as input to train the character recognition model to generate an updated character recognition model.

[0106] Figure 7 A schematic diagram of another migration strategy provided in an embodiment of the present invention, as shown below. Figure 7 As shown, the network parameters include CNN, Reshape, GRU, Dense, and Softmax. When the characters in the segmented image sets corresponding to different products or processes change—that is, when the characters in the segmented image sets corresponding to different products or processes are not completely identical or entirely different—some network parameters of the character recognition model are transferred to quickly optimize the new network to adapt to the new dataset. Specifically, some network parameters of the character recognition model are transferred, namely CNN, GRU, and Dense, while the normalized exponential function (Softmax) is not transferred. Instead, the combined segmented image set is used as input to train the character recognition model, generating an updated normalized exponential function (Softmax) and the corresponding character recognition model. This allows for rapid optimization of the backbone network parameters and complete optimization of all classifier parameters.

[0107] The technical solution provided in this embodiment of the invention involves acquiring an original image of the processed product; preprocessing the original image; segmenting the preprocessed original image to generate a segmented image; and inputting the segmented image into a character recognition model to generate character information from the original image. In this technical solution, by inputting the segmented image generated from the preprocessed original image into a trained character recognition model, character information from the original image can be generated. This character recognition model effectively improves the accuracy of character recognition. Furthermore, based on whether the characters contained in different products or processes are the same, network parameters are quickly transferred to obtain the corresponding character recognition model, thereby improving training efficiency.

[0108] This invention also provides a character recognition method. Figure 8 A flowchart of a character recognition method provided in an embodiment of the present invention is shown below. Figure 8 As shown, the method includes:

[0109] Step 202: Obtain the original image of the processed product.

[0110] In this embodiment of the invention, please refer to step 102 for a detailed description of step 202.

[0111] Step 204: Preprocess the original image.

[0112] For a detailed description of step 204 in this embodiment of the invention, please refer to step 104.

[0113] Step 206: Segment the preprocessed original image to generate segmented images.

[0114] In this embodiment of the invention, please refer to step 106 for a detailed description of step 206.

[0115] Step 208: Input the segmented image into the character recognition model to generate character information in the original image, wherein the character recognition model is obtained through the aforementioned training method for generating the character recognition model.

[0116] In this step, the segmented image is input into the character recognition model to generate character information in the original image. For example, if the segmented image shows a concentricity of 0.145911 mm, the character information in the original image can be generated by inputting the segmented image into the character recognition model. The character information is concentricity of 0.145911 mm, which can then identify the character displayed on the segmented image, output the character information, and save it to the database.

[0117] In the technical solution provided by this invention, the original image of the processed product is acquired; the original image is preprocessed; the preprocessed original image is segmented to generate a segmented image; and the segmented image is input into a character recognition model to generate character information in the original image. In this technical solution, by inputting the segmented image generated from the preprocessed original image into a trained character recognition model, character information in the original image can be generated. This character recognition model can effectively improve the accuracy of character recognition.

[0118] This invention provides a method for tracing processing quality defects. Figure 9 A flowchart of a method for tracing processing quality defects provided in an embodiment of the present invention is shown below. Figure 9 As shown, the method includes:

[0119] Step 302: Obtain the character information of the processed product, wherein the character information is obtained from the characters recognized by the aforementioned character recognition method.

[0120] For example, obtain the character information of the processed product, where the concentricity is 0.145911 mm.

[0121] Step 304: Extract feature information based on character information.

[0122] For example, the concentricity of the character information is extracted as the feature information based on the concentricity: 0.145911mm.

[0123] Step 306: Obtain processing information during product processing.

[0124] For example, processing information is acquired during product processing, including information about the product, machine, fixture, and operator. In one embodiment, the processing information may include processing parameters of the machine and other devices during processing, as well as sensor information obtained by various sensors during processing.

[0125] Step 308: Perform correlation analysis between the feature information and the acquired processing information to generate processing quality defect factors.

[0126] In this embodiment of the invention, the processing quality defect factors include arc finding, circle finding, line finding, value determination, and distance between two circles.

[0127] For example, the computing server performs correlation analysis between feature information and acquired processing information, that is, it binds information on products, machines, fixtures and operators to generate a processing quality defect factor called concentricity, and finally stores the results in the database.

[0128] In the technical solution provided by the embodiments of the present invention, by using the aforementioned character recognition method, the text in the image of the processed product is recognized, and combined with the product's processing information, the defective factors during product processing can be quickly traced, and the processing parameters can be adjusted according to the determined defective factors to improve the processing yield.

[0129] According to experimental data, after applying the traceability method for processing quality defects, the welding yield of the product increased by 1.5%, and the welding quality can be controlled and alarmed in real time.

[0130] In this embodiment of the invention, manpower for production and equipment adjustment can be saved, and product data reports can be generated directly without manual statistics, reducing the workload of on-site data statistics.

[0131] In this embodiment of the invention, switching to a new product only requires updating the model, without the need for any other development, thus reducing the product switching time.

[0132] The technical solution provided in this invention is applicable to industrial workstations manufacturing products with text and images. This invention provides a technique for extracting and analyzing character information using a character recognition model. It can be applied to laser welding and other processes. By combining image processing and deep learning, it segments the region of interest (ROI) of the text, establishes an optical character recognition (OCR) model to recognize text in the material handling image, extracts character information from the image, and performs statistical analysis to provide data for production.

[0133] This invention provides a training apparatus for generating a character recognition model. Figure 10 This is a schematic diagram of the structure of a training device for generating a character recognition model, provided in an embodiment of the present invention. Figure 10 As shown, the device includes: an acquisition module 11, a preprocessing module 12, a segmentation module 13, a data augmentation module 14, and a training module 15.

[0134] The acquisition module 11 is used to acquire the original image of the processed product.

[0135] The preprocessing module 12 is used to preprocess the original image.

[0136] The segmentation module 13 is used to segment the preprocessed original image to generate a segmented image.

[0137] The data augmentation module 14 is used to perform data augmentation on the segmented images to generate a segmented image set.

[0138] The training module 15 is used to input the segmented image set into the preset model for training and generate a character recognition model.

[0139] In this embodiment of the invention, the data augmentation module 14 is specifically used to generate a segmented image set by blurring, translating, scaling, rotating, and inputting into a deep learning model.

[0140] In this embodiment of the invention, the training module 15 is specifically used to combine segmented image sets corresponding to different products or processes; input the combined segmented image sets into a preset model for training to generate a character recognition model.

[0141] In this embodiment of the invention, the training module 15 is further specifically used to: when the characters in the segmented image sets corresponding to different products or processes remain unchanged, transfer all network parameters of the character recognition model for one product or process, and use the combined segmented image set as input to the character recognition model for training to generate an updated character recognition model; or when the characters in the segmented image sets corresponding to different products or processes change, transfer some network parameters of the character recognition model for one product or process, and use the combined segmented image set as input to the character recognition model for training to generate an updated character recognition model.

[0142] In this embodiment of the invention, the preprocessing module 12 is specifically used to convert the original image into a three-channel image, the three-channel image including a saturation channel image; perform image processing on the saturation channel image and extract the target region; and perform target recognition on the target region corresponding to the original image for preprocessing.

[0143] In this embodiment of the invention, the preprocessing module 12 is specifically used to perform median filtering, noise removal, and dilation erosion processing on the saturation channel image to generate a target image; convert the target image into a binary image, and extract the target region from the binary image.

[0144] In this embodiment of the invention, the segmentation module 13 is specifically used to obtain pixel value data in the preprocessed original image; when the pixel value data in the preprocessed original image is a set value, the target region of the preprocessed original image is segmented line by line to generate a segmented image.

[0145] The training device for generating a character recognition model provided in this embodiment can be used to achieve the above. Figure 1 The training method for generating the character recognition model is described in detail in the above-described embodiment of the training method for generating the character recognition model, and will not be repeated here.

[0146] In the technical solution provided by this invention, the original image of the processed product is acquired; the original image is preprocessed; the preprocessed original image is segmented to generate a segmented image; and the segmented image is input into a character recognition model to generate character information in the original image. In this technical solution, by inputting the segmented image generated from the preprocessed original image into a trained character recognition model, character information in the original image can be generated. This character recognition model can effectively improve the accuracy of character recognition.

[0147] This invention provides a character recognition device. Figure 11 A schematic diagram of the structure of a character recognition device provided in an embodiment of the present invention is shown below. Figure 11As shown, the device includes: an acquisition module 21, a preprocessing module 22, a segmentation module 23, and an identification module 24.

[0148] The acquisition module 21 is used to acquire the original image of the processed product.

[0149] The preprocessing module 22 is used to preprocess the original image.

[0150] The segmentation module 23 is used to segment the preprocessed original image to generate a segmented image.

[0151] The recognition module 24 is used to input the segmented image set into the trained character recognition model to recognize character information in the original image, wherein the character recognition model is obtained by the training method described above for generating the character recognition model.

[0152] The character recognition device provided in this embodiment can be used to implement the above. Figure 8 For a detailed description of the character recognition method described above, please refer to the embodiments of the character recognition method, which will not be repeated here.

[0153] In the technical solution provided by this invention, the original image of the processed product is acquired; the original image is preprocessed; the preprocessed original image is segmented to generate a segmented image; and the segmented image is input into a character recognition model to generate character information in the original image. In this technical solution, by inputting the segmented image generated from the preprocessed original image into a trained character recognition model, character information in the original image can be generated. This character recognition model can effectively improve the accuracy of character recognition.

[0154] This invention provides a device for tracing processing quality defects. Figure 12 This is a schematic diagram of a traceability device for processing quality defects provided in an embodiment of the present invention, as shown below. Figure 12 As shown, the device includes: a character acquisition module 31, an extraction module 32, an information acquisition module 33, and an association analysis module 34.

[0155] The character acquisition module 31 is used to acquire character information of the product after processing, wherein the character information is obtained from the characters recognized by the character recognition method described above.

[0156] The extraction module 32 is used to extract feature information based on character information.

[0157] The information acquisition module 33 is used to acquire processing information during product processing;

[0158] The correlation analysis module 34 is used to perform correlation analysis between feature information and acquired processing information to generate processing quality defect factors.

[0159] The traceability device for processing quality defects provided in this embodiment can be used to achieve the above. Figure 9 For a detailed description of the method for tracing the processing quality defects, please refer to the above-described embodiment of the method for tracing the processing quality defects, which will not be repeated here.

[0160] In the technical solution provided by the embodiments of the present invention, the traceability device for processing quality defects uses the aforementioned character recognition method to recognize the text in the image of the processed product, and combines it with the product's processing information to quickly trace the defective factors during product processing, and facilitates subsequent adjustment of processing parameters based on the determined defective factors to improve processing yield.

[0161] This invention provides a storage medium including a stored program. During program execution, the device containing the storage medium is controlled to execute the steps of the above-described training method for generating a character recognition model; or, a character recognition method; or, a method for tracing processing quality defects. For detailed descriptions, please refer to the embodiments of the above-described training method for generating a character recognition model; or, a character recognition method; or, a method for tracing processing quality defects.

[0162] This invention provides a computer device, including a memory and a processor. The memory stores information including program instructions, and the processor controls the execution of the program instructions. When the program instructions are loaded and executed by the processor, they implement the steps of the above-described embodiments of the training method for generating a character recognition model; or, the character recognition method; or, the method for tracing processing quality defects. For a detailed description, please refer to the embodiments of the above-described training method for generating a character recognition model; or, the character recognition method; or, the method for tracing processing quality defects.

[0163] Figure 13 This is a schematic diagram of a computer device provided in an embodiment of the present invention. Figure 13 As shown, the computer device 40 in this embodiment includes: a processor 41, a memory 42, and a computer program 43 stored in the memory 42 and executable on the processor 41. When the processor 41 executes the computer program 43, it implements the training method for generating a character recognition model, or a character recognition method, or a method for tracing processing quality defects, as described in the embodiment. To avoid repetition, these methods are not described in detail here. Alternatively, when the processor 41 executes the computer program, it implements the functions of each model / unit in the training device for generating a character recognition model, or a character recognition device, or a device for tracing processing quality defects, as described in the embodiment. To avoid repetition, these methods are not described in detail here.

[0164] The computer device 40 includes, but is not limited to, a processor 41 and a memory 42. Those skilled in the art will understand that... Figure 13 This is merely an example of computer device 40 and does not constitute a limitation on computer device 40. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.

[0165] The processor 41 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0166] The memory 42 can be an internal storage unit of the computer device 40, such as a hard disk or RAM of the computer device 40. The memory 42 can also be an external storage device of the computer device 40, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device 40. Furthermore, the memory 42 can include both internal and external storage units of the computer device 40. The memory 42 is used to store computer programs and other programs and data required by the computer device. The memory 42 can also be used to temporarily store data that has been output or will be output.

[0167] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0168] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

[0169] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0170] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0171] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A training method for generating a character recognition model, characterized by, The method comprises the following steps: obtaining an original image of a processed product; preprocessing the original image; segmenting the preprocessed original image to generate a segmented image; performing data augmentation on the segmented image to generate a segmented image set; inputting the segmented image set into a preset model for training to generate a character recognition model; the step of inputting the segmented image set into a preset model for training to generate a character recognition model comprises the following steps: combining segmented image sets corresponding to different products or processes; inputting the combined segmented image set into a preset model for training to generate a character recognition model; the step of inputting the combined segmented image set into a preset model for training to generate a character recognition model comprises the following steps: when the characters in the segmented image sets corresponding to different products or processes are unchanged, migrating all network parameters of the character recognition model of one of the products or processes, and inputting the combined segmented image set into the character recognition model for training to generate an updated character recognition model; when the characters in the segmented image sets corresponding to different products or processes change, migrating part of the network parameters of the character recognition model of one of the products or processes, and inputting the combined segmented image set into the character recognition model for training to generate an updated character recognition model.

2. The training method of claim 1, wherein, The step of performing data augmentation on the segmented image to generate a segmented image set comprises the following steps: generating a segmented image set by at least one of the following methods: blurring, shifting, scaling, rotating, and inputting into a deep learning model.

3. The training method of claim 1, wherein, The step of preprocessing the original image comprises the following steps: converting the original image into a three-channel image, wherein the three-channel image comprises a saturation channel image; performing image processing on the saturation channel image and extracting a target region; performing target recognition on the target region corresponding to the original image to perform preprocessing.

4. The training method of claim 3, wherein, The step of performing image processing on the saturation channel image and extracting a target region comprises the following steps: performing median filtering, noise removal, and dilation and erosion processing on the saturation channel image to generate a target image; converting the target image into a binary image and extracting a target region from the binary image.

5. The training method of claim 3, wherein, The step of segmenting the preprocessed original image to generate a segmented image comprises the following steps: obtaining pixel value data in the preprocessed original image; when the pixel value data in the preprocessed original image is a set value, segmenting a target region of the preprocessed original image row by row to generate a segmented image.

6. A character recognition method characterized by, The method comprises the following steps: obtaining an original image of a processed product; preprocessing the original image; segmenting the preprocessed original image to generate a segmented image; inputting the segmented image into a character recognition model to generate character information in the original image, wherein the character recognition model is obtained by the training method for generating a character recognition model according to any one of claims 1-5.

7. A method of tracing a poor-quality factor, characterized by, The method comprises the following steps: obtaining character information of a processed product, wherein the character information is obtained by the character recognition method according to claim 6; According to the character information, feature information is extracted; Obtain processing information during product processing; Correlation analysis is performed on the feature information and the obtained processing information to generate a processing quality bad factor.

8. A character recognition apparatus, characterized by comprising: Comprise: An acquisition module configured to acquire an original image of a processed product; A preprocessing module configured to preprocess the original image; A segmentation module configured to segment the preprocessed original image to generate a segmented image; An identification module configured to input the segmented image set into a trained character recognition model to identify character information in the original image, wherein the character recognition model is obtained by the training method for generating a character recognition model according to any one of claims 1-5.

9. A storage medium, characterized by Comprise: The storage medium comprises a stored program, wherein the program controls the device where the storage medium is located to execute the training method for generating a character recognition model according to any one of claims 1-5 when the program is running; Or, The character recognition method of claim 6; or The processing quality bad factor tracing method of claim 7.

Citation Information

Patent Citations

  • Character recognition model training method and device and character recognition method and device

    CN111435445A

  • Character recognition method, server, and computer readable storage medium

    WO2020098250A1