CN110889469A - Image processing method and device, electronic equipment and storage medium - Google Patents

Image processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110889469A
CN110889469A CN201911337804.XA CN201911337804A CN110889469A CN 110889469 A CN110889469 A CN 110889469A CN 201911337804 A CN201911337804 A CN 201911337804A CN 110889469 A CN110889469 A CN 110889469A
Authority
CN
China
Prior art keywords
text
network
image
processing
text image
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.)
Granted
Application number
CN201911337804.XA
Other languages
Chinese (zh)
Other versions
CN110889469B (en
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.)
Beijing Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development 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 Beijing Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Publication of CN110889469A publication Critical patent/CN110889469A/en
Application granted granted Critical
Publication of CN110889469B publication Critical patent/CN110889469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4046Scaling the whole image or part thereof using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4053Super resolution, i.e. output image resolution higher than sensor resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • 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

The present disclosure relates to an image processing method and apparatus, an electronic device, and a storage medium, the method including: acquiring an original text image; and performing image quality enhancement processing on the original text image through a generating network to obtain an enhanced text image, wherein the generating network is obtained by performing auxiliary training based on a first text recognition network. The embodiment of the disclosure can improve the image quality of the original text image, and further improve the text recognition precision.

Description

Image processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an image processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of related technologies, text recognition is widely used. Text recognition can be applied in many important areas, for example: reading comprehension, invoice recognition, license plate recognition, visual question answering and the like. However, the accuracy of text recognition is highly correlated with image quality, and text recognition accuracy is low for images with poor image quality, for example, images with low resolution, broken images, stained images, corroded images, images with scratches, and the like.
Disclosure of Invention
The disclosure provides an image processing method and device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided an image processing method including: acquiring an original text image; and performing image quality enhancement processing on the original text image through a generating network to obtain an enhanced text image, wherein the generating network is obtained by performing auxiliary training based on a first text recognition network.
In one possible implementation, the image quality enhancement process includes a text repair process.
In one possible implementation, the generation network includes at least one first convolutional layer with a step size greater than 1, at least one second convolutional layer with a step size of 1, and at least one deconvolution layer; the quality enhancement processing is performed on the original text image through the generation network to obtain an enhanced text image, and the method comprises the following steps: carrying out down-sampling processing on the original text image through the at least one first convolution layer to obtain a down-sampling result; performing convolution processing on the downsampling result through the at least one second convolution layer to obtain a convolution result; and performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
In one possible implementation, the image processing includes super-resolution processing, wherein a resolution of the enhanced text image is higher than a resolution of the original text image.
In one possible implementation, the generation network includes at least one second convolutional layer and at least one deconvolution layer with a step size of 1; the quality enhancement processing is performed on the original text image through the generation network to obtain an enhanced text image, and the method comprises the following steps: performing convolution processing on the original text image through the at least one second convolution layer to obtain a convolution result; and performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
In a possible implementation manner, the training sample of the generated network includes the original text image and corresponding labeled text information; the method further comprises the following steps: performing text recognition processing on the enhanced text image by using the first text recognition network to obtain a first text recognition result; and adjusting the network parameters of the generated network based on the difference between the labeled text information and the first text recognition result.
In a possible implementation manner, the training sample further includes a reference text image corresponding to the original text image; the method further comprises the following steps: adjusting network parameters of the generated network according to a difference between the reference text image and the enhanced text image.
In a possible implementation manner, the generated network is obtained by performing auxiliary training based on the first text recognition network and the discriminant network.
In one possible implementation, the method further includes: and performing text recognition processing on the enhanced text image by using a second text recognition network to obtain a second text recognition result.
According to an aspect of the present disclosure, there is provided an image processing apparatus including: the acquisition module is used for acquiring an original text image; and the image processing module is used for performing image quality enhancement processing on the original text image through a generation network to obtain an enhanced text image, wherein the generation network is obtained by performing auxiliary training based on a first text recognition network.
In one possible implementation, the image quality enhancement process includes a text repair process.
In one possible implementation, the generation network includes at least one first convolutional layer with a step size greater than 1, at least one second convolutional layer with a step size of 1, and at least one deconvolution layer; the image processing module comprises: the down-sampling sub-module is used for carrying out down-sampling processing on the original text image through the at least one first convolution layer to obtain a down-sampling result; the convolution submodule is used for performing convolution processing on the downsampling result through the at least one second convolution layer to obtain a convolution result; and the up-sampling sub-module is used for performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
In one possible implementation, the image processing includes super-resolution processing, wherein a resolution of the enhanced text image is higher than a resolution of the original text image.
In one possible implementation, the generation network includes at least one second convolutional layer and at least one deconvolution layer with a step size of 1; the image processing module comprises: the convolution submodule is used for performing convolution processing on the original text image through the at least one second convolution layer to obtain a convolution result; and the up-sampling sub-module is used for performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
In a possible implementation manner, the training sample of the generated network includes the original text image and corresponding labeled text information; the device further comprises: the first text recognition module is used for performing text recognition processing on the enhanced text image by using the first text recognition network to obtain a first text recognition result; and the first parameter adjusting module is used for adjusting the network parameters of the generated network based on the difference between the labeled text information and the first text recognition result.
In a possible implementation manner, the training sample further includes a reference text image corresponding to the original text image; the device further comprises: and the second parameter adjusting module is used for adjusting the network parameters of the generated network according to the difference between the reference text image and the enhanced text image.
In a possible implementation manner, the generated network is obtained by performing auxiliary training based on the first text recognition network and the discriminant network.
In one possible implementation, the apparatus further includes: and the second text recognition module is used for performing text recognition processing on the enhanced text image by using a second text recognition network to obtain a second text recognition result.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
In the embodiment of the disclosure, the original text image is acquired, the generated network obtained by performing the auxiliary training based on the first text recognition network is used to perform the image quality enhancement processing on the original text image, so as to obtain the enhanced text image, thereby improving the image quality of the original text image and further improving the text recognition accuracy.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 shows a flow diagram of an image processing method of an embodiment of the present disclosure;
FIG. 2 illustrates a schematic diagram of a structure of a generation network according to an embodiment of the disclosure;
FIG. 3 illustrates a schematic diagram of a structure of a generation network according to an embodiment of the disclosure;
fig. 4 shows a block diagram of an image processing apparatus of an embodiment of the present disclosure;
FIG. 5 illustrates a block diagram of an electronic device of an embodiment of the disclosure;
fig. 6 illustrates a block diagram of an electronic device of an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flowchart of an image processing method of an embodiment of the present disclosure. The image processing method may be performed by a terminal device or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. The other processing devices may be servers or cloud servers, etc. In some possible implementations, the image processing method may be implemented by a processor calling computer readable instructions stored in a memory. It should be understood that the image processing method may be applied to an inference phase for performing image quality enhancement processing on an image by using a generation network, and may also be applied to a training phase for training the generation network, which is not specifically limited in this disclosure. As shown in fig. 1, the method may include:
in step S11, an original text image is acquired.
And step S12, performing image quality enhancement processing on the original text image through a generating network to obtain an enhanced text image, wherein the generating network is obtained by performing auxiliary training based on the first text recognition network.
After the original text image is obtained, the original text image is subjected to image quality enhancement processing through a generating network obtained by performing auxiliary training based on the first text recognition network to obtain an enhanced text image, so that the image quality of the original text image can be improved, and the text recognition accuracy can be improved.
The generating network and the first text recognition network may be a neural network or other network models that can implement corresponding processing, and this disclosure is not limited thereto.
In one possible implementation, the image quality enhancement process includes a text repair process.
Under the condition that text information in the original text image is missing (for example, the original text image is a damaged image, a stained image, a corroded image, a scratched image and the like), the original text image can be subjected to text restoration processing through a generation network, so that an enhanced text image with text information integrity higher than that of the original text image is obtained, and the image quality of the original text image is improved.
In one possible implementation, the generation network includes at least one first convolutional layer with a step size greater than 1, at least one second convolutional layer with a step size of 1, and at least one deconvolution layer; carrying out image quality enhancement processing on the original text image through a generation network to obtain an enhanced text image, wherein the image quality enhancement processing comprises the following steps: carrying out down-sampling processing on the original text image through at least one first convolution layer to obtain a down-sampling result; performing convolution processing on the downsampling result through at least one second convolution layer to obtain a convolution result; and performing up-sampling processing on the convolution result through at least one deconvolution layer to obtain an enhanced text image.
Fig. 2 shows a schematic structural diagram of a generation network according to an embodiment of the present disclosure. As shown in fig. 2, the generation network may include a first convolutional layer (Conv layer) 201 with a step size greater than 1, an active layer (ReLU layer) 202, a plurality of residual modules 203, a deconvolution layer (DeConv layer) 204, an active layer (ReLU layer) 205, a deconvolution layer (DeConv layer) 206, an active layer (ReLU layer) 207, and a second convolutional layer (Conv layer) 208 with a step size of 1.
The generation network performs down-sampling processing on the original text image 209 through the first convolution layer 201, so as to reduce the resolution of the original text image, and obtain a down-sampling result, where the down-sampling result includes text feature information extracted from the original text image, such as semantic information. After the activated downsampling result is activated through the activation layer 202, the activated downsampling result is input into the residual error module 203, the residual error of the activated downsampling result is determined through the residual error module 203, the residual error and the activated downsampling result are summed to obtain first data, and residual error calculation and summation calculation of the calculated residual error and input data of the residual error module are sequentially performed according to the first data and other residual error modules to obtain residual error processing data. The deconvolution layer 204 performs upsampling (i.e., deconvolution) on the residual processed data to obtain a first deconvolution result, and then inputs the first deconvolution result to the active layer 205. The activation layer 205 performs activation processing on the first deconvolution result, and then inputs the activated first deconvolution result to the deconvolution layer 206. The deconvolution layer 206 performs up-sampling processing (i.e., deconvolution processing) on the activated deconvolution result to obtain a second deconvolution result, and inputs the second deconvolution result to the activation layer 207. The activation layer 207 performs an activation operation on the second deconvolution result to obtain an activated second deconvolution result. After the activated second deconvolution result is convolved by the second convolution layer 208, an enhanced text image 210 is obtained. The integrity of the text information of the enhanced text image is higher than that of the original text image, and therefore, the image quality of the enhanced text image is higher than that of the original text image. The first convolution layer may implement a downsampling process for the input data to extract text feature information from the original text image of low image quality; the deconvolution layer may implement an upsampling process on the input data to construct an enhanced text image with the same resolution as the original text image and higher image quality than the original text image. The number of the first convolutional layers, the second convolutional layers, and the deconvolution layers and the positions in the generation network may vary according to actual conditions, which is not specifically limited by the present disclosure.
In one possible implementation, the image processing includes super-resolution processing, wherein the resolution of the enhanced text image is higher than the resolution of the original text image.
In the case where the resolution in the original text image is low (for example, the original text image is a low-resolution image), super-resolution processing may be performed on the original text image through the generation network to obtain an enhanced text image (for example, a super-resolution image) having a resolution higher than that of the original text image, so as to enhance the image quality of the original text image.
In one possible implementation, the generation network comprises at least one second convolutional layer and at least one deconvolution layer with a step size of 1; carrying out image quality enhancement processing on the original text image through a generation network to obtain an enhanced text image, wherein the image quality enhancement processing comprises the following steps: performing convolution processing on the original text image through at least one second convolution layer to obtain a convolution result; and performing up-sampling processing on the convolution result through at least one deconvolution layer to obtain an enhanced text image.
Fig. 3 shows a schematic structural diagram of a generation network according to an embodiment of the present disclosure. As shown in fig. 3, the generation network may include a second convolutional layer (Conv layer) 301 having a step size of 1, an active layer (ReLU layer) 302, a plurality of residual modules 303, a deconvolution layer (DeConv layer) 304, an active layer (ReLU layer) 305, a deconvolution layer (DeConv layer) 306, an active layer (ReLU layer) 307, and a second convolutional layer (Conv layer) 308 having a step size of 1.
The generating network performs convolution processing on the original text image 309 through the second convolution layer 301 to obtain a first convolution result, where the first convolution result includes text feature information extracted from the original text image, for example, semantic information. After the activation processing is performed on the first convolution result through the activation layer 302, the activated first convolution result is input into the residual error module 303, the residual error of the activated first convolution result is determined through the residual error module 303, the residual error and the activated first convolution result are summed to obtain first data, and the residual error calculation and the summation calculation of the calculated residual error and the input data of the residual error module are sequentially performed according to the first data and other residual error modules to obtain residual error processing data. The deconvolution layer 304 performs upsampling (i.e., deconvolution) on the residual processed data to obtain a first deconvolution result, and then inputs the first deconvolution result to the active layer 305. The active layer 305 performs activation processing on the first deconvolution processing result, and then inputs the activated first deconvolution processing result to the deconvolution layer 306. The deconvolution layer 306 performs upsampling (i.e., deconvolution) on the activated first deconvolution result to obtain a second deconvolution result, and inputs the second deconvolution result to the activation layer 307. After the activation layer 307 performs an activation operation on the second deconvolution result, an activated second deconvolution result is obtained. After convolution processing is performed on the activated second deconvolution result by the second convolution layer 308, an enhanced text image 310 (e.g., a super-resolution image) is obtained. The resolution of the enhanced text image is higher than that of the original text image, and therefore, the image quality of the enhanced text image is higher than that of the original text image. The deconvolution layer may implement an upsampling process on the input data to construct an enhanced text image with a higher resolution and higher image quality than the original text image. The number of second convolutional layers and deconvolution layers and the position in the generation network may vary according to actual circumstances, and this disclosure does not specifically limit this.
In one possible implementation, the method further includes: and performing text recognition processing on the enhanced text image by using a second text recognition network to obtain a second text recognition result.
Because the image quality of the enhanced text image obtained after the original text image is subjected to the image quality enhancement processing by the generation network is higher, the enhanced text image can be subjected to the text recognition processing by the second text recognition network to obtain a second text recognition result, so that the text recognition precision can be improved. The first text recognition network and the second text recognition network may be the same or different, and the disclosure is not limited thereto.
In one possible implementation manner, the training sample for generating the network comprises an original text image and corresponding labeled text information; the method further comprises the following steps: performing text recognition processing on the enhanced text image by using a first text recognition network to obtain a first text recognition result; and adjusting the network parameters of the generated network based on the difference between the labeling text information and the first text recognition result.
In the embodiment of the disclosure, a training sample for generating a network may be created in advance, the training sample may include an original text image and annotation text information corresponding to the original text image (the annotation text information corresponding to the original text image is text information included in the original text image), and the network may be trained based on the first text recognition network and the training sample. The first text recognition network may be a pre-trained network, or may be trained in cooperation with a generation network, which is not specifically limited in this disclosure.
In the embodiment of the present disclosure, after the enhanced text image corresponding to the original text image is generated by the network, the enhanced text image may be input to the first text recognition network to perform text recognition processing, so as to obtain the first text information included in the enhanced text image, that is, the first text recognition result. Wherein the first text recognition network may be a convolutional neural network for text recognition.
As shown in fig. 2, the first text recognition network performs text recognition processing on the enhanced text image 210 to obtain a first text recognition result. As shown in fig. 3, the first text recognition network performs text recognition processing on the enhanced text image 310 to obtain a first text recognition result.
In one possible implementation, the first text recognition network includes a text rectification subnetwork and a text recognition subnetwork; performing text recognition processing on the enhanced text image by using a first text recognition network to obtain a first text recognition result, wherein the text recognition result comprises the following steps: rectifying the text in the enhanced text image through a text rectifying sub-network to obtain a rectified text sequence; and performing text recognition processing on the text sequence through a text recognition sub-network to obtain a first text recognition result.
The text rectification subnetwork described above can rectify text in an enhanced text image, for example: and carrying out operations such as character correction, sorting, position and font size adjustment on the text in the enhanced text image so as to adjust the text in the enhanced text image into a standard format and obtain a rectified text sequence.
The text recognition subnetwork can perform text recognition processing on the rectified text sequence obtained by the text rectification subnetwork to obtain first text information included in the enhanced text image, namely, a first text recognition result. For example, as shown in fig. 2 and fig. 3, the first text recognition sub-network may be composed of an encoder and a decoder, where the encoder may be configured to extract text feature information in the rectified enhanced text image and convert the text feature information into a feature sequence, and the decoder is configured to predict a character sequence according to the feature sequence to obtain the first text information included in the enhanced text image.
After the texts in the enhanced text images are rectified based on the text rectifying sub-network, the text recognition processing is carried out on the rectified text sequences through the text recognition sub-network, and the text recognition precision can be improved.
After the enhanced text image is subjected to text recognition processing through the first text recognition network to obtain a first text recognition result, according to a difference between the labeled text information corresponding to the original text image and the first text recognition result obtained by the first text recognition network, a first recognition loss of the first text recognition network for the original text image may be determined, for example: the first recognition loss may be determined by the following equation (one):
Figure BDA0002331448010000111
where t denotes the length of the character sequence of the text information, ISRRepresenting an enhanced text image, ytThe t-th character, p (y), in the character sequence of the annotated text information corresponding to the original text imaget|ISR) The t-th character, l, representing the output of the first text recognition result obtained by the first text recognition networkTRRepresenting a first recognition penalty of the first text recognition network for the original text image.
In the case where a plurality of original text images are included in the training sample, a first generation loss of the generation network may be determined from a first recognition loss of each original text image by the first text recognition network, for example: the average of the first recognition losses of all the original text images may be determined as a first generation loss of the generation network, which may be determined by the following formula (two):
Figure BDA0002331448010000112
where G denotes a generation network, N denotes the number of the original text image, and N denotes the total number of the original text imageThe number of the first and second groups is,
Figure BDA0002331448010000113
representing the nth original text image,
Figure BDA0002331448010000114
representing the enhanced text image, y, corresponding to the n-th original text imagenIndicating the annotation text information corresponding to the nth original text image,
Figure BDA0002331448010000115
representing a first recognition penalty of the first text recognition network for the nth original text image.
After determining a first generation loss of the generation net based on a first recognition loss of the first text recognition net to the original text image, the generation net may be trained based on a first generation loss back propagation, for example: and adjusting network parameters of the generating network according to the first generating loss until the first generating loss meets the training requirement of the generating network.
In the embodiment of the present disclosure, the first text recognition network may be trained in advance before the generation network is trained, or the first text recognition network may be trained while the generation network is trained.
In one possible implementation, the training sample further includes a reference text image corresponding to the original text image, and the method further includes: performing text recognition processing on the reference text image through a first text recognition network aiming at the reference text image corresponding to the original text image to obtain a second text recognition result; and adjusting the network parameters of the first text recognition network according to the labeled text information corresponding to the original text image and the second text recognition result.
And training the first text recognition network in advance according to the training samples, and after the training of the first text recognition network is completed, supervising and generating the training of the network according to the first text recognition network obtained after the training.
The training process for the first text recognition network specifically includes: and performing text recognition processing on the reference text image corresponding to the original text image through a first recognition network to obtain second text information included in the reference text image, namely obtaining a second text recognition result, determining second text recognition loss of the first text recognition network according to the difference between the labeled text information corresponding to the original text image and the second text information included in the reference text image, adjusting network parameters of the first text recognition network according to the second text recognition loss until the second text recognition loss of the first text recognition network meets the training requirement of the first text recognition network, stopping training of the first text recognition network, and obtaining the trained first text recognition network.
After the training of the first text recognition network is completed, the enhanced text image generated by the generated network can be subjected to text recognition processing through the first text recognition network to obtain a first text recognition result, and the network parameters of the generated network are adjusted according to the difference between the first text recognition result and the labeled text information corresponding to the original text image.
Before the generation network is trained, the first text recognition network is trained in advance, and the training of the generation network is supervised by the trained first text recognition network, so that the convergence speed of the generation network can be increased, and the generation network can generate an enhanced text image with higher image quality.
In one possible implementation, the method further includes: a first text recognition network is trained based on the first recognition loss.
In training the generating network, the first text recognition network may be trained simultaneously. After determining a first recognition loss of the first text recognition network for the original text image, the network parameters of the first text recognition network may be adjusted according to the first recognition loss until the first recognition loss satisfies training requirements of the recognition network.
In one possible implementation, the method further includes: and adjusting the network parameters of the generated network according to the difference between the reference text image and the enhanced text image.
The reference text image corresponding to the original text image is consistent with the content in the original text image, and the image quality of the reference text image is higher than that of the original text image. According to the difference between the reference text image corresponding to the original text image and the enhanced text image, a second generation loss of the generated network can be determined, for example: the second generation loss may be determined by using a loss function such as a 0-1 loss function, a squared loss function, an absolute loss function, an exponential loss function, and the like, and the function of determining the second generation loss of the generation network is not particularly limited in the present disclosure.
After determining a second generation loss for generating the network based on a difference between the reference text image and the enhanced text image corresponding to the original text image, the network may be generated based on a second generation loss back propagation training, for example: and adjusting the network parameters of the generated network according to the second generation loss until the second generation loss meets the training requirement of the generated network.
In one possible implementation manner, the network parameters of the generation network are adjusted comprehensively according to the first generation loss and the second generation loss.
After determining a first generation loss of the generation net based on a first recognition loss of the first text recognition net to the original text image, the generation net may be generated in combination with a second generation loss back propagation synthesis training of the generation net, for example: and comprehensively adjusting network parameters of the generating network according to the first generating loss and the second generating loss until the first generating loss and the second generating loss meet the training requirement of the generating network.
In one possible implementation manner, the comprehensively adjusting network parameters of the generation network according to the first generation loss and the second generation loss includes: carrying out weighted summation operation on the first generation loss and the second generation loss to obtain a first total loss of the generation network; and adjusting network parameters of the generated network according to the first total loss. The first total loss of the generating network may be determined by the following equation (three):
Figure BDA0002331448010000141
wherein the content of the first and second substances,
Figure BDA0002331448010000142
representing the reference text image to which the nth original text image corresponds,
Figure BDA0002331448010000143
and a weighted sum representing the first and second generation losses corresponding to the nth original text image.
The method comprises the steps of carrying out image quality enhancement processing on an original text image through a generation network to obtain an enhanced text image, determining second generation loss of the generation network according to a reference text image and the original text image corresponding to the original text image, carrying out text recognition processing on the enhanced text image through a first text recognition network to obtain a first text recognition result and label text information corresponding to the original text image, determining first generation loss of the generation network, and carrying out back propagation through the first generation loss and the second generation loss to supervise training of the generation network, so that the convergence speed of the generation network is increased, the generation network can generate the enhanced text image with higher image quality, and the text recognition accuracy of the original text image is improved.
In one possible implementation, the generated network is obtained by performing auxiliary training based on the first text recognition network and the discriminant network.
The enhanced text image generated by the generation network and the reference text image corresponding to the original text image are input to a discrimination network, as shown in fig. 2, the enhanced text image 210 and the reference text image 211 are input to the discrimination network, as shown in fig. 3, the enhanced text image 310 and the reference text image 311 are input to the discrimination network. And judging whether the input image is a reference text image or an enhanced text image by the network to obtain a judgment result of the enhanced text image and a judgment result of the reference text image. Determining the confrontation loss according to the discrimination result of the enhanced text image and the discrimination result of the reference text image, and adjusting the network parameters of the generated network and the discrimination network according to the confrontation loss, namely performing confrontation training on the generated network and the discrimination network.
The generation network and the discrimination network can be subjected to countermeasure training through the following formula (IV):
Figure BDA0002331448010000144
wherein D represents a discrimination network, IHRRepresenting the corresponding reference text image of the original text image, ILRWhich represents the original text image, is,
Figure BDA0002331448010000145
representing the discrimination loss in the case of a probability distribution of the reference text image obeying the training samples,
Figure BDA0002331448010000151
representing discriminant loss of output of the original text image obeying the generating network, DθD(IHR) Representing the probability that the discriminating network determines the reference text image as the reference text image, DθD(GθG(ILR) Is) represents the probability that the discrimination network determines the enhanced text image to be the reference text image.
In one possible implementation, the method further includes: obtaining a second total loss of the generating network according to the first generating loss, the second generating loss and the countermeasure loss; and adjusting the network parameters of the generated network and the judgment network according to the second total loss.
After determining the countermeasure loss, a weighted summation operation may be performed on the first generation loss, the second generation loss, and the countermeasure loss of the generation network to obtain a second overall loss of the generation network, and a network parameter of the generation network may be adjusted according to the second overall loss.
And performing image quality enhancement processing on the original text image through the generation network after the parameters are adjusted to obtain an enhanced text image, respectively judging the enhanced text image and the reference text image corresponding to the original text image through a judgment network, determining the countermeasure loss of the countermeasure training according to the judgment result, and adjusting the parameters of the judgment network according to the countermeasure loss. And circularly executing the process of adjusting the parameters of the generation network and the judgment network according to the countermeasure loss to optimize the generation network and the judgment network until the countermeasure loss meets the requirement of countermeasure training. In optimizing the generation network, it is desirable that V (D, G) is minimized, i.e., the generation network is capable of generating an enhanced text image that approaches infinitely to the reference text image corresponding to the original text image. When optimizing the discrimination network, it is desirable that V (D, G) is maximized, i.e., the discrimination network can determine whether the input image is a reference text image corresponding to the original text image or an enhanced text image generated from the generation network. In the training process, a network is generated to try to confuse the reference text images corresponding to the enhanced text images and the original text images, and the network is judged to try to distinguish the reference text images corresponding to the enhanced text images and the original text images, so that the enhanced text images and the reference text images are mutually confronted. In the optimization process, the generation and discrimination capabilities of the two networks are respectively improved, and finally, the optimal network parameters are obtained.
In the embodiment of the disclosure, the original text image is acquired, the generated network obtained by performing the auxiliary training based on the first text recognition network is used to perform the image quality enhancement processing on the original text image, so as to obtain the enhanced text image, thereby improving the image quality of the original text image and further improving the text recognition accuracy.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides an image processing apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the image processing methods provided by the present disclosure, and the descriptions and corresponding descriptions of the corresponding technical solutions and the corresponding descriptions in the methods section are omitted for brevity.
Fig. 4 shows a block diagram of an image processing apparatus of an embodiment of the present disclosure. As shown in fig. 4, the apparatus 40 includes:
an obtaining module 41, configured to obtain an original text image;
and the image processing module 42 is configured to perform image quality enhancement processing on the original text image through a generation network to obtain an enhanced text image, where the generation network is obtained by performing auxiliary training based on the first text recognition network.
In one possible implementation, the image quality enhancement process includes a text repair process.
In one possible implementation, the generation network includes at least one first convolutional layer with a step size greater than 1, at least one second convolutional layer with a step size of 1, and at least one deconvolution layer;
an image processing module 42, comprising:
the down-sampling sub-module is used for carrying out down-sampling processing on the original text image through at least one first convolution layer to obtain a down-sampling result;
the convolution submodule is used for performing convolution processing on the downsampling result through at least one second convolution layer to obtain a convolution result;
and the up-sampling sub-module is used for performing up-sampling processing on the convolution result through at least one deconvolution layer to obtain an enhanced text image.
In one possible implementation, the image processing includes super-resolution processing, wherein the resolution of the enhanced text image is higher than the resolution of the original text image.
In one possible implementation, the generation network comprises at least one second convolutional layer and at least one deconvolution layer with a step size of 1;
an image processing module 42, comprising:
the convolution submodule is used for performing convolution processing on the original text image through at least one second convolution layer to obtain a convolution result;
and the up-sampling sub-module is used for performing up-sampling processing on the convolution result through at least one deconvolution layer to obtain an enhanced text image.
In one possible implementation manner, the training sample for generating the network comprises an original text image and corresponding labeled text information;
the apparatus 40 further comprises:
the first text recognition module is used for performing text recognition processing on the enhanced text image by utilizing a first text recognition network to obtain a first text recognition result;
and the first parameter adjusting module is used for adjusting the network parameters of the generated network based on the difference between the labeled text information and the first text recognition result.
In a possible implementation manner, the training sample further includes a reference text image corresponding to the original text image;
the apparatus 40 further comprises:
and the second parameter adjusting module is used for adjusting the network parameters of the generated network according to the difference between the reference text image and the enhanced text image.
In one possible implementation, the generated network is obtained by performing auxiliary training based on the first text recognition network and the discriminant network.
In one possible implementation, the apparatus 40 further includes:
and the second text recognition module is used for performing text recognition processing on the enhanced text image by utilizing a second text recognition network to obtain a second text recognition result.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
The embodiments of the present disclosure also provide a computer program product, which includes computer readable code, and when the computer readable code runs on a device, a processor in the device executes instructions for implementing the image processing method provided in any one of the above embodiments.
The embodiments of the present disclosure also provide another computer program product for storing computer readable instructions, which when executed cause a computer to perform the operations of the image processing method provided in any of the above embodiments.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 5 shows a block diagram of an electronic device of an embodiment of the disclosure. For example, the electronic device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 5, electronic device 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the electronic device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the electronic device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 500.
The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 may detect an open/closed state of the electronic device 500, the relative positioning of components, such as a display and keypad of the electronic device 500, the sensor assembly 514 may detect a change in the position of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, orientation or acceleration/deceleration of the electronic device 500, and a change in the temperature of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 504, is also provided that includes computer program instructions executable by the processor 520 of the electronic device 500 to perform the above-described method.
Fig. 6 illustrates a block diagram of an electronic device of an embodiment of the disclosure. For example, the electronic device 600 may be provided as a server. Referring to fig. 6, electronic device 600 includes a processing component 622 that further includes one or more processors, and memory resources, represented by memory 632, for storing instructions, such as applications, that are executable by processing component 622. The application programs stored in memory 632 may include one or more modules that each correspond to a set of instructions. Further, the processing component 622 is configured to execute instructions to perform the above-described methods.
The electronic device 600 may also include a power component 626 configured to perform power management for the electronic device 600, a wired or wireless network interface 650 configured to connect the electronic device 600 to a network, and an input/output (I/O) interface 658. The electronic device 600 may operate based on an operating system stored in memory 632, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 632, is also provided that includes computer program instructions executable by the processing component 622 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (20)

1. An image processing method, comprising:
acquiring an original text image;
and performing image quality enhancement processing on the original text image through a generating network to obtain an enhanced text image, wherein the generating network is obtained by performing auxiliary training based on a first text recognition network.
2. The method of claim 1, wherein the image quality enhancement process comprises a text repair process.
3. The method of claim 2, wherein the generation network comprises at least one first convolutional layer with a step size greater than 1, at least one second convolutional layer with a step size of 1, and at least one deconvolution layer;
the obtaining of the enhanced text image by performing image quality enhancement processing on the original text image through the generation network includes:
carrying out down-sampling processing on the original text image through the at least one first convolution layer to obtain a down-sampling result;
performing convolution processing on the downsampling result through the at least one second convolution layer to obtain a convolution result;
and performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
4. The method according to any of claims 1 to 3, characterized in that the image processing comprises super resolution processing, wherein the resolution of the enhanced text image is higher than the resolution of the original text image.
5. The method of claim 4, wherein the generator network comprises at least one second convolutional layer and at least one deconvolution layer with a step size of 1;
the obtaining of the enhanced text image by performing image quality enhancement processing on the original text image through the generation network includes:
performing convolution processing on the original text image through the at least one second convolution layer to obtain a convolution result;
and performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
6. The method according to any one of claims 1 to 5, wherein the training samples of the generated network comprise the original text image and corresponding annotation text information;
the method further comprises the following steps:
performing text recognition processing on the enhanced text image by using the first text recognition network to obtain a first text recognition result;
and adjusting the network parameters of the generated network based on the difference between the labeled text information and the first text recognition result.
7. The method of claim 6, wherein the training samples further comprise reference text images corresponding to the original text images;
the method further comprises the following steps:
adjusting network parameters of the generated network according to a difference between the reference text image and the enhanced text image.
8. The method of any one of claims 1 to 7, wherein the generating network is assisted by training based on the first text recognition network and a discriminant network.
9. The method according to any one of claims 1 to 5, further comprising:
and performing text recognition processing on the enhanced text image by using a second text recognition network to obtain a second text recognition result.
10. An image processing apparatus characterized by comprising:
the acquisition module is used for acquiring an original text image;
and the image processing module is used for performing image quality enhancement processing on the original text image through a generation network to obtain an enhanced text image, wherein the generation network is obtained by performing auxiliary training based on a first text recognition network.
11. The apparatus of claim 10, wherein the image quality enhancement process comprises a text repair process.
12. The apparatus of claim 11, wherein the generation network comprises at least one first convolutional layer with a step size greater than 1, at least one second convolutional layer with a step size of 1, and at least one deconvolution layer;
the image processing module comprises:
the down-sampling sub-module is used for carrying out down-sampling processing on the original text image through the at least one first convolution layer to obtain a down-sampling result;
the convolution submodule is used for performing convolution processing on the downsampling result through the at least one second convolution layer to obtain a convolution result;
and the up-sampling sub-module is used for performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
13. The apparatus according to any of claims 10 to 12, wherein the image processing comprises super resolution processing, wherein the resolution of the enhanced text image is higher than the resolution of the original text image.
14. The apparatus of claim 13, wherein the generation network comprises at least one second convolutional layer and at least one deconvolution layer with a step size of 1;
the image processing module comprises:
the convolution submodule is used for performing convolution processing on the original text image through the at least one second convolution layer to obtain a convolution result;
and the up-sampling sub-module is used for performing up-sampling processing on the convolution result through the at least one deconvolution layer to obtain the enhanced text image.
15. The apparatus according to any one of claims 10 to 14, wherein the training samples of the generated network comprise the original text image and corresponding annotation text information;
the device further comprises:
the first text recognition module is used for performing text recognition processing on the enhanced text image by using the first text recognition network to obtain a first text recognition result;
and the first parameter adjusting module is used for adjusting the network parameters of the generated network based on the difference between the labeled text information and the first text recognition result.
16. The apparatus of claim 15, wherein the training samples further comprise reference text images corresponding to the original text images;
the device further comprises:
and the second parameter adjusting module is used for adjusting the network parameters of the generated network according to the difference between the reference text image and the enhanced text image.
17. The apparatus of any of claims 10-16, wherein the generated network is trained based on the first text recognition network and a discriminant network.
18. The apparatus of any one of claims 10 to 14, further comprising:
and the second text recognition module is used for performing text recognition processing on the enhanced text image by using a second text recognition network to obtain a second text recognition result.
19. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1 to 9.
20. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any of claims 1 to 9.
CN201911337804.XA 2019-09-19 2019-12-23 Image processing method and device, electronic equipment and storage medium Active CN110889469B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019108886189 2019-09-19
CN201910888618.9A CN110633755A (en) 2019-09-19 2019-09-19 Network training method, image processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110889469A true CN110889469A (en) 2020-03-17
CN110889469B CN110889469B (en) 2023-07-21

Family

ID=68971852

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910888618.9A Pending CN110633755A (en) 2019-09-19 2019-09-19 Network training method, image processing method and device and electronic equipment
CN201911337804.XA Active CN110889469B (en) 2019-09-19 2019-12-23 Image processing method and device, electronic equipment and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201910888618.9A Pending CN110633755A (en) 2019-09-19 2019-09-19 Network training method, image processing method and device and electronic equipment

Country Status (1)

Country Link
CN (2) CN110633755A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111652093A (en) * 2020-05-21 2020-09-11 中国工商银行股份有限公司 Text image processing method and device
CN116095509A (en) * 2021-11-05 2023-05-09 荣耀终端有限公司 Method, device, electronic equipment and storage medium for generating video frame

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111223040B (en) * 2020-01-09 2023-04-25 北京市商汤科技开发有限公司 Network training method and device, and image generation method and device
CN111310764B (en) * 2020-01-20 2024-03-26 上海商汤智能科技有限公司 Network training method, image processing device, electronic equipment and storage medium
CN111402156B (en) * 2020-03-11 2021-08-03 腾讯科技(深圳)有限公司 Restoration method and device for smear image, storage medium and terminal equipment
CN111461070B (en) * 2020-04-29 2023-12-08 Oppo广东移动通信有限公司 Text recognition method, device, electronic equipment and storage medium
CN112419159A (en) * 2020-12-07 2021-02-26 上海互联网软件集团有限公司 Character image super-resolution reconstruction system and method
CN112906699A (en) * 2020-12-23 2021-06-04 深圳市信义科技有限公司 Method for detecting and identifying enlarged number of license plate
CN113538235B (en) * 2021-06-30 2024-01-09 北京百度网讯科技有限公司 Training method and device for image processing model, electronic equipment and storage medium
CN113537151B (en) * 2021-08-12 2023-10-17 北京达佳互联信息技术有限公司 Training method and device for image processing model, image processing method and device
CN113591798B (en) * 2021-08-23 2023-11-03 京东科技控股股份有限公司 Method and device for reconstructing text of document, electronic equipment and computer storage medium
CN116091871B (en) * 2023-03-07 2023-08-25 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Physical countermeasure sample generation method and device for target detection model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107330444A (en) * 2017-05-27 2017-11-07 苏州科技大学 A kind of image autotext mask method based on generation confrontation network
CN107679533A (en) * 2017-09-27 2018-02-09 北京小米移动软件有限公司 Character recognition method and device
US20190114743A1 (en) * 2017-07-17 2019-04-18 Open Text Corporation Systems and methods for image modification and image based content capture and extraction in neural networks
CN109657229A (en) * 2018-10-31 2019-04-19 北京奇艺世纪科技有限公司 A kind of intention assessment model generating method, intension recognizing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107330444A (en) * 2017-05-27 2017-11-07 苏州科技大学 A kind of image autotext mask method based on generation confrontation network
US20190114743A1 (en) * 2017-07-17 2019-04-18 Open Text Corporation Systems and methods for image modification and image based content capture and extraction in neural networks
CN107679533A (en) * 2017-09-27 2018-02-09 北京小米移动软件有限公司 Character recognition method and device
CN109657229A (en) * 2018-10-31 2019-04-19 北京奇艺世纪科技有限公司 A kind of intention assessment model generating method, intension recognizing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
袁飘逸等: "双判别器生成对抗网络图像的超分辨率重建方法", 《激光与光电子学进展》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111652093A (en) * 2020-05-21 2020-09-11 中国工商银行股份有限公司 Text image processing method and device
CN111652093B (en) * 2020-05-21 2023-10-24 中国工商银行股份有限公司 Text image processing method and device
CN116095509A (en) * 2021-11-05 2023-05-09 荣耀终端有限公司 Method, device, electronic equipment and storage medium for generating video frame
CN116095509B (en) * 2021-11-05 2024-04-12 荣耀终端有限公司 Method, device, electronic equipment and storage medium for generating video frame

Also Published As

Publication number Publication date
CN110633755A (en) 2019-12-31
CN110889469B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN110889469B (en) Image processing method and device, electronic equipment and storage medium
CN110348537B (en) Image processing method and device, electronic equipment and storage medium
CN110647834B (en) Human face and human hand correlation detection method and device, electronic equipment and storage medium
CN110378976B (en) Image processing method and device, electronic equipment and storage medium
CN110287874B (en) Target tracking method and device, electronic equipment and storage medium
CN111753822A (en) Text recognition method and device, electronic equipment and storage medium
CN112465843A (en) Image segmentation method and device, electronic equipment and storage medium
CN109615006B (en) Character recognition method and device, electronic equipment and storage medium
CN111539410B (en) Character recognition method and device, electronic equipment and storage medium
CN110781813B (en) Image recognition method and device, electronic equipment and storage medium
CN109145970B (en) Image-based question and answer processing method and device, electronic equipment and storage medium
CN109685041B (en) Image analysis method and device, electronic equipment and storage medium
CN111931844A (en) Image processing method and device, electronic equipment and storage medium
CN113065591B (en) Target detection method and device, electronic equipment and storage medium
US20220188982A1 (en) Image reconstruction method and device, electronic device, and storage medium
CN111242303A (en) Network training method and device, and image processing method and device
CN113361540A (en) Image processing method and device, electronic equipment and storage medium
CN110633715B (en) Image processing method, network training method and device and electronic equipment
CN113298091A (en) Image processing method and device, electronic equipment and storage medium
CN109903252B (en) Image processing method and device, electronic equipment and storage medium
CN111311588B (en) Repositioning method and device, electronic equipment and storage medium
CN113313115A (en) License plate attribute identification method and device, electronic equipment and storage medium
CN112102300A (en) Counting method and device, electronic equipment and storage medium
CN109635926B (en) Attention feature acquisition method and device for neural network and storage medium
CN111784773A (en) Image processing method and device and neural network training method and device

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
GR01 Patent grant
GR01 Patent grant