CN110503105A - Character identifying method, training data acquisition methods, device and medium - Google Patents

Character identifying method, training data acquisition methods, device and medium Download PDF

Info

Publication number
CN110503105A
CN110503105A CN201910821315.5A CN201910821315A CN110503105A CN 110503105 A CN110503105 A CN 110503105A CN 201910821315 A CN201910821315 A CN 201910821315A CN 110503105 A CN110503105 A CN 110503105A
Authority
CN
China
Prior art keywords
character
size
picture
shared
sample text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910821315.5A
Other languages
Chinese (zh)
Inventor
周以晴
侯绍东
熊玉竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Meinenghua Intelligent Technology Co Ltd
Original Assignee
Suzhou Meinenghua Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Meinenghua Intelligent Technology Co Ltd filed Critical Suzhou Meinenghua Intelligent Technology Co Ltd
Priority to CN201910821315.5A priority Critical patent/CN110503105A/en
Publication of CN110503105A publication Critical patent/CN110503105A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Abstract

This application involves a kind of character identifying method, training data acquisition methods, device and media, belong to image identification technical field, this method comprises: obtaining Target Photo to be identified;Pass through size shared by the location of character in Target Photo described in target detection model inspection and character;Size shared by the location of character obtained by character recognition model according to the target detection model inspection and character, identification obtain the character in the Target Photo.Go out the location of character and size shared by character in Target Photo by target detection model inspection, and then the location of character obtained subsequently through character recognition model according to detection identifies to obtain the character in Target Photo with size shared by character;It solves the problems, such as that accuracy of identification is poor in the prior art, has reached without doing Character segmentation in identification process, have ambiguity and then the higher effect of accuracy of identification without the output of CTC model is solved.

Description

Character identifying method, training data acquisition methods, device and medium
Technical field
This application involves character identifying method, training data acquisition methods, device and media, belong to image recognition technology neck Domain.
Background technique
Currently, needing to identify the character in paper in many scenes.For example, for paper document, when needing its turn It then needs to identify the character in paper document when being changed to electronics shelves.
Currently used character identifying method is to pass through OCR (Optical Character Recognition, optics word Symbol identification) Lai Shixian, the specific scheme is that (1) detects the size and location of line of text;(2) based on the figure where line of text Panel region identifies text.
Summary of the invention
This application provides a kind of character identifying method, training data acquisition methods, device and media, can solve existing The problem of scheme.The application provides the following technical solutions:
In a first aspect, providing a kind of symbol recognition methods, which comprises
Obtain Target Photo to be identified;
Pass through size shared by the location of character in Target Photo described in target detection model inspection and character;
The location of character obtained by character recognition model according to the target detection model inspection and character institute Size is accounted for, identification obtains the character in the Target Photo.
Optionally, described to pass through character recognition model position according to locating for the character that the target detection model inspection obtains It sets and obtains the character in the Target Photo with size shared by character, identification, comprising:
By the picture of character scaled as shared by the character detected to default size;
Using the picture of the location of described character and the character of the default size as the character recognition The input of model, and then identify and obtain the character in the Target Photo.
Optionally, described by shared by the location of character in Target Photo described in target detection model inspection and character Size, comprising:
The Target Photo is cut into n picture, the size of the n picture is identical, and the n is more than or equal to 2 Integer;
By n picture described in the target detection model inspection, and detects and obtain the position of the character in the n picture It sets and size shared by character.
Second aspect provides a kind of training data acquisition methods, which comprises
Background picture is obtained, the background picture is mixed to get by least two pictures;
It obtains sample text and records the character in the sample text;
The sample text is plotted in the background picture, and record each character position and shared size;
According to the character, each in the sample text for drawing the background picture after the sample text, record The position of character and shared size, generate training data, and the training data is known for training objective detection model and character Other model, the target detection model is used to detect the position of the character in Target Photo and shared size, the character are known Target figure described in the position for the character that other model is used to be obtained according to the target detection model inspection and shared size identification Character in piece.
Optionally, the acquisition background picture, comprising:
Obtain the background picture of content blank;
Obtain the random background picture of content.
Optionally, the acquisition sample text, comprising:
Text is randomly selected from internet, using the text randomly selected as the sample text.
Optionally, in the sample text of the background picture after the sample text according to drafting, record Character, each character position and shared size, generate training data, comprising:
The background picture after the sample text will be drawn to convert, the transformed background picture is obtained, remember Record size shared in the picture of character after the conversion;
By the transformed background picture, record the sample text in character, the position of each character and every Shared size in the picture of a character after the conversion, as the training data.
Optionally, the method also includes:
Noise is added at random in the background picture;
According to the position of character, each character in the sample text of the background picture, record after addition noise It sets and shared size, generation training data
The third aspect provides a kind of computer storage medium, is stored at least one in the computer storage medium Program instruction, at least one program instruction are loaded and executed by processors to realize character recognition side described in first aspect Method, or realize training data acquisition methods described in second aspect.
Fourth aspect provides a kind of device, and described device includes memory and processor, stores in the memory right At least one program instruction, the processor is by loading and executing above-metioned instruction to realize character recognition described in first aspect Method, or realize training data acquisition methods described in second aspect.
The beneficial effects of the present application are as follows:
Go out the location of character and size shared by character, Jin Erhou in Target Photo by target detection model inspection The location of continuous character obtained by character recognition model according to detection identifies to obtain target with size shared by character Character in picture;It solves the problems, such as that accuracy of identification is poor in the prior art, has reached and cut in identification process without doing character It cuts, has ambiguity and then the higher effect of accuracy of identification without the output of CTC model is solved.
By using the picture of the character of default size as the input of character recognition model, so that character recognition model can be with The matching characteristic on fixed size improves the precision of identification character.
By the way that the bigger Target Photo of size to be cut into the picture of n fixed sizes, and then n picture is made respectively For the input of target detection model, the processing pressure of CPU or GPU are alleviated, and since the size of character is smaller, It will not influence training effect.
Many enchancement factors and interference is added by automatically generating training data, and when generating training data, reaches The training data used in model training has more challenge than real scene, improves the robustness of model, namely improve The accuracy of character in target detection model and character recognition model the identification picture for using training to obtain.
Above description is only the general introduction of technical scheme, in order to better understand the technological means of the application, And can be implemented in accordance with the contents of the specification, with the preferred embodiment of the application and cooperate attached drawing below detailed description is as follows.
Detailed description of the invention
Fig. 1 is the method flow diagram for the character identifying method that the application one embodiment provides;
Fig. 2 is the method flow diagram for the training data acquisition methods that the application one embodiment provides.
Specific embodiment
With reference to the accompanying drawings and examples, the specific embodiment of the application is described in further detail.Implement below Example is not limited to scope of the present application for illustrating the application.
Referring to FIG. 1, the method flow diagram of the character identifying method provided it illustrates the application one embodiment, such as schemes Shown in 1, which comprises
Step 101, Target Photo to be identified is obtained;
Target Photo can be the picture being locally stored, and be also possible to the picture acquired from other equipment, certainly It can also be the picture acquired from internet.
Step 102, by shared by the location of character in Target Photo described in target detection model inspection and character Size;
Step 103, the location of the character obtained by character recognition model according to the target detection model inspection With size shared by character, identification obtains the character in the Target Photo.
Above-mentioned described target detection model and character recognition model can be CNN (Convolutional Neural Network, convolutional neural networks), certainly in actual implementation, it can also be other kinds of network model, this is not limited It is fixed.
In conclusion being gone out in Target Photo by target detection model inspection big shared by the location of character and character It is small, and then the location of character obtained subsequently through character recognition model according to detection is identified with size shared by character Obtain the character in Target Photo;Solve the problems, such as that accuracy of identification is poor in the prior art, has reached and has been not necessarily in identification process Character segmentation is done, has ambiguity and then the higher effect of accuracy of identification without the output of CTC model is solved.
Optionally, step 103, comprising:
First, by the picture of character scaled as shared by the character detected to default size;
May be different as detecting size shared by obtained each character, in order to improve precision, the present embodiment Scaled shared by obtained character can will be identified to default size by panntographic system.Wherein, according to default size The size of empirical value setting, which is the numerical value greater than ordinary symbol, and the numerical value of default size is less than threshold value.
Second, using the picture of the location of described character and the character of the default size as the character The input of identification model, and then identify and obtain the character in the Target Photo.
By using the picture of the character of default size as the input of character recognition model, so that character recognition model can be with The matching characteristic on fixed size improves the precision of identification character.
Optionally, step 102, comprising:
First, the Target Photo is cut into n picture, the size of the n picture is identical, the n be greater than etc. In 2 integer;
In actual implementation, Target Photo can be cut into the picture of fixed size, for example Target Photo is cut into n Picture.
Second, by n picture described in the target detection model inspection, and detects and obtain the word in the n picture Size shared by the position of symbol and character.
By the way that the bigger Target Photo of size to be cut into the picture of n fixed sizes, and then n picture is made respectively For the input of target detection model, the processing pressure of CPU or GPU are alleviated, and since the size of character is smaller, It will not influence training effect.
It should be noted that the target detection model and character recognition model in above-described embodiment are pre- according to training data First training obtains, and training data can be and directly acquire, and is also possible to be generated according to preset rules, the present embodiment with Training data is to be illustrated according to what preset rules generated.
Referring to FIG. 2, such as scheming it illustrates a kind of method flow diagram of training data acquisition methods provided in this embodiment Shown in 2, which comprises
Step 201, background picture is obtained, the background picture is mixed to get by least two pictures;
The present embodiment is mixed to get with background picture by two pictures come for example, this step includes that the following two kinds is realized At least one of mode:
First, obtain the background picture of content blank;
In actual implementation, paper blank can be scanned to obtain the background picture.
Second, obtain the random background picture of content.
In actual implementation, at the same time include it is above two when, can will acquire above two picture synthesis as back Scape picture, details are not described herein.
Step 202, it obtains sample text and records the character in the sample text;
Text is randomly selected from internet, using the text randomly selected as the sample text.
For example, text can be randomly selected from the news release of finance or entertainment news, and then obtain sample text.
Step 203, the sample text is plotted in the background picture, and records the position of each character and shared Size;
Step 204, according to the word in the sample text of the background picture, record after the drafting sample text Symbol, the position of each character and shared size generate training data.
The training data is used for training objective detection model and character recognition model, and the target detection model is for examining The position and shared size, the character recognition model for surveying the character in Target Photo are used for according to the target detection model Character in Target Photo described in the position for the character that detection obtains and shared size identification.
Optionally, in the sample text of the background picture after the sample text according to drafting, record Character, each character position and shared size, generate training data, comprising:
The background picture after the sample text will be drawn to convert, the transformed background picture is obtained, remember Record size shared in the picture of character after the conversion;
Transformation described herein may include at least one of rotation and stretching.
By the transformed background picture, record the sample text in character, the position of each character and every Shared size in the picture of a character after the conversion, as the training data.
Optionally, the method also includes:
Noise is added at random in the background picture;
According to the position of character, each character in the sample text of the background picture, record after addition noise It sets and shared size, generation training data.
Many enchancement factors and interference is added by automatically generating training data, and when generating training data, reaches The training data used in model training has more challenge than real scene, improves the robustness of model, namely improve The accuracy of character in target detection model and character recognition model the identification picture for using training to obtain.
Optionally, the application is also provided with a kind of computer storage medium, be stored in the computer storage medium to A few program instruction, at least one program instruction are loaded and executed by processors to realize above-mentioned described character recognition Method, or realize above-mentioned described training data acquisition methods.
Optionally, the application is also provided with a kind of device, and described device includes memory and processor, in the memory Right at least one program instruction is stored, the processor realizes that above-mentioned described character is known by loading and executing above-metioned instruction Other method, or realize above-mentioned described training data acquisition methods.
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of character identifying method, which is characterized in that the described method includes:
Obtain Target Photo to be identified;
Pass through size shared by the location of character in Target Photo described in target detection model inspection and character;
It is big shared by the location of character obtained by character recognition model according to the target detection model inspection and character Small, identification obtains the character in the Target Photo.
2. the method according to claim 1, wherein it is described by character recognition model according to the target detection Size shared by the location of character that model inspection obtains and character, identification obtain the character in the Target Photo, comprising:
By the picture of character scaled as shared by the character detected to default size;
Using the picture of the location of described character and the character of the default size as the character recognition model Input, and then identify obtain the character in the Target Photo.
3. the method according to claim 1, wherein described pass through Target Photo described in target detection model inspection Size shared by the location of middle character and character, comprising:
The Target Photo is cut into n picture, the size of the n picture is identical, and the n is the integer more than or equal to 2;
By n picture described in the target detection model inspection, and detect the position for obtaining the character in the n picture and Size shared by character.
4. a kind of training data acquisition methods, which is characterized in that the described method includes:
Obtain background picture;
It obtains sample text and records the character in the sample text;
The sample text is plotted in the background picture, and record each character position and shared size;
According to character, each character in the sample text of the background picture, record after the drafting sample text Position and shared size, generate training data, the training data be used for training objective detection model and character recognition mould Type, the target detection model be used to detect character in Target Photo position and shared size, the character recognition mould In Target Photo described in the position for the character that type is used to be obtained according to the target detection model inspection and shared size identification Character.
5. according to the method described in claim 4, it is characterized in that, the acquisition background picture, comprising:
Obtain the background picture of content blank;And/or
Obtain the random background picture of content.
6. according to the method described in claim 4, it is characterized in that, the acquisition sample text, comprising:
Text is randomly selected from internet, using the text randomly selected as the sample text.
7. according to any method of claim 4 to 6, which is characterized in that after the sample text according to drafting The background picture, record the sample text in character, each character position and shared size, generate training number According to, comprising:
The background picture after the sample text will be drawn to convert, the transformed background picture is obtained, record word Shared size in the picture of symbol after the conversion;
By the transformed background picture, record the sample text in character, each character position and each word Shared size in the picture of symbol after the conversion, as the training data.
8. according to any method of claim 4 to 6, which is characterized in that the method also includes:
Noise is added at random in the background picture;
According to addition noise after the background picture, record the sample text in character, each character position and Shared size generates training data.
9. a kind of computer storage medium, be stored at least one program instruction in the computer storage medium, it is described at least One program instruction is loaded and executed by processor to realize the character identifying method as described in claims 1 to 3 is any, or Realize the training data acquisition methods as described in claim 4 to 8 is any.
10. a kind of device, which is characterized in that described device includes memory and processor, and storage is right at least in the memory One program instruction, the processor is by loading and executing above-metioned instruction to realize the word as described in claims 1 to 3 is any Recognition methods is accorded with, or realizes the training data acquisition methods as described in claim 4 to 8 is any.
CN201910821315.5A 2019-09-02 2019-09-02 Character identifying method, training data acquisition methods, device and medium Pending CN110503105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910821315.5A CN110503105A (en) 2019-09-02 2019-09-02 Character identifying method, training data acquisition methods, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910821315.5A CN110503105A (en) 2019-09-02 2019-09-02 Character identifying method, training data acquisition methods, device and medium

Publications (1)

Publication Number Publication Date
CN110503105A true CN110503105A (en) 2019-11-26

Family

ID=68590885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910821315.5A Pending CN110503105A (en) 2019-09-02 2019-09-02 Character identifying method, training data acquisition methods, device and medium

Country Status (1)

Country Link
CN (1) CN110503105A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626244A (en) * 2020-05-29 2020-09-04 中国工商银行股份有限公司 Image recognition method, image recognition device, electronic equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103971097A (en) * 2014-05-15 2014-08-06 武汉睿智视讯科技有限公司 Vehicle license plate recognition method and system based on multiscale stroke models
CN107292302A (en) * 2016-03-31 2017-10-24 高德信息技术有限公司 Detect the method and system of point of interest in picture
CN108052937A (en) * 2017-12-28 2018-05-18 百度在线网络技术(北京)有限公司 Based on Weakly supervised character machining device training method, device, system and medium
CN108596180A (en) * 2018-04-09 2018-09-28 深圳市腾讯网络信息技术有限公司 Parameter identification, the training method of parameter identification model and device in image
CN109583449A (en) * 2018-10-29 2019-04-05 深圳市华尊科技股份有限公司 Character identifying method and Related product
WO2019071660A1 (en) * 2017-10-09 2019-04-18 平安科技(深圳)有限公司 Bill information identification method, electronic device, and readable storage medium
CN109766879A (en) * 2019-01-11 2019-05-17 北京字节跳动网络技术有限公司 Generation, character detection method, device, equipment and the medium of character machining model

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103971097A (en) * 2014-05-15 2014-08-06 武汉睿智视讯科技有限公司 Vehicle license plate recognition method and system based on multiscale stroke models
CN107292302A (en) * 2016-03-31 2017-10-24 高德信息技术有限公司 Detect the method and system of point of interest in picture
WO2019071660A1 (en) * 2017-10-09 2019-04-18 平安科技(深圳)有限公司 Bill information identification method, electronic device, and readable storage medium
CN108052937A (en) * 2017-12-28 2018-05-18 百度在线网络技术(北京)有限公司 Based on Weakly supervised character machining device training method, device, system and medium
CN108596180A (en) * 2018-04-09 2018-09-28 深圳市腾讯网络信息技术有限公司 Parameter identification, the training method of parameter identification model and device in image
CN109583449A (en) * 2018-10-29 2019-04-05 深圳市华尊科技股份有限公司 Character identifying method and Related product
CN109766879A (en) * 2019-01-11 2019-05-17 北京字节跳动网络技术有限公司 Generation, character detection method, device, equipment and the medium of character machining model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626244A (en) * 2020-05-29 2020-09-04 中国工商银行股份有限公司 Image recognition method, image recognition device, electronic equipment and medium
CN111626244B (en) * 2020-05-29 2023-09-12 中国工商银行股份有限公司 Image recognition method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN109146892B (en) Image clipping method and device based on aesthetics
RU2668717C1 (en) Generation of marking of document images for training sample
WO2019119966A1 (en) Text image processing method, device, equipment, and storage medium
US8965127B2 (en) Method for segmenting text words in document images
US8861884B1 (en) Training classifiers for deblurring images
CN108460396B (en) Negative sampling method and device
US8538164B2 (en) Image patch descriptors
US10311099B2 (en) Method and system for 3D model database retrieval
Dubská et al. Real-time precise detection of regular grids and matrix codes
US9025889B2 (en) Method, apparatus and computer program product for providing pattern detection with unknown noise levels
CN108765532B (en) Child drawing model building method, reading robot and storage device
CN111310759B (en) Target detection inhibition optimization method and device for dual-mode cooperation
WO2019020061A1 (en) Video dialogue processing method, video client, video server, and computer readable storage medium
US20150213331A1 (en) Emotion modification for image and video content
CN111836118B (en) Video processing method, device, server and storage medium
US20150055866A1 (en) Optical character recognition by iterative re-segmentation of text images using high-level cues
US20140169684A1 (en) Distance Metric for Image Comparison
US20220156897A1 (en) Method and apparatus for classifying fake images
CN115171138A (en) Method, system and equipment for detecting image text of identity card
CN110503105A (en) Character identifying method, training data acquisition methods, device and medium
WO2014176746A1 (en) Method and system for automatically capturing an object using a mobile terminal
JP2016012767A (en) Image processing system
US10558882B2 (en) Performing distance-based feature suppression
US10631050B2 (en) Determining and correlating visual context on a user device with user behavior using digital content on the user device
US10546218B2 (en) Method for improving quality of recognition of a single frame

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191126