Remote sensing image generation method for comprehensive monitoring of forestry resources
By constructing a style consistency diffusion network and a generative adversarial network, the problem of inconsistent remote sensing image styles and difficult target positioning is solved, high-quality, consistent-style images are generated, and the application value of forestry resource monitoring and disaster management is improved.
Patent Information
- Application Number
- CN202411148905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-08-21
AI Technical Summary
Existing remote sensing images have differences in resolution and imaging conditions, resulting in inconsistent styles, and it is difficult for traditional generation algorithms to determine the location of target objects, resulting in the need for secondary processing of generated samples such as target detection and manual labeling.
Construct a style consistency diffusion network, combine the diffusion model and VGG19 network, introduce a style loss function, and use a generative adversarial network for training, optimizing the generator to ensure image style consistency and target positioning.
Generate images with higher visual quality and consistent style, which can accurately classify and locate objects, significantly improving the application value of remote sensing images, especially in the fields of forestry resource monitoring and disaster management.
Smart Images

Figure CN118657685B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of remote sensing images, and in particular to a remote sensing image generation method for comprehensive monitoring of forestry resources. Background Art
[0002] In recent years, remote sensing technology has shown great potential in the fields of forestry resource monitoring, geospatial analysis, and disaster management. As a powerful generative model, the diffusion model can not only improve the visual quality of the generated images, but also ensure the consistency of the image style by introducing a style-aware loss function, thereby supporting more effective data fusion and analysis applications. In the field of comprehensive monitoring of forestry resources, ensuring the high quality and accuracy of image data is crucial for effective environmental monitoring and geospatial analysis. Remote sensing images usually need to contain precise geographic features to facilitate forest area planning, resource change monitoring, and disaster management. However, the following problems still exist:
[0003] (1) Due to the differences in resolution and imaging conditions between images from different sensors, the styles of the images are inconsistent. This inconsistency may cause the overall style of the style-transferred image to not match the desired style when the style-transferred image is generated based on these datasets, so the style-transferred image may not be accurate enough when used for specific applications.
[0004] (2) Existing image synthesis technologies often have limitations in accurately simulating geographic locations and details, and traditional generation algorithms are unable to determine the location of the target object, resulting in the need for secondary processing such as target detection and manual labeling of generated samples. Summary of the invention
[0005] The purpose of the present invention is to provide a remote sensing image generation method for comprehensive monitoring of forestry resources that solves the above-mentioned problems, generates images with higher visual quality and consistent style, and can accurately classify and locate objects.
[0006] In order to achieve the above-mentioned object, the technical solution adopted by the present invention is as follows: a remote sensing image generation method for comprehensive monitoring of forestry resources, comprising the following steps;
[0007] S1, construct datasets, including remote sensing image dataset D and style dataset D s and a set of predetermined boxes L;
[0008] Several samples belonging to the same category extracted from the GLCF dataset constitute the remote sensing image dataset D;
[0009] Select several style images of different styles to form a style dataset D s ;
[0010] Preset a number of locations for generating targets, each location corresponds to a predetermined box, and all the predetermined boxes constitute a predetermined box set L;
[0011] S2, constructs the style consistency diffusion network M1;
[0012] The M1 includes a diffusion model and a VGG19 network, the diffusion model includes a forward process and a reverse process, both processes include T time steps;
[0013] The forward process is used to gradually add Gaussian noise to the sample x0, and finally obtain the noise sample z, wherein a noise data is obtained after adding Gaussian noise at each time step, and the noise data at the tth time step is x t , the noise data x at the Tth time step T is the noise sample z, 1≤t≤T;
[0014] The reverse process is used to gradually predict and remove the prediction noise, and a denoised data is obtained at each time step. The prediction noise at the tth time step is , the denoised data is , the denoised data of the last time step is the restored data x final ;
[0015] The VGG19 network is pre-trained and is used to extract feature maps from the input image through 5 feature layers, where the feature map extracted by the i-th feature layer is the i-th feature map, 1≤i≤5, and the input image is the restored data x final or style image x s , x s ∈D s ;
[0016] S3, construct the total loss L of M1 total , L total =L noise +αL style ;
[0017] Among them, L noise is the loss function of the diffusion model, L style is the style loss, based on x final and x s The i-th layer feature map is constructed, α is L style The weight of
[0018] S4, first stage training: using D and D S To minimize L total Train M1 to obtain the style consistency diffusion model M2;
[0019] S5, construct a generative adversarial network M3;
[0020] The reverse process of the diffusion model in M2 is used as the generator, and the pre-trained YOLOv5s model is used as the discriminator to obtain M3. The generator is used to input the noise sample z and output the restored data x. final , the discriminator is used to take x0 as the real sample, x final As the generated samples, input x0 and x final , output the binary classification result of the real sample or the generated sample and the predicted box of the target;
[0021] S6, according to the desired target location, select a predetermined box l from the predetermined box set L, and construct the discriminator loss L D and the generator loss L G ;
[0022] L D According to the following formula:
[0023] ,
[0024] ,
[0025] ,
[0026] Where, L loc is the positioning loss, L cls is the classification loss, β is L cls The weight of is the generator’s prediction box for the target, is the Smooth L1 loss function, To find the expectation of a batch of noise samples z, for The goal within for The target category, for The prediction category, To find the expectation for a batch of real samples;
[0027] L G According to the following formula:
[0028] ,
[0029] In the formula, γ and μ are L loc , L total The weight of
[0030] S7, the second stage of training, according to the training method of the generative adversarial network, iteratively optimizes the generator and discriminator to obtain the generative adversarial model M4, and freezes the generator when optimizing it. ~ , only optimize , get the optimized generator;
[0031] S8, generating remote sensing images of forest resources;
[0032] Get the noise sample to be processed , input into the optimization generator, and use the output of the optimization generator as the forestry resources remote sensing image, wherein the noise sample to be processed The dimension and Gaussian noise distribution of are the same as those of the noise sample z.
[0033] As a preferred embodiment: in the forward process, at the tth time step, Gaussian noise is added according to the following formula, 1≤t≤T;
[0034] ,
[0035] in, , are the noise data of the tth and t-1th time steps respectively, is the noise adjustment coefficient of the t-1th time step, For the t-1th time step, The noise sampled in
[0036] The reverse process obtains the denoised data according to the following formula: ;
[0037] ,
[0038] in, is the noise adjustment coefficient at the t-th time step and the predicted noise at the t-th time step Noise prediction network Predicted, are the network parameters of the noise prediction network, .
[0039] As a preference: In S3, the loss function L of the diffusion model is noise Calculate according to the following formula;
[0040] ,
[0041] In the formula, For the tth time step, The sampled Gaussian noise, is the L2 norm.
[0042] As a preference: In S3, the style loss L style Calculate according to the following formula;
[0043] ,
[0044] in, is the mapping function of the i-th feature layer, which is used to extract features from the input image and output the i-th feature map corresponding to the input image. To calculate the average value of all elements in the corresponding feature map, To calculate the standard deviation of the corresponding feature map, is the L2 norm.
[0045] Preferably, in the VGG19 network, if the input image size is 3×h×w, the sizes of the feature maps from the first layer to the fifth layer are 64×h×w, 128×h / 2×w / 2, 256×h / 4×w / 4, 512×h / 8×w / 8, and 512×h / 16×w / 16, respectively, where h and w are the height and width of the input image, respectively.
[0046] Preferably, the YOLOv5s model is pre-trained with the xView dataset.
[0047] The remote sensing image dataset D is obtained from the GLCF (Global Land Cover Facility) dataset, which includes remote sensing satellite images from around the world. Its data covers natural landforms such as forests, wetlands, and grasslands, and supports users to select samples of specific categories for input as needed, so that the desired land cover type can be precisely controlled when generating targets.
[0048] The overall idea of the present invention is:
[0049] (1) First introduce the style loss L into the diffusion model style To construct the style consistency diffusion network M1, and use the remote sensing image dataset D and the style dataset D s Train M1 to get the style consistency diffusion model M2. Due to the redefinition of the total loss L of M1 total , so that the diffusion model has a certain consistency with the style in advance, and the noise prediction network is optimized during the training process so that it can continuously predict the noise restoration image, and because of the addition of style loss, the restored data x final Ability to have style consistency.
[0050] (2) The reverse process of the diffusion model in M2 is used as the generator, and the pre-trained YOLOv5s model is used as the discriminator to construct a generative adversarial network M3. The discriminator is used to classify and locate the input samples. Combined with the predetermined box l, M3 is trained using the training method of the generative adversarial network to obtain the generative adversarial model M4. The predetermined box l is the position where the target is expected to be generated, and finally the generator has the function of generating the target at the preset position.
[0051] (3) During the training of M3, the generator , thereby fine-tuning the generator and obtaining an optimized generator, thereby optimizing the reverse process of the diffusion model.
[0052] (4) In practical applications, it is only necessary to generate a noise sample to be processed with the same z dimension and Gaussian noise distribution as the noise sample , through the reverse process of the diffusion model, the image is gradually restored and denoised, so that the data is restored to a remote sensing image with a specific style in the training set, while ensuring that the generated object targets appear accurately at specific locations. Finally, the restored image.
[0053] Compared with the prior art, the advantages of the present invention are:
[0054] (1) By introducing style loss into the diffusion model, the trained style consistency diffusion model M2 can generate images with higher visual quality and consistent style. This method not only improves the visual effect of the image, but also ensures the consistency of the image style, supports more effective data fusion and analysis applications, and is particularly suitable for the generation of remote sensing images of forestry resources.
[0055] (2) Compared with the traditional target generation method, which can only ensure that there is a target in the image but cannot determine the target position, the present invention not only focuses on the authenticity of the overall image, but also can accurately classify and locate each object in the remote sensing image, thereby accurately generating the required ground objects, such as trees, water bodies and various natural landforms, at a preset specific location, significantly improving the application value of remote sensing images, especially in the fields of forestry development forecasting, environmental impact assessment and disaster response strategy formulation.
[0056] In summary, this invention significantly improves the quality and practicality of generated remote sensing images by introducing style consistency in the diffusion model and using target detection as a discriminator, providing a new and effective solution for the field of comprehensive monitoring of forestry resources. This innovation not only solves the limitations of existing technologies in accurately simulating geographic locations and details, but also greatly expands the application potential of remote sensing images in forestry resource monitoring, geospatial analysis, and disaster management. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flow chart of the present invention;
[0058] Figure 2 This is the M1 network structure diagram;
[0059] Figure 3 This is the M3 network structure diagram;
[0060] Figure 4 Schematic diagram of image features of different scales in 5 layers in VGG19. DETAILED DESCRIPTION
[0061] The present invention will be further described below in conjunction with the accompanying drawings.
[0062] Example 1: See Figure 1 , see Figures 1 to 4 ,A remote sensing image generation method for comprehensive monitoring of forestry resources, comprising the following steps;
[0063] S1, construct datasets, including remote sensing image dataset D and style dataset D s and a set of predetermined boxes L;
[0064] Several samples belonging to the same category extracted from the GLCF dataset constitute the remote sensing image dataset D;
[0065] Select several style images of different styles to form a style dataset D s ;
[0066] Preset a number of locations for generating targets, each location corresponds to a predetermined box, and all the predetermined boxes constitute a predetermined box set L;
[0067] S2, constructs the style consistency diffusion network M1;
[0068] The M1 includes a diffusion model and a VGG19 network, the diffusion model includes a forward process and a reverse process, both processes include T time steps;
[0069] The forward process is used to gradually add Gaussian noise to the sample x0, and finally obtain the noise sample z, wherein a noise data is obtained after adding Gaussian noise at each time step, and the noise data at the tth time step is x t , the noise data x at the Tth time step T is the noise sample z, 1≤t≤T;
[0070] The reverse process is used to gradually predict and remove the prediction noise, and a denoised data is obtained at each time step. The prediction noise at the tth time step is , the denoised data is , the denoised data of the last time step is the restored data x final ;
[0071] The VGG19 network is pre-trained and is used to extract feature maps from the input image through 5 feature layers, where the feature map extracted by the i-th feature layer is the i-th feature map, 1≤i≤5, and the input image is the restored data x final or style image x s , x s ∈D s ;
[0072] S3, construct the total loss L of M1 total , L total =L noise +αL style ;
[0073] Among them, L noise is the loss function of the diffusion model, L style is the style loss, based on x final and x s The i-th layer feature map is constructed, α is L style The weight of
[0074] S4, first stage training: using D and D S To minimize L total Train M1 to obtain the style consistency diffusion model M2;
[0075] S5, construct a generative adversarial network M3;
[0076] The reverse process of the diffusion model in M2 is used as the generator, and the pre-trained YOLOv5s model is used as the discriminator to obtain M3. The generator is used to input the noise sample z and output the restored data x. final , the discriminator is used to take x0 as the real sample, x final As the generated samples, input x0 and x final , output the binary classification result of the real sample or the generated sample and the predicted box of the target;
[0077] S6, according to the desired target location, select a predetermined box l from the predetermined box set L, and construct the discriminator loss L D and the generator loss L G ;
[0078] L D According to the following formula:
[0079] ,
[0080] ,
[0081] ,
[0082] Where, L loc is the positioning loss, L cls is the classification loss, β is L cls The weight of is the generator’s prediction box for the target, is the Smooth L1 loss function, To find the expectation of a batch of noise samples z, for The goal within for The target category, for The prediction category, To find the expectation for a batch of real samples;
[0083] L G According to the following formula:
[0084] ,
[0085] In the formula, γ and μ are L loc , L total The weight of
[0086] S7, the second stage of training, according to the training method of the generative adversarial network, iteratively optimizes the generator and discriminator to obtain the generative adversarial model M4, and freezes the generator when optimizing it. ~ , only optimize , get the optimized generator;
[0087] S8, generating remote sensing images of forest resources;
[0088] Get the noise sample to be processed , input into the optimization generator, and use the output of the optimization generator as the forestry resources remote sensing image, wherein the noise sample to be processed The dimension and Gaussian noise distribution of are the same as those of the noise sample z.
[0089] Example 2: See Figures 1 to 4 , based on Example 1, in the forward process, at the t-th time step, Gaussian noise is added according to the following formula, 1≤t≤T;
[0090] ,
[0091] in, , are the noise data of the tth and t-1th time steps respectively, is the noise adjustment coefficient of the t-1th time step, For the t-1th time step, The noise sampled in
[0092] The reverse process obtains the denoised data according to the following formula: ;
[0093] ,
[0094] in, is the noise adjustment coefficient at the t-th time step and the predicted noise at the t-th time step Noise prediction network Predicted, are the network parameters of the noise prediction network, .
[0095] In S3, the loss function L of the diffusion model noise Calculate according to the following formula;
[0096] ,
[0097] In the formula, For the tth time step, The sampled Gaussian noise, is the L2 norm.
[0098] In S3, the style loss L style Calculate according to the following formula;
[0099] ,
[0100] in, is the mapping function of the i-th feature layer, which is used to extract features from the input image and output the i-th feature map corresponding to the input image. To calculate the average value of all elements in the corresponding feature map, To calculate the standard deviation of the corresponding feature map, is the L2 norm.
[0101] In the VGG19 network, if the input image size is 3×h×w, the sizes of the feature maps from the 1st layer to the 5th layer are 64×h×w, 128×h / 2×w / 2, 256×h / 4×w / 4, 512×h / 8×w / 8, and 512×h / 16×w / 16, respectively, where h and w are the height and width of the input image, respectively.
[0102] The YOLOv5s model is pre-trained on the xView dataset.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A remote sensing image generation method for comprehensive monitoring of forestry resources, characterized by: The steps include: S1, construct datasets, including remote sensing image dataset D and style dataset D s and a set of predetermined boxes L; Several samples belonging to the same category extracted from the GLCF dataset constitute the remote sensing image dataset D; Select several style images of different styles to form a style dataset D s ; Preset a number of locations for generating targets, each location corresponds to a predetermined box, and all the predetermined boxes constitute a predetermined box set L; S2, constructs the style consistency diffusion network M1; The M1 includes a diffusion model and a VGG19 network, the diffusion model includes a forward process and a reverse process, both processes include T time steps; The forward process is used to gradually add Gaussian noise to the sample x0, and finally obtain the noise sample z, wherein a noise data is obtained after adding Gaussian noise at each time step, and the noise data at the tth time step is x t , the noise data x at the Tth time step T is the noise sample z, 1≤t≤T; The reverse process is used to gradually predict and remove the prediction noise, and a denoised data is obtained at each time step. The prediction noise at the tth time step is , the denoised data is , the denoised data of the last time step is the restored data x final ,in Noise prediction network Predicted, Predict network parameters for noise prediction networks; The VGG19 network is pre-trained and is used to extract feature maps from the input image through 5 feature layers, where the feature map extracted by the i-th feature layer is the i-th feature map, 1≤i≤5, and the input image is the restored data x final or style image x s , x s ∈D s ; S3, construct the total loss L of M1 total , L total =L noise +αL style ; Among them, L noise is the loss function of the diffusion model, L style is the style loss, based on x final and x s The i-th layer feature map is constructed, α is L style The weight of S4, first stage training: using D and D S To minimize L total Train M1 to obtain the style consistency diffusion model M2; S5, construct a generative adversarial network M3; The reverse process of the diffusion model in M2 is used as the generator, and the pre-trained YOLOv5s model is used as the discriminator to obtain M3. The generator is used to input the noise sample z and output the restored data x. final , the discriminator is used to take x0 as the real sample, x final As the generated samples, input x0 and x final , output the binary classification result of the real sample or the generated sample and the predicted box of the target; S6, according to the desired target location, select a predetermined box l from the predetermined box set L, and construct the discriminator loss L D and the generator loss L G ; L D According to the following formula: , , , Where, L loc is the positioning loss, L cls is the classification loss, β is L cls The weight of is the generator’s prediction box for the target, is the Smooth L1 loss function, To find the expectation of a batch of noise samples z, for The goal within for The target category, for The predicted category, To find the expectation for a batch of real samples; L G According to the following formula: , In the formula, γ and μ are L loc , L total The weight of S7, the second stage of training, according to the training method of the generative adversarial network, iteratively optimizes the generator and discriminator to obtain the generative adversarial model M4, and freezes the generator when optimizing it. ~ , only optimize , get the optimized generator; S8, generating remote sensing images of forest resources; Get the noise sample to be processed , input into the optimization generator, and use the output of the optimization generator as the forestry resources remote sensing image, wherein the noise sample to be processed The dimension and Gaussian noise distribution of are the same as those of the noise sample z; In the forward process, at the tth time step, Gaussian noise is added according to the following formula, 1≤t≤T; , in, , are the noise data of the tth and t-1th time steps respectively, is the noise adjustment coefficient of the t-1th time step, For the t-1th time step, The noise sampled in The reverse process obtains the denoised data according to the following formula: ; , in, is the noise adjustment coefficient at the t-th time step, and the predicted noise at the t-th time step Noise prediction network Predicted, are the network parameters of the noise prediction network, ; In S3, the loss function L of the diffusion model noise Calculate according to the following formula; , In the formula, For the tth time step, The sampled Gaussian noise, is the L2 norm; In S3, the style loss L style Calculate according to the following formula; , in, is the mapping function of the i-th feature layer, which is used to extract features from the input image and output the i-th feature map corresponding to the input image. To calculate the average value of all elements in the corresponding feature map, To calculate the standard deviation of the corresponding feature map, is the L2 norm.
2. The remote sensing image generation method for comprehensive monitoring of forestry resources according to claim 1 is characterized in that: In the VGG19 network, if the input image size is 3×h×w, the sizes of the feature maps from the 1st layer to the 5th layer are 64×h×w, 128×h / 2×w / 2, 256×h / 4×w / 4, 512×h / 8×w / 8, and 512×h / 16×w / 16, respectively, where h and w are the height and width of the input image, respectively.
3. The remote sensing image generation method for comprehensive monitoring of forestry resources according to claim 1 is characterized in that: The YOLOv5s model is pre-trained on the xView dataset.
