Handwritten Chinese character text recognition method based on neural network

By adopting attention bidirectional long and short-term memory network module and knowledge distillation technology in handwritten Chinese character recognition technology, combined with OpenCV feature extraction and data enhancement technology, the problems of low recognition accuracy and poor text accuracy in the existing technology are solved, and higher recognition accuracy and better text connection are achieved.

CN119851301APending Publication Date: 2025-04-18HEBEI UNIV OF ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411958503.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing handwritten Chinese character recognition technology has problems such as low recognition accuracy, poor text accuracy, and incomplete text connections, especially when dealing with complex Chinese character structures and similar characters, it is easy to lead to misjudgment.

Method used

Using a handwritten Chinese character text recognition method based on neural network, the attention bidirectional long and short-term memory network module is designed, combined with knowledge distillation technology, the model architecture and compressed model volume are optimized, and feature extraction and preprocessing are used for OpenCV, and text contour detection is optimized through data enhancement technology.

Benefits of technology

It significantly improves the recognition accuracy of handwritten Chinese characters, enhances the accuracy of text and the perfection of text connections, and improves the accuracy and efficiency of the recognition system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119851301A_ABST
    Figure CN119851301A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of handwritten Chinese character text recognition, and discloses a handwritten Chinese character text recognition method based on a neural network, which comprises the following steps: S1, model architecture design, S2, model optimization and compression, S3, system implementation and integration, S4, recognition performance test, and S5, application verification and evaluation. The method comprises the following steps: S1, designing a model architecture: designing an attention bidirectional long-short-term memory network module which combines a bidirectional long-short-term memory network and an attention mechanism to enable a neural network to focus on useful features and ignore irrelevant features so as to optimize feature extraction capability; according to the handwritten Chinese character text recognition method based on the neural network, the attention bidirectional long-short-term memory network module is introduced, the knowledge distillation technology is combined, the model precision is kept, meanwhile, the neural network model is remarkably compressed, training parameters are reduced, and therefore the recognition accuracy of the handwritten Chinese character text is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of handwritten Chinese character text recognition, in particular to a handwritten Chinese character text recognition method based on a neural network. Background Art

[0002] Handwritten Chinese character recognition is a technology that converts handwritten Chinese characters into editable and searchable electronic text. It is based on computer vision and machine learning algorithms, and processes and analyzes images of handwritten Chinese characters to identify the content of handwritten Chinese characters.

[0003] At present, most of the existing handwritten Chinese character recognition technologies adopt the method of "feature extraction + classifier" or convolutional neural network. The recognition accuracy of this method of "feature extraction + classifier" is difficult to be further significantly improved. When processing large-scale data sets, convolutional neural network needs to consume a lot of computing resources and time, which limits its promotion and popularization in practical applications to a certain extent. In addition, Chinese characters have complex structures, many strokes, and a large number. At the same time, there are a large number of similar characters in Chinese characters. These characters are similar in structure but different in details, which can easily lead to misjudgment of the recognition system. Moreover, handwriting is the result of artificial writing, and everyone's writing style and habits are different, which further increases the complexity of handwritten Chinese character recognition. In practical applications, handwritten Chinese characters may also have problems such as stroke adhesion, tilt and bending. These problems will bring additional challenges to the recognition system. In addition, technical problems such as text correction, character segmentation, and optimization and improvement of recognition engines are also key problems to be solved in the current field of handwritten Chinese character recognition. Therefore, the present invention provides a handwritten Chinese character text recognition method based on neural network. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the shortcomings of the prior art, the present invention provides a handwritten Chinese character text recognition method based on a neural network, which has the advantages of high recognition accuracy, more precise text, and more complete text connection, and solves the problems of low recognition accuracy, poor text accuracy, and incomplete text connection.

[0006] (II) Technical solution

[0007] In order to achieve the above-mentioned purpose of higher recognition accuracy, more precise text, and more complete text connection, the present invention provides the following technical solutions:

[0008] A handwritten Chinese character text recognition method based on a neural network, comprising the following steps: S1, model architecture design, S2, model optimization and compression, S3, system implementation and integration, S4, recognition performance testing, S5, application verification and evaluation;

[0009] S1. Model architecture design:

[0010] Design an attention bidirectional long short-term memory network module. By combining the bidirectional long short-term memory network with the attention mechanism, the module enables the neural network to focus on useful features and ignore irrelevant features, thereby optimizing feature extraction capabilities and improving training efficiency and text recognition rate.

[0011] S2. Model optimization and compression:

[0012] Introducing knowledge distillation technology, while maintaining model accuracy, through knowledge transfer and compression strategies, reducing model size and training parameters, and obtaining a smaller, faster, and lighter training model;

[0013] S3. System implementation and integration:

[0014] Under the Pytorch framework, combined with the OpenCV computer vision library, we researched and developed a handwritten Chinese character recognition system, using OpenCV technology for feature extraction and preprocessing to provide high-quality input for neural network recognition.

[0015] S4, recognition performance test:

[0016] The recognition accuracy of the model was tested, and the effectiveness of the attention bidirectional long short-term memory network module and knowledge distillation technology was verified through comparative experiments to ensure that the model achieved ideal results in recognizing handwritten Chinese texts;

[0017] S5. Application verification and evaluation:

[0018] Apply the optimized handwritten Chinese character recognition system to actual scenarios, evaluate its performance and stability in actual applications, and make further adjustments and optimizations based on feedback to suit a wider range of text recognition needs.

[0019] As a preferred technical solution of the present invention, in the S1, model architecture design, data enhancement technology is used to optimize the text contour detection technology. The data enhancement technology uses text data enhancement to enable the attention bidirectional long short-term memory network to more perfectly handle the mutual connection between the previous and subsequent texts.

[0020] As a preferred technical solution of the present invention, in the S2, model optimization and compression, the knowledge transfer and compression strategies need to consider the balance between the complexity and accuracy of the model, while reducing the model size and the number of parameters, ensuring that the model can still accurately capture and represent the features of handwritten Chinese text.

[0021] As a preferred technical solution of the present invention, in the S3, system implementation and integration, OpenCV technology needs to perform feature extraction and preprocessing to provide high-quality input for neural network recognition, thereby ensuring the accuracy and efficiency of the recognition system.

[0022] As a preferred technical solution of the present invention, in the S4, recognition performance test, the comparative experiment adopts a benchmark model comparison method, that is, a traditional neural network model that does not adopt the attention bidirectional long short-term memory network module and knowledge distillation technology is constructed as a benchmark model, and the recognition accuracy is compared with the optimized model.

[0023] As a preferred technical solution of the present invention, in the S5, application verification and evaluation, the performance and stability are evaluated by actual scenario testing, that is, the optimized handwritten Chinese character recognition system is applied to the actual scenario, and its performance and stability are evaluated by observing and recording the performance of the system in actual operation, and further adjustments and optimizations are made based on feedback.

[0024] (III) Beneficial effects

[0025] Compared with the prior art, the present invention provides a method for handwritten Chinese character text recognition based on a neural network, which has the following beneficial effects:

[0026] This neural network-based handwritten Chinese text recognition method, by introducing an attention bidirectional long short-term memory network module and combining it with knowledge distillation technology, significantly compresses the neural network model and reduces the training parameters while maintaining the model accuracy, thereby improving the recognition accuracy of handwritten Chinese text. In addition, data enhancement technology is used to optimize the text contour detection technology, so that the network can more accurately extract text features in the text, further improving the mutual connection between the previous and next texts. At the same time, feature extraction and preprocessing through OpenCV technology provide high-quality input for the neural network, significantly improving the accuracy and efficiency of the recognition system. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flow chart of the handwritten Chinese character text recognition method of the present invention;

[0028] Figure 2 Optimize and compress the flow chart of the model of the present invention;

[0029] Figure 3 This is a flow chart for the implementation and integration of the system of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] In the description of the present invention, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0032] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0033] See also Figure 1-3 ,

[0034] Embodiment 1: A method for handwritten Chinese character text recognition based on a neural network, comprising the following steps: S1, model architecture design, S2, model optimization and compression, S3, system implementation and integration, S4, recognition performance testing, S5, application verification and evaluation;

[0035] S1. Model architecture design:

[0036] An innovative attention bidirectional long short-term memory network module is designed, which deeply integrates the bidirectional long short-term memory network with the advanced attention mechanism. Through this design, the neural network can intelligently focus on the key features in the input data and effectively ignore irrelevant or redundant information. This ability not only significantly optimizes the accuracy of feature extraction, but also greatly improves the efficiency of the training process, thereby ensuring a significant improvement in the recognition rate of handwritten Chinese text. In the architecture design, data enhancement technology is also used to further optimize the text contour detection technology. By enhancing the diversity and complexity of text data, the attention bidirectional long short-term memory network can more comprehensively process and understand the complex connection between the previous and next texts.

[0037] S2. Model optimization and compression:

[0038] The knowledge distillation technology was introduced, which is an efficient and advanced model compression method. Through knowledge transfer and compression strategies, the technology greatly reduces the model size and training parameters while maintaining the original accuracy of the model. This not only makes the training process more efficient, but also reduces the model's operating resource requirements, thereby obtaining a smaller, faster, and lighter training model. During the optimization process, the relationship between the complexity and accuracy of the model is also balanced, ensuring that while reducing the model size and the number of parameters, it can still accurately capture and represent the characteristics of handwritten Chinese text.

[0039] S3. System implementation and integration:

[0040] Under the Pytorch framework, combined with the OpenCV computer vision library, the research and development of the handwritten Chinese character recognition system is realized, and the OpenCV technology is used for feature extraction and preprocessing. Through the collaborative work of these two tools, the research and development of the handwritten Chinese character recognition system is realized, and the advantages of OpenCV in feature extraction and preprocessing are fully utilized to provide high-quality, low-noise input data for neural network recognition. The implementation of this step lays the foundation for ensuring the accuracy and efficiency of the recognition system.

[0041] S4, recognition performance test:

[0042] The recognition accuracy of the model was tested, and the effectiveness of the attention bidirectional long short-term memory network module and knowledge distillation technology was verified through comparative experiments to ensure that the model achieves ideal results in recognizing handwritten Chinese text. Specifically, a neural network model that did not adopt these advanced technologies was constructed as a baseline model, and its recognition accuracy was compared with that of the optimized model. Through this comparative experiment, we can intuitively see the significant advantages of the optimized model in recognizing handwritten Chinese text, thereby ensuring that the model can achieve ideal results in practical applications.

[0043] S5. Application verification and evaluation:

[0044] The optimized handwritten Chinese character recognition system is applied to actual scenarios. By observing and recording the system's performance in actual operation, its performance and stability are comprehensively evaluated. At the same time, user feedback is collected and further adjustments and optimizations are made based on these feedbacks. Through continuous iteration and optimization, it can be applied to a wider range of text recognition needs, providing users with more convenient and efficient services.

[0045] In the present embodiment, in the S1 and model architecture design, data enhancement technology is used to optimize the text contour detection technology. The data enhancement technology uses text data enhancement, so that the attention bidirectional long short-term memory network can more perfectly handle the mutual connection between the front and back texts. Specifically, the strategy of text data enhancement is adopted. By performing a series of transformations (such as rotation, scaling, translation, adding noise, etc.) on the original text data, more diverse training samples are generated. These enhanced data not only enrich the training set of the model, but also enable the attention bidirectional long short-term memory network to better learn and understand the inherent laws and characteristics of the text data, especially the mutual connection between the front and back texts. Through this series of optimization designs, the model architecture can theoretically capture the key information in the handwritten Chinese text more accurately, and improve the accuracy and robustness of recognition. At the same time, the introduction of data enhancement technology also lays a solid foundation for improving the generalization ability of the model, so that it can better adapt to input data of different writing styles and conditions.

[0046] In this embodiment, in the S2, model optimization and compression, the knowledge transfer and compression strategy needs to consider the balance between the complexity and accuracy of the model. While reducing the model size and the number of parameters, it is necessary to ensure that the model can still accurately capture and represent the characteristics of handwritten Chinese text. Specifically, the knowledge distillation technology allows the extraction of key knowledge and information from a large and complex teacher model, and then "distills" this knowledge and information into a smaller and more concise student model. In this process, the designed distillation strategy ensures that the student model can accurately capture and represent the characteristics of handwritten Chinese text, while avoiding the loss of accuracy caused by over-simplification. In order to achieve this goal, feature matching, loss function design and fine-tuning of the training process are adopted. These means work together in every link of knowledge distillation to ensure that while reducing the model size and the number of parameters, the recognition accuracy of the model can be effectively maintained and improved. In addition, in the process of model optimization and compression, the model is flexibly adjusted and optimized according to the specific application scenarios and hardware conditions to further meet its performance and stability requirements in practical applications.

[0047] In this embodiment, in the S3, system implementation and integration, OpenCV technology needs to perform feature extraction and preprocessing to provide high-quality input for neural network recognition, thereby ensuring the accuracy and efficiency of the recognition system. Feature extraction is to use the image processing algorithm provided by OpenCV to extract key feature information from handwritten Chinese text images. These features include but are not limited to the outline, edge, texture, etc. of the text, which are extremely valuable for the subsequent neural network recognition process. Preprocessing is after feature extraction, and a series of preprocessing operations are required to the image to further eliminate noise, enhance contrast, adjust size, etc. These preprocessing steps can ensure the consistency of input data, thereby improving the recognition accuracy of the neural network. OpenCV provides a wealth of preprocessing functions, such as grayscale, binarization, and denoising, which are flexibly selected and applied according to actual needs.

[0048] In this embodiment, in the S4, recognition performance test, the comparative experiment adopts the benchmark model comparison method, that is, a traditional neural network model that does not adopt the attention bidirectional long short-term memory network module and knowledge distillation technology is constructed as a benchmark model, and the recognition accuracy is compared with the optimized model.

[0049] The formula is:

[0050] Recognition accuracy = (number of correctly recognized characters / total number of characters) × 100%

[0051] In the comparative experiment, the recognition accuracy of the baseline model and the optimized model will be calculated respectively, and a comparative analysis will be conducted. By comparing the recognition accuracy of the two, the improvement effect of the attention bidirectional long short-term memory network module and knowledge distillation technology on the handwritten Chinese text recognition performance can be intuitively evaluated.

[0052] In this embodiment, in the S5, application verification and evaluation, the performance and stability are evaluated by actual scenario testing, that is, the optimized handwritten Chinese character recognition system is applied to actual scenarios, and its performance and stability are evaluated by observing and recording the performance of the system in actual operation, and further adjustments and optimizations are made based on feedback. Specifically, the optimized handwritten Chinese character recognition system is deployed to multiple actual scenarios, which may include education, office, finance and other fields. By observing and recording the actual operation performance of the system in these scenarios, the performance and stability of the system can be intuitively understood. During the test, special attention is paid to recognition accuracy, processing speed, stability and user feedback. Recognition accuracy: evaluates the recognition accuracy of the system for handwritten Chinese texts to ensure that the system can accurately recognize Chinese characters in various writing styles and conditions. Processing speed: tests the speed at which the system processes input data and outputs recognition results to ensure that the system can complete the recognition task within the specified time. Stability: observes the stability of the system in actual operation, including whether there will be crashes, freezes and other problems, and whether it can continuously and stably provide high-quality recognition services. User feedback: collects user feedback on the system to understand the advantages and disadvantages of the system in actual applications in order to make further adjustments and optimizations.

[0053] Beneficial effects of the above embodiments:

[0054] This neural network-based handwritten Chinese text recognition method, by introducing an attention bidirectional long short-term memory network module and combining it with knowledge distillation technology, significantly compresses the neural network model and reduces the training parameters while maintaining the model accuracy, thereby improving the recognition accuracy of handwritten Chinese text. In addition, data enhancement technology is used to optimize the text contour detection technology, so that the network can more accurately extract text features in the text, further improving the mutual connection between the previous and next texts. At the same time, feature extraction and preprocessing through OpenCV technology provide high-quality input for the neural network, significantly improving the accuracy and efficiency of the recognition system.

[0055] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for handwritten Chinese character text recognition based on a neural network, comprising the following steps: S1, model architecture design, S2, model optimization and compression, S3, system implementation and integration, S4, recognition performance testing, S5, application verification and evaluation; Features: S1. Model architecture design: Design an attention bidirectional long short-term memory network module. By combining the bidirectional long short-term memory network with the attention mechanism, the module enables the neural network to focus on useful features and ignore irrelevant features, thereby optimizing feature extraction capabilities and improving training efficiency and text recognition rate. S2. Model optimization and compression: Introducing knowledge distillation technology, while maintaining model accuracy, through knowledge transfer and compression strategies, reducing model size and training parameters, and obtaining a smaller, faster, and lighter training model; S3. System implementation and integration: Under the Pytorch framework, combined with the OpenCV computer vision library, we researched and developed a handwritten Chinese character recognition system, using OpenCV technology for feature extraction and preprocessing to provide high-quality input for neural network recognition. S4, recognition performance test: The recognition accuracy of the model was tested, and the effectiveness of the attention bidirectional long short-term memory network module and knowledge distillation technology was verified through comparative experiments to ensure that the model achieved ideal results in recognizing handwritten Chinese texts; S5. Application verification and evaluation: Apply the optimized handwritten Chinese character recognition system to actual scenarios, evaluate its performance and stability in actual applications, and make further adjustments and optimizations based on feedback to suit a wider range of text recognition needs.

2. The method for handwritten Chinese character text recognition based on a neural network according to claim 1, characterized in that: In the S1 model architecture design, data enhancement technology is used to optimize the text contour detection technology. The data enhancement technology uses text data enhancement to enable the attention bidirectional long short-term memory network to more perfectly handle the mutual connection between the previous and next texts.

3. The method for handwritten Chinese character text recognition based on neural network according to claim 1, characterized in that: In S2, model optimization and compression, the knowledge transfer and compression strategies need to consider the balance between the complexity and accuracy of the model. While reducing the model size and the number of parameters, it is necessary to ensure that the model can still accurately capture and represent the characteristics of handwritten Chinese text.

4. The method for handwritten Chinese character text recognition based on neural network according to claim 1, characterized in that: In the above S3, system implementation and integration, OpenCV technology needs to perform feature extraction and preprocessing to provide high-quality input for neural network recognition, thereby ensuring the accuracy and efficiency of the recognition system.

5. The method for handwritten Chinese character recognition based on neural network according to claim 1, characterized in that: In the S4, recognition performance test, the comparative experiment adopts the benchmark model comparison method, that is, a traditional neural network model that does not adopt the attention bidirectional long short-term memory network module and knowledge distillation technology is constructed as a benchmark model, and the recognition accuracy is compared with the optimized model.

6. The method for handwritten Chinese character text recognition based on neural network according to claim 1, characterized in that: In the above-mentioned S5, application verification and evaluation, the performance and stability are evaluated by actual scenario testing, that is, the optimized handwritten Chinese character recognition system is applied to the actual scenario, and its performance and stability are evaluated by observing and recording the performance of the system in actual operation, and further adjustments and optimizations are made based on the feedback.