Back to results
US 12,380,721 B2Granted
Handwriting recognition method and apparatus, and electronic device and storage medium
AssigneeBoe Technology Group Co., Ltd.
InventorHuanhuan Zhang
Life of this patent
Estimating the term…
Abstract
A handwriting recognition method and apparatus, and an electronic device and a storage medium are provided. The method includes: acquiring a text image containing handwritten text; inputting the text image into a convolutional neural network, and extracting a CNN feature and a HOG feature of the text image; and extracting the handwritten text in text image according to the CNN feature and the HOG feature.
Claims10
A handwriting recognition method, comprising:
- acquiring a text image containing handwritten text;
- inputting the text image to a convolutional neural network and extracting a Convolutional Neural Network feature of the text image;
- dividing the text image into a plurality of text subimages according to a preset size, and extracting directional gradient features of the plurality of text subimages;
- acquiring a histogram of oriented gradient feature of the text image according to the directional gradient features;
- and
- extracting the handwritten text from the text image according to the Convolutional Neural Network feature and the histogram of oriented gradient feature;
- wherein extracting the handwritten text from the text image according to the Convolutional Neural Network feature and the histogram of oriented gradient feature comprises:
- generating a target image feature according to the Convolutional Neural Network feature and the histogram of oriented gradient feature and dividing the target image feature into a plurality of time steps;
- encoding the target image feature by an encoding layer in a recognition model, so as to obtain an image encoding feature corresponding to each of the time steps in the target image feature;
- sequentially inputting the image encoding feature corresponding to each of the time steps to a decoding layer in the recognition model for decoding, so as to obtain an image decoding feature corresponding to each of the time steps;
- inputting the image decoding feature corresponding to each of the time steps to a classification layer in the recognition model, so as to obtain a handwritten text recognition result corresponding to each of the time steps;
- and
- recognizing the handwritten text according to the handwritten text recognition result;
- wherein sequentially inputting the image encoding feature corresponding to each of the time steps to the decoding layer in the recognition model for decoding, so as to obtain an image decoding feature corresponding to each of the time steps comprises:
- determining whether a currently input image encoding feature is a first image encoding feature;
- on the condition that the currently input image encoding feature is not the first image encoding feature, acquiring an image decoding feature corresponding to a previously input image encoding feature;
- generating an image decoding feature corresponding to the currently input image encoding feature according to the currently input image encoding feature and the image decoding feature corresponding to the previously input image encoding feature;
- and
- on the condition that the currently input image encoding feature is the first image encoding feature, acquiring a corresponding image decoding feature according to the currently input image encoding feature.
16 more elements
An electronic device, comprising:
- at least one processor;
- and
- a memory in communication connection with the at least one processor;
- wherein
- the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the operations comprise:
- acquiring a text image containing handwritten text;
- inputting the text image to a convolutional neural network and extracting a Convolutional Neural Network feature of the text image;
- dividing the text image into a plurality of text subimages according to a preset size, and extracting directional gradient features of the plurality of text subimages;
- acquiring a histogram of oriented gradient feature of the text image according to the directional gradient features;
- and
- extracting the handwritten text from the text image according to the Convolutional Neural Network feature and the histogram of oriented gradient feature;
- wherein extracting the handwritten text from the text image according to the Convolutional Neural Network feature and the histogram of oriented gradient feature comprises:
- generating a target image feature according to the Convolutional Neural Network feature and the histogram of oriented gradient feature and dividing the target image feature into a plurality of time steps;
- encoding the target image feature by an encoding layer in a recognition model, so as to obtain an image encoding feature corresponding to each of the time steps in the target image feature;
- sequentially inputting the image encoding feature corresponding to each of the time steps to a decoding layer in the recognition model for decoding, so as to obtain an image decoding feature corresponding to each of the time steps;
- inputting the image decoding feature corresponding to each of the time steps to a classification layer in the recognition model, so as to obtain a handwritten text recognition result corresponding to each of the time steps;
- and
- recognizing the handwritten text according to the handwritten text recognition result;
- wherein sequentially inputting the image encoding feature corresponding to each of the time steps to the decoding layer in the recognition model for decoding, so as to obtain an image decoding feature corresponding to each of the time steps comprises:
- determining whether a currently input image encoding feature is a first image encoding feature;
- on the condition that the currently input image encoding feature is not the first image encoding feature, acquiring an image decoding feature corresponding to a previously input image encoding feature;
- generating an image decoding feature corresponding to the currently input image encoding feature according to the currently input image encoding feature and the image decoding feature corresponding to the previously input image encoding feature;
- and
- on the condition that the currently input image encoding feature is the first image encoding feature, acquiring a corresponding image decoding feature according to the currently input image encoding feature.
21 more elements
Dependencies are inferred from the claim text.