Embedded steel seal character recognition system based on machine learning

Through the embedded stamp character recognition system based on machine learning, combined with the YOLOv5 model and the Raspberry Pi platform, the recognition problem in complex environments is solved, and automatic recognition with high accuracy and rapid response is achieved, which is suitable for industrial applications, reducing costs and False detection rate.

CN118736591AInactive Publication Date: 2024-10-01钟梦怡
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410799041.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing stamped character recognition technology has limited recognition accuracy when dealing with unclear imprints, complex backgrounds, and tilted characters, making it difficult to meet the recognition needs in complex environments.

Method used

An embedded stamp character recognition system based on machine learning is adopted, including a data set production module, a stamp character detection and recognition model module and an embedded development module. Through data set expansion, feature extraction and network structure optimization, it is combined with the Raspberry Pi platform for embedded development. Developed, using YOLOv5 model for recognition.

Benefits of technology

It improves the accuracy and speed of stamp character recognition, reduces hardware costs, realizes automatic recognition, is suitable for industrial site use, and improves production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736591A_ABST
    Figure CN118736591A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded steel seal character recognition system based on machine learning. In the invention, in the development of the steel seal character recognition system, based on the Raspberry Pi platform, the hardware cost can be effectively reduced, and the development and deployment of the system are more flexible and convenient due to the powerful community support and abundant hardware interfaces. In addition, the Raspberry Pi is low in power consumption, stable in operation and very suitable for large-scale industrial field use. In the application scene of steel seal character recognition, the system can be quickly deployed through the Raspberry Pi platform, the characteristics of portability, easiness in use and high cost effectiveness can be exerted no matter on a production line or in a mobile detection scene, and the popularity rate and the practical value of the recognition system are greatly improved. In industrial production, the system can quickly and accurately identify steel seal characters on a product, so that the detection efficiency is greatly improved, the false detection rate is reduced, and the product quality and the production efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of steel stamp character recognition, and specifically is an embedded steel stamp character recognition system based on machine learning. Background Art

[0002] Steel stamp character recognition technology is a technology that uses image processing, pattern recognition, deep learning and other methods to automatically detect and recognize characters stamped on hard surfaces such as metal. Early steel stamp character recognition mainly relied on OCR (optical character recognition) technology, but the recognition accuracy of traditional OCR was limited when processing steel stamp characters due to factors such as unclear character imprints and complex backgrounds. In recent years, with the development of deep learning technology, steel stamp character recognition technology based on deep learning models such as convolutional neural networks (CNN) and recurrent neural networks (RNN) has received widespread attention and application. These methods can learn the characteristics and laws of steel stamp characters and improve recognition accuracy by training a large amount of annotated data. Deep learning algorithm: Deep learning algorithm can automatically extract the characteristics of steel stamp characters and has strong generalization ability. By continuously increasing the annotated data, the model performance can be continuously improved. Most existing technologies adopt an end-to-end recognition method, that is, directly mapping the input image to the output character sequence, without the need for post-processing steps such as character segmentation, which improves the recognition speed and accuracy. In order to solve the problems of unclear imprints of stamped characters and complex backgrounds, existing technologies have improved anti-interference capabilities and recognition accuracy by designing special neural network structures and algorithms. Existing stamped character recognition technology still has certain limitations in certain specific scenarios, such as tilted characters and complex backgrounds. Future research will further optimize the algorithm model to improve recognition accuracy and robustness. With the continuous development of deep learning technology and the improvement of computing power, stamped character recognition technology is expected to achieve higher recognition accuracy and a wider range of application scenarios in the future.

[0003] However, the existing steel stamp character recognition algorithms have several limitations:

[0004] Unclear imprint: Steel-stamped characters are often printed on hard surfaces such as metal. Due to the process and material, the imprint of the characters may not be obvious, making it difficult to identify. The background of steel-stamped characters is complex and changeable, and there may be interference factors such as reflections, stains, and scratches, which affect the accuracy of recognition. Due to factors in the production process, steel-stamped characters may be tilted, bent, and deformed, increasing the difficulty of recognition.

[0005] According to this invention, the image is first subjected to image processing such as tilt correction and image enhancement before recognition, so that the stamped characters are clearer and easier to recognize. Summary of the invention

[0006] The purpose of the present invention is to provide an embedded steel stamp character recognition system based on machine learning in order to solve the above-mentioned problems.

[0007] The technical solution adopted by the present invention is as follows: an embedded steel stamp character recognition system based on machine learning, the system comprising a data set production module, a steel stamp character detection and recognition model module and an embedded development module;

[0008] The data set production module includes a data collection module, a data set expansion module and a data set processing module;

[0009] The steel stamp character detection and recognition model module is divided into an input end, a backbone, a neck, and a prediction;

[0010] The embedded development module performs embedded development of the steel stamp character recognition system based on the Raspberry Pi platform, and the Raspberry Pi used by the embedded development module is Raspberry Pi 4 Computer Model B 2GB RAM.

[0011] In a preferred embodiment, the data acquisition module obtains a total of 200 steel stamp images through online collection and physical photography.

[0012] In a preferred embodiment, the data set expansion module uses four methods, namely, image brightening, image darkening, image Gaussian blurring, and image noise addition, to process the existing images, and the processing results are shown in the figure. The final data set is obtained by expanding the original data set to 1220 images. Among them, 969 images are used as training sets (train) to establish the model, 118 images are used as validation sets (val) to evaluate the model during the training process, and 133 images are used as test sets (test). It is divided into training sets (train), validation sets (val) and test sets (test) to evaluate the accuracy of the model when predicting unknown samples, that is, the generalization ability of the model.

[0013] In a preferred embodiment, the data set processing module uses labelimg software to select the yolo annotation format to annotate the data set, converting the original image data into a structured format that can be understood and learned by the YOLO algorithm, helping the model to learn category features and accurately identify the content in the image.

[0014] In a preferred embodiment, the steel stamp character detection and recognition model module can obtain four versions of models by adjusting the width and depth of the algorithm backbone network, namely YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x. Among them, YOLOv5s is the simplest version, which has the smallest model parameters and the fastest detection speed.

[0015] In a preferred embodiment, the input end of the steel stamp character detection and recognition model module is mainly composed of three parts: Mosaic image enhancement, adaptive anchor frame calculation, and adaptive image scaling. Mosaic data enhancement is to splice four pictures by random scaling, random cropping, and random arrangement, which can enrich the background and small target information of the detected object; the idea of ​​the adaptive anchor frame is to automatically calculate the optimal anchor frame parameters of the input image by learning without manual setting, which can improve the accuracy and robustness of target detection; adaptive image scaling can keep the aspect ratio of the picture unchanged and scale it to a suitable size, which can retain the original information in the picture to a great extent and avoid information loss.

[0016] In a preferred embodiment, the backbone part of the steel stamp character detection and recognition model module is mainly used to extract image features. First, this part introduces the Focus structure to periodically extract pixels from the high-resolution image, and reconstruct the low-resolution image by channel splicing of the four sub-images to achieve downsampling and feature compression of the input feature map. Then, the CSP structure is introduced to convert the input feature map into a low-resolution image. Figure 1 After being divided into two, they are spliced ​​and combined after cross-stage processing as the input of the next layer, which significantly reduces the parameters and calculation amount of the network, while improving the efficiency of feature extraction, thereby speeding up the training and reasoning of the model.

[0017] In a preferred embodiment, the Neck part of the steel stamp character detection and recognition model module further improves the feature extraction capability. Neck adopts the FPN+PAN structure, uses the FPN structure to transmit strong semantic features from top to bottom, uses the PAN module to build a feature pyramid structure, transmits strong positioning features from bottom to top, and realizes feature fusion between different layers.

[0018] In a preferred embodiment, the prediction information in the Prediction part of the steel stamp character detection and recognition model module mainly consists of bounding box position information, category, and confidence. The Bounding box loss function adopts the CIOU_Loss function, and the specific calculation formulas are as follows (1) to (4), which are mainly used to measure the difference between the predicted bounding box and the real bounding box. NMS non-maximum suppression is used for screening the prediction box.

[0019]

[0020] In a preferred embodiment, during the training process of the steel stamp character detection and recognition model module, the CIOU_Loss function is used to measure the degree of deviation between the model prediction value and the true value, which largely determines the performance of the model. Therefore, in order to obtain better training results, the smaller the loss function value, the better. The figure is the loss function curve obtained by training. As can be seen from the figure, the loss rates gradually decrease during the training process, and finally box_loss basically remains around 0.03, obj_loss eventually approaches 0.05, and cls_loss decreases to 0.01, all of which meet the preset expectations.

[0021] After the training is completed, a visualization image of the character recognition confusion matrix can be obtained to show the classification effect of the model on different categories. Each row represents a true category and each column represents a predicted category. In the confusion matrix element diagram, the values ​​on the off-diagonal line represent the number of samples misclassified by the model. It can be seen from the figure that the model has poor detection effect on characters 0 and O, 1 and I, O and C. Therefore, in subsequent work, we can try to increase the number of images of such characters to achieve better recognition effect.

[0022] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0023] 1. In the present invention, in the development of the steel stamp character recognition system, based on the Raspberry Pi platform, not only can the hardware cost be effectively reduced, but also its strong community support and rich hardware interfaces make the development and deployment of the system more flexible and convenient. In addition, the Raspberry Pi has low power consumption and stable operation, which is very suitable for large-scale industrial site use. In the application scenario of steel stamp character recognition, the system can be quickly deployed through the Raspberry Pi platform, whether on the production line or in the mobile detection scenario, it can give play to its light, easy to use, and cost-effective characteristics, greatly improving the popularity and practical value of the recognition system.

[0024] 2. In the present invention, in the design process of the steel stamp character recognition system, advanced machine learning algorithms and deep learning models are used, combined with large-scale data set training, which effectively improves the recognition accuracy and speed of the system. Through multi-scale feature extraction and optimization of network structure, the system can not only accurately identify steel stamp characters in various complex environments, but also has a fast recognition speed, which can meet the needs of real-time processing. In addition, the system supports two recognition modes, photo and video, making the application scenarios more extensive. In industrial production, the system can quickly and accurately identify the steel stamp characters on the product, greatly improve the detection efficiency, and reduce the false detection rate, thereby improving product quality and production efficiency.

[0025] 3. In the present invention, by introducing an embedded steel stamp character recognition system based on machine learning, automatic recognition can be achieved, greatly reducing the workload of manual sampling and verification. The high precision and rapid response capabilities of the system ensure the accuracy of the recognition results, thereby effectively improving production efficiency. At the same time, automatic recognition reduces labor costs and helps companies save a lot of expenses. In long-term production practice, the application of this automatic recognition system will bring significant economic benefits and productivity improvements, and is an important trend in the future development of industrial automation. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the YOLOv5s network structure of the present invention;

[0027] Figure 2 is the loss rate curve in the present invention;

[0028] Figure 3 It is the confusion matrix element diagram in the present invention;

[0029] Figure 4 It is the PR curve diagram of the present invention. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0031] Reference Figure 1-4 ,

[0032] Example:

[0033] An embedded steel stamp character recognition system based on machine learning, the system includes a data set production module, a steel stamp character detection and recognition model module and an embedded development module;

[0034] The data set making module includes a data collection module, a data set expansion module and a data set processing module;

[0035] The steel stamp character detection and recognition model module is divided into input end, Backbone, Neck, and Prediction;

[0036] The embedded development module is based on the Raspberry Pi platform for embedded development of the steel stamp character recognition system. The Raspberry Pi used in the embedded development module is the Raspberry Pi 4 Computer Model B 2GB RAM.

[0037] The data collection module obtained a total of 200 steel stamp images through online collection and physical photography.

[0038] The dataset expansion module uses four methods: image brightening, image darkening, image Gaussian blurring, and image noise addition to process the existing images. The processing results are shown in the figure. The final dataset is obtained by expanding the original dataset to 1220 images. Among them, 969 images are used as training sets (train) to build the model, 118 images are used as validation sets (val) to evaluate the model during training, and 133 images are used as test sets (test). The training set (train), validation set (val) and test set (test) are used to evaluate the accuracy of the model when predicting unknown samples, that is, the generalization ability of the model.

[0039] The dataset processing module uses labelimg software to select the yolo annotation format to annotate the dataset, converting the original image data into a structured format that the YOLO algorithm can understand and learn, helping the model learn category features and accurately identify the content in the image.

[0040] The steel stamp character detection and recognition model module can obtain four versions of the model by adjusting the width and depth of the algorithm backbone network, namely YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x. Among them, YOLOv5s is the simplest version, which has the smallest model parameters and the fastest detection speed.

[0041] The input end of the steel stamp character detection and recognition model module is mainly composed of three parts: Mosaic image enhancement, adaptive anchor frame calculation, and adaptive image scaling. Mosaic data enhancement is to splice four pictures by random scaling, random cropping, and random arrangement, which can enrich the background and small target information of the detected object; the idea of ​​adaptive anchor frame is to automatically calculate the optimal anchor frame parameters of the input image through learning without manual setting, which can improve the accuracy and robustness of target detection; adaptive image scaling can keep the aspect ratio of the picture unchanged and scale it to a suitable size, which can retain the original information in the picture to a great extent and avoid information loss.

[0042] The backbone part of the steel stamp character detection and recognition model module is mainly used to extract image features. First, this part introduces the Focus structure to periodically extract pixels from the high-resolution image, and reconstruct the low-resolution image by channel splicing of the four sub-images to achieve downsampling and feature compression of the input feature map. Then, the CSP structure is introduced to convert the input feature map into a Figure 1 After being divided into two, they are spliced ​​and combined after cross-stage processing as the input of the next layer, which significantly reduces the parameters and calculation amount of the network, while improving the efficiency of feature extraction, thereby speeding up the training and reasoning of the model.

[0043] The Neck part of the steel stamp character detection and recognition model module further improves the feature extraction capability. Neck adopts the FPN+PAN structure, uses the FPN structure to transmit strong semantic features from top to bottom, and uses the PAN module to build a feature pyramid structure to transmit strong positioning features from bottom to top, thus realizing feature fusion between different layers.

[0044] The prediction information in the Prediction part of the steel stamp character detection and recognition model module mainly consists of bounding box position information, category, and confidence. The bounding box loss function uses the CIOU_Loss function, and the specific calculation formulas are as follows (1) to (4), which is mainly used to measure the difference between the predicted bounding box and the true bounding box. NMS non-maximum suppression is used to screen the predicted box.

[0045]

[0046] During the training process of the steel stamp character detection and recognition model module, the CIOU_Loss function is used to measure the deviation between the model prediction value and the true value, which largely determines the performance of the model. Therefore, in order to obtain better training results, the smaller the loss function value, the better. The figure is the loss function curve obtained by training. As can be seen from the figure, the loss rates gradually decrease during the training process. In the end, box_loss basically remains around 0.03, obj_loss eventually approaches 0.05, and cls_loss decreases to 0.01, all of which meet the preset expectations.

[0047] After the training is completed, a visualization image of the character recognition confusion matrix can be obtained to show the classification effect of the model on different categories. Each row represents a true category and each column represents a predicted category. In the confusion matrix element diagram, the values ​​on the off-diagonal line represent the number of samples misclassified by the model. It can be seen from the figure that the model has poor detection effect on characters 0 and O, 1 and I, O and C. Therefore, in subsequent work, we can try to increase the number of images of such characters to achieve better recognition effect.

[0048] In the present invention, in the development of the steel stamp character recognition system, based on the Raspberry Pi platform, not only can the hardware cost be effectively reduced, but also its strong community support and rich hardware interfaces make the development and deployment of the system more flexible and convenient. In addition, the Raspberry Pi has low power consumption and stable operation, which is very suitable for large-scale industrial site use. In the application scenario of steel stamp character recognition, the system can be quickly deployed through the Raspberry Pi platform, whether on the production line or in the mobile detection scenario, it can play its lightweight, easy to use, and cost-effective characteristics, greatly improving the popularity and practical value of the recognition system.

[0049] In the present invention, in the design process of the steel stamp character recognition system, advanced machine learning algorithms and deep learning models are used, combined with large-scale data set training, which effectively improves the recognition accuracy and speed of the system. Through multi-scale feature extraction and optimization of network structure, the system can not only accurately identify steel stamp characters in various complex environments, but also has a fast recognition speed, which can meet the needs of real-time processing. In addition, the system supports two recognition modes, photo and video, making the application scenarios more extensive. In industrial production, the system can quickly and accurately identify the steel stamp characters on the product, greatly improve the detection efficiency, reduce the false detection rate, and thus improve product quality and production efficiency.

[0050] In the present invention, by introducing an embedded steel stamp character recognition system based on machine learning, automatic recognition can be achieved, greatly reducing the workload of manual sampling and verification. The high precision and rapid response capabilities of the system ensure the accuracy of the recognition results, thereby effectively improving production efficiency. At the same time, automatic recognition reduces labor costs and helps companies save a lot of expenses. In long-term production practice, the application of this automatic recognition system will bring significant economic benefits and productivity improvements, and is an important trend in the future development of industrial automation.

[0051] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or still includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0052] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An embedded steel stamp character recognition system based on machine learning, characterized in that: The system includes a data set making module, a steel stamp character detection and recognition model module and an embedded development module; The data set production module includes a data collection module, a data set expansion module and a data set processing module; The steel stamp character detection and recognition model module is divided into an input end, a backbone, a neck, and a prediction; The embedded development module performs embedded development of the steel stamp character recognition system based on the Raspberry Pi platform, and the Raspberry Pi used by the embedded development module is Raspberry Pi 4 Computer Model B 2GB RAM.

2. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The data acquisition module obtained a total of 200 steel stamp images through online collection and physical photography.

3. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The dataset expansion module uses four methods, namely, image brightening, image darkening, image Gaussian blurring, and image noise addition, to process the existing images, and expands the original dataset to 1,220 images to obtain the final dataset; 969 of them are used as training sets (train) to establish the model, 118 are used as validation sets (val) to evaluate the model during training, and 133 are used as test sets (test); the training set (train), validation set (val) and test set (test) are used to evaluate the accuracy of the model in predicting unknown samples, that is, the generalization ability of the model.

4. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The dataset processing module uses labelimg software to select the yolo annotation format to annotate the dataset, converting the original image data into a structured format that the YOLO algorithm can understand and learn, helping the model learn category features and accurately identify the content in the image.

5. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The stamped character detection and recognition model module can obtain four versions of models by adjusting the width and depth of the algorithm backbone network, namely YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x; among them, YOLOv5s is the simplest version, which has the smallest model parameters and the fastest detection speed.

6. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The input end of the steel stamp character detection and recognition model module is mainly composed of three parts: Mosaic image enhancement, adaptive anchor frame calculation, and adaptive picture scaling; Mosaic data enhancement is to splice four pictures by random scaling, random cropping, and random arrangement, which can enrich the background and small target information of the detected object; the idea of ​​the adaptive anchor frame is to automatically calculate the optimal anchor frame parameters of the input image by learning without manual setting, which can improve the accuracy and robustness of target detection; adaptive picture scaling can keep the aspect ratio of the picture unchanged and scale it to a suitable size, which can retain the original information in the picture to the greatest extent and avoid information loss.

7. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The Backbone part of the steel stamp character detection and recognition model module is mainly used to extract image features. First, this part introduces the Focus structure, periodically extracts pixels from the high-resolution image, and reconstructs the four sub-images into a low-resolution image by channel splicing, thereby realizing downsampling and feature compression of the input feature map. Then, the CSP structure is introduced, and the input feature map is divided into two, and then spliced ​​and combined after cross-stage processing as the input of the next layer, which significantly reduces the parameters and calculation amount of the network, while improving the efficiency of feature extraction, thereby accelerating the training and reasoning speed of the model.

8. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The Neck part of the steel stamp character detection and recognition model module further improves the feature extraction capability; Neck adopts the FPN+PAN structure, uses the FPN structure to transfer strong semantic features from top to bottom, uses the PAN module to build a feature pyramid structure, transfers strong positioning features from bottom to top, and realizes feature fusion between different layers.

9. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: The prediction information in the Prediction part of the steel stamp character detection and recognition model module mainly consists of bounding box position information, category, and confidence. The bounding box loss function adopts the CIOU_Loss function, and the specific calculation formulas are as follows (1) to (4), which is mainly used to measure the difference between the predicted bounding box and the real bounding box. The NMS non-maximum suppression is used to screen the predicted box.

10. The embedded steel stamp character recognition system based on machine learning as claimed in claim 1, characterized in that: During the training process of the stamp character detection and recognition model module, the CIOU_Loss function is used to measure the deviation between the model prediction value and the true value, which largely determines the performance of the model. Therefore, in order to obtain better training results, the smaller the loss function value, the better. During the training process, each loss rate gradually decreases. Finally, box_loss is basically maintained at around 0.03, obj_loss eventually approaches 0.05, and cls_loss is reduced to 0.01, all of which meet the preset expectations. After the training is completed, a visualization image of the character recognition confusion matrix can be obtained to show the classification effect of the model on different categories; each row represents a real category, and each column represents a predicted category; in the confusion matrix element diagram, the values ​​on the off-diagonal line represent the number of samples misclassified by the model. The model has poor detection effect on characters 0 and O, 1 and I, O and C, so in subsequent work, we can try to increase the number of images of such characters to achieve better recognition effect.

Citation Information

Cited By

  • Method and system for tracing surface identification of die steel plate based on OCR (Optical Character Recognition)

    CN121838179A