An unsupervised multimodal image conversion method based on generative adversarial network

By introducing the attention mechanism and multi-scale discriminator into the generative adversarial network, the problem of unclear image details and difficult training in unsupervised image conversion is solved, high-quality multi-domain image conversion is achieved, and the model and training process are simplified. Expanded application scenarios.

CN113160032BActive Publication Date: 2024-10-29ZHEJIANG UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110333549.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-29
Publication Date
2024-10-29
Estimated Expiration
2041-03-29

AI Technical Summary

Technical Problem

Under unsupervised conditions, especially in the case of non-matching data, existing image conversion algorithms have problems such as insufficient clarity of image details, changes in edge shapes, and difficulty in training, which limits their application scope.

Method used

An unsupervised multi-modal image conversion method based on generative adversarial networks is used to split and reorganize image content through codecs, introduce an attention mechanism to allow the network to focus on important areas, and use multi-scale discriminators to improve the performance of the generator and achieve image style. Convert.

Benefits of technology

It achieves high-quality multi-domain image conversion under unsupervised conditions, simplifies the model and training process, reduces the difficulty of data collection, and expands application scenarios. The generated images have clear details and accurate edge shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113160032B_ABST
    Figure CN113160032B_ABST
Patent Text Reader

Abstract

An unsupervised multimodal image conversion method based on a generative adversarial network comprises the following steps: 1) simultaneously inputting an image x belonging to domain A a And the image x belonging to the B domain b Enter the image cross-domain conversion neural network; 2) The encoder splits the image into image content code c and domain style code s; 3) Different specific domain codes m are configured for different domain images; 4) The content code c, domain style code s and specific domain code m are fused and decoded to generate a specified target domain image; 5) The discriminator judges the quality of the image generated by the generator; 6) Repeat steps 1) to 5) for a set number of times until the network converges. The present invention aims to use deep learning technology to complete multi-domain image generation with only a single generation network in the absence of mutually matching image data, and efficiently and effectively realize unsupervised image cross-domain conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of generative adversarial networks in deep learning, and introduces an attention mechanism, which is a method for realizing unsupervised multimodal image conversion. Background Art

[0002] Deep learning is a subfield of machine learning that uses multi-level nonlinear information processing and abstraction for supervised, unsupervised, semi-supervised, self-supervised, weakly supervised, etc. feature learning, representation, classification, regression, and pattern recognition. In recent years, deep neural networks have achieved great success in supervised learning. In addition, deep learning models have also been very successful in unsupervised, hybrid, and reinforcement learning. Due to the lack of sufficient prior knowledge, it is difficult to manually label or the cost of labeling is too high. We hope that computers can complete these tasks on our behalf or provide some help. Therefore, unsupervised learning has made great progress in recent years, which is also the future development direction of deep learning. Deep learning technology has also received more and more attention from researchers and has been successfully applied to many practical applications.

[0003] In terms of the application of generative adversarial networks (GANs), it has also been a hot research topic in the field of deep learning in recent years and is the most successful generative model to date. Since 2014, people have conducted extensive research on GANs and proposed a large number of algorithms. GANs consist of two networks: a generator and a discriminator, which are responsible for forging pictures and identifying whether pictures are real or fake, respectively. The purpose of the generator to generate images is to trick the discriminator into believing that they are real. At the same time, the discriminator will be rewarded for discovering fake pictures. Through the mutual game between the two, performance is improved together. GANs have a wide range of applications in image processing and computer vision, natural language processing, speech and audio, medicine, and data science.

[0004] In recent years, attention mechanisms have been a hot research topic in both natural language processing and computer vision. Many scholars have proposed several attention mechanisms to improve the performance of models in related tasks. The basic idea of ​​the attention mechanism in computer vision is to make the model learn to pay attention, that is, to ignore irrelevant information and focus on key information.

[0005] Cross-domain image conversion is a new technology based on deep learning that has emerged in recent years. It has also developed rapidly along with the development of deep learning. Cross-domain image conversion aims to learn the mapping of images from one domain to another. Traditional methods can only extract low-level features, while convolutional neural networks can extract high-level features of image features, making it feasible to separate image content from domain style.

[0006] From the current research status of related fields, the current image conversion algorithms are mainly divided into two categories, one is the image conversion algorithm based on matching data, and the other is the image conversion algorithm based on non-matching data. Specifically, data matching means that from the perspective of content, the two images have consistent content attributes, but from the perspective of domain style, the two belong to different style domains. According to current research results, the algorithm based on matching data sets has better experimental results, but the matching data sets are scarce and difficult to obtain, which is also a problem that cannot be ignored. This also leads to a small application range of style conversion algorithms based on matching data sets, which also prompts unsupervised image conversion algorithms based on non-matching data to become the focus of research by many researchers. The current non-matching data algorithm has problems such as unclear image details, changes in edge shapes, and difficulty in training. The present invention uses a codec to split and reorganize the image, retain the split content encoding, and introduce an attention mechanism to make the network focus on the detailed information of important areas, which can solve the above-mentioned related problems. Summary of the invention

[0007] In order to overcome the shortcomings of the prior art, the present invention provides an unsupervised multimodal image conversion method based on a generative adversarial network. In the absence of mutually matching image data, deep learning technology is used to effectively convert the style domain of the image. Through a carefully designed network structure, the quality of the converted image can be effectively improved and adapted to a wider range of application scenarios.

[0008] The technical solution adopted by the present invention to solve its technical problem is:

[0009] An unsupervised multimodal image conversion method based on a generative adversarial network, the method comprising the following steps:

[0010] 1) Input image x belonging to domain A a and the image x belonging to domain B b Enter the image cross-domain conversion neural network for training. The image cross-domain conversion neural network consists of a generator and a discriminator;

[0011] 2) The encoder encodes the image into image content code c and domain style code s;

[0012] 3) Configure different domain-specific codes m for different domain images;

[0013] 4) The content code c, the domain style code s and the domain specific code m are fused and decoded to generate the specified target domain image. a As the source domain, the conversion generates B target domain image x a-→b , if the B-domain image x b As the source domain, the conversion generates A target domain image xb-→a ;

[0014] 5) The discriminator evaluates the quality of the images generated by the generator and distinguishes whether the images input to the discriminator are real images or fake images generated by the network;

[0015] 6) Repeat steps 1) to 5) for a set number of times, and the generator and the discriminator will continue to compete with each other to improve the performance together until the network converges.

[0016] Furthermore, the image cross-domain conversion neural network uses domain-specific encoding and only uses one generative network to complete the mutual generative conversion of multi-domain images. Compared with the traditional model that requires multiple generative network models to complete the conversion of multiple domains, this method greatly simplifies the model and training process.

[0017] Furthermore, for the generator structure, which includes the structure of the encoder and the decoder, the encoder encodes the image, which includes two encoder structures: the content encoder, which encodes the content features of the image and generates the content code; the domain style encoder, which encodes the domain style features of the image and generates the domain style code; the decoder decodes the code completed by the encoder, merges the content code, domain style code and domain specific code, and synthesizes the corresponding target domain image. The encoder learns the distribution characteristics of a specific style, so paired matching supervision data is not required for training, realizing the characteristics of unsupervised training and reducing the difficulty of data collection.

[0018] Furthermore, an attention mechanism is introduced to visualize the features extracted by the convolutional network to form a heat map. Based on the heat map, the neural network is taught to focus on important areas. The attention mechanism is introduced in both the generator and the discriminator. Suppose the number of channels of the feature map extracted by a certain layer of the neural network is n, and the corresponding n feature maps are represented by f1, f2…f n The introduced attention mechanism is: the weight representing the importance of the feature map of each channel is calculated, using w1, w2…w n Indicates that the sum of all weights is 1, that is The weight corresponding to each channel is weighted and summed with the feature map to form a heat map, and the feature visualization result of the convolutional network is obtained, that is, The attention mechanism enables the network to teach the neural network to focus on important areas, improving detail information and overall imaging quality.

[0019] Furthermore, the discriminator uses a multi-scale discriminator to guide the generator to generate realistic details and correct global structures. The present invention selects three scales to train the discriminator, the first scale is the resolution of the original input image, and the second and third scales are half and one quarter of the resolution of the original input image, respectively.

[0020] The beneficial effects of the present invention are as follows: through the present invention, only one generative network is needed to complete multi-domain image conversion. Compared with the traditional model, while completing the one-to-many conversion, no matching supervision data is required, and it has a wide range of application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Schematic diagram of the main process structure of an unsupervised multimodal image conversion method based on generative adversarial networks.

[0022] Figure 2 Schematic diagram of the autoencoder process in an unsupervised multimodal image conversion method based on generative adversarial networks.

[0023] Figure 3 Schematic diagram of the internal structure details of the autoencoder in an unsupervised multimodal image conversion method based on generative adversarial networks.

[0024] Figure 4 Schematic diagram of the attention mechanism in an unsupervised multimodal image conversion method based on a generative adversarial network.

[0025] Figure 5 Schematic diagram of a multi-scale discriminator in an unsupervised multimodal image conversion method based on generative adversarial networks. DETAILED DESCRIPTION

[0026] The present invention will be further described below in conjunction with the accompanying drawings.

[0027] Reference Figure 1 to Figure 5 , an unsupervised multimodal image conversion method based on generative adversarial networks, the two domain images that need to be converted to each other are named x a With x b , the following describes in detail the image x in the style of source domain A. a Transformed to the target domain B style image x a-→b Process, from the source domain B style image x b Transformed to the target domain A style image x b-→a The process is similar. a After a cross-domain image conversion neural network based on GAN architecture, an image is generated, which has the source domain A image x a The content of , and the target domain B image x b The style feature is named x a-→b .

[0028] Furthermore, this method makes the following assumptions: First, it is assumed that the latent space of the image can be decomposed into a domain content space and a domain style space. It is further assumed that images in different domains share a common content space, rather than a style space. Figure 1 As shown in Figure 1, in order to convert an image to the target domain, we recombine its content encoding with the target style encoding. The image is split into a content encoding c and a style encoding s, and the content encoding is the information that should be preserved during the conversion. m is the domain-specific encoding assigned to different domains, and m can be used to guide the generator to convert between which two domains.

[0029] Furthermore, the conversion model contains the same pair of domain encoder E and decoder D, such as Figure 2 As shown, the autoencoder maps the image x into content code c and style code s, where c = E c (x),s=E s (x). Then, the image is reconstructed based on the encoded c and s to train the autoencoder.

[0030] Furthermore, Figure 3 As shown in the figure, it is a schematic diagram of the autoencoder structure of this method, which consists of a content encoder, a style encoder and a decoder; the content encoder E c , several convolutional layers are used to downsample the input, and several residual blocks are used for further processing, where all convolutional layers are followed by instance normalization; style encoder E s, several convolutional layers are used to downsample the input, followed by global average pooling, global maximum pooling and fully connected layers to extract the style of the input image. The style encoding dimension is 50*n, where n is the total number of different domains in the dataset; the instance normalization layer is not used in the style encoder because instance normalization is not used. Normalization) removes the original feature mean and variance that represent important style information. The decoder D reconstructs the image from the content and style encoding of the input image. It processes the encoding through a set of residual blocks, and finally generates a reconstructed image through several upsampling layers and convolution layers; the upsampling method used here does not use traditional nearest neighbor interpolation, bilinear interpolation or deconvolution methods, but instead samples a novel upsampling method carafe, which is a lightweight upsampling method and has a larger receptive field of view than other upsampling methods. It has richer semantic information correlation with feature maps, has significant performance improvement, and only introduces a small amount of parameters and computational cost. At the same time, it can also avoid the checkerboard artifacts that are most likely to be caused during the upsampling process. The extracted style code s is concatenated with the configured domain-specific code m and input into the multi-layer perceptron (MLP) for mapping, and then the adaptive instance normalization is used to adapt the parameters of the residual layer, whose parameters are dynamically generated by the multi-layer perceptron. The formula is: τ is the activation of the previous convolutional layer, μ and σ are the mean and standard deviation calculated based on the channel, and γ and β are the MLP parameters.

[0031] Furthermore, Figure 4As shown in the figure, it is a schematic diagram of the attention mechanism in this method. This method obtains the content feature map of the input image after downsampling and residual block, and obtains the feature vector based on the number of channels through the global average pooling layer and the global maximum pooling layer. Create a learnable parameter weight and compress it to B×1 dimension through the fully connected layer. Here B is the batch size. For image conversion tasks, this value is usually taken as 1. For the corresponding bit multiplication of the learning parameter weight and the encoder feature map, that is, for each channel of the encoder feature map, a weight is assigned. This weight determines the importance of the corresponding feature of this channel, which realizes the attention mechanism under the feature map. For the B×1 dimension obtained by full connection, it is spliced ​​under average pooling and maximum pooling and then sent to the classification to make classification judgments of the source domain and the target domain. This is an unsupervised process. Only the source domain and the target domain are known. This binary classification problem can be well classified under CAM global and average pooling. When the generator can well distinguish the source domain and target domain inputs, the attention module can help the model know where to perform dense conversion. The attention maps obtained by average pooling and maximum pooling are concatenated, restored to the number of input channels through a convolutional layer, and then sent to AdaIN for adaptive normalization.

[0032] Furthermore, Figure 5 As shown in the figure, considering that the application scenario of the algorithm does not require the deployment of the discriminator model, multiple discriminators are used for training during the training process, and each modality corresponds to a discriminator. The discriminator discriminates and scores the target modality image generated by the generator, with the lowest score being 0 and the highest score being 1. The closer to the real MRI modality image, the higher the score. In order to enable the discriminator to perceive the global information of the image while also paying attention to the local information, the discriminator adopts a multi-scale discriminator in its design structure to prevent the discriminator from misjudging the image details as an image with excellent overall quality. The multi-scale discriminator uses three discriminators with the same network structure, down-samples the generated image twice, and each down-sampling reduces the target image to half the resolution, and then discriminates multiple scale images, thereby improving the quality of image generation.

[0033] It is also worth noting that the discriminator used in this method will be pre-trained in a classification experiment to distinguish the classification of different modalities of MRI. Specifically, training different classifiers can accurately distinguish different modalities of MRI. For example, classifier D a Capable of identifying MRI with T1 sequence imaging, classifier D b Capable of identifying MRI with T2 sequence imaging, classifier D c Able to identify MRI with T1ce sequence imaging, classifier D dIt can identify MRI images of Flair sequence imaging. Finally, the model parameters with the best reasoning ability are saved for discriminator training, which can effectively improve the discriminator performance and make the generated MRI higher quality.

[0034] After the above steps are repeated for a set number of times, the generator and the discriminator compete with each other and make progress together. The final generator has powerful performance and can generate a very realistic conversion image of the style based on a reference image of another style.

[0035] The above describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific examples, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0036] It should be noted that the diagrams provided in the above embodiments are only used to illustrate the basic concept of the present invention in a schematic manner, and thus the diagrams only show components related to the present invention rather than being drawn according to the number of components in actual implementation. The number and proportion of each component in actual implementation can be changed at will.

Claims

1. An unsupervised multimodal image conversion method based on generative adversarial network, characterized by: The method comprises the following steps: 1) Input image x belonging to domain A a and the image x belonging to domain B b Enter the image cross-domain conversion neural network for training. The image cross-domain conversion neural network is a generative adversarial network that includes a generator and a discriminator; 2) The encoder splits the image into image content code c and domain style code s; 3) Configure different specific domain codes m for different domain images; 4) The content code c, the domain style code s and the specific domain code m are fused and decoded to generate the specified target domain image. a As the source domain, the conversion generates B target domain image x a-→b , if the B-domain image x b As the source domain, the conversion generates A target domain image x b-→a ; 5) The discriminator evaluates the quality of the images generated by the generator and distinguishes whether the images input to the discriminator are real images or fake images generated by the network; 6) Repeat steps 1) to 5) for a set number of times, and the generator and the discriminator will continue to compete with each other to improve the performance together until the network converges.

2. The unsupervised multimodal image conversion method based on a generative adversarial network as claimed in claim 1, characterized in that: Using the assigned domain-specific encodings, generation of other target domain images can be accomplished using only one set of generators.

3. The unsupervised multimodal image conversion method based on generative adversarial network as claimed in claim 2, characterized in that: The generator includes an encoder and a decoder structure. The encoder performs encoding operation on the image, and includes two encoder structures: a content encoder, which encodes the content features of the image and generates content coding; a style encoder, which encodes the domain style features of the image and generates domain style coding; The decoder performs AdaIN affine transformation on the code in the shallow space, fuses the transformed content code, domain style code and specific domain code to synthesize the corresponding target domain style image.

4. The unsupervised multimodal image conversion method based on a generative adversarial network as claimed in claim 3, characterized in that: The attention mechanism is introduced in both the generator and the discriminator. Assume that the number of channels of the feature map extracted by the neural network is n, and the corresponding n feature maps are represented by f1, f2…f n The introduced attention mechanism is: the weight representing the importance of the feature map of each channel is calculated, using w1, w2…w n Indicates that the sum of all weights is 1, that is The weight corresponding to each channel is weighted and summed with the feature map to form a heat map, and the feature visualization result of the convolutional network is obtained, that is,

Citation Information

Patent Citations

  • Optical character recognition employing deep learning with machine generated training data

    US10489682B1