Semantic segmentation image conversion method, device, computer equipment and storage medium
By conducting semantic segmentation and multi-modal conditional generative adversarial network training on the initial real-life image, multiple real-life images with different content modalities are generated, which solves the problem of insufficient image diversity in traditional methods and achieves higher image diversity. gender and difference.
Patent Information
- Application Number
- CN202011321375.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-11-23
AI Technical Summary
Traditional conditional generative adversarial networks have a mode collapse problem during the image conversion process, resulting in insufficient output image diversity and can only generate a single corresponding image.
Using the semantic segmentation image conversion method, after semantic segmentation processing of the initial real-life image, it is input into the multi-modal conditional generation adversarial network, and multiple real-life images with different content modalities are generated using preset control functions and generation parameters for training. .
The diversity of the generated real-life images is improved. Through the iterative training and discrimination adjustment of the multi-modal conditional generative adversarial network, the modal differences of the generated image content are large, which solves the problem of image unity in traditional methods.
Smart Images

Figure CN112614199B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image generation, and in particular to a semantic segmentation image conversion method, device, computer equipment and storage medium. Background Art
[0002] Before applying the neural network model for business processing, a large number of training set images are required to train the model. When the training set images are difficult to collect, image conversion processing can be performed on the collected initial images to obtain a large amount of converted training set images.
[0003] In traditional methods, image conversion is usually performed through conditional generative adversarial networks.
[0004] However, the above method has a mode collapse problem, which makes it possible to output only a one-to-one image, that is, only one corresponding image can be output based on the input image, making the output image relatively simple and lacking in diversity. Summary of the invention
[0005] Based on this, it is necessary to provide a semantic segmentation image conversion method, device, computer equipment and medium that can improve the diversity of real-scene images converted from semantic segmentation images in response to the above technical problems.
[0006] A semantic segmentation image conversion method, the method comprising:
[0007] Receiving an initial real scene image acquired by an acquisition device;
[0008] Performing semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image;
[0009] The semantic segmentation image is input into a multimodal conditional generative adversarial network, and multiple real-scene images corresponding to the semantic segmentation image are output. The content modality of each real-scene image is different. The multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function. The preset control function is determined according to the real-scene images of different content modalities and the generation parameters corresponding to the real-scene images of different content modalities.
[0010] In one embodiment, before performing semantic segmentation processing on the initial real scene image to generate the semantic segmentation image, the process further includes:
[0011] Performing image size normalization processing on the initial real scene image to obtain the initial real scene image after image size normalization processing;
[0012] The initial real scene image is subjected to semantic segmentation processing to generate a semantic segmentation image corresponding to the initial real scene image, including:
[0013] The initial real scene image after the image size normalization processing is performed with semantic segmentation processing to generate a semantic segmentation image corresponding to the initial real scene image after the image size normalization processing.
[0014] In one embodiment, a semantic segmentation image is input into a multimodal conditional generative adversarial network, and a plurality of real scene images corresponding to the semantic segmentation image are output, including:
[0015] The encoder in the multimodal conditional generative adversarial network is used to extract features from the semantic segmentation image and generate a feature map corresponding to the semantic segmentation image;
[0016] The feature map is decoded and transformed through the generator in the multimodal conditional generative adversarial network to obtain multiple real-scene images corresponding to the semantic segmentation image.
[0017] In one embodiment, the feature map is decoded and converted by a generator in a multimodal conditional generative adversarial network to obtain multiple real scene images corresponding to the semantic segmentation image, including:
[0018] A plurality of different generation parameters are configured through the generator, and a plurality of real scene images corresponding to the semantic segmentation image are generated according to the generation parameters and the feature map.
[0019] In one embodiment, the generation method of the multimodal conditional generative adversarial network includes:
[0020] Get training set images;
[0021] Input the training set images into the constructed initial multimodal conditional generative adversarial network, and generate corresponding predicted real scene images based on the determined generation parameters;
[0022] Generate image sets corresponding to the predicted real scene images according to the predicted real scene images and the training set images;
[0023] Input each image set into the discriminator for authenticity identification, and output the corresponding identification results;
[0024] Based on each identification result, the network parameters of the initial multimodal conditional generative adversarial network are adjusted, and according to a preset number of iterations, the initial multimodal conditional generative adversarial network after the network parameters are adjusted is iteratively trained to obtain a trained multimodal conditional generative adversarial network.
[0025] In one embodiment, after iteratively training the initial multimodal conditional generative adversarial network after adjusting the network parameters according to a preset number of iterations, the method further includes:
[0026] Store the initial multimodal conditional generative adversarial network and the corresponding training indicator values for each iteration of training;
[0027] The trained multimodal conditional generative adversarial network is obtained, including:
[0028] Determine the initial multimodal conditional generative adversarial network corresponding to the highest training index value as the multimodal conditional generative adversarial network that has completed training.
[0029] In one embodiment, based on each identification result, adjusting the network parameters of the initial multimodal conditional generative adversarial network, and iteratively training the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to generate a trained multimodal conditional generative adversarial network, including:
[0030] According to each identification result, a loss value of the initial multimodal conditional generative adversarial network is calculated, and a network parameter of the initial multimodal conditional generative adversarial network is first adjusted based on the loss value to obtain a first adjusted initial multimodal conditional generative adversarial network;
[0031] According to the predicted real scene images with true identification results and the corresponding generation parameters, the difference indexes between the predicted real scene images are determined based on a preset control function, and the network parameters of the initial multimodal conditional generative adversarial network are adjusted for the second time based on the difference indexes to obtain the initial multimodal conditional generative adversarial network after the second adjustment;
[0032] According to a preset number of iterations, the initial multimodal conditional generative adversarial network after the first adjustment and the second adjustment is iteratively trained to obtain a trained multimodal conditional generative adversarial network.
[0033] A semantic segmentation image conversion device, the device comprising:
[0034] An initial real scene image receiving module is used to receive the initial real scene image collected by the collection device;
[0035] A semantic segmentation processing module, used to perform semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image;
[0036] A multimodal real-scene image generation module is used to input a semantically segmented image into a multimodal conditional generative adversarial network, and output multiple real-scene images corresponding to the semantically segmented image. The content modality of each of the multiple real-scene images is different. The multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function. The preset control function is determined based on real-scene images of different content modalities and generation parameters corresponding to the real-scene images of different content modalities.
[0037] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.
[0038] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.
[0039] The above-mentioned semantic segmentation image conversion method, device, computer equipment and storage medium obtain a semantic segmentation image, input the semantic segmentation image into a multimodal conditional generative adversarial network, and output multiple real-scene images corresponding to the semantic segmentation image. The content modality of each real-scene image in the multiple real-scene images is different, and the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and the preset control function is determined according to the real-scene images of each different content modality and the generation parameters of the real-scene images corresponding to each different content modality. Since the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and the preset control function is determined according to the real-scene images of each different content modality and the generation parameters of the real-scene images corresponding to each different content modality, when the real-scene images are generated according to the multimodal conditional generative adversarial network, the diversity of the generated real-scene images can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A diagram showing an application scenario of a semantic segmentation image conversion method in an embodiment;
[0041] Figure 2 A flowchart of a semantic segmentation image conversion method in one embodiment;
[0042] Figure 3 A schematic diagram of a flow chart of a semantic segmentation image conversion step in another embodiment;
[0043] Figure 4 A schematic diagram of a flow chart of steps for generating multiple real scene images in one embodiment;
[0044] Figure 5 A schematic diagram of a flow chart of a network iterative training step in an embodiment;
[0045] Figure 6 is a structural block diagram of a semantic segmentation image conversion device in one embodiment;
[0046] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The semantic segmentation image conversion method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the acquisition device 102 communicates with the server 104 through the network. The acquisition device 102 can acquire the initial real scene image and send it to the server 104 through the network. After receiving the initial real scene image, the server 104 can perform semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image. Further, the server 104 can input the semantic segmentation image into a multimodal conditional generative adversarial network and output a plurality of real scene images corresponding to the semantic segmentation image. Among them, the content modality of each real scene image in the plurality of real scene images is different, and the multimodal conditional generative adversarial network is generated by training based on the difference index determined by the preset control function, and the preset control function is determined according to the real scene images of different content modes and the generation parameters corresponding to the real scene images of different content modes. Among them, the acquisition device 102 can be, but is not limited to, various cameras, video cameras, video recorders and other devices with image acquisition and sending functions, and the server 104 can be implemented with an independent server or a server cluster composed of multiple servers.
[0049] In one embodiment, Figure 2 As shown, a semantic segmentation image conversion method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0050] Step S202: receiving an initial real scene image captured by a capture device.
[0051] The initial real-scene image refers to an image generated by capturing an actual life scene through a capturing device, for example, it may be a real-scene image of a road.
[0052] In this embodiment, due to the limitation of the real scene, when collecting real scene images through the acquisition device, real scene images that meet the preset requirements cannot be collected, or a sufficient number of real scene images cannot be collected. This application is used to generate a large number of real scene images based on a small number of collected initial real scene images.
[0053] In this embodiment, after the acquisition device acquires the initial real scene image, it can transmit the image to the server through the network for further processing by the server.
[0054] Step S204 , performing semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image.
[0055] Among them, semantic segmentation image refers to an image that classifies each pixel in the image, determines the category of each point, and presents the original image in a category style. The semantic segmentation image can be Figure 3 The conditional image input is shown in .
[0056] In this embodiment, after acquiring the initial real scene image, the server may perform semantic segmentation processing on the acquired image to obtain a semantic segmentation image corresponding to the real scene image. For example, the server may perform semantic segmentation processing by region-based semantic segmentation, full convolutional network semantic segmentation, and weakly supervised semantic segmentation to obtain a semantic segmentation image corresponding to the initial real scene image.
[0057] Step S206: Input the semantic segmentation image into a multimodal conditional generative adversarial network, and output multiple real-scene images corresponding to the semantic segmentation image. The content modality of each of the multiple real-scene images is different. The multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function. The preset control function is determined according to the real-scene images of different content modalities and the generation parameters corresponding to the real-scene images of different content modalities.
[0058] In this embodiment, after acquiring the semantic segmentation image, the server can input the acquired semantic segmentation image into a pre-trained multimodal conditional generative adversarial network to output multiple real-scene images corresponding to different content modalities through the multimodal conditional generative adversarial network.
[0059] Continue to refer Figure 3 The server generates multiple real scene images through a multi-modal conditional generative adversarial network as shown in 301 and 302. The multiple real scene images have different content modes, and their colors, pixel differences, etc. are different.
[0060] In this embodiment, the multimodal conditional generative adversarial network can be generated by training based on a difference index determined by a preset control function, and the preset control function can be shown in formula (1).
[0061]
[0062] Among them, G(E(x), z1) is the real scene image outputted by the corresponding generation parameter z1, and G(E(x), z2) is the real scene image outputted by the corresponding generation parameter z2. In this embodiment, when the server trains the multimodal conditional generative adversarial network, the value of the difference index determined by the control function is as large as possible, that is, the difference between the output real scene images G(E(x), z1) and G(E(x), z2) is as large as possible, so that the trained multimodal conditional generative adversarial network can generate multiple real scene images with large differences.
[0063] In the above-mentioned semantic segmentation image conversion method, by obtaining a semantic segmentation image, and inputting the semantic segmentation image into a multimodal conditional generative adversarial network, a plurality of real-scene images corresponding to the semantic segmentation image are output, the content modality of each real-scene image in the plurality of real-scene images is different, and the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and the preset control function is determined according to the real-scene images of each different content modality and the generation parameters corresponding to the real-scene images of each different content modality. Since the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and the preset control function is determined according to the real-scene images of each different content modality and the generation parameters corresponding to the real-scene images of each different content modality, when the real-scene images are generated according to the multimodal conditional generative adversarial network, the diversity of the generated real-scene images can be improved.
[0064] In one of the embodiments, before semantic segmentation is performed on the initial real scene image to generate the semantic segmentation image, the method may further include: performing image size normalization on the initial real scene image to obtain the initial real scene image after image size normalization.
[0065] Specifically, the sizes of the initial real scene images collected by different terminals may be inconsistent, so the sizes of the initial real scene images acquired by the server are inconsistent.
[0066] In this embodiment, after receiving the initial real scene image, the server may pre-process the initial real scene image, for example, perform image size normalization processing to adjust the image size of the initial real scene image to a preset size.
[0067] Specifically, the server performs image size normalization processing on the initial real scene image by first determining whether the aspect ratio of the initial real scene image is consistent with the aspect ratio of a preset size. If not, the initial real scene image is filled with a preset pixel image until the aspect ratio is consistent with the preset size, and scaled to the preset size to obtain an initial real scene image of the preset size. If they are consistent, the initial real scene image is scaled to the preset size to obtain an initial real scene image of the preset size.
[0068] For example, the preset length and width are 256*256, and the size of the initial real scene image obtained from the terminal is 255*256. The server can fill the length of the initial real scene image with a preset pixel image, such as 0 pixels, to 256*256. Similarly, when the size of the initial real scene image is 256*255, the server can fill the width of the semantic segmentation image with 0 pixels to 256*256.
[0069] Optionally, when the size of the initial real-scene image acquired by the server is 512*510, the initial real-scene image can be filled to 512*512 with 0 pixels to make it consistent with the aspect ratio of the preset size, and then reduced to 256*256 to make it consistent with the preset size; or, if the size of the initial real-scene image is 128*123, the preset image can be filled to 128*128 with 0 pixels to make it consistent with the aspect ratio of the preset size, and then enlarged to 256*256 to make it consistent with the preset size.
[0070] In other embodiments, the server may also perform image brightness adjustment, image normalization processing, etc. on the initial real scene image to make the processed initial real scene image.
[0071] In this embodiment, performing semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image can include: performing semantic segmentation processing on the initial real scene image after image size normalization processing to generate a semantic segmentation image corresponding to the initial real scene image after image size normalization processing.
[0072] Specifically, after obtaining the initial real scene image after image size normalization processing, the server can perform semantic segmentation processing on the initial real scene image after image size normalization processing, for example, through region-based semantic segmentation, full convolutional network semantic segmentation, and weakly supervised semantic segmentation, etc., so as to obtain a semantic segmentation image of the initial real scene image after image size normalization processing.
[0073] Those skilled in the art may understand that, in the present embodiment, the image size normalization process may also be performed after semantic segmentation, that is, semantic segmentation is performed on the initial real scene image to obtain a semantic segmentation image, and then the image size is normalized on the semantic segmentation image to obtain an image whose size meets the input requirements of the multimodal conditional generative adversarial network.
[0074] In the above embodiment, by performing image size normalization processing on the initial real scene image, the initial real scene image after image size normalization processing is obtained, and then performing semantic segmentation processing, the output semantic segmentation image can meet the input requirements of the multimodal conditional generative adversarial network, and the accuracy of the real scene image generated by the multimodal conditional generative adversarial network can be improved.
[0075] In one embodiment, reference Figure 4 , the server inputs the semantic segmentation image into the multimodal conditional generative adversarial network, and outputs multiple real scene images corresponding to the semantic segmentation image, which may include:
[0076] Step S402: extract features from the semantic segmentation image through an encoder in a multimodal conditional generative adversarial network to generate a feature map corresponding to the semantic segmentation image.
[0077] In this embodiment, the multimodal conditional generative adversarial network may include an encoder and a corresponding generator (or decoder). After the server inputs the initial image into the multimodal conditional generative adversarial network, the encoder of the multimodal conditional generative adversarial network can be used to extract features of the semantic segmentation image to obtain a feature map of the corresponding semantic segmentation image.
[0078] In this embodiment, the encoder may include multiple convolutional layers, and the size and number of channels of each convolutional layer are different. For example, 8 convolutional layers may be included, wherein the first to eighth convolutional layers are smaller in size and the number of channels gradually increases. Specifically, the number of channels of the first convolutional layer is 64 channels, the number of channels of the second convolutional layer is 128 channels, the number of channels of the third convolutional layer is 512 channels, the number of channels of the fourth convolutional layer is 512 channels, the number of channels of the fifth convolutional layer is 512 channels, the number of channels of the sixth convolutional layer is 512 channels, the number of channels of the seventh convolutional layer is 512 channels, and the number of channels of the eighth convolutional layer is 512 channels.
[0079] Step S404: decode and transform the feature map through the generator in the multimodal conditional generative adversarial network to obtain multiple real scene images corresponding to the semantic segmentation image.
[0080] Among them, the generator may include a multi-layer network structure, for example, it may be a generator including a skip connection, or a general generator, etc.
[0081] In one embodiment, the generator including jump connections may include multiple convolutional layers, multiple Dropout layers and Tann layers. Specifically, the first layer may be a 512-channel convolutional layer, followed by a Dropout layer, a 1024-channel convolutional layer, a Dropout layer, a 1024-channel convolutional layer, a Dropout layer, a 1024-channel convolutional layer, a 1024-channel convolutional layer, a 1024-channel convolutional layer, a 512-channel convolutional layer, a 125-channel convolutional layer, a 3-channel convolutional layer and a Tann layer.
[0082] In another embodiment, the universal generation phase may include multiple layers of convolutional layers, for example, a 64-channel convolutional layer, a 128-channel convolutional layer, a 256-channel convolutional layer, and multiple layers of 512-channel convolutional layers.
[0083] In this embodiment, the server may input the feature map generated by the encoder into the generator for decoding conversion to obtain a real scene image corresponding to the semantic segmentation image.
[0084] Those skilled in the art will appreciate that the above description of the encoder and generator structures is merely an example, and in other embodiments, other structures may be possible, and this application does not impose any limitation on this.
[0085] In one of the embodiments, decoding and converting the feature map by a generator in a multimodal conditional generative adversarial network to obtain multiple real-scene images corresponding to the semantic segmentation image can include: configuring multiple different generation parameters by the generator, and generating multiple real-scene images corresponding to the semantic segmentation image according to each generation parameter and the feature map.
[0086] Specifically, continue to refer to Figure 3 ,After generating the feature map, the server takes two unequal generation parameters, namely latent vectors z1 and z2 from the normal distribution N(0,1), and inputs them from the latent space between the encoder and the generator.
[0087] In this embodiment, the generator generates multiple real-scene images corresponding to the semantic segmentation image according to various generation parameters and feature maps, that is, based on z1 and z2, the corresponding real-scene map data G(E(x), z1) and G(E(x), z2) are generated respectively.
[0088] In the above embodiment, by configuring different generation parameters and generating a plurality of real scene images corresponding to the semantic segmentation image based on the feature map, the generated real scene images can be made different.
[0089] In one of the embodiments, a method for generating a multimodal conditional generative adversarial network may include: obtaining training set images; inputting the training set images into the constructed initial multimodal conditional generative adversarial network, and generating corresponding predicted real scene images based on determined generation parameters; generating image sets corresponding to the predicted real scene images and the training set images; inputting each image set into a discriminator for authenticity identification, and outputting corresponding identification results; adjusting the network parameters of the initial multimodal conditional generative adversarial network based on the identification results, and iteratively training the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to obtain a trained multimodal conditional generative adversarial network.
[0090] In this embodiment, the server obtains a batch of paired two-dimensional plane maps and satellite map images, and uses the two-dimensional plane maps as training set images.
[0091] Further, the server randomly takes two unequal generation parameters, namely latent vectors z1 and z2, from the normal distribution N(0,1), and inputs the initial multimodal conditional generative adversarial network from the latent space between the encoder and the generator.
[0092] Furthermore, the server extracts features from the training set images through an initial multimodal conditional generative adversarial network, and generates corresponding test map images based on the generation parameters and feature maps obtained by feature extraction.
[0093] Furthermore, the server generates an image set using the test map image and the training set image, and inputs each image set into the discriminator for authenticity identification, and outputs corresponding identification results.
[0094] In this embodiment, when the identification result output by the discriminator is false, the server can calculate the loss value based on the obtained test map image and the satellite map image corresponding to the two-dimensional plane map, so as to update the network parameters of the initial multimodal conditional generative adversarial network based on the calculated loss value.
[0095] Furthermore, the server iteratively trains the initial multimodal conditional generative adversarial network after adjusting the network parameters according to a preset number of iterations until the identification result output by the discriminator is true, so as to obtain a trained multimodal conditional generative adversarial network.
[0096] In the above embodiment, authenticity identification is performed by generating images and outputting corresponding identification results. Then, based on the identification results, the network parameters of the initial multimodal conditional generative adversarial network are adjusted. The initial multimodal conditional generative adversarial network after the network parameters are adjusted is iteratively trained according to a preset number of iterations. This can make the obtained initial multimodal conditional generative adversarial network more accurate and improve the accuracy of the generated real-life images.
[0097] In one of the embodiments, after iteratively training the initial multimodal conditional generative adversarial network after adjusting the network parameters according to a preset number of iterations, it can also include: storing the initial multimodal conditional generative adversarial network of each iterative training and the corresponding training indicator value.
[0098] In this embodiment, when the server is performing model training, or after iteratively training the initial multimodal conditional generative adversarial network after adjusting the network parameters, the server can store the initial multimodal conditional generative adversarial network and the corresponding training index values for each iterative training.
[0099] Among them, the training index value is an index value indicating the completion degree, completion status and effect of the initial multimodal conditional generative adversarial network, which can be an index level or a score.
[0100] In other embodiments, the server may also store the network parameters and training index values of the initial multimodal conditional generative adversarial network for each iterative training, which is not limited in this application.
[0101] In this embodiment, obtaining a trained multimodal conditional generative adversarial network may include: determining that the trained multimodal conditional generative adversarial network is a trained multimodal conditional generative adversarial network in the initial multimodal conditional generative adversarial network corresponding to the highest training index value.
[0102] Specifically, after completing the network training for a preset number of iterations, the server can sort the training indicator values according to the training indicator values of each iterative training, and after sorting, determine the initial multimodal conditional generative adversarial network with the highest training indicator value as the multimodal conditional generative adversarial network that has completed the training, and use it for subsequent test applications.
[0103] In the above embodiment, by storing the initial multimodal conditional generative adversarial network and the corresponding training index value after each iterative training, and selecting the initial multimodal conditional generative adversarial network with the highest index value as the final trained multimodal conditional generative adversarial network, the final multimodal conditional generative adversarial network can be the network with the best training effect, which can improve the accuracy of network prediction.
[0104] In one embodiment, reference Figure 5 The server adjusts the network parameters of the initial multimodal conditional generative adversarial network based on each identification result, and iteratively trains the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to generate a trained multimodal conditional generative adversarial network, which may include:
[0105] Step S502: Calculate the loss value of the initial multimodal conditional generative adversarial network according to each identification result, and make a first adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on the loss value to obtain the first adjusted initial multimodal conditional generative adversarial network.
[0106] Specifically, after obtaining the identification result, the server can determine whether the identification result is true or false. In this embodiment, when the server determines that the identification result output by the discriminator is false, the server can calculate the loss value based on the obtained test map image and the satellite map image corresponding to the two-dimensional plane map, so as to make a first adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on the calculated loss value.
[0107] In this embodiment, the loss value can be calculated by different loss functions, for example, a cross entropy loss function, a binary classification loss function, a multi-classification loss function, etc., without limitation.
[0108] Step S504, according to the predicted real scene images whose identification results are true and the corresponding generation parameters, determine the difference indicators between the predicted real scene images based on the preset control function, and make a second adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on the difference indicators to obtain the initial multimodal conditional generative adversarial network after the second adjustment.
[0109] In this embodiment, the server may also calculate the difference index between the predicted real scene images according to the predicted real scene images generated by different generation parameters and the corresponding generation parameters through a preset control function.
[0110] In this embodiment, the control function can refer to the formula (1) above, which will not be described again here.
[0111] In this embodiment, in order to make the difference between multiple real-scene images output by the trained multimodal conditional generative adversarial network as large as possible, the server can make a second adjustment to the network parameters of the initial multimodal conditional generative adversarial network according to the calculated difference index to obtain the second adjusted initial multimodal conditional generative adversarial network.
[0112] Step S506, iteratively training the initial multimodal conditional generative adversarial network after the first adjustment and the second adjustment according to a preset number of iterations to obtain a trained multimodal conditional generative adversarial network.
[0113] In this embodiment, the server performs iterative training for a preset number of iterations on the initial multimodal conditional generative adversarial network after the first adjustment and the second adjustment to obtain a trained multimodal conditional generative adversarial network.
[0114] In the above embodiment, by respectively calculating the loss value and the difference index, and adjusting and iterating the initial multimodal conditional generative adversarial network respectively, the accuracy of the training can be improved, and the accuracy of the final multimodal conditional generative adversarial network prediction can be improved.
[0115] In this embodiment, the multimodal conditional generative adversarial network and the discriminator can be trained by cross-iterative training. Specifically, cross-iterative training is performed in the following manner: a multimodal conditional generative adversarial network of the first generation can generate some very poor images, and then a discriminator of the first generation can accurately classify the pictures generated by the multimodal conditional generative adversarial network and the real pictures. In short, the discriminator is a binary classifier, which outputs 0 for the images generated by the multimodal conditional generative adversarial network and 1 for the real images. Further, the server starts to train a second-generation multimodal conditional generative adversarial network based on the identification results of the discriminator. The second-generation multimodal conditional generative adversarial network can generate slightly better images, which can make the first-generation discriminator think that these generated images are real graphics. Then the server will train a second-generation discriminator, which can accurately identify the real images and the images generated by the second-generation multimodal conditional generative adversarial network. By analogy, there will be three, four, and n generations of multimodal conditional generative adversarial networks and discriminators. Finally, the final discriminator will not be able to distinguish between the images generated by the multimodal conditional generative adversarial network and the real images, so that the training is completed.
[0116] It should be understood that although Figure 2 , Figure 4 and Figure 5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , Figure 4 and Figure 5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0117] In one embodiment, Figure 6 As shown, a semantic segmentation image conversion device is provided, comprising: an initial real scene image receiving module 100, a semantic segmentation processing module 200 and a multi-modal real scene image generating module 300, wherein:
[0118] The initial real scene image receiving module 100 is used to receive the initial real scene image collected by the collection device.
[0119] The semantic segmentation processing module 200 is used to perform semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image.
[0120] The multimodal real-scene image generation module 300 is used to input the semantic segmentation image into the multimodal conditional generative adversarial network, and output multiple real-scene images corresponding to the semantic segmentation image. The content modality of each real-scene image in the multiple real-scene images is different. The multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function. The preset control function is determined according to the real-scene images of different content modalities and the generation parameters corresponding to the real-scene images of different content modalities.
[0121] In one embodiment, the above device may further include:
[0122] The normalization processing module is used to perform image size normalization processing on the initial real scene image before the semantic segmentation processing module 200 performs semantic segmentation processing on the initial real scene image to generate a semantic segmentation image, so as to obtain the initial real scene image after the image size normalization processing.
[0123] In this embodiment, the semantic segmentation processing module 200 is used to perform semantic segmentation processing on the initial real scene image after the image size normalization processing, and generate a semantic segmentation image corresponding to the initial real scene image after the image size normalization processing.
[0124] In one embodiment, the multimodal real scene image generation module 300 may include:
[0125] The feature extraction submodule is used to extract features of the semantic segmentation image through the encoder in the multimodal conditional generative adversarial network to generate a feature map corresponding to the semantic segmentation image.
[0126] The decoding conversion submodule is used to decode and convert the feature map through the generator in the multimodal conditional generative adversarial network to obtain multiple real-scene images corresponding to the semantic segmentation image.
[0127] In one of the embodiments, the decoding conversion submodule is used to configure a plurality of different generation parameters through a generator, and generate a plurality of real scene images corresponding to the semantic segmentation image according to each generation parameter and the feature map.
[0128] In one embodiment, the above device may further include:
[0129] Training module for training multimodal conditional generative adversarial networks.
[0130] In this embodiment, the training module may include:
[0131] The training set image acquisition submodule is used to acquire training set images.
[0132] The predicted image generation submodule is used to input the training set images into the constructed initial multimodal conditional generative adversarial network, and generate corresponding predicted real scene images based on the determined generation parameters.
[0133] The image set generation submodule is used to generate image sets corresponding to each predicted real scene image according to each predicted real scene image and the training set image.
[0134] The identification submodule is used to input each image set into the discriminator for authenticity identification and output the corresponding identification results.
[0135] The iterative training submodule is used to adjust the network parameters of the initial multimodal conditional generative adversarial network based on each identification result, and iteratively train the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to obtain a trained multimodal conditional generative adversarial network.
[0136] In one embodiment, the above device may further include:
[0137] The storage module is used to store the initial multimodal conditional generative adversarial network and the corresponding training index value of each iterative training after the iterative training submodule iteratively trains the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations.
[0138] In this embodiment, the iterative training submodule can determine the multimodal conditional generative adversarial network that has completed training in the initial multimodal conditional generative adversarial network that corresponds to the highest training index value.
[0139] In one embodiment, the iterative training submodule may include:
[0140] The first adjustment unit is used to calculate the loss value of the initial multimodal conditional generative adversarial network according to each identification result, and make a first adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on the loss value to obtain the initial multimodal conditional generative adversarial network after the first adjustment.
[0141] The second adjustment unit is used to determine the difference index between each predicted real scene image based on a preset control function according to each predicted real scene image with true identification results and the corresponding generation parameters, and to make a second adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on each difference index to obtain the initial multimodal conditional generative adversarial network after the second adjustment.
[0142] The iteration unit is used to iteratively train the initial multimodal conditional generative adversarial network after the first adjustment and the second adjustment according to a preset number of iterations to obtain a trained multimodal conditional generative adversarial network.
[0143] For the specific definition of the semantic segmentation image conversion device, please refer to the definition of the semantic segmentation image conversion method above, which will not be repeated here. The various modules in the above-mentioned semantic segmentation image conversion device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0144] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as semantic segmentation images and generated real-life images. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a semantic segmentation image conversion method is implemented.
[0145] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0146] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: receiving an initial real scene image acquired by an acquisition device; performing semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image; inputting the semantic segmentation image into a multimodal conditional generative adversarial network, and outputting a plurality of real scene images corresponding to the semantic segmentation image, wherein each of the plurality of real scene images has a different content modality, and the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and the preset control function is determined according to the real scene images of different content modalities and generation parameters corresponding to the real scene images of different content modalities.
[0147] In one of the embodiments, when the processor executes the computer program, it implements semantic segmentation processing on the initial real scene image. Before generating the semantic segmentation image, the following steps can also be implemented: performing image size normalization processing on the initial real scene image to obtain the initial real scene image after image size normalization processing.
[0148] In this embodiment, when the processor executes the computer program, it implements semantic segmentation processing on the initial real scene image and generates a semantic segmentation image corresponding to the initial real scene image, which may include: performing semantic segmentation processing on the initial real scene image after image size normalization processing, and generating a semantic segmentation image of the initial real scene image after image size normalization processing.
[0149] In one of the embodiments, when the processor executes the computer program, inputting the semantic segmentation image into the multimodal conditional generative adversarial network and outputting multiple real-scene images corresponding to the semantic segmentation image can include: extracting features of the semantic segmentation image through the encoder in the multimodal conditional generative adversarial network to generate a feature map corresponding to the semantic segmentation image; decoding and converting the feature map through the generator in the multimodal conditional generative adversarial network to obtain multiple real-scene images corresponding to the semantic segmentation image.
[0150] In one embodiment, when the processor executes the computer program, it decodes and converts the feature map through the generator in the multimodal conditional generative adversarial network to obtain multiple real-scene images corresponding to the semantic segmentation image, which can include: configuring multiple different generation parameters through the generator, and generating multiple real-scene images corresponding to the semantic segmentation image according to each generation parameter and the feature map.
[0151] In one of the embodiments, when the processor executes the computer program, the generation method of the multimodal conditional generative adversarial network may include: obtaining training set images; inputting the training set images into the constructed initial multimodal conditional generative adversarial network, and generating corresponding predicted real scene images based on the determined generation parameters; generating image sets corresponding to the predicted real scene images according to the predicted real scene images and the training set images; inputting each image set into the discriminator for authenticity identification, and outputting corresponding identification results; based on each identification result, adjusting the network parameters of the initial multimodal conditional generative adversarial network, and iteratively training the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to obtain a trained multimodal conditional generative adversarial network.
[0152] In one of the embodiments, when the processor executes the computer program, after iterative training of the initial multimodal conditional generative adversarial network after adjusting the network parameters according to a preset number of iterations, the processor can also implement the following steps: storing the initial multimodal conditional generative adversarial network of each iterative training and the corresponding training indicator value.
[0153] In this embodiment, when the processor executes the computer program to obtain a trained multimodal conditional generative adversarial network, it can include: determining that the initial multimodal conditional generative adversarial network corresponding to the highest training index value is a trained multimodal conditional generative adversarial network.
[0154] In one embodiment, when the processor executes the computer program, it is implemented to adjust the network parameters of the initial multimodal conditional generative adversarial network based on each identification result, and iteratively train the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to generate a trained multimodal conditional generative adversarial network, which may include: calculating the loss value of the initial multimodal conditional generative adversarial network according to each identification result, and making a first adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on the loss value to obtain the initial multimodal conditional generative adversarial network after the first adjustment; determining the difference index between each predicted real scene image based on a preset control function according to each predicted real scene image with each identification result being true and the corresponding generation parameters, and making a second adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on each difference index to obtain the initial multimodal conditional generative adversarial network after the second adjustment; iteratively training the initial multimodal conditional generative adversarial network after the first adjustment and the second adjustment according to a preset number of iterations to obtain the trained multimodal conditional generative adversarial network.
[0155] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving an initial real-scene image acquired by an acquisition device; performing semantic segmentation processing on the initial real-scene image to generate a semantic segmentation image corresponding to the initial real-scene image; inputting the semantic segmentation image into a multimodal conditional generative adversarial network, and outputting a plurality of real-scene images corresponding to the semantic segmentation image, wherein each of the plurality of real-scene images has a different content modality, and the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and the preset control function is determined according to the real-scene images of different content modalities and generation parameters corresponding to the real-scene images of different content modalities.
[0156] In one of the embodiments, when the computer program is executed by the processor, semantic segmentation processing is performed on the initial real scene image. Before generating the semantic segmentation image, the following steps can also be implemented: image size normalization processing is performed on the initial real scene image to obtain the initial real scene image after image size normalization processing.
[0157] In this embodiment, when the computer program is executed by the processor, semantic segmentation processing is performed on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image, which may include: performing semantic segmentation processing on the initial real scene image after image size normalization processing, and generating a semantic segmentation image of the initial real scene image after image size normalization processing.
[0158] In one of the embodiments, when the computer program is executed by the processor, inputting the semantic segmentation image into the multimodal conditional generative adversarial network and outputting multiple real-scene images corresponding to the semantic segmentation image can include: extracting features of the semantic segmentation image through the encoder in the multimodal conditional generative adversarial network to generate a feature map corresponding to the semantic segmentation image; decoding and converting the feature map through the generator in the multimodal conditional generative adversarial network to obtain multiple real-scene images corresponding to the semantic segmentation image.
[0159] In one embodiment, when the computer program is executed by a processor, it is implemented to decode and convert the feature map through the generator in the multimodal conditional generative adversarial network to obtain multiple real-scene images corresponding to the semantic segmentation image, which can include: configuring multiple different generation parameters through the generator, and generating multiple real-scene images corresponding to the semantic segmentation image according to each generation parameter and the feature map.
[0160] In one embodiment, when the computer program is executed by the processor, the generation method of the multimodal conditional generative adversarial network may include: obtaining training set images; inputting the training set images into the constructed initial multimodal conditional generative adversarial network, and generating corresponding predicted real scene images based on the determined generation parameters; generating image sets corresponding to the predicted real scene images according to the predicted real scene images and the training set images; inputting each image set into the discriminator for authenticity identification, and outputting corresponding identification results; based on each identification result, adjusting the network parameters of the initial multimodal conditional generative adversarial network, and iteratively training the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to obtain a trained multimodal conditional generative adversarial network.
[0161] In one of the embodiments, when the computer program is executed by the processor, after iterative training of the initial multimodal conditional generative adversarial network after adjusting the network parameters according to a preset number of iterations, the following steps may also be implemented: storing the initial multimodal conditional generative adversarial network and the corresponding training indicator values for each iterative training.
[0162] In this embodiment, when the computer program is executed by the processor to obtain a trained multimodal conditional generative adversarial network, it can include: determining that the initial multimodal conditional generative adversarial network corresponding to the highest training index value is a trained multimodal conditional generative adversarial network.
[0163] In one embodiment, when the computer program is executed by the processor, it is implemented to adjust the network parameters of the initial multimodal conditional generative adversarial network based on each identification result, and iteratively train the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to generate a trained multimodal conditional generative adversarial network, which may include: calculating the loss value of the initial multimodal conditional generative adversarial network according to each identification result, and making a first adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on the loss value to obtain the initial multimodal conditional generative adversarial network after the first adjustment; determining the difference index between each predicted real scene image based on a preset control function according to each predicted real scene image with true identification results and the corresponding generation parameters, and making a second adjustment to the network parameters of the initial multimodal conditional generative adversarial network based on each difference index to obtain the initial multimodal conditional generative adversarial network after the second adjustment; iteratively training the initial multimodal conditional generative adversarial network after the first adjustment and the second adjustment according to a preset number of iterations to obtain the trained multimodal conditional generative adversarial network.
[0164] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0165] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0166] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A semantic segmentation image conversion method, characterized in that: The method comprises: Receiving an initial real scene image acquired by an acquisition device; Performing semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image; Inputting the semantic segmentation image into a multimodal conditional generative adversarial network, outputting a plurality of real scene images corresponding to the semantic segmentation image, wherein each of the plurality of real scene images has a different content modality, and the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and during training, the value of the difference index determined by the control function is made as large as possible, and the preset control function is determined according to the real scene images of different content modalities and generation parameters corresponding to the real scene images of different content modalities; The control function adopts the following formula: Among them, G(E(X), Z1) is the real scene image output corresponding to the generation parameter Z1, and G(E(X), Z2) is the real scene image output corresponding to the generation parameter Z2.
2. The method according to claim 1, characterized in that: Before the semantic segmentation processing is performed on the initial real scene image to generate the semantic segmentation image, the method further includes: Performing image size normalization processing on the initial real scene image to obtain an initial real scene image after image size normalization processing; The performing semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image includes: The initial real scene image after the image size normalization processing is subjected to semantic segmentation processing to generate a semantic segmentation image corresponding to the initial real scene image after the image size normalization processing.
3. The method according to claim 1, characterized in that The step of inputting the semantic segmentation image into a multimodal conditional generative adversarial network and outputting a plurality of real scene images corresponding to the semantic segmentation image comprises: Extracting features from the semantic segmentation image through an encoder in a multimodal conditional generative adversarial network to generate a feature map corresponding to the semantic segmentation image; The feature map is decoded and converted by a generator in a multimodal conditional generative adversarial network to obtain a plurality of real scene images corresponding to the semantic segmentation image.
4. The method according to claim 3, characterized in that The generator in the multimodal conditional generative adversarial network decodes and converts the feature map to obtain multiple real scene images corresponding to the semantic segmentation image, including: A plurality of different generation parameters are configured by the generator, and a plurality of real scene images corresponding to the semantic segmentation image are generated according to each of the generation parameters and the feature map.
5. The method according to claim 1, characterized in that The generation method of the multimodal conditional generative adversarial network includes: Get training set images; Inputting the training set images into the constructed initial multimodal conditional generative adversarial network, and generating corresponding predicted real scene images based on the determined generation parameters; Generating image sets corresponding to the predicted real scene images according to the predicted real scene images and the training set images; Inputting each of the image sets into a discriminator for authenticity identification, and outputting corresponding identification results; Based on each of the identification results, the network parameters of the initial multimodal conditional generative adversarial network are adjusted, and according to a preset number of iterations, the initial multimodal conditional generative adversarial network after the network parameters are adjusted is iteratively trained to obtain a trained multimodal conditional generative adversarial network.
6. The method according to claim 5, characterized in that After iteratively training the initial multimodal conditional generative adversarial network after adjusting the network parameters according to the preset number of iterations, the method further includes: Store the initial multimodal conditional generative adversarial network and the corresponding training indicator values for each iteration of training; The multimodal conditional generative adversarial network obtained after training includes: Determine the initial multimodal conditional generative adversarial network corresponding to the highest training index value as the multimodal conditional generative adversarial network that has completed training.
7. The method according to claim 5, characterized in that The method of adjusting the network parameters of the initial multimodal conditional generative adversarial network based on each of the identification results, and iteratively training the initial multimodal conditional generative adversarial network after the network parameters are adjusted according to a preset number of iterations to generate a trained multimodal conditional generative adversarial network includes: According to each of the identification results, a loss value of the initial multimodal conditional generative adversarial network is calculated, and based on the loss value, a first adjustment is made to a network parameter of the initial multimodal conditional generative adversarial network to obtain a first adjusted initial multimodal conditional generative adversarial network; According to the predicted real scene images whose identification results are true and the corresponding generation parameters, the difference index between the predicted real scene images is determined based on a preset control function, and the network parameters of the initial multimodal conditional generative adversarial network are adjusted for the second time based on the difference indexes to obtain the initial multimodal conditional generative adversarial network after the second adjustment; According to a preset number of iterations, the initial multimodal conditional generative adversarial network after the first adjustment and the second adjustment is iteratively trained to obtain a trained multimodal conditional generative adversarial network.
8. A semantic segmentation image conversion device, characterized in that: The device comprises: An initial real scene image receiving module is used to receive the initial real scene image collected by the collection device; A semantic segmentation processing module, used to perform semantic segmentation processing on the initial real scene image to generate a semantic segmentation image corresponding to the initial real scene image; A multimodal real-scene image generation module, used for inputting the semantic segmentation image into a multimodal conditional generative adversarial network, and outputting a plurality of real-scene images corresponding to the semantic segmentation image, wherein each of the plurality of real-scene images has a different content modality, and the multimodal conditional generative adversarial network is generated by training based on a difference index determined by a preset control function, and during training, the value of the difference index determined by the control function is made as large as possible, and the preset control function is determined according to real-scene images of different content modalities and generation parameters corresponding to the real-scene images of different content modalities; The control function adopts the following formula: Among them, G(E(X), Z1) is the real scene image output corresponding to the generation parameter Z1, and G(E(X), Z2) is the real scene image output corresponding to the generation parameter Z2.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
