A training method and device of a recognition network for recognizing Chinese in a scene
By training the recognition network with scene image samples synthesized from randomly generated and controlled corpus samples with uniform Chinese character frequency, and combining real semantic and scene data for multi-stage training, the long-tail distribution problem in Chinese scene text recognition is solved, and the recognition accuracy and generalization ability are improved.
Patent Information
- Application Number
- CN201910146791.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-02-27
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2039-02-27
AI Technical Summary
Existing deep learning models suffer from long-tail word problems in Chinese character recognition, resulting in poor recognition performance and an inability to effectively recognize low-frequency Chinese characters.
By randomly generating corpus samples of commonly used Chinese characters and synthesizing them with background images to form scene image samples, the recognition network is trained. The frequency of Chinese characters is controlled to be uniform, and multi-stage training is carried out by combining real semantic information and real scene image data.
It improves the accuracy of Chinese character recognition in various scenarios, especially for low-frequency Chinese characters, solves the long-tail distribution problem, and enhances the generalization ability of the recognition network.
Smart Images

Figure CN111626287B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image recognition, and in particular to a training method of a recognition network for recognizing Chinese in a scene, a training device of the recognition network, a computer storage medium, and a computing device. BACKGROUND
[0002] At present, deep learning technology is widely used in the field of graphics images. As a key link between electronic devices and the outside environment in life, OCR (Optical Character Recognition) is widely used in many application scenarios such as license plate recognition, street scene recognition, network image / video monitoring, etc. The introduction of deep learning has significantly improved the OCR recognition accuracy and promoted the commercialization of related technology products.
[0003] At present, the application of a scene text recognition model based on deep learning in English text recognition has been widely studied by domestic and foreign scholars, and good recognition results have been achieved. However, due to the characteristics of Chinese, such as no special interval between characters, rich number of characters, similar character shapes, and long-tail distribution of corpus, it is difficult to achieve the expected result by directly migrating the English recognition scheme to the Chinese environment for Chinese scene text recognition.
[0004] Therefore, there is an urgent need for a method that can improve the long-tail word problem of Chinese scene text recognition and thus improve the recognition effect of Chinese text in a scene. SUMMARY
[0005] In view of the above problems, the present application is proposed in order to provide a training method of a recognition network for recognizing Chinese in a scene, a training device of the recognition network, a computer storage medium, and a computing device that overcome the above problems or at least partially solve the above problems.
[0006] According to an aspect of an embodiment of the present application, a training method of a recognition network for recognizing Chinese in a scene is provided, comprising:
[0007] randomly generating a first corpus sample using commonly used Chinese characters;
[0008] synthesizing the first corpus sample and a first background image to obtain a first synthesized scene image sample containing a Chinese character region;
[0009] training the recognition network for recognizing Chinese in a scene using the first synthesized scene image sample.
[0010] Optionally, in the first corpus sample, the frequency of occurrence of each Chinese character is controllable.
[0011] Optionally, in the first corpus sample, the occurrence frequency of all Chinese characters is controlled to be equal.
[0012] Optionally, before the first corpus sample is randomly generated by using commonly used Chinese characters, the method further comprises:
[0013] obtaining the commonly used Chinese characters from a codebook for Chinese character input.
[0014] Optionally, the method further comprises:
[0015] obtaining a corpus with real semantic information;
[0016] synthesizing the corpus with real semantic information and a second background image to obtain a second synthesized scene image sample containing a Chinese character region;
[0017] training the recognition network by using the second synthesized scene image sample.
[0018] Optionally, the first background image is the same as the second background image.
[0019] Optionally, obtaining a corpus with real semantic information comprises:
[0020] cutting a specific length of characters from a text material containing natural semantics as the corpus with real semantic information.
[0021] Optionally, the method further comprises:
[0022] obtaining real scene image data;
[0023] adjusting parameters of the recognition network by using the real scene image data.
[0024] Optionally, obtaining real scene image data comprises:
[0025] annotating a real scene image and cropping a Chinese character region in the real scene image.
[0026] Optionally, the recognition network is used for recognizing Chinese in a natural scene.
[0027] According to another aspect of the embodiment of the present application, a training device of a recognition network for recognizing Chinese in a scene is also provided, comprising:
[0028] a random corpus generation module adapted to randomly generate a first corpus sample by using commonly used Chinese characters;
[0029] an image sample synthesis module adapted to synthesize the first corpus sample and a first background image to obtain a first synthesized scene image sample containing a Chinese character region; and
[0030] An identification network training module is adapted to train an identification network for identifying Chinese characters in a scene by using the first synthesized scene image sample.
[0031] Optionally, in the first corpus sample, the occurrence frequency of each Chinese character is controllable.
[0032] Optionally, in the first corpus sample, the occurrence frequency of all Chinese characters is controlled to be equal.
[0033] Optionally, the random corpus generation module is further adapted to:
[0034] Before the first corpus sample is randomly generated by using commonly used Chinese characters, the commonly used Chinese characters are obtained from a codebook for Chinese character input.
[0035] Optionally, the apparatus further comprises:
[0036] A real corpus obtaining module is adapted to obtain a corpus with real semantic information.
[0037] The image sample synthesizing module is further adapted to:
[0038] The corpus with real semantic information is synthesized with a second background image to obtain a second synthesized scene image sample containing a Chinese character region.
[0039] The identification network training module is further adapted to:
[0040] The identification network is trained by using the second synthesized scene image sample.
[0041] Optionally, the first background image is the same as the second background image.
[0042] Optionally, the real corpus obtaining module is further adapted to:
[0043] Text materials with natural semantics are intercepted as the corpus with real semantic information.
[0044] Optionally, the apparatus further comprises:
[0045] A real scene data obtaining module is adapted to obtain real scene image data; and
[0046] An identification network adjusting module is adapted to adjust parameters of the identification network by using the real scene image data.
[0047] Optionally, the real scene data obtaining module is further adapted to:
[0048] Real scene images are labeled, and Chinese character regions in the real scene images are cropped.
[0049] Optionally, the recognition network is configured to recognize Chinese in a natural scene.
[0050] According to a further aspect of the embodiments of the present application, a computer storage medium is also provided, which stores computer program codes, when the computer program codes are run on a computing device, causing the computing device to execute the training method of the recognition network for recognizing Chinese in a scene according to any one of the above.
[0051] According to a further aspect of the embodiments of the present application, a computing device is also provided, which comprises:
[0052] a processor; and
[0053] a memory storing computer program codes;
[0054] when the computer program codes are run by the processor, causing the computing device to execute the training method of the recognition network for recognizing Chinese in a scene according to any one of the above.
[0055] The training method and device of the recognition network for recognizing Chinese in a scene according to the embodiments of the present application, by utilizing commonly used Chinese characters to randomly generate corpus samples and synthesizing the obtained corpus samples with background images to obtain synthetic scene image samples containing Chinese character regions, and then utilizing the synthetic scene image samples to train the recognition network. Since in natural corpus information, only a small part of commonly used Chinese characters will frequently appear, and other Chinese characters will rarely or even not appear (i.e. so-called long-tail distribution), if natural corpus information materials are utilized to train the recognition network, it is impossible to obtain good recognition effect for Chinese characters with low frequency in the corpus. However, in the randomly generated corpus samples, the appearance probability of commonly used Chinese characters tends to be uniform, and then when the recognition network is trained by utilizing the scene image samples synthesized based on the randomly generated corpus samples, the recognition network can see the frequency of all commonly used Chinese characters tends to be consistent, thereby to a certain extent, solving the long-tail distribution problem of Chinese characters and improving the recognition effect of Chinese characters in the scene.
[0056] Further, by controlling the appearance frequency of each Chinese character in the randomly synthesized corpus samples, especially controlling the appearance frequency of all Chinese characters to be equal, the long-tail distribution problem of Chinese characters is further effectively solved.
[0057] Further, after the first stage training of the recognition network by using the scene image samples synthesized based on the randomly generated corpus samples, the second stage training of the recognition network by using the scene image samples synthesized based on the corpus with real semantic information can be further performed, and finally the fine tuning of the recognition network by using the real scene image data can be performed. Through the multi-stage training strategy, the generalization ability of the recognition network and the recognition effect of the Chinese characters in the scene are further improved. The above description is only a summary of the technical scheme of the present application. In order to enable one skilled in the art to better understand the technical means of the present application, the contents of the specification can be implemented, and in order to enable the above and other purposes, characteristics and advantages of the present application to be more apparent and easy to understand, the specific embodiments of the present application are described below.
[0058] The above and other objects, advantages and features of the present application will become more apparent from the following detailed description of specific embodiments thereof, when taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0059] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a better understanding of the preferred embodiments, and are not to be considered limitations of the present application. Furthermore, in the accompanying drawings, like reference numerals refer to same components throughout the several views. In the drawings:
[0060] Figure 1 a flow chart of a training method of a recognition network for recognizing Chinese in a scene according to an embodiment of the present application is shown;
[0061] Figure 2 a flow chart of a training method of a recognition network for recognizing Chinese in a scene according to another embodiment of the present application is shown;
[0062] Figure 3 a structural schematic diagram of a training device of a recognition network for recognizing Chinese in a scene according to an embodiment of the present application is shown; and
[0063] Figure 4 a structural schematic diagram of a training device of a recognition network for recognizing Chinese in a scene according to another embodiment of the present application is shown. DETAILED DESCRIPTION
[0064] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the present disclosure are shown. Like reference numerals can be used to refer to like elements throughout the several figures of the drawings. It is to be noted that the exemplary embodiments can be implemented in various forms of hardware, software, or combinations thereof; and several of the exemplary embodiments can be implemented in one or more computing devices. Furthermore, the exemplary embodiments can be implemented by any type of hardware system or component of a computing device. Hence, the disclosed embodiments are not intended to be limited to the depicted examples and any implementation that is within the scope of the present disclosure can also be implemented.
[0065] The current mainstream scene text recognition scheme is to use a CRNN (Convolutional Recurrent Neural Network) to extract features of an image text region, which combines the extraction of spatial feature information of text in an image by a CNN (Convolutional Neural Network) and the encoding ability of time sequence information by an RNN (Recurrent Neural Network). Then, a CTC (Connectionist Temporal Classification) network is used to decode the encoding result of the text region to obtain corresponding text information.
[0066] In this field, English text recognition is widely studied by domestic and foreign scholars, and several recognition schemes are proposed, and good recognition results are obtained. For the English scene, there are only 26 English letters, and even if numbers are added, the total number is only dozens. And there is a space between each word of English. However, for the Chinese scene, Chinese characters are displayed in square, and the distinction between words is not obvious (especially in the case of similar character shapes), and there is no obvious space gap. In particular, although there are about 5000-6000 commonly used Chinese characters, in natural corpus (for example, a book), usually 80% of the text appears in the first few hundred characters with high frequency, and the other thousands of characters rarely appear, which is the so-called long-tail distribution of Chinese characters. In summary, the Chinese scene text recognition has the characteristics of no special interval between characters, rich number of characters, similar character shapes, and long-tail distribution of corpus, so the English recognition scheme is difficult to directly migrate to the Chinese environment to achieve the expected result.
[0067] To solve the above technical problems, an embodiment of the present application proposes a training method of a recognition network for recognizing Chinese in a scene. Figure 1 A flowchart of the training method of the recognition network for recognizing Chinese in a scene is shown according to an embodiment of the present application. Referring to Figure 1 The method can at least include the following steps S102 to S106.
[0068] Step S102, randomly generating a first corpus sample using commonly used Chinese characters.
[0069] Step S104, synthesizing the first corpus sample and a first background image to obtain a first synthesized scene image sample containing a Chinese text region.
[0070] Step S106, training the recognition network for recognizing Chinese in a scene using the first synthesized scene image sample.
[0071] In the embodiment of the present application, the recognition network is a deep learning network, adopts the architecture of CRNN combined with CTC, and mainly recognizes Chinese characters in a natural scene.
[0072] The training method and device of the recognition network for recognizing Chinese in a scene provided in the embodiment of the present application synthesize a synthetic scene image sample containing a Chinese character region by using commonly used Chinese characters to randomly generate a corpus sample and synthesizing the obtained corpus sample with a background image, and then train the recognition network by using the synthetic scene image sample. Since the occurrence probability of commonly used Chinese characters in the randomly generated corpus sample tends to be uniform, when the recognition network is trained by using the scene image sample synthesized based on the randomly generated corpus sample, the frequency of all commonly used Chinese characters seen by the recognition network is also consistent, thereby to a certain extent solving the long-tail distribution problem of Chinese characters and improving the recognition effect of Chinese characters in a scene.
[0073] In step S102 above, the first corpus sample is generated by randomly combining commonly used Chinese characters. In order to make the distribution of Chinese characters in the generated corpus sample tend to be uniform, a sufficient number of commonly used Chinese characters can be used, for example, 5000-6000 commonly used Chinese characters.
[0074] Optionally, the commonly used Chinese characters can be obtained from a codebook for Chinese character input (for example, the codebook of Sogou Chinese character input method). Preferably, the commonly used Chinese characters with high usage frequency in the codebook are selected.
[0075] In a preferred embodiment, in order to further solve the problem of long-tail distribution of corpus, the occurrence frequency of each Chinese character in the randomly generated first corpus sample can be controlled so that the distribution of characters in the corpus meets the needs.
[0076] Further, the occurrence frequency of all Chinese characters in the first corpus sample is controlled to be equal, thereby realizing the uniform distribution of Chinese characters in the corpus.
[0077] In step S104 above, the first background image can be an image of a real scene without characters, and the first synthetic scene image sample is obtained by fusing the first corpus sample into the first background image.
[0078] Further, in step S106, the obtained first synthetic scene image sample is used to train the recognition network, so that in the training process, the frequency of all commonly used Chinese characters seen by the recognition network is consistent, thereby realizing more optimal and accurate recognition effect of Chinese characters (especially Chinese characters with low usage frequency) when the trained recognition network is used to recognize Chinese in a scene.
[0079] In an optional embodiment of the present application, after the recognition network is trained by using the first synthesized scene image sample based on the randomly generated first corpus sample, the following steps can be further performed:
[0080] First, a corpus with real semantic information is obtained. Then, the corpus with real semantic information is synthesized with a second background image to obtain a second synthesized scene image sample containing a Chinese character region. Finally, the recognition network is trained by using the second synthesized scene image sample.
[0081] By training the recognition network by using the scene image sample synthesized based on the randomly generated corpus sample (referred to as first stage training) and then training the recognition network by using the scene image sample synthesized based on the corpus with real semantic information (referred to as second stage training), the effect of Chinese recognition can be further improved.
[0082] Optionally, in order to simplify the synthesis of the scene image sample and the training operation of the recognition network, the second background image can adopt the same real scene image as the first background image.
[0083] In actual application, there can be multiple ways to obtain the corpus with real semantic information. For example, a specific length of characters can be extracted from a text material containing natural semantics as the corpus with real semantic information. The text material can be, for example, news, books, etc.
[0084] In an optional embodiment of the present application, after the recognition network is trained by using the first synthesized scene image sample based on the randomly generated first corpus sample, or after the recognition network is trained by using the second synthesized scene image sample based on the corpus with real semantic information, the following steps can be further performed:
[0085] Real scene image data is obtained, and then the recognition network is adjusted in parameters by using the real scene image data.
[0086] Further, the real scene image data can be obtained by the following way:
[0087] The real scene image is labeled, and the Chinese character region in the real scene image is cropped.
[0088] By using the dataset of real scene images containing Chinese to fine-tune the parameters of the recognition network, the generalization ability of the recognition network is improved, and thus the effect of Chinese character recognition is further improved.
[0089] The above introduces Figure 1The implementation of the training method of the recognition network for recognizing Chinese in a scene will be described in detail below through specific embodiments.
[0090] Figure 2 A flowchart of the training method of the recognition network for recognizing Chinese in a scene according to an embodiment of the present application is shown. In this embodiment, the recognition network is a deep learning network, and the architecture of CRNN combined with CTC is adopted. Referring to Figure 2 As shown, the method can include the following steps S202 to S216.
[0091] Step S202, obtaining commonly used Chinese characters from a codebook for Chinese character input, and randomly generating a first corpus sample using the commonly used Chinese characters, wherein the occurrence frequency of all Chinese characters in the first corpus sample is controlled to be equal.
[0092] Step S204, synthesizing the first corpus sample and a first background image to obtain a first synthesized scene image sample containing a Chinese character region.
[0093] Step S206, performing first-stage training on the recognition network for recognizing Chinese in a natural scene using the first synthesized scene image sample.
[0094] Step S208, extracting a specific length of text from text material containing natural semantics as a corpus with real semantic information.
[0095] The text material is, for example, news material, books, etc.
[0096] Step S210, synthesizing the corpus with real semantic information and a second background image to obtain a second synthesized scene image sample containing a Chinese character region, wherein the second background image is the same as the first background image.
[0097] Step S212, performing second-stage training on the recognition network using the second synthesized scene image sample.
[0098] Step S214, annotating a real scene image and cropping a Chinese character region in the real scene image to obtain a real scene image dataset.
[0099] Step S216, performing parameter fine-tuning on the recognition network using the real scene image dataset.
[0100] In this embodiment, through the multi-stage training strategy, the long-tail word problem of Chinese scene text recognition is effectively improved, and the recognition effect of Chinese text in a natural scene is improved.
[0101] Based on the same inventive concept, the embodiment of the present application further provides a training device for the recognition network for recognizing Chinese in a scene, which is used to support the training method for the recognition network for recognizing Chinese in a scene provided by any one of the above-mentioned embodiments or the combination thereof. Figure 3 The structural schematic diagram of the training device 300 for the recognition network for recognizing Chinese in a scene according to an embodiment of the present application is shown. Referring to Figure 3 The device 300 can at least include a random corpus generation module 310, an image sample synthesis module 320 and a recognition network training module 330.
[0102] Now the functions of each component or device of the training device 300 for the recognition network for recognizing Chinese in a scene according to the embodiment of the present application and the connection relationship between the parts are introduced:
[0103] The random corpus generation module 310 is adapted to randomly generate the first corpus sample by using commonly used Chinese characters.
[0104] The image sample synthesis module 320 is connected with the random corpus generation module 310 and is adapted to synthesize the first corpus sample and the first background image to obtain the first synthesized scene image sample containing the Chinese character region.
[0105] The recognition network training module 330 is connected with the image sample synthesis module 320 and is adapted to train the recognition network for recognizing Chinese in a scene by using the first synthesized scene image sample.
[0106] In an optional embodiment of the present application, the occurrence frequency of each Chinese character in the obtained first corpus sample is controllable.
[0107] Further, in the obtained first corpus sample, the occurrence frequencies of all Chinese characters are controlled to be equal.
[0108] In an optional embodiment of the present application, the random corpus generation module 310 is further adapted to:
[0109] Before randomly generating the first corpus sample by using commonly used Chinese characters, the commonly used Chinese characters are obtained from a codebook for Chinese character input.
[0110] In an optional embodiment of the present application, as Figure 4 shown, Figure 3The training apparatus 300 for the recognition network for recognizing Chinese in a scene as shown can further include a real corpus obtaining module 340. The real corpus obtaining module 340 can be connected with the image sample synthesizing module 320 and adapted to obtain a corpus with real semantic information. Accordingly, the image sample synthesizing module 320 is further adapted to synthesize the corpus with real semantic information and the second background image to obtain a second synthesized scene image sample containing a Chinese character region. The recognition network training module 330 is further adapted to train the recognition network by using the second synthesized scene image sample.
[0111] In an optional embodiment of the present application, the first background image is the same as the second background image.
[0112] In an optional embodiment of the present application, the real corpus obtaining module 340 is further adapted to:
[0113] cutting a character of a specific length from a text material with natural semantics as the corpus with real semantic information.
[0114] In an optional embodiment of the present application, still referring to Figure 4 The training apparatus 300 for the recognition network for recognizing Chinese in a scene as shown can further include a real scene data obtaining module 350 and a recognition network adjusting module 360. The real scene data obtaining module 350 is adapted to obtain real scene image data. The recognition network adjusting module 360 can be connected with the real scene data obtaining module 350 and the recognition network training module 330 respectively and adapted to adjust parameters of the recognition network by using the real scene image data.
[0115] In an optional embodiment of the present application, the real scene data obtaining module 350 is further adapted to:
[0116] annotating the real scene image and cutting out a Chinese character region in the real scene image.
[0117] In an optional embodiment of the present application, the recognition network is used for recognizing Chinese in a natural scene.
[0118] Based on the same inventive concept, the embodiments of the present application further provide a computer storage medium. The computer storage medium stores computer program codes, which, when executed on a computing device, cause the computing device to perform the training method of the recognition network for recognizing Chinese in a scene according to any one of the above embodiments or a combination thereof.
[0119] Based on the same inventive concept, the embodiments of the present application further provide a computing device. The computing device can include:
[0120] a processor; and
[0121] a memory storing computer program code;
[0122] When the computer program code is run by the processor, the computer program code causes the computer device to perform the training method of the recognition network for recognizing Chinese in a scene according to any one of the above embodiments or a combination thereof.
[0123] According to any one of the above optional embodiments or a combination of multiple optional embodiments, the embodiments of the present application can achieve the following beneficial effects:
[0124] The training method and device of the recognition network for recognizing Chinese in a scene provided by the embodiments of the present application can generate random corpus samples by using commonly used Chinese characters, synthesize the obtained corpus samples with background images to obtain synthesized scene image samples containing Chinese character regions, and then train the recognition network by using the synthesized scene image samples. Since in natural corpus information, only a small part of commonly used Chinese characters usually appear frequently, and other Chinese characters rarely or even do not appear (i.e. so-called long-tail distribution), if the natural corpus information material is used to train the recognition network, it is impossible to obtain good recognition effect for Chinese characters with low appearance frequency in the corpus. However, in the random corpus samples, the appearance probability of commonly used Chinese characters tends to be uniform, and when the recognition network is trained by using the scene image samples synthesized based on the random corpus samples, the recognition network can see the frequency of all commonly used Chinese characters tends to be consistent, thereby solving the long-tail distribution problem of Chinese characters to some extent and improving the recognition effect of Chinese characters in a scene.
[0125] Further, by controlling the appearance frequency of each Chinese character in the randomly synthesized corpus samples, especially by controlling the appearance frequency of all Chinese characters to be equal, the long-tail distribution problem of Chinese characters is further effectively solved.
[0126] Further, after the first stage training of the recognition network by using the scene image samples synthesized based on the random corpus samples, the second stage training of the recognition network by using the scene image samples synthesized based on corpus with real semantic information can be performed, and finally the fine tuning of the recognition network by using real scene image data can be performed. Through this multi-stage training strategy, the generalization ability of the recognition network and the recognition effect of Chinese characters in a scene are further improved.
[0127] Those skilled in the art can clearly understand the specific working process of the above-described system, device and unit, which can refer to the corresponding process in the foregoing method embodiments, and for the sake of brevity, no further description is given here.
[0128] In addition, each function unit in each embodiment of the present application can be physically independent of each other, or two or more function units can be integrated together, or all function units can be integrated in one processing unit. The integrated function unit can be realized in the form of hardware or in the form of software or firmware.
[0129] Those skilled in the art can understand that the integrated function unit, if realized in the form of software and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or all or part of the technical solutions. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computing device (such as a personal computer, a server, or a network device) to execute all or part of the steps of the method described in each embodiment of the present application when the instructions are executed. The storage medium mentioned above includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0130] Alternatively, all or part of the steps of the foregoing method embodiments can be completed by program instruction related hardware (such as a computing device of a personal computer, a server, or a network device), and the program instruction can be stored in a computer readable storage medium. When the program instruction is executed by the processor of the computing device, the computing device executes all or part of the steps of the method described in each embodiment of the present application.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that within the spirit and principles of the present application, the technical solutions recorded in the foregoing embodiments can still be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not cause the corresponding technical solutions to deviate from the protection scope of the present application.
Claims
1. A method for training a recognition network for recognizing Chinese in a scene, comprising: generating a first corpus sample randomly using commonly used Chinese characters, wherein in the first corpus sample, the frequency of occurrence of each Chinese character is controlled to be equal; synthesizing the first corpus sample with a first background image to obtain a first synthesized scene image sample containing a Chinese character region; performing first stage training of the recognition network for recognizing Chinese in a scene using the first synthesized scene image sample; wherein the method further comprises: obtaining a corpus with real semantic information; synthesizing the corpus with real semantic information with a second background image to obtain a second synthesized scene image sample containing a Chinese character region; performing second stage training of the recognition network using the second synthesized scene image sample; wherein the method further comprises: annotating a real scene image and cropping a Chinese character region in the real scene image; fine-tuning parameters of the recognition network after the second stage training using a dataset of real scene images containing Chinese.
2. The method of claim 1, wherein, Before generating the first corpus sample randomly using commonly used Chinese characters, the method further comprises: obtaining the commonly used Chinese characters from a codebook for Chinese character input.
3. The method of claim 1, wherein, The first background image is the same as the second background image.
4. The method of claim 1, wherein, Obtaining a corpus with real semantic information comprises: extracting a text of a specific length from a text material containing natural semantics as the corpus with real semantic information.
5. The method of any one of claims 1-4, wherein, The recognition network is used for recognizing Chinese in a natural scene. 6.A device for training a recognition network for recognizing Chinese in a scene, comprising: a random corpus generation module adapted to generate a first corpus sample randomly using commonly used Chinese characters, wherein in the first corpus sample, the frequency of occurrence of each Chinese character is controlled to be equal; an image sample synthesis module adapted to synthesize the first corpus sample with a first background image to obtain a first synthesized scene image sample containing a Chinese character region; and a recognition network training module adapted to perform first stage training of the recognition network for recognizing Chinese in a scene using the first synthesized scene image sample; wherein the device further comprises: a real corpus obtaining module adapted to obtain a corpus with real semantic information; the image sample synthesis module is further adapted to: synthesize the corpus with real semantic information with a second background image to obtain a second synthesized scene image sample containing a Chinese character region; the recognition network training module is further adapted to: perform second stage training of the recognition network using the second synthesized scene image sample; the recognition network training module is further adapted to:
7. The apparatus of claim 6, wherein, annotate a real scene image and crop a Chinese character region in the real scene image; and fine-tune parameters of the recognition network after the second stage training using a dataset of real scene images containing Chinese. the random corpus generation module is further adapted to:
8. The apparatus of claim 6, wherein, before generating the first corpus sample randomly using commonly used Chinese characters, obtain the commonly used Chinese characters from a codebook for Chinese character input.
9. The apparatus of claim 6, wherein, The first background image is the same as the second background image. the real corpus obtaining module is further adapted to: cutting a text of a specific length from a text material containing natural semantics as the corpus with real semantic information.
10. The apparatus of any one of claims 6-9, wherein, The recognition network is used for recognizing Chinese in a natural scene. 11.A computer storage medium storing computer program codes, when the computer program codes are run on a computing device, causing the computing device to execute the training method of the recognition network for recognizing Chinese in a scene according to any one of claims 1-5. 12.A computing device, comprising: a processor; and a memory storing computer program codes; when the computer program codes are run by the processor, causing the computing device to execute the training method of the recognition network for recognizing Chinese in a scene according to any one of claims 1-5.
Citation Information
Patent Citations
Method for recognizing Chinese characters in natural scene
CN106022363A
A text recognition method and device of an ID card image based on depth learning
CN109034050A
A method and apparatus for generating an image recognition model
CN109214386A
Chinese character recognition method for deep matching of templates by introducing font library character image
CN111950548A
Image character language recognition method and system
CN114998909A