Remote sensing scene text-image generation method assisted by cross-modal target expression

Through the target cross-modal expression auxiliary method, the target image is converted into text modal features and integrated into the generation process, which solves the problem of combining target images and text conditions in remote sensing scenes, improves the pertinence and quality of generated images, and avoids Layout information restrictions.

CN118587327BActive Publication Date: 2024-10-01DALIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411070980.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-10-01
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

In remote sensing scenarios, it is difficult for existing technologies to effectively combine target images and text conditions, resulting in distortion of the generated image targets and affecting quality, especially in the absence of target layout information.

Method used

Using the method of target cross-modal expression assistance, the target adaptive cross-modal expression network is constructed through the pre-trained CLIP model, the target image is converted into text modal features, and the target text features are integrated with the original text features as control conditions The image generation process is introduced to avoid the interference of layout uncertainty and enhance the pertinence of the generation process.

Benefits of technology

Effectively combines target image and text conditions to improve the pertinence and quality of generated images, avoid the restrictions of additional layout information, and improve the diversity of generation and authenticity of details.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587327B_ABST
    Figure CN118587327B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of image information processing, and discloses a remote sensing scene text-image generation method assisted by target cross-modal expression. This method first utilizes the cross-modal feature association capability of the pre-trained image-text joint expression model to adaptively match the corresponding text modal expression for the target image condition, and avoids the interference of layout uncertainty on the target information through the cross-modal conversion from the target image to the target text; then integrates the target text features with the original text condition features, and uses the target information to modify and expand the text conditions; finally, the supplemented text features are introduced as control conditions into the image generation process to regulate the generated image. While avoiding the introduction of additional layout priors, the present invention effectively realizes the targeted enhancement of the local target in the generated image using the image target conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image information processing, relates to a problem of image generation guided by text conditions in remote sensing scenes, and proposes a new method, specifically relates to a remote sensing scene text-image generation method assisted by target cross-modal expression. Background Art

[0002] Currently, the technologies related to the present invention include three aspects: the first is a text-image generation method based on deep learning; the second is an image generation method for remote sensing scenes; and the third is an image-text cross-modal joint modeling method.

[0003] The text-to-image generation methods based on deep learning are mainly divided into two categories: one method builds a generative model and a discriminative model based on the basic principle of generative adversarial networks, and makes the two models compete with each other by optimizing them in turn, so as to continuously improve the quality of generated images. Ming et al. proposed a single-stage generative discriminative framework in the paper "Df-gan: A simple and effective baseline for text-to-image synthesis", which greatly simplified the overall structure of the network and improved the performance by adding technologies such as gradient penalty and affine transformation; Tan et al. designed a semantic disentanglement module in the paper "DR-GAN: Distribution Regularization for Text-to-Image Generation" to help the generator extract key semantic information for image generation, and at the same time, normalized and denoised the potential distribution of the image by introducing the variational autoencoder into the discriminative process to better discriminate and supervise the generated results. Another method based on diffusion model does not require model adversarial training, but approximates the image data distribution by simulating the random walk process. Dhariwal et al. proposed a conditional diffusion method based on classification guidance in the paper "Diffusion models beat gans on image synthesis". They used an auxiliary classification network to calculate the classification cross entropy loss of the generated images in the reverse diffusion process, and achieved conditional control of the generation process by guiding the next generation sampling in the gradient. Rombach et al. designed a general diffusion generation framework in the paper "High-resolution image synthesis with latent diffusion models". By transferring the diffusion operation from the image space to the latent feature space, they achieved more efficient and faster conditionally controlled image generation.

[0004] In recent years, there have been several studies on remote sensing scene image generation methods, but the correlation of related studies is relatively weak. Among them, the representative methods include a text-remote sensing image generation method constructed using a modern Hopfield network proposed by Xu et al. in the paper "Txt2Img-MHN: Remote sensing image generation from textusing modern Hopfield networks", which processes text-image features through the Hopfield network structure and ensures rich semantic encoding through hierarchical prototype learning; for example, Tang et al. in the paper "Crs-diff: Controllable generative remote sensing foundation model" combined remote sensing image related conditions such as depth map, segmentation map, target layout as control information, and improved the generation process of the Stable Diffusion model so that it can better adapt to the generation needs of remote sensing scenes.

[0005] Image-text cross-modal joint modeling aims to establish a common encoding space between image and text data, and achieve a unified representation of the features of data in different modalities. A representative method is Radford et al., who used the idea of ​​contrastive learning in the paper "Learning transferable visual models from natural language supervision" to train on a large-scale image-text pairing dataset to learn the cross-modal alignment relationship between images and text.

[0006] Remote sensing image scenes are complex and rich in content, and the information in them is difficult to express briefly and comprehensively through natural language text. Existing image-text data in the remote sensing field is limited by data annotation overhead, and the text descriptions corresponding to the images can only provide simple overall scene descriptions. Such generalized text cannot provide detailed target-level information for the image generation process, resulting in distortion of the generated target and affecting image quality. To address this problem, a potential approach is to use additional target images as control conditions to provide fine-grained target-level information to the generation process to supplement the deficiencies of text descriptions. However, in the absence of target location layout information, existing methods cannot effectively align the local information provided by the target image with the global generation process; if layout information is further introduced, the generation diversity will be greatly limited. Therefore, how to combine the target image reference with the text conditional image generation process in a targeted manner without providing the target layout is the core difficulty of using target images to assist remote sensing scene text-image generation. Summary of the invention

[0007] Aiming at the problem of targeted introduction of image target reference in remote sensing scene text-image generation task, a remote sensing scene text-image generation method assisted by target cross-modal expression is proposed. This method firstly utilizes the cross-modal feature association capability of the pre-trained image-text joint expression model to adaptively match the corresponding text modal expression for the target image condition, and avoids the interference of layout uncertainty on the introduction of target information through cross-modal transformation from target image to target text; further, the target text features are integrated with the original text condition features, and the target information is used to modify and expand the text conditions; finally, the supplemented text features are introduced as control conditions into the image generation process to regulate the generated image.

[0008] The technical solution of the present invention:

[0009] A remote sensing scene text-image generation method assisted by target cross-modal expression, the steps are as follows:

[0010] The entire training process is divided into the training phase of the target adaptive cross-modal representation network and the training phase of the image adversarial generation network;

[0011] (1) Target adaptive cross-modal representation training stage

[0012] A target adaptive cross-modal representation network is constructed based on the pre-trained CLIP text and image encoder (the model proposed by Radford et al. in the paper "Learning transferable visual models from natural language supervision"). The pre-trained CLIP text and image encoders are composed of 12 Transformer self-attention layers; then a text description conversion model is constructed, which consists of multiple mappers and a set of learnable vectors, which are used to adaptively generate target-specific text representations from multi-scale features of target images and learn class-invariant target representations according to target categories; each mapper includes a 1 1 convolution and a fully connected layer for feature dimension reduction and transformation;

[0013] The details are as follows: Remote Sensing Scene Text-Image Dataset ,in For the images, For images The corresponding A text description, is the number of text descriptions corresponding to each image, is the total number of text-image pairs; from the entire image data set Each image Capture the target partial image Construct the entire target image set , For images The total number of target images selected; the target local image The selection criteria are: in the text description of each image The targets that appear repeatedly in the image, the targets that are the visual center of gravity in the image, or the targets that represent the scene type in the image.

[0014] From the entire target image set Sampling target image , the target adaptive cross-modal representation network receives the target image As input, the pre-trained CLIP image encoder Extract multi-scale intermediate features of the target image modality And the final image modality features ,in express No. The feature map of the layer output, is the number of feature layers selected, , , The width, height and number of channels of the feature map are express Extract the final image modality features of the target image, is the length of the target image mode; for the extracted multi-scale target image intermediate features , through a set of mappers Reduce the dimension and map it to obtain the target specific representation corresponding to the target image ,in It is The textual representation corresponding to the layer target image modality, The feature length of each text representation; usually the deepest feature representation of the image encoder tends to capture abstract semantics, but lacks description of local information such as edges or shapes. For this task, we hope to preserve the original information as completely as possible when performing cross-modal transformation of the target condition, which helps to build a more accurate text modality target information representation. On this basis, we design a set of learnable class-invariant target representations for each type of target image ,in , Represents the target image Category, Represents length for class-invariant targets; It is a set of learnable vectors shared among target images of the same category, used to express the text modal representation of the common information of target images of the same category; the class-invariant target representation and the target-specific representation are connected to obtain the target image Text modal representation of ; is defined as:

[0015] T o c ̂ = t c 1 t c 2 ⋅⋅⋅[ t c M ][ t o 1 ][ t o 2 ]⋅⋅⋅[ t o L ][ CLS o c ] (1)

[0016] in, [ CLS o c ] is the target Corresponding category The text encoding of the target plays a role in stabilizing the text representation. Input pre-trained CLIP text encoder Extracting target text modality features , which completes the adaptive feature transformation of the target from image modality to text modality.

[0017] In order to make the target text representation as semantically consistent as possible with the target image, the contrast loss is used Constraining the target's text modality features Image modality features , Defined as:

[0018] (2)

[0019] in, is the distribution of the target image, and we have:

[0020] (3)

[0021] in, represents the cosine similarity calculation, is the temperature hyperparameter.

[0022] Contrastive loss Maximize the semantic similarity between the target image and the synthesized text description, while distinguishing the target image from the text description of other categories, using Training a target-adaptive cross-modal representation network helps transform the target image into a textual modality representation that is target-discriminative and semantically consistent with the image.

[0023] (2) Image adversarial generation training stage

[0024] After the first stage of training, the target image can be adaptively cross-modally converted into text modal features. The fundamental purpose of cross-modal conversion is to overcome the lack of spatial mapping from local target information to the global generation process in the image modality. By converting the target image condition into a text modal condition that is independent of spatial information, the target image condition can be introduced into the generation process in the same way as the text modal condition.

[0025] Specifically, from the remote sensing scene text-image dataset Sampling a real image , from the real image Sample a text description condition from the corresponding text description set , while from which the real image A target image condition is randomly selected from the corresponding target image set , randomly sample a length from a Gaussian distribution The noise vector .

[0026] Fixed target adaptive cross-modal representation network, input target image condition Convert it into a textual representation of the target image , further input CLIP text encoder Get the target text features ; At the same time, the text description condition Enter the CLIP text encoder Get global text features ; Noise vector , global text features And the target text features Splicing to get target enhanced text conditions :

[0027] (4)

[0028] in, Represents a feature concatenation operation.

[0029] To make the text condition and initial features Deep and efficient combination, the present invention adopts the deep text-image fusion module (DFBlock) proposed by Ming et al. in the paper "Df-gan: A simple and effective baseline for text-to-image synthesis" to enhance the text condition of the target Introducing the generation process. Generative Network The structure is:

[0030] Generative Network With noise vector , target enhanced text conditions As input, the output generates the resulting image, whose structure is: noise vector After a fully connected layer, the vector is reshaped to a spatial size of 7 7. Initial generated features with channel dimension 64 ; The initial features Input 4 fusion modules including DFBlock to enhance the text condition of the target Introducing initial features Get the generated intermediate features The structure of the fusion module is as follows: two DFBlocks and two convolution operations are connected in series alternately to form a fusion module; in each DFBlock, two multi-layer perceptrons are used respectively. , Text conditions from target enhancement Predict a set of channel scaling parameters and bias parameters , expressed as:

[0031] (5)

[0032] For the initial features , using the scaling parameter and bias parameters Perform channel-level affine transformation operations, expressed as:

[0033] (6)

[0034] in, represents an affine transformation operation, is the initial feature No. The characteristic components of the channels, and The scaling parameters are and bias parameters No. The components of the channels;

[0035] Initial Features Text conditionalization using target enhancement via fusion module Strengthen conditional information to generate intermediate features ; Input pre-trained CLIP image encoder, combined with text conditioning using target augmentation A set of hint vectors predicted by a fully connected layer are appended to generate intermediate features In the above example, we obtain the generated intermediate features combining visual modality information. ; Finally, combine the visual modality information to generate intermediate features After 6 fusion modules connected by upsampling operations, the text condition of target enhancement is continued While guiding the generation, the feature space size is made close to the image size, and the final image generation result output is obtained;

[0036] In the discrimination process, the real image or the image generated by the generative network is passed through the CLIP image encoder to extract intermediate visual features, and the CLIP complex scene understanding ability is used to extract more informative visual features from the image to be discriminated. The discriminant network design based on CLIP proposed by Ming et al. in the paper "Galip: Generative adversarial clips for text-to-image synthesis" is adopted. The structure is: the image to be judged Input CLIP image encoder Get a series of intermediate visual features ,in To select the number of visual feature layers, For image encoder Extract judgment image The obtained The visual features between the first and second layers Start by putting all The intermediate visual feature maps of the layers are integrated by: After inputting two convolutional layers with ReLU activation and the next layer of visual features The result is then added to two convolutional layers with ReLU activation, and this process continues until it is combined with the last layer of visual features. Complete the integration and obtain the integrated multi-scale image features; transform the global text features , target text features After channel-by-channel splicing, it is replicated in space so that it has the same spatial size as the integrated multi-scale image features, and then it is spliced ​​with the integrated multi-scale image features and input into a single-channel discriminator for prediction to obtain the discrimination result output.

[0037] The generative network and the discriminative network adopt an alternating optimization strategy to update parameters in each round of training. The loss functions of the discriminative model and the generative model in the adversarial generative training phase are:

[0038] (7)

[0039] L G =- E G z, T g , T Q ~ P g D G z, T g , T Q , T g , T Q -λ E G z, T g , T Q ~ P g [ S (G z, T g , T Q , T g )] (8)

[0040] in, is random noise sampled from a Gaussian distribution, is the global text feature, is the target text feature, is a real image; To generate the network, For the discriminant network, To generate CLIP similarity between image and text conditions; and To control the hyperparameters of the gradient penalty, the coefficient Used to adjust the weight of text-image similarity loss; , , They represent the generated data distribution, the real data distribution, and the mismatched data distribution respectively; , Respectively in and The gradient component in the direction, is the mathematical expectation.

[0041] Beneficial effects of the present invention: The present invention uses the inherent target information in the text-image generation process as the matching object, based on the correspondence between the target image condition and the text condition, uses the text modality target information corresponding to the target image as a medium, and combines the target image condition into the image generation process by expanding and strengthening the original text condition in the text modality. In this way, while avoiding the introduction of additional layout priors, the targeted enhancement of the target part in the generated image by using the image target condition is effectively achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is the overall training flow chart of the network.

[0043] Figure 2 Schematic diagram of the overall structure of the remote sensing scene text-image generation method assisted by target cross-modal expression.

[0044] Figure 3An example of the generation effect of the remote sensing scene text-image generation method assisted by cross-modal expression of the target. DETAILED DESCRIPTION

[0045] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings and technical solutions.

[0046] Figure 1 The flowchart of the overall network training is shown below. First, extract the local target image from the entire image data of the text-image dataset, and use formulas (1), (2), and (3) to train the target adaptive cross-modal representation model based on the category information of the target image, so that the model has the ability to adaptively convert the target image modal information into the text modality; further sample a batch of text-image pairs from the text-image dataset, and randomly select a target from each image as the target image condition, and use the previously trained target adaptive cross-modal representation model to convert the target image into a text modality feature, and then use formula (4) to concatenate it with the global text feature and the noise vector randomly sampled from the Gaussian distribution to obtain the target enhanced text condition. Use this condition to control the generation network in the manner of formulas (5) and (6). Generate images, and input the generated results and real images into the discriminant network together Finally, the discriminant network and the generative network are alternately trained using formula (7) and formula (8) until the model converges. The generative network obtained has the ability to generate high-quality remote sensing images based on global text and local target image conditions.

[0047] In order to obtain a remote sensing scene image during the model inference process, it is necessary to input a text description condition about the image and a target image condition about the scene. The text description condition is composed of short English sentences, with words separated by spaces and ending with a period. The description should not be too long, preferably within 50 words; the target image condition should ensure the relevance to the text description condition, that is, the scene described in the text must contain the target type shown in the target image condition. In the reasoning process, the target image condition is first input into the target adaptive cross-modal representation model to obtain the text modal features of the target image, and then the text description condition is converted into a global text feature, which is input into the generative network together with the noise randomly sampled from the Gaussian distribution. Output the generated remote sensing image.

[0048] Figure 3The figure is a schematic diagram of the method generation effect. The generated images of the method of the present invention and two existing methods: GALIP proposed by Ming et al. in the literature "Galip: Generative adversarial clips for text-to-image synthesis" and DF-GAN proposed by Ming et al. in the literature "Df-gan: A simple and effective baseline for text-to-image synthesis" are visualized and compared. The generated results in the 1st, 3rd and 6th columns of the figure are limited by the limited information provided by the single text condition. In remote sensing scenes containing complex structure targets (such as aircraft, thermal power stations, and ships), the comparison method is difficult to obtain sufficient guidance from the text condition for accurate construction of the target, resulting in distortion of the target structure and shape, affecting the generation quality; in addition, the generated results in the 2nd and 7th columns of the figure are observed. For scenes with simple but small and dense target shapes, the two existing methods can roughly generate targets with correct shapes, but the target details are missing to varying degrees. In contrast, the method designed in this study benefits from the reasonable application of additional target conditions. On the one hand, the generation ability of complex targets is significantly enhanced, and on the other hand, the texture details of simple targets can be further enriched, which comprehensively improves the authenticity of the generated images.

Claims

1. A remote sensing scene text-image generation method assisted by target cross-modal expression, characterized in that: The steps include: The entire training process of the remote sensing scene text-image generation method assisted by target cross-modal expression is divided into a target adaptive cross-modal representation network training phase and an image adversarial generation network training phase; (1) Target adaptive cross-modal representation training stage A target adaptive cross-modal representation network is constructed based on the pre-trained CLIP text encoder and the pre-trained CLIP image encoder. The pre-trained CLIP text encoder and the pre-trained CLIP image encoder are both composed of 12 Transformer self-attention layers. A text description conversion model is then constructed, which consists of multiple mappers and a set of learnable vectors, which are used to adaptively generate target-specific text representations from multi-scale features of target images and learn class-invariant target representations according to target categories. Each mapper includes a 1 1 convolution and one fully connected layer; specifically: Remote Sensing Scene Text-Image Dataset ,in For the images, For images The corresponding A text description, is the number of text descriptions corresponding to each image, is the total number of text-image pairs; from the entire image data set Each image Capture the target partial image Construct the entire target image set , For images The total number of target images selected; the target local image The selection criteria are: in the text description of each image The recurring targets in the image, the visual center targets in the image, or the targets in the image that represent the scene type; From the entire target image set Sampling target image , a pre-trained CLIP image encoder Extract multi-scale intermediate features of the target image modality And the final image modality features ,in express No. The feature map of the layer output, is the number of feature layers selected, , , The width, height and number of channels of the feature map are express Extract the final image modality features of the target image, is the length of the target image modality; for the multi-scale intermediate features extracted from the target image modality , through a set of mappers Reduce the dimension and map it to obtain the target specific representation corresponding to the target image ,in It is The textual representation corresponding to the layer target image modality, The feature length of each text representation; at the same time, a set of learnable class-invariant target representations is designed for each type of target image ,in , Represents the target image Category, The number of class-invariant target statements; It is a set of learnable vectors shared among target images of the same category, used to express the text modal representation of the common information of target images of the same category; the class-invariant target representation and the target-specific representation are connected to obtain the target image Text modal representation of ; is defined as: (1) in, is the target image Corresponding category Text encoding is used to stabilize text representation; the text modality representation of the target image Input pre-trained CLIP text encoder Extract text modality features of target images ; Using contrast loss Constraining the text modality features of target images and target image modality features , Defined as: (2) in, is the distribution of the target image, and we have: (3) in, represents the cosine similarity calculation, is the temperature hyperparameter; (2) Image adversarial generation training stage From remote sensing scene text-image dataset Sampling a real image , from the real image Sample a text description condition from the corresponding text description set , while from which the real image A target image condition is randomly selected from the corresponding target image set , randomly sample a length from a Gaussian distribution The noise vector ; Fixed target adaptive cross-modal representation network, input target image condition Convert it into a textual representation of the target image , further input CLIP text encoder Get the target text features ; At the same time, the text description condition Input pre-trained CLIP text encoder Get global text features ; Noise vector , global text features And the target text features Splicing to get target enhanced text conditions : (4) in, Represents feature concatenation operation; Generative Network With noise vector , target enhanced text conditions As input, the output generates the resulting image, whose structure is: noise vector After a fully connected layer, the vector is reshaped to a spatial size of 7 7. Initial generated features with channel dimension 64 ; The initial features Input 4 fusion modules including DFBlock to enhance the text condition of the target Introducing initial features Get the generated intermediate features , where two DFBlocks and two convolution operations are alternately connected in series to form a fusion module; in each DFBlock, two multi-layer perceptrons are used respectively , Text conditions from target enhancement Predict a set of channel scaling parameters and bias parameters , expressed as: (5) For the initial features , using the scaling parameter and bias parameters Perform channel-level affine transformation operations, expressed as: (6) in, represents an affine transformation operation, is the initial feature No. The characteristic components of the channels, and The scaling parameters are and bias parameters No. The components of the channels; Initial Features Text conditionalization using target enhancement via fusion module Strengthen conditional information to generate intermediate features ; Input pre-trained CLIP image encoder, combined with text conditioning using target augmentation A set of hint vectors predicted by a fully connected layer are appended to generate intermediate features In the above example, we obtain the generated intermediate features combining visual modality information. ; Finally, combine the visual modality information to generate intermediate features After 6 fusion modules connected by upsampling operations, the text condition of target enhancement is continued While guiding the generation, the feature space size is made close to the image size, and the final image generation result output is obtained; Text Conditioning with Target Augmentation Controlling and guiding the generation network Get the image generation result, the generated result is different from the real image As the image to be discriminated, input the discriminative network To discriminate; the discriminant network The structure is: the image to be judged Input pre-trained CLIP image encoder Get a series of intermediate visual features ,in To select the number of visual feature layers, For pre-trained CLIP image encoder Extract judgment image The obtained The visual features between the first and second layers Start by putting all The intermediate visual feature maps of the layers are integrated by: After inputting two convolutional layers with ReLU activation and the next layer of visual features The result is then added to two convolutional layers with ReLU activation, and this process continues until it is combined with the last layer of visual features. Complete the integration and obtain the integrated multi-scale image features; the global text features , target text features After splicing by channel, it is replicated in space so that it has the same spatial size as the integrated multi-scale image features, and then it is spliced ​​with the integrated multi-scale image features and input into a single-channel discriminator for prediction to obtain the discrimination result output; The remote sensing scene text-image generation network assisted by cross-modal expression of the target is trained with adversarial loss as a whole; the generation network and the discriminant network adopt an alternating optimization strategy to update parameters in each round of training. The loss functions of the discriminant network and the generation network in the adversarial generation training stage are: (7) (8) in, is random noise sampled from a Gaussian distribution, is the global text feature, is the target text feature, is a real image; To generate the network, For the discriminant network, To generate CLIP similarity between image and text conditions; and To control the hyperparameters of the gradient penalty, the coefficient Used to adjust the weight of text-image similarity loss; , , They represent the generated data distribution, the real data distribution, and the mismatched data distribution respectively; , The gradients are and The weight in direction, is the mathematical expectation.