Image processing method, device and storage medium
By removing the target image from the image through the generator in the generative adversarial network, the problem of image interference in image recognition is solved, and the recognition accuracy and automation are improved.
Patent Information
- Application Number
- CN201910378956.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-08
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2039-05-08
AI Technical Summary
In image recognition tasks, interfering images such as seals often lead to recognition errors. It is difficult to effectively remove these interfering images with existing technology, affecting recognition accuracy.
The generator in the generative adversarial network is used to convolve and deconvolve the image to be processed through the convolution subnetwork and the deconvolution subnetwork, extract and remove the target image features, and thereby generate an image that does not contain the target image.
It realizes an automated, manual-free image removal process, improves the accuracy of OCR recognition, reduces the interference of the seal on recognition, and restores the overwritten text information.
Smart Images

Figure CN110163194B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to an image processing method, device and storage medium. Background Art
[0002] Optical Character Recognition (OCR) technology can provide text detection and recognition in multiple scenarios. In some image recognition tasks, there are often some interfering images. For example, in the recognition task of bills, key fields are usually covered with seals, which greatly interferes with subsequent detection and recognition tasks. For example, the characters in the seal are also added to the recognition results, or the seal overlaps with the text to be recognized, resulting in recognition errors.
[0003] Therefore, in fields such as text recognition in images, it is very important to remove interfering images in the image to be recognized. Summary of the invention
[0004] The embodiments of the present invention provide an image processing method, an apparatus and a storage medium, which can remove a target image from an image to be identified.
[0005] An embodiment of the present invention provides an image processing method, including:
[0006] Get the image to be processed;
[0007] Performing target image detection on the image to be processed;
[0008] When it is detected that the image to be processed includes a target image, a first generator in a generative adversarial network is obtained, wherein the generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork;
[0009] Performing convolution processing on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed, where the non-target image features are image features corresponding to images other than the target image in the image to be processed;
[0010] Deconvolution processing is performed on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image.
[0011] Accordingly, an embodiment of the present invention further provides an image processing device, comprising:
[0012] A first acquisition unit, used for acquiring an image to be processed;
[0013] A detection unit, used for performing target image detection on the image to be processed;
[0014] A second acquisition unit is used to acquire a first generator in a generative adversarial network when it is detected that the image to be processed includes a target image, wherein the generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork;
[0015] A first processing unit is used to perform convolution processing on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed, where the non-target image features are image features corresponding to images other than the target image in the image to be processed;
[0016] The second processing unit is used to perform deconvolution processing on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image.
[0017] Optionally, in some embodiments, the first processing unit is specifically configured to:
[0018] Extracting image features of the image to be processed based on the convolutional layer in the convolutional subnetwork;
[0019] The image features are downsampled based on the pooling layer in the convolutional subnetwork to obtain the non-target image features.
[0020] Optionally, in some embodiments, the second processing unit is specifically configured to:
[0021] Performing deconvolution processing on the non-target image features based on the deconvolution layer in the deconvolution subnetwork;
[0022] Based on the upsampling layer in the deconvolution subnetwork, upsampling processing is performed on the non-target image features that have undergone the deconvolution processing to obtain the processed image.
[0023] Optionally, in some embodiments, the second processing unit is further specifically configured to:
[0024] Acquire image features output by the convolution layer based on the deconvolution layer;
[0025] Acquire image features output by a previous layer based on the deconvolution layer;
[0026] Deconvolution processing is performed on the image features output by the convolution layer and the image features output by the previous layer based on the deconvolution layer.
[0027] Optionally, in some embodiments, the device further comprises:
[0028] a third acquisition unit, configured to acquire the sample image, wherein the sample image includes a positive sample and a negative sample, wherein the positive sample is a sample containing a target image, and the negative sample is a sample not containing the target image;
[0029] A training unit is used to alternately train a preset generative adversarial network according to the positive samples and the negative samples to obtain the generative adversarial network, wherein the preset generative adversarial network includes a first generator.
[0030] Optionally, in some embodiments, the preset generative adversarial network includes a first preset generative adversarial network and a second preset generative adversarial network, and the training unit is specifically used to:
[0031] Training the first preset generative adversarial network according to the positive example samples to obtain a first generative adversarial network;
[0032] Updating the parameters of the first network module in the first generative adversarial network to the second network module corresponding to the second preset generative adversarial network, where the second network module includes a first generator;
[0033] Training the second preset generative adversarial network according to the negative example samples to obtain a second generative adversarial network;
[0034] Updating the parameters of the second network module in the second generative adversarial network to the first network module corresponding to the first preset generative adversarial network, where the first network module includes a first generator;
[0035] The generative adversarial network is determined according to the first generative adversarial network or the second generative adversarial network.
[0036] Optionally, in some embodiments, the first network module further includes a second generator, a first discriminator and a second discriminator, and the training unit is further specifically used for:
[0037] Inputting the positive sample into a first generator in the first preset generative adversarial network to generate a first image that does not include the target image;
[0038] Inputting the first image into a second generator in the first preset generative adversarial network to generate a second image containing a target image;
[0039] Determine a first loss value of the first image by a first discriminator in the first preset generative adversarial network, and determine a second loss value of the second image by a second discriminator in the first preset generative adversarial network;
[0040] Adjust the parameters of the first preset generative adversarial network according to the first loss value and the second loss value to obtain the first generative adversarial network.
[0041] Optionally, in some embodiments, the second network module further includes a second generator, a first discriminator and a second discriminator, and the training unit is further specifically used for:
[0042] Inputting the negative example sample into the second generator in the second preset generative adversarial network to generate a third image containing the target image;
[0043] Inputting the third image into the first generator in the second preset generative adversarial network to generate a fourth image that does not include the target image;
[0044] Determining a third loss value of the third image by a second discriminator in the second preset generative adversarial network, and determining a fourth loss value of the fourth image by a first discriminator in the second preset generative adversarial network;
[0045] Adjust the parameters of the second preset generative adversarial network according to the third loss value and the fourth loss value to obtain the second generative adversarial network.
[0046] Optionally, in some embodiments, the device further comprises:
[0047] an extraction unit, configured to extract a target image region corresponding to the target image from the image to be processed when it is detected that the image to be processed includes the target image;
[0048] At this time, the first processing unit is specifically used for:
[0049] Based on the convolutional subnetwork, convolution processing is performed on the target image area to obtain non-target image features of the image to be processed.
[0050] An embodiment of the present invention further provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in any one of the image processing methods provided by the embodiment of the present invention.
[0051] The embodiment of the present invention further provides a computer program product, which, when executed on a computer, enables the computer to execute the steps of any one of the image processing methods provided by the embodiment of the present invention.
[0052] In the embodiment of the present invention, the image processing device obtains an image to be processed; performs target image detection on the image to be processed; when it is detected that the image to be processed contains the target image, obtains the first generator in the generative adversarial network, the generative adversarial network is trained by the sample image, wherein the first generator includes a convolution subnetwork and a deconvolution subnetwork connected to the convolution subnetwork; then convolution processing is performed on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed; then deconvolution processing is performed on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image. This scheme can extract non-target image features in the image to be processed through the first generator in the generative adversarial network, and then generate a processed image that does not contain the target image based on the non-target image features, thereby removing the target image in the image to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 is a schematic diagram of a scenario of an image processing method provided by an embodiment of the present invention;
[0055] Figure 2 is a flowchart of an image processing method provided by an embodiment of the present invention;
[0056] Figure 3 is a structural diagram of a first preset generative adversarial network provided by an embodiment of the present invention;
[0057] Figure 4 is a structural diagram of a second preset generative adversarial network provided by an embodiment of the present invention;
[0058] Figure 5 is a structural schematic diagram of a first generator provided by an embodiment of the present invention;
[0059] Figure 6a is another flowchart of the image processing method provided by an embodiment of the present invention;
[0060] Figure 6b is a schematic diagram of an unprocessed bill image provided by an embodiment of the present invention;
[0061] Figure 6c is a schematic diagram of a processed bill image provided by an embodiment of the present invention;
[0062] Figure 6dIt is a schematic diagram of a framework flow of the image processing method provided by the present invention;
[0063] Figure 7 is a structural schematic diagram of an image processing device provided by an embodiment of the present invention;
[0064] Figure 8 is another structural schematic diagram of an image processing device provided by an embodiment of the present invention;
[0065] Fig. 9 It is a structural diagram of a network device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0067] An embodiment of the present invention provides an image processing method, device and storage medium. The image processing device can be integrated in a network device, which can be a server or a terminal. The terminal can include a mobile phone, a tablet computer, a laptop computer, and a personal computer (PC).
[0068] The image processing method provided by the embodiment of the present invention can be used to process an image. For example, the target image in the image to be processed can be removed by the embodiment of the present invention. In some embodiments, the target image in the image to be processed can be removed by a generator in a generative adversarial network, wherein the target image includes a seal image.
[0069] For example, see Figure 1 , the network device obtains the image to be processed, and then performs target image detection on the image to be processed. Taking the image to be processed as a bill image and the target image as a seal image as an example, when it is detected that the bill image contains a seal image, the seal image in the bill image is then removed by the generator in the generative adversarial network. Specifically, the non-seal image features of the bill image are extracted according to the convolution subnetwork in the generator, and finally the image corresponding to the non-seal image features is restored according to the deconvolution subnetwork in the generator to obtain a bill image that does not contain a seal image.
[0070] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0071] In the embodiment of the present invention, the image processing apparatus is described. In one embodiment, an image processing method is provided. The method can be executed by a processor of a network device, such as Figure 2 As shown, the specific process of the image processing method can be as follows:
[0072] 201. Obtain an image to be processed.
[0073] The image to be processed is an image that needs to be subjected to target image detection, and when a target image is contained, an image that needs to be subjected to target image removal.
[0074] The target image in the embodiment of the present invention may be an interference image in the image to be processed, and the interference image may be a foreground image of the image to be recognized, and the image may interfere with OCR recognition of the image to be processed.
[0075] In some embodiments, when a user needs to remove a target image from an image to be processed, the image to be processed is input into an image processing device, so that the image processing device acquires the image to be processed.
[0076] In some embodiments, the image to be processed may be a bill image, and the target image in the image to be processed may be a seal image, that is, the embodiment of the present invention may remove the seal image in the bill image.
[0077] 202. Perform target image detection on the image to be processed.
[0078] After the image processing device acquires the image to be processed, it will perform target image detection on the image to detect whether the image to be processed contains the target image.
[0079] Specifically, the embodiments of the present invention can realize target image detection of the image to be processed through image detection methods, attention networks, etc. The specific method of target image detection is not limited here, as long as it can detect whether the image to be processed contains the target image, for example, detecting whether the bill image contains a seal image.
[0080] 203. When it is detected that the image to be processed contains the target image, a first generator in the generative adversarial network is obtained.
[0081] The generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork.
[0082] When it is detected that the image to be processed contains a target image, it is necessary to remove the target image from the image to be processed. First, it is necessary to obtain the first generator in the generative adversarial network, and then use the first generator to remove the target image from the image to be processed, wherein the first generator can be preset in the image processing device or obtained from other servers or terminals.
[0083] The generative adversarial network is trained by sample images, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork.
[0084] Among them, the first generator in the generative adversarial network can be included in the image processing device.
[0085] In some embodiments, before acquiring the image to be processed, it is necessary to train a preset generative adversarial network based on the sample image to obtain the generative adversarial network, wherein the generative adversarial network is a network trained based on the sample image.
[0086] Specifically, training the preset generative adversarial network includes:
[0087] (1) Obtain a sample image.
[0088] The sample images include positive samples and negative samples. The positive samples are samples that contain the target image, and the negative samples are samples that do not contain the target image.
[0089] (2) Alternately training a preset generative adversarial network according to positive samples and negative samples to obtain a generative adversarial network, wherein the preset generative adversarial network includes a first generator.
[0090] More specifically, the preset generative adversarial network includes a first preset generative adversarial network and a second preset generative adversarial network, the first preset generative adversarial network includes a first generator, and the second preset generative adversarial network includes the first generator.
[0091] At this time, the preset generative adversarial network is alternately trained according to the positive samples and the negative samples to obtain a generative adversarial network, including:
[0092] a. Train the first preset generative adversarial network according to the positive example samples to obtain the first generative adversarial network.
[0093] Since it is difficult to collect a large number of paired images with and without target images, we use an alternating generation method to train the network. The positive samples and negative samples in this embodiment can be unpaired samples.
[0094] The structure of the first preset generation adversarial network is as follows Figure 3As shown, the first network module in the first preset generative adversarial network includes a first generator G x-y , the first discriminator D y , the second generator G y-x and the second discriminator D x , where G x-y It is used to generate an image y without the target image according to the image x with the target image, G y-x Used to generate image x' with target image according to image y, D y It is used to judge whether the image y is a real image without the target image, which is determined by the loss value, D x It is used to judge whether the image x' is a real image with a seal. y and D x ) is a typical classification model based on convolutional neural network, the main components of which are convolutional layer and fully connected layer.
[0095] Specifically, the positive sample x is input into the first generator G in the first preset generative adversarial network x-y , generate a first image y that does not contain the target image;
[0096] Then the first image y is input into the second generator G in the first preset generative adversarial network y-x , generate a second image x containing the target image;
[0097] And generate the first discriminator D in the adversarial network through the first preset y Determine a first loss value of the first image y, and generate a second discriminator D in the first preset adversarial network x Determining a second loss value for the second image x';
[0098] Finally, the parameters of the first preset generative adversarial network are adjusted according to the first loss value and the second loss value to obtain the first generative adversarial network.
[0099] Specifically, the first loss value is used to adjust the parameters in the first generator, and the second loss value is used to adjust the network parameters in the second generator.
[0100] The image recognition device uses the first image generated by the first generator as a sample in the first discriminator to improve the accuracy of the first discriminator.
[0101] b. Update the parameters of the first network module in the first generative adversarial network to the second network module corresponding to the second preset generative adversarial network, where the second network module includes the first generator.
[0102] After a round of training of the first preset generative adversarial network according to the positive sample, the parameters of the first network module in the first generative adversarial network after the round of training are updated to the second network module corresponding to the second preset generative adversarial network, where Figure 4 As shown, the second network module in the second preset generative adversarial network includes: a second generator G y-x , the second discriminator D x , the first generator G x-y and the first discriminator D y .
[0103] Specifically, the parameters of the first generator in the first generative adversarial network are updated to the first generator in the second preset generative adversarial network; the parameters of the second generator in the first generative adversarial network are updated to the second generator in the second preset generative adversarial network; the parameters of the first discriminator in the first generative adversarial network are updated to the first discriminator in the second preset generative adversarial network; the parameters of the second discriminator in the first generative adversarial network are updated to the second discriminator in the second preset generative adversarial network.
[0104] It should be noted that, at this time, the first generative adversarial network may be a first generative adversarial network that has been newly trained.
[0105] The discriminator in the first generative adversarial network makes the produced image x' as similar to the real image x as possible, and the discriminator in the second generative adversarial network makes the produced image y' as similar to the real image y as possible. Through the continuous game evolution process between the discriminator and the generator, the capabilities of both sides can be continuously improved.
[0106] c. Train the second preset generative adversarial network according to the negative example samples to obtain a second generative adversarial network.
[0107] Among them, if the first preset generative adversarial network has been trained before, then the parameters of the corresponding network module in the second preset generative adversarial network are the same as the parameters of the trained first preset generative adversarial network.
[0108] At this time, the second preset generative adversarial network is trained according to the example sample, specifically:
[0109] Input the negative sample y into the second generator G in the second preset generative adversarial network y-x , generate a third image x containing the target image;
[0110] Then input the third image x into the first generator G in the second preset generative adversarial network x-y , generate a fourth image y' that does not contain the target image;
[0111] And through the second preset generation of the second discriminator D in the adversarial network x Determine a third loss value of the third image x, and generate a first discriminator D in the second preset adversarial network y determining a fourth loss value for the fourth image y';
[0112] Finally, the parameters of the second preset generative adversarial network are adjusted according to the third loss value and the fourth loss value to obtain a second generative adversarial network.
[0113] Specifically, the parameters of the second generator are adjusted according to the third loss value, and the parameters of the first generator are adjusted according to the fourth loss value.
[0114] d. Update the parameters of the second network module in the second generative adversarial network to the first network module corresponding to the first preset generative adversarial network, where the first network module includes a first generator.
[0115] After a new round of training is performed on the second preset generative adversarial network according to the negative example samples, the parameters of the second network module in the second generative adversarial network after this round of training will be updated to the first network module corresponding to the first generative adversarial network.
[0116] Specifically, the parameters of the second generator in the second generative adversarial network are updated to the second generator in the first preset generative adversarial network; the parameters of the first generator in the second generative adversarial network are updated to the first generator in the first preset generative adversarial network; the parameters of the second discriminator in the second generative adversarial network are updated to the second discriminator in the first preset generative adversarial network; the parameters of the first discriminator in the second generative adversarial network are updated to the first discriminator in the first preset generative adversarial network.
[0117] It should be noted that at this time, the second generative adversarial network is the second generative adversarial network that has undergone the latest training.
[0118] It should be noted that this embodiment needs to alternately train the first preset generative adversarial network (or the first generative adversarial network that has not been trained to converge) and the second preset generative adversarial network (or the second generative adversarial network that has not been trained to converge) according to positive samples and negative samples, respectively, and during the alternating training process, update the latest training parameters to the network module corresponding to the other party (the first or second generative adversarial network) until the network converges.
[0119] Among them, at the beginning of training, the training order of the first preset generative adversarial network and the second preset generative adversarial network is not limited here.
[0120] In the embodiment of the present invention, it is only necessary to extract the first generator in the first generative adversarial network or the second generative adversarial network to process the image.
[0121] e. Determine a generative adversarial network based on the first generative adversarial network or the second generative adversarial network.
[0122] When the network convergence is determined based on the first generative adversarial network and the second generative adversarial network, at this time, since the parameters in the corresponding network modules in the first generative adversarial network and the second generative adversarial network are updated with each other, the parameters of the network modules in the first generative adversarial network and the second generative adversarial network after convergence are the same. The generative adversarial network at this time is the first generative adversarial network after training convergence and / or the second generative adversarial network after training convergence.
[0123] At this point, the first generator can be obtained from the first generative adversarial network or the second generative adversarial network.
[0124] 204. Perform convolution processing on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed.
[0125] The non-target image feature is the image feature corresponding to the image other than the target image in the image to be processed. The network structure of the first generator is as follows: Figure 5 As shown, specifically, the image features of the image to be processed are extracted based on the convolution layer in the convolution subnetwork, wherein the image image is a non-target image feature, i.e., it does not include the image features corresponding to the target image; then, the image features are downsampled based on the pooling layer in the convolution subnetwork to obtain the non-target image features.
[0126] Among them, the number of convolutional layers and deconvolutional layers in the embodiment of the present invention is not limited, and can be 7 or other numbers. In addition, the number of pooling layers and upsampling layers in the embodiment of the present invention is also not limited.
[0127] 205. Deconvolution is performed on non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image.
[0128] Specifically, based on the deconvolution layer in the deconvolution subnetwork, the non-target image features are deconvolved to restore the image; then, based on the upsampling layer in the deconvolution subnetwork, the non-target image features that have been deconvolved are upsampled to restore the image size to obtain a processed image, wherein the processed image may be an image to be processed with the target image removed, for example, an image of a bill with a seal removed.
[0129] Among them, Figure 5As shown in the figure, since detail information may be lost during the encoding process of the convolutional layer, we need to connect the convolutional subnetwork with the corresponding layer in the deconvolutional subnetwork to reduce the information loss. At this time, the deconvolutional layer in the deconvolutional subnetwork is used to perform deconvolution processing on the non-target image features, including: obtaining the image features output by the convolutional layer based on the deconvolutional layer; obtaining the image features output by the previous layer based on the deconvolutional layer; and performing deconvolution processing on the image features output by the convolutional layer and the image features output by the previous layer based on the deconvolutional layer. Among them, the convolutional layer is the convolutional layer corresponding to the deconvolutional layer.
[0130] In some embodiments, when it is detected that the image to be processed contains a target image, a target image region corresponding to the target image is extracted from the image to be processed, that is, a portion of the image region containing the target image is intercepted from the image to be processed. At this time, the non-target image feature may be an image feature corresponding to an image other than the target image in the target image region;
[0131] At this time, the convolution subnetwork and the deconvolution subnetwork in the first generator only process the target image area, remove the target image in the target image area, and obtain the processed image.
[0132] At this point, it is also necessary to stitch the processed image back to the original image, and then the image to be processed with the target image removed can be obtained.
[0133] In some embodiments, after obtaining the image to be processed with the target image removed, optical character recognition (OCR) can be performed on the image to be processed with the target image removed, for example, the image of a bill with the seal removed, to obtain text information corresponding to the image to be processed, such as the text information of the bill image. The scheme in this embodiment can reduce the interference of the seal image on image recognition, will not cause the problem of excessive seal removal, can restore the text covered by the seal, and improve the accuracy of OCR recognition.
[0134] In the embodiment of the present invention, the image processing device obtains an image to be processed; performs target image detection on the image to be processed; when it is detected that the image to be processed contains the target image, obtains the first generator in the generative adversarial network, the generative adversarial network is trained by the sample image, wherein the first generator includes a convolution subnetwork and a deconvolution subnetwork connected to the convolution subnetwork; then convolution processing is performed on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed; then deconvolution processing is performed on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image. This scheme can extract non-target image features in the image to be processed through the first generator in the generative adversarial network, and then generate a processed image that does not contain the target image based on the non-target image features, thereby removing the target image in the image to be processed.
[0135] Among them, the image processing method in the embodiment of the present invention is an end-to-end image processing method, and the removal process is fully automated without manual participation.
[0136] The method described in the above embodiment is further described in detail below with examples.
[0137] See also Figure 6a In this embodiment, the image processing device is specifically integrated in a network device, the image to be processed is a bill image, and the target image is a seal image.
[0138] 601. The network device obtains a bill image.
[0139] The bill image is an image that needs to be subjected to seal image detection.
[0140] In some embodiments, the unprocessed bill image may be Figure 6b shown.
[0141] In some embodiments, when the user needs to remove the seal image in the receipt image, the receipt image is input into the network device so that the network device acquires the receipt image.
[0142] The bill image may be a bill image obtained by scanning the bill, or may be a bill image obtained by photographing the bill, and the specific details are not limited here.
[0143] 602. The network device performs seal image detection on the bill image.
[0144] After the network device obtains the bill image, it will perform seal image detection on the image to detect whether the bill image contains a seal image.
[0145] Specifically, the embodiments of the present invention can realize seal image detection of the image to be processed through a seal detection network, an attention network, etc. The specific method of seal image detection is not limited here, as long as it can detect whether the bill image contains a seal image.
[0146] 603. When it is detected that the bill image contains a seal image, the network device extracts a seal image area corresponding to the seal image from the bill image.
[0147] In order to improve the efficiency of removing seal images of network devices, the network device can extract a seal image area corresponding to the seal image from the bill image, wherein the seal image area is smaller than the area of the bill image and contains all the seal image information. The seal image area can be a circular area or a square area, and the specific shape is not limited here.
[0148] In some embodiments, when it is detected that the bill image does not contain a seal image, OCR recognition can be performed directly on the image.
[0149] 604. The network device obtains a first generator in the generative adversarial network.
[0150] The generative adversarial network is trained by sample images, wherein the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork.
[0151] When the seal image is detected and the seal image area is extracted from the bill image, it is necessary to obtain the first generator in the generative adversarial network, and then use the first generator to remove the seal image from the bill image.
[0152] Before acquiring the bill image, the preset generative training network will be trained to obtain a training generative adversarial network;
[0153] The preset generative training network includes a first preset generative adversarial network and a second preset generative adversarial network. After the first preset generative adversarial network is trained, the first generative adversarial network is obtained; after the second preset generative adversarial network is trained, the second generative adversarial network is obtained. The structure of the first preset generative adversarial network is as follows: Figure 3 As shown, the structure of the second preset generative adversarial network is as follows Figure 4 shown.
[0154] Since it is difficult to collect a large number of paired images with target images and without target images, we use an alternating generation method to train the network. The positive samples and negative samples in this embodiment can be unpaired samples. The positive samples are bill images containing seal images, and the negative samples are bill images not containing seal images. In this embodiment of the present invention, the first preset generative adversarial network is trained using positive samples, and the second preset generative adversarial network is trained using negative samples.
[0155] Among them, the embodiment of the present invention uses positive samples and negative samples to alternately train the first preset generative adversarial network and the second preset generative adversarial network. In addition, after training one preset generative adversarial network, the parameters of the preset generative adversarial network will be updated to the network module corresponding to the other preset generative adversarial network; for example, after training the first preset generative adversarial network, the parameters of the first preset generative adversarial network will be updated to the network module corresponding to the second preset generative adversarial network; after training the second preset generative adversarial network, the parameters of the second preset generative adversarial network will be updated to the network module corresponding to the first preset generative adversarial network, until the first preset generative adversarial network and / or the second preset generative adversarial network converge, generating a trained first preset generative adversarial network and / or a second preset generative adversarial network, wherein at this time, the parameters of the corresponding network modules in the first preset generative adversarial network and the second preset generative adversarial network are the same.
[0156] In the embodiment of the present invention, it is only necessary to extract the first generator in the first generative adversarial network or the second generative adversarial network to process the image.
[0157] 605. The network device extracts image features of the seal image area based on the convolution layer in the convolution subnetwork.
[0158] Among them, the structure of the first generator is as follows Figure 5 As shown, specifically, the image features of the seal image area are extracted based on the convolution layer in the convolution subnetwork; then the image features are downsampled based on the pooling layer in the convolution subnetwork to obtain non-target image features in the seal image area.
[0159] Among them, the number of convolutional layers and deconvolutional layers in the embodiment of the present invention is not limited, and can be 7 or other numbers. In addition, the number of pooling layers and upsampling layers in the embodiment of the present invention is also not limited.
[0160] 606. The network device downsamples the image features based on the pooling layer in the convolutional subnetwork to obtain non-seal image features.
[0161] In some embodiments, after the network device obtains the image features of the seal image area, it will downsample the image to reduce the image features and obtain the non-seal image features in the seal image area.
[0162] 607. The network device performs deconvolution processing on the non-seal image features based on the deconvolution layer in the deconvolution subnetwork.
[0163] Among them, Figure 5 As shown in the figure, since detail information may be lost in the process of convolutional layer encoding, we need to connect the convolutional subnetwork with the corresponding layer in the deconvolutional subnetwork to reduce information loss. At this time, the non-target image features are deconvolved based on the deconvolutional layer in the deconvolutional subnetwork, including: obtaining the image features output by the convolutional layer based on the deconvolutional layer; obtaining the image features output by the previous layer based on the deconvolutional layer; and deconvolving the image features output by the convolutional layer and the image features output by the previous layer based on the deconvolutional layer.
[0164] 608. The network device performs upsampling processing on the non-seal image features that have been subjected to deconvolution processing based on the upsampling layer in the deconvolution subnetwork to obtain a processed image corresponding to the seal image area.
[0165] After the non-seal image features are deconvolved and the image corresponding to the non-seal image features is restored, the non-seal image features that have been deconvolved will be upsampled to restore the image size of the seal image area and obtain the processed image corresponding to the seal image area.
[0166] 609. The network device stitches the processed image corresponding to the seal image area back to the original bill image to obtain the processed image corresponding to the bill image.
[0167] After the seal image in the seal image area is removed, the seal image in the area except the seal image will be spliced back into the original bill image to obtain a processed image corresponding to the bill image, that is, a bill image with the seal image removed.
[0168] In some embodiments, the processed image corresponding to the bill image is as follows: Figure 6c shown.
[0169] 610. The network device performs OCR recognition on the processed image corresponding to the bill image to obtain text information corresponding to the bill image.
[0170] In this embodiment, since the processed image corresponding to the bill image is the bill image with the seal image removed, performing OCR recognition on the processed image can reduce the interference of the seal image on OCR recognition. Moreover, the generator in the present invention can also restore the text covered by the seal when removing the seal, thereby improving the accuracy of OCR recognition.
[0171] Among them, the embodiment of the present invention can also remove the seal image through a super-resolution reconstruction network or other generative adversarial networks.
[0172] Among them, see Figure 6d , Figure 6d This is a schematic diagram of a framework flow of the image processing method provided by the present invention. Specifically, for an input image, the specific position of the seal is first detected by the seal detection network. If there is no seal, OCR recognition is directly performed. Otherwise, the seal image area where the seal is located is intercepted, and the seal image area is input into the generator of the generative adversarial network to generate an image without the seal. Then, the image without the seal is spliced into the original image and OCR recognition is performed.
[0173] In the embodiment of the present invention, the image processing device obtains an image to be processed; performs target image detection on the image to be processed; when it is detected that the image to be processed contains the target image, obtains the first generator in the generative adversarial network, the generative adversarial network is trained by the sample image, wherein the first generator includes a convolution subnetwork and a deconvolution subnetwork connected to the convolution subnetwork; then convolution processing is performed on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed; then deconvolution processing is performed on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image. This scheme can extract non-target image features in the image to be processed through the first generator in the generative adversarial network, and then generate a processed image that does not contain the target image based on the non-target image features, thereby removing the target image in the image to be processed.
[0174] In order to better implement the above method, accordingly, an embodiment of the present invention further provides an image processing device, which can be integrated in a network device, and the network device can be a server, a terminal or other device.
[0175] For example, Figure 7 As shown, the image processing device may include
[0176] A first acquisition unit 701 is used to acquire an image to be processed;
[0177] A detection unit 702, configured to perform target image detection on the image to be processed;
[0178] A second acquisition unit 703 is used to acquire a first generator in a generative adversarial network when it is detected that the image to be processed includes a target image, wherein the generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork;
[0179] A first processing unit 704 is configured to perform convolution processing on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed, where the non-target image features are image features corresponding to images other than the target image in the image to be processed;
[0180] The second processing unit 705 is used to perform deconvolution processing on the non-target image features based on the deconvolution subnetwork to obtain an image that does not include the target image.
[0181] In some embodiments, the first processing unit 704 is specifically configured to:
[0182] Extracting image features of the image to be processed based on the convolutional layer in the convolutional subnetwork;
[0183] The image features are downsampled based on the pooling layer in the convolutional subnetwork to obtain the non-target image features.
[0184] In some embodiments, the second processing unit 705 is specifically configured to:
[0185] Performing deconvolution processing on the non-target image features based on the deconvolution layer in the deconvolution subnetwork;
[0186] Based on the upsampling layer in the deconvolution subnetwork, upsampling processing is performed on the non-target image features that have undergone the deconvolution processing to obtain the processed image.
[0187] In some embodiments, the second processing unit 705 is further specifically configured to:
[0188] Acquire image features output by the convolution layer based on the deconvolution layer;
[0189] Acquire image features output by a previous layer based on the deconvolution layer;
[0190] Deconvolution processing is performed on the image features output by the convolution layer and the image features output by the previous layer based on the deconvolution layer.
[0191] See also Figure 8 In some embodiments, the device further comprises:
[0192] A third acquisition unit 706 is used to acquire the sample image, where the sample image includes a positive sample and a negative sample, where the positive sample is a sample containing the target image, and the negative sample is a sample not containing the target image;
[0193] The training unit 707 is used to alternately train a preset generative adversarial network according to the positive samples and the negative samples to obtain the generative adversarial network, wherein the preset generative adversarial network includes a first generator.
[0194] In some embodiments, the preset generative adversarial network includes a first preset generative adversarial network and a second preset generative adversarial network, and the training unit 707 is specifically used to:
[0195] Training the first preset generative adversarial network according to the positive example samples to obtain a first generative adversarial network;
[0196] Updating the parameters of the first network module in the first generative adversarial network to the second network module corresponding to the second preset generative adversarial network, where the second network module includes a first generator;
[0197] Training the second preset generative adversarial network according to the negative example samples to obtain a second generative adversarial network;
[0198] Updating the parameters of the second network module in the second generative adversarial network to the first network module corresponding to the first preset generative adversarial network, where the first network module includes a first generator;
[0199] The generative adversarial network is determined according to the first generative adversarial network or the second generative adversarial network.
[0200] In some embodiments, the first network module further includes a second generator, a first discriminator and a second discriminator, and the training unit 707 is further specifically used for:
[0201] Inputting the positive sample into a first generator in the first preset generative adversarial network to generate a first image that does not include the target image;
[0202] Inputting the first image into a second generator in the first preset generative adversarial network to generate a second image containing a target image;
[0203] Determine a first loss value of the first image by a first discriminator in the first preset generative adversarial network, and determine a second loss value of the second image by a second discriminator in the first preset generative adversarial network;
[0204] Adjust the parameters of the first preset generative adversarial network according to the first loss value and the second loss value to obtain the first generative adversarial network.
[0205] In some embodiments, the second network module further includes a second generator, a first discriminator and a second discriminator, and the training unit 707 is further specifically used for:
[0206] Inputting the negative example sample into the second generator in the second preset generative adversarial network to generate a third image containing the target image;
[0207] Inputting the third image into the first generator in the second preset generative adversarial network to generate a fourth image that does not include the target image;
[0208] Determining a third loss value of the third image by a second discriminator in the second preset generative adversarial network, and determining a fourth loss value of the fourth image by a first discriminator in the second preset generative adversarial network;
[0209] Adjust the parameters of the second preset generative adversarial network according to the third loss value and the fourth loss value to obtain the second generative adversarial network.
[0210] In some embodiments, the apparatus further comprises:
[0211] An extraction unit 708, configured to extract a target image region corresponding to the target image from the image to be processed when it is detected that the image to be processed includes the target image;
[0212] At this time, the first processing unit 704 is specifically used for:
[0213] Based on the convolutional subnetwork, convolution processing is performed on the target image area to obtain non-target image features of the image to be processed.
[0214] In the embodiment of the present invention, the image processing device in the embodiment of the present invention obtains the image to be processed; the detection unit 702 performs target image detection on the image to be processed; when it is detected that the image to be processed contains the target image, the second acquisition unit 703 obtains the first generator in the generative adversarial network, the generative adversarial network is trained by the sample image, wherein the first generator includes a convolution subnetwork and a deconvolution subnetwork connected to the convolution subnetwork; then the first processing unit 704 performs convolution processing on the image to be processed based on the convolution subnetwork to obtain the non-target image features of the image to be processed; the second processing unit 705 performs deconvolution processing on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image. This scheme can extract the non-target image features in the image to be processed by the first generator in the generative adversarial network, and then generate a processed image that does not contain the target image according to the non-target image features, thereby removing the target image in the image to be processed.
[0215] In addition, an embodiment of the present invention further provides a network device, such as Fig. 9 As shown, it shows a schematic diagram of the structure of the network device involved in the embodiment of the present invention, specifically:
[0216] The network device may include one or more processing core processors 901, one or more computer-readable storage media memories 902, a power supply 903, an input unit 904 and other components. Those skilled in the art will appreciate that Fig. 9 The network device structure shown in the figure does not constitute a limitation on the network device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0217] The processor 901 is the control center of the network device. It uses various interfaces and lines to connect various parts of the entire network device. By running or executing software programs and / or modules stored in the memory 902 and calling data stored in the memory 902, it executes various functions of the network device and processes data, thereby performing overall detection of the network device. Optionally, the processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 901.
[0218] The memory 902 can be used to store software programs and modules. The processor 901 executes various functional applications and data processing by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the network device, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 902 may also include a memory controller to provide the processor 901 with access to the memory 902.
[0219] The network device also includes a power supply 903 for supplying power to each component. Preferably, the power supply 903 can be logically connected to the processor 901 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 903 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0220] The network device may further include an input unit 904, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0221] Although not shown, the network device may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 901 in the network device will load the executable files corresponding to the processes of one or more application programs into the memory 902 according to the following instructions, and the processor 901 will run the application programs stored in the memory 902, thereby realizing various functions, as follows:
[0222] Acquire an image to be processed; perform target image detection on the image to be processed; when it is detected that the image to be processed contains a target image, acquire a first generator in a generative adversarial network, wherein the generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork; perform convolution processing on the image to be processed based on the convolutional subnetwork to obtain non-target image features of the image to be processed, wherein the non-target image features are image features corresponding to images other than the target image in the image to be processed; perform deconvolution processing on the non-target image features based on the deconvolutional subnetwork to obtain an image that does not contain the target image.
[0223] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0224] As can be seen from the above, the image processing device in the embodiment of the present invention obtains an image to be processed; performs target image detection on the image to be processed; when it is detected that the image to be processed contains a target image, obtains a first generator in a generative adversarial network, the generative adversarial network is trained by a sample image, wherein the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork; then, based on the convolutional subnetwork, convolution processing is performed on the image to be processed to obtain non-target image features of the image to be processed; then, based on the deconvolutional subnetwork, deconvolution processing is performed on the non-target image features to obtain an image that does not contain the target image. This scheme can extract non-target image features in the image to be processed through the first generator in the generative adversarial network, and then generate a processed image that does not contain the target image based on the non-target image features, thereby removing the target image in the image to be processed.
[0225] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0226] To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored. The instructions can be loaded by a processor to execute the steps in any one of the image processing methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:
[0227] Acquire an image to be processed; perform target image detection on the image to be processed; when it is detected that the image to be processed contains a target image, acquire a first generator in a generative adversarial network, wherein the generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork; perform convolution processing on the image to be processed based on the convolutional subnetwork to obtain non-target image features of the image to be processed, wherein the non-target image features are image features corresponding to images other than the target image in the image to be processed; perform deconvolution processing on the non-target image features based on the deconvolutional subnetwork to obtain an image that does not contain the target image.
[0228] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0229] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0230] Since the instructions stored in the storage medium can execute the steps in any image processing method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any image processing method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0231] The above is a detailed introduction to an image processing method, device and storage medium provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. An image processing method, characterized in that: include: Acquire a sample image, wherein the sample image includes a positive sample and a negative sample, wherein the positive sample is a sample containing a target image, and the negative sample is a sample not containing the target image; The preset generative adversarial network is alternately trained according to the positive sample and the negative sample to obtain a generative adversarial network, wherein the preset generative adversarial network includes a first generator; wherein the preset generative adversarial network includes a first preset generative adversarial network and a second preset generative adversarial network, the first preset generative adversarial network includes a first generator, and the second preset generative adversarial network includes a first generator, and the preset generative adversarial network is alternately trained according to the positive sample and the negative sample to obtain a generative adversarial network, including: training the first preset generative adversarial network according to the positive sample to obtain a first generative adversarial network; updating the parameters of the first network module in the first generative adversarial network to the second network module corresponding to the second preset generative adversarial network, the second network module including the first generator; training the second preset generative adversarial network according to the negative sample to obtain a second generative adversarial network; updating the parameters of the second network module in the second generative adversarial network to the first network module corresponding to the first preset generative adversarial network, the first network module including the first generator; determining the generative adversarial network according to the first generative adversarial network or the second generative adversarial network; Get the image to be processed; Performing target image detection on the image to be processed; When it is detected that the image to be processed includes a target image, a first generator in the generative adversarial network is obtained, wherein the generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork; Performing convolution processing on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed, where the non-target image features are image features corresponding to images other than the target image in the image to be processed; Deconvolution processing is performed on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image.
2. The method according to claim 1, characterized in that The step of performing convolution processing on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed includes: Extracting image features of the image to be processed based on the convolutional layer in the convolutional subnetwork; The image features are downsampled based on the pooling layer in the convolutional subnetwork to obtain the non-target image features.
3. The method according to claim 1, characterized in that The deconvolution processing is performed on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image, including: Performing deconvolution processing on the non-target image features based on the deconvolution layer in the deconvolution subnetwork; Based on the upsampling layer in the deconvolution subnetwork, upsampling processing is performed on the non-target image features that have undergone the deconvolution processing to obtain a processed image.
4. The method according to claim 3, characterized in that: The performing deconvolution processing on the non-target image features based on the deconvolution layer in the deconvolution subnetwork includes: Acquire image features output by the convolution layer based on the deconvolution layer; Acquire image features output by a previous layer based on the deconvolution layer; Based on the deconvolution layer, deconvolution processing is performed on the image features output by the convolution layer and the image features output by the previous layer.
5. The method according to claim 1, characterized in that The first network module further includes a second generator, a first discriminator and a second discriminator. The first preset generative adversarial network is trained according to the positive sample to obtain a first generative adversarial network, including: Inputting the positive sample into a first generator in the first preset generative adversarial network to generate a first image that does not include the target image; Inputting the first image into a second generator in the first preset generative adversarial network to generate a second image containing a target image; Determine a first loss value of the first image by a first discriminator in the first preset generative adversarial network, and determine a second loss value of the second image by a second discriminator in the first preset generative adversarial network; Adjust the parameters of the first preset generative adversarial network according to the first loss value and the second loss value to obtain the first generative adversarial network.
6. The method according to claim 1, characterized in that The second network module further includes a second generator, a first discriminator and a second discriminator. The second preset generative adversarial network is trained according to the negative example sample to obtain a second generative adversarial network, including: Inputting the negative example sample into the second generator in the second preset generative adversarial network to generate a third image containing the target image; Inputting the third image into the first generator in the second preset generative adversarial network to generate a fourth image that does not include the target image; Determining a third loss value of the third image by a second discriminator in the second preset generative adversarial network, and determining a fourth loss value of the fourth image by a first discriminator in the second preset generative adversarial network; Adjust the parameters of the second preset generative adversarial network according to the third loss value and the fourth loss value to obtain the second generative adversarial network.
7. The method according to any one of claims 1 to 6, characterized in that After performing target image detection on the image to be processed, the method further includes: When it is detected that the image to be processed includes a target image, a target image region corresponding to the target image is extracted from the image to be processed; Performing convolution processing on the image to be processed based on the convolution subnetwork in the first generator to obtain non-target image features of the image to be processed includes: Based on the convolutional subnetwork, convolution processing is performed on the target image area to obtain non-target image features of the image to be processed.
8. An image processing device, characterized in that: include: A third acquisition unit is used to acquire a sample image, wherein the sample image includes a positive sample and a negative sample, wherein the positive sample is a sample containing a target image, and the negative sample is a sample not containing the target image; A training unit, used for alternately training a preset generative adversarial network according to the positive samples and the negative samples to obtain a generative adversarial network, wherein the preset generative adversarial network includes a first generator; wherein the preset generative adversarial network includes a first preset generative adversarial network and a second preset generative adversarial network, and the training unit is specifically used for: training the first preset generative adversarial network according to the positive samples to obtain a first generative adversarial network; updating the parameters of the first network module in the first generative adversarial network to the second network module corresponding to the second preset generative adversarial network, the second network module including the first generator; training the second preset generative adversarial network according to the negative samples to obtain a second generative adversarial network; updating the parameters of the second network module in the second generative adversarial network to the first network module corresponding to the first preset generative adversarial network, the first network module including the first generator; determining the generative adversarial network according to the first generative adversarial network or the second generative adversarial network; A first acquisition unit, used for acquiring an image to be processed; A detection unit, used for performing target image detection on the image to be processed; A second acquisition unit is used to acquire a first generator in the generative adversarial network when it is detected that the image to be processed includes a target image, wherein the generative adversarial network is trained by sample images, wherein the target image is an image to be detected, and the first generator includes a convolutional subnetwork and a deconvolutional subnetwork connected to the convolutional subnetwork; A first processing unit is used to perform convolution processing on the image to be processed based on the convolution subnetwork to obtain non-target image features of the image to be processed, where the non-target image features are image features corresponding to images other than the target image in the image to be processed; The second processing unit is used to perform deconvolution processing on the non-target image features based on the deconvolution subnetwork to obtain an image that does not contain the target image.
9. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the image processing method according to any one of claims 1 to 7.
