Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

General text OCR training data generation method and system

A technology of training data and text, applied in the field of text recognition, can solve problems such as large changes in placement angle, poor recognition effect, blurred text, etc., and achieve the effect of ingenious calculation process, fast generation speed, and simple judgment

Inactive Publication Date: 2022-08-05
HEFEI HIGH DIMENSIONAL DATA TECH CO LTD
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, the general OCR field involves many and complex scenes, mainly reflected in the fact that the placement angle of the text line in the image varies greatly in different scenes (horizontal, vertical, oblique and other angles); the background image is becoming more and more complex ( Various patterns, color mixtures and other complex backgrounds); the picture contains a mixture of text with various fonts, which makes the existing data generation algorithm fail to meet the requirements
Specifically, the existing methods have the following problems: First, the existing data generation algorithm mainly solves the training data generation of horizontal text, and does not generate vertical text and text data with a large oblique angle, resulting in such data (such as name plaques, billboards, etc.) are poorly recognized in actual scenes; second, the background of existing data generation algorithms is a specific scene picture background or a single solid color background, including various patterns in general scene tasks, The image recognition effect under complex backgrounds such as mixed colors is very poor; third, the existing data generation algorithm fonts use specific fonts or specified fonts, and mix multiple fonts in data images (such as web page screenshots, billboards, etc.) The picture recognition effect of the situation is very poor; Fourth, when the picture and text are fused, the color difference algorithm is used to determine the text color and background color. Most of the current data contain complex backgrounds and texts of various colors, and the text color and background color The color has a good contrast. The color difference algorithm is suitable for blending pictures with a single-color background. The contrast between the text and the background in the picture generated by the complex background is very poor, resulting in blurred text and poor recognition effect.
[0005] Through the above scheme, although the generation of OCR training data can be realized, the speed of generating data sets is very slow due to the selection of text colors through complex algorithms.
For the model to be trained, the number of data set samples used for training is often hundreds of thousands or millions. It takes a lot of time to generate training samples through the above algorithm

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • General text OCR training data generation method and system
  • General text OCR training data generation method and system
  • General text OCR training data generation method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] Combine below Figure 1 to Figure 5 , the present invention is described in further detail.

[0017] see figure 1 The invention discloses a training data generation method for general text OCR, comprising the following steps: S100, randomly selecting characters in a corpus, font types and sizes in a font library to obtain text information; S200, randomly selecting a background in a background library image, and determine whether the RGB mean pix_mean of the background image is greater than or equal to the threshold k, , if so, go to the next step, otherwise randomly select the background image again; S300, calculate the value range of the character color according to the RGB mean value pix_mean of the background image , and randomly select the character color font_color that satisfies the value range from the color library; S400, fit the text information on the background image according to the selected character color font_color to obtain the first text image, assu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention particularly relates to a universal text OCR training data generation method. The method comprises the following steps of S100, randomly selecting characters in a corpus and font types and sizes in a font library to obtain text information; s200, randomly selecting a background image in a background library, and judging whether the RGB mean value of the background image is greater than or equal to a threshold value or not; s300, calculating the value range of character colors according to the RGB mean value of the background image, and randomizing the character colors; s400, fitting the text information on the background image according to the selected character color to obtain a first text image; and S500, performing data enhancement on the first text image to obtain a second text image, wherein the second text image and a label thereof form training data. In the method, the process of selecting the character colors is very ingenious, only simple judgment, addition and subtraction are needed, and the consumed time is very short; therefore, the generation speed of the training data is very fast, and the speed increase is very obvious.

Description

technical field [0001] The invention relates to the technical field of text recognition methods, in particular to a method and system for generating training data for general text OCR. Background technique [0002] With the development of machine learning and deep learning, in the field of Optical Character Recognition (OCR), the deep learning algorithm is continuously updated and the learning ability is continuously improved. Since deep learning is driven by data, a large amount of data is generated by combining data generation algorithms. , a good recognition effect can be obtained. [0003] However, the general OCR field involves many and very complex scenarios, mainly reflected in the fact that the placement angles of text lines in images vary greatly in different scenarios (horizontal, vertical, oblique, etc.); background images are becoming more and more complex ( Complex backgrounds such as various patterns, color mixing, etc.); the pictures contain text mixtures of ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06V20/62G06V30/413G06V10/24G06V10/32G06V10/764G06K9/62G06N20/00
CPCG06V20/62G06V30/413G06V10/24G06V10/32G06V10/764G06N20/00G06F18/00
Inventor 田辉鲁国峰郭玉刚张志翔
Owner HEFEI HIGH DIMENSIONAL DATA TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products