Remote sensing image segmentation method and system, storage medium and equipment
By combining the conditions of diffusion models and color correction technology, a high -quality virtual remote sensing image is generated, and a hybrid sample training strategy is used to solve the problem of scarcity of sample data in the interpretation of remote sensing images, which significantly improves the accuracy and efficiency of the translation.
Patent Information
- Application Number
- CN202411503879.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art has the problem of sample data scarcity in remote sensing image interpretation, which makes it difficult for methods such as data augmentation and generation of adversarial networks to meet the needs of high-precision remote sensing interpretation tasks.
Combined with the condition diffusion model (CDDPM) and color correction technology, by generating high -quality virtual remote sensing images to improve the spectral consistency of generating samples, and adopt a mixed sample training strategy based on similarity, significantly reduce the needs of manual labeling, improve the remote sensing sensing The accuracy and efficiency of image interpretation.
By generating realistic virtual remote sensing images and color correction, the quality and consistency of generated samples are improved, the accuracy and efficiency of remote sensing image interpretation are significantly improved, and the need for manual annotation is reduced.
Smart Images

Figure CN119360025A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a remote sensing image segmentation method, system, storage medium and equipment. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Remote sensing image interpretation is to obtain the required information from the acquired remote sensing images, and has a wide range of applications in many fields such as earth monitoring, ecological protection, and agricultural management. When using computer models to accurately interpret remote sensing images, the computer model that performs the interpretation relies on large-scale labeled data for training, and obtains the required information by segmenting the target to be interpreted. However, the labeling process is costly and time-consuming, which makes it difficult to meet the needs of large-scale remote sensing tasks, and there is a certain problem of sample data scarcity.
[0004] In order to solve the problem of sample data scarcity, speed up the efficiency of remote sensing image interpretation and reduce costs, the existing technology uses some methods to expand the data volume after obtaining a small amount of labeled data.
[0005] For example, data enhancement methods can be used to expand the data set by transforming remote sensing images (such as cropping, rotation, and scaling). However, this method is difficult to fully reflect the complex features of land objects in remote sensing images, especially in terms of high-dimensional data, spatial relationships, and spectral consistency. As a result, data enhancement methods are difficult to meet the needs of high-precision remote sensing interpretation tasks.
[0006] Generative models such as generative adversarial networks (GANs) can also be used to generate samples similar to real remote sensing images through the adversarial process between the generator and the discriminator to expand the amount of data. However, GANs are prone to mode collapse during training, resulting in insufficient diversity of generated samples, which is also difficult to meet the needs of high-precision remote sensing interpretation tasks.
[0007] In addition, although the generative model based on deep learning can generate more remote sensing image samples, the generated images are different from the real images in terms of hue, saturation and brightness, which will affect the segmentation processes involved in subsequent tasks, and thus affect the interpretation accuracy. Summary of the invention
[0008] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a remote sensing image segmentation method, system, storage medium and device, which combines the conditional diffusion model (CDDPM) and color correction technology, takes high spatial resolution remote sensing images as the data source, optimizes the quality of the generated samples by improving the spectral consistency of the generated samples, and adopts a mixed sample training strategy based on similarity screening, which significantly reduces the need for manual annotation while improving the accuracy and efficiency of remote sensing image interpretation.
[0009] In order to achieve the above object, the present invention adopts the following technical solution:
[0010] A first aspect of the present invention provides a remote sensing image segmentation method, comprising the following steps:
[0011] Obtain original remote sensing images and preprocess them;
[0012] The preprocessed remote sensing images are used as real samples, and the generated samples are obtained using the conditional diffusion model;
[0013] The real sample and the generated sample are converted to the set color space respectively, the color distribution of the real sample is determined by calculating the color value of each channel pixel by pixel, and the color distribution of the generated sample is aligned with the color distribution of the real sample through linear transformation to obtain the generated sample after color correction;
[0014] The generated samples after color correction are screened for similarity and mixed with real samples in a set ratio. The resulting mixed sample set is used as the training set of the semantic segmentation model. The trained semantic segmentation model is used to realize the segmentation of remote sensing images.
[0015] Further, preprocessing is specifically as follows: the original remote sensing image is labeled to obtain the label of the target to be segmented.
[0016] Furthermore, the conditional diffusion model is used to obtain generated samples, specifically: the conditional diffusion model is trained through simultaneous forward diffusion and backward diffusion processes; the forward diffusion starts from the real remote sensing image, and gradually adds random noise to the image, so that the image gradually degenerates into a pure noise image close to the standard normal distribution; the backward diffusion process gradually removes the noise until the image is restored.
[0017] Furthermore, the color distribution of the real sample is determined by calculating the color value of each channel pixel by pixel, including: for each image in the real sample, the color value corresponding to the brightness channel and the two chromaticity channels is calculated pixel by pixel to obtain the mean and standard deviation of the corresponding image.
[0018] Furthermore, the mean and standard deviation of the corresponding image are obtained as shown in the following formula:
[0019]
[0020] In the formula, μ c is the mean, σ c is the standard deviation, X c,i Represents the color value of the i-th pixel on channel c, where c includes the brightness channel L, the chromaticity channel a and / or the chromaticity channel b.
[0021] Furthermore, the color distribution of the real sample is determined by calculating the color value of each channel pixel by pixel, which also includes: taking the global mean μ of the real sample set Rc and the global standard deviation σ Rc , as the ruler of the target color distribution, as shown in the following formula:
[0022]
[0023] Where M represents the total number of images in the sample set, μ c,i is the mean of the i-th image on channel c, σ c,i is the standard deviation of the i-th image on channel c.
[0024] Furthermore, the color distribution of the real sample is determined, specifically: the mean and standard deviation corresponding to each pixel of each image in the real sample, and the global mean and global standard deviation corresponding to the corresponding image are taken as the color distribution of the real sample.
[0025] Furthermore, through linear transformation, the color distribution of the generated sample is aligned with the color distribution of the real sample, and the generated sample after color correction is obtained, as shown in the following formula:
[0026]
[0027] In the formula, X′ gc,i is the corrected color value; X gc,i Indicates the specific pixel color value of the generated image g; μ Rc and σ Rc are the mean and standard deviation of the real image set on channel c, respectively. α is a control parameter used to find a balance between color consistency and diversity of generated samples. According to the adjustment of the α value, a choice is made between complete correction and partial retention of the original color characteristics.
[0028] A second aspect of the present invention provides a remote sensing image segmentation system, comprising:
[0029] The preprocessing module is configured to: obtain the original remote sensing image and preprocess it;
[0030] The virtual sample generation module is configured to: use the preprocessed remote sensing image as the real sample and obtain the generated sample using the conditional diffusion model;
[0031] The color correction module is configured to: convert the real sample and the generated sample into a set color space respectively, determine the color distribution of the real sample by calculating the color value of each channel pixel by pixel, and align the color distribution of the generated sample with the color distribution of the real sample through linear transformation to obtain the generated sample after color correction;
[0032] The mixed sample training segmentation module is configured as follows: the generated samples after color correction are screened for similarity and mixed with real samples in a set ratio. The formed mixed sample set is used as the training set of the semantic segmentation model, and the trained semantic segmentation model is used to realize the segmentation of remote sensing images.
[0033] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned remote sensing image segmentation method when executed by a processor.
[0034] A fourth aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned remote sensing image segmentation method when executing the program.
[0035] Compared with the prior art, one or more of the above technical solutions have the following beneficial effects:
[0036] 1. After obtaining a small amount of real remote sensing images, the conditional diffusion model is used to generate virtual remote sensing images to achieve the purpose of expanding the sample size. The conditional diffusion model generates realistic remote sensing images that meet the conditions of the ground object category by gradually removing Gaussian noise, which can avoid the collapse problem when using the generative adversarial network to generate virtual images.
[0037] 2. Considering that the virtual images generated by the conditional diffusion model differ from the real remote sensing images in terms of hue, saturation and brightness, the generated samples are visually inconsistent with the real samples, and the color difference affects the accuracy of subsequent semantic segmentation and interpretation tasks. By combining the conditional diffusion model and color correction, the color distribution in the real remote sensing image is used to correct the color distribution of the generated virtual remote sensing image, so that the model can capture the subtle color features and changes in lighting conditions in the sample, making the generated virtual image closer to the real remote sensing image in terms of color and brightness, thereby improving the accuracy of subsequent tasks.
[0038] 3. When expanding samples, the existing technology has expanded in quantity, but due to the certain differences between it and the real samples, the diversity of samples is still not ideal, and using the generated samples alone to train the model is prone to error accumulation, affecting the final performance. In order to avoid this problem, the generated samples after color correction are mixed with the real samples and participate in the subsequent training process of the semantic segmentation model to give full play to the advantages of both. The introduction of the mixed sample set significantly enhances the generalization ability of the model. The real samples provide high-precision object annotations, while the generated samples maintain consistency with the real samples through color correction, and help the model better learn the arrangement and morphological characteristics of the target to be interpreted by expanding the diversity of the data set.
[0039] 4. Before mixed training, use similarity evaluation indicators to screen and filter the generated samples. Through similarity evaluation, high-quality generated samples that are highly consistent with real samples in terms of geometric shape, spectral characteristics, and arrangement are screened out, and samples with poor quality and low similarity are eliminated to ensure the quality of the generated samples. Then, they are mixed with real samples as training data, which can further improve the quality of the expanded data set and the accuracy of subsequent tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0041] Figure 1 is a schematic diagram of a remote sensing image segmentation process provided by one or more embodiments of the present invention. DETAILED DESCRIPTION
[0042] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0043] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0044] The following embodiments provide a remote sensing image segmentation method, system, storage medium and device, which are constructed based on a conditional diffusion model (CDDPM) and a color correction module (CCM), using high spatial resolution remote sensing images as a data source, optimizing the quality of generated samples by improving the spectral consistency of generated samples, and adopting a mixed sample training strategy, which significantly reduces the need for manual annotation and improves the accuracy and efficiency of remote sensing image interpretation.
[0045] Embodiment 1:
[0046] In response to the problem of sample data scarcity during remote sensing image interpretation, existing technologies have adopted data augmentation methods and generative model methods to expand the data volume. In addition, the diffusion model method can also be used. The basic idea is to convert Gaussian noise into samples in the target distribution through a step-by-step denoising process. The generation process can be divided into two main stages: forward diffusion process and reverse diffusion process.
[0047] The forward diffusion process starts from the initial remote sensing image x0 and gradually introduces noise to generate a series of intermediate state images x t The process is modeled as a Markov chain, where the state at each time step depends only on the previous time step, as shown in the following equation:
[0048]
[0049] Specifically, the conditional probability q(x t ∣x t-1 ) represents the distribution of the image at time step t when time step t-1 is given, which is a Gaussian distribution. In the formula, β t is the amount of noise added. As the time step t increases, β t Gradually increase, so that the image gradually degenerates into a noise image close to the standard normal distribution; is the scaling factor used to adjust the previous time step x t-1 For the current step x t The influence of ; I represents the unit matrix, ensuring that the noise is independent in each dimension. In this process, the information in the original image is gradually covered by the noise, and finally only the most basic statistical characteristics are retained, which provides the basis for the subsequent back diffusion process to reconstruct and generate high-quality images from the noise.
[0050] In the back diffusion process, the model gradually denoises the noisy image x t Gradually restore to the initial image x0, as shown in the following formula:
[0051]
[0052] In this process, the model predicts the noise distribution parameters of each time step through the neural network θ, including the mean μ θ (x t ,t) and variance Σ θ (x t ,t) These parameters define the Gaussian distribution p that generates time step t-1 from time step t θ (x t-1 ∣x t ). Among them, μ θ (x t,t) is the mean value predicted by the model based on the current image and time step, which is used to gradually remove noise; Σ θ (x t ,t) represents the covariance matrix at each step in the denoising process, controlling the residual noise intensity in the generated image. By minimizing the KL divergence loss function, the model is optimized to ensure that the generated samples are highly close to the real data in terms of structure, texture, and lighting.
[0053] In order to further enhance the control ability of generated samples over the object category during the back-diffusion process, the Classifier-Free Guidance (CFG) technology is used in the model. In each step of back-diffusion, the generated samples are dynamically adjusted by combining the unconditional and conditional noise prediction results without relying on pre-trained classifiers. Specifically, CFG generates an intermediate result in each step, and weighted combinations of the unconditional and conditional noise predictions are performed to ensure that the generated samples maintain diversity while strictly complying with specific object category labels, as shown in the following formula:
[0054]
[0055] Where: ∈ u represents the unconditionally generated noise prediction, reflecting the sample features generated without being constrained by the object category label; ∈ c It is a conditionally generated noise prediction, which is used to ensure that the generated samples strictly conform to the specific object category label. w is a guidance coefficient. By adjusting its value, the influence of the object label on the generated results can be enhanced while retaining the sample diversity.
[0056] The sampling process is in the inference phase, from the final noisy image x t At the beginning, samples x0 that meet the ground feature category labels are gradually generated through reverse diffusion, as shown in the following formula:
[0057]
[0058] Among them, α t It is the key coefficient of noise scheduling, which determines the rate at which the noise decreases with time steps; is the cumulative noise scheduling coefficient, which is used to adjust the t to x t-1 The noise amplitude; μ θ (x t ,c,t) is the neural network according to the current image x t , the mean of the guided condition c and the prediction of time step t is used to restore the image that meets the conditions; It is usually approximated as β t; z is random noise sampled from a standard normal distribution, ensuring that the generated samples are diverse. Through step-by-step denoising, the samples finally generated by the model not only meet the conditional information, but also retain sufficient real data features.
[0059] There are some obvious defects when using the conditional diffusion model (CDDPM) to generate remote sensing image samples:
[0060] 1. Color difference problem: There are significant differences between the samples generated by the existing conditional diffusion model and the real images in terms of hue, saturation and brightness, resulting in the generated samples being visually inconsistent with the real samples. This color difference will affect the accuracy of subsequent tasks, especially in the accuracy of object recognition and semantic segmentation tasks. In order to overcome this problem, this embodiment uses a color correction module (CCM) to adjust the spectral consistency of the generated samples to make them closer to the real remote sensing images in terms of color and brightness, thereby improving the accuracy of subsequent tasks.
[0061] 2. Sample diversity problem: The existing technology lacks sufficient sample diversity when processing a small number of real samples, resulting in insufficient generalization ability of the model. At the same time, although the generated samples have been expanded in number, there are still certain differences between them and the real samples. Using the generated samples alone to train the model is likely to cause error accumulation and affect the final performance. In order to avoid this problem, this embodiment proposes a hybrid training strategy based on similarity screening, which mixes the generated samples with the real samples to participate in the subsequent semantic segmentation model training process, giving full play to the advantages of both, improving the robustness and segmentation accuracy of the model, and overcoming the difference between the generated samples and the real samples.
[0062] Therefore, this embodiment introduces a color correction module and a hybrid training strategy based on similarity screening to solve the shortcomings of the prior art in sample color consistency and diversity during sample data expansion, thereby improving the accuracy and efficiency of remote sensing image interpretation tasks.
[0063] The CDDPM model is trained with a certain number of real samples to learn the complex distribution characteristics of remote sensing images guided by semantic labels. The trained CDDPM model can generate high-quality remote sensing images conditioned on specific semantic masks. By introducing a color correction module, the module inputs the original image and the image generated by the CDDPM model, converts them to the Lab color space, adjusts its color channels to match the distribution of real samples, and outputs the corrected image, further solving the spectral difference problem between the generated image and the real image. By fusing the color-corrected generated sample set with the real sample set, and then training the semantic segmentation model, the segmentation performance is improved by making full use of the advantages of synthetic data and real data.
[0064] Specifically, the remote sensing image segmentation method includes the following steps:
[0065] Obtain original remote sensing images and preprocess them;
[0066] The preprocessed remote sensing images are used as real samples, and the generated samples are obtained using the conditional diffusion model;
[0067] The real sample and the generated sample are converted to the set color space respectively, the color distribution of the real sample is determined by calculating the color value of each channel pixel by pixel, and the color distribution of the generated sample is aligned with the color distribution of the real sample through linear transformation to obtain the generated sample after color correction;
[0068] The generated samples after color correction are screened for similarity and mixed with real samples in a set ratio. The resulting mixed sample set is used as the training set of the semantic segmentation model. The trained semantic segmentation model is used to realize the segmentation of remote sensing images.
[0069] 1. Data collection and preprocessing
[0070] The dataset relied on by this embodiment is a precise remote sensing analysis task specifically for agricultural greenhouses. Since existing datasets are difficult to meet the needs of high-resolution image analysis, a high-resolution agricultural greenhouse remote sensing image dataset (referred to as the "real sample set") is constructed. This dataset is based on satellite images of a certain area and is generated through fine annotation. It covers the various forms, colors, and texture features of agricultural greenhouses in the area, as well as their arrangement in different geographical backgrounds, fully reflecting the diversity of agricultural landscapes.
[0071] The dataset contains 1200 pairs of high-resolution samples with a size of 256x256, of which 1000 pairs of samples are used for model training and 200 pairs of samples are used for verification. All images were collected without significant meteorological interference to ensure the clarity and consistency of the data. In order to support high-precision semantic segmentation tasks, the annotation of each image in the dataset is binary, with the greenhouse area marked as the foreground (value 1) and the rest as the background (value 0). The dataset not only captures the geometric shape and spectral characteristics of the greenhouse under different environmental conditions, but also covers a variety of arrangements of typical agricultural greenhouses. By fully covering the greenhouse area in Shouguang City, the dataset can provide a solid foundation for the training and testing of generative models, and play an important role in the interpretation of agricultural scenes in high-resolution remote sensing images.
[0072] 2. Generate samples using the conditional diffusion model
[0073] This embodiment uses the conditional diffusion denoising probability model (CDDPM) to generate high-quality remote sensing image samples, with the aim of expanding the real data set and providing more sample support for the semantic segmentation task in remote sensing images. CDDPM generates realistic remote sensing images that meet the conditions of ground object classification by gradually removing Gaussian noise. The process includes three main stages: model training, conditional guidance generation, and output of generated sample sets.
[0074] (1) Model training: forward and reverse diffusion process
[0075] During the model training phase, CDDPM undergoes both forward diffusion and reverse diffusion processes, such as Figure 1 As shown in “(a) Conditional Diffusion Model Training” in the figure. Forward diffusion starts with a real remote sensing image and gradually adds random noise to the image, causing the image to gradually degenerate into a pure noise image close to the standard normal distribution. As the noise gradually increases, the details, texture, and structural information of the image are gradually weakened, and finally degenerate into a highly noisy state. This process allows the model to learn how to gradually destroy a clear image, thereby understanding how an image degrades.
[0076] Correspondingly, the back diffusion process is the process of gradually restoring the image. The model learns how to gradually remove noise and restore the noisy image to a clear original image, such as Figure 1 As shown in “(b) Denoising” in the figure. During training, the model continuously performs the process of alternating forward diffusion and reverse diffusion to learn how to generate high-quality images consistent with the characteristics of real samples from noise. This process not only allows the model to master the image degradation mechanism, but also enhances the model's ability to restore images through reverse denoising.
[0077] The goal of training is to enable the model to understand the mapping relationship between noise and real images, so that in the generation stage it can efficiently generate samples that conform to the real object category from noise.
[0078] (2) Sample generation based on conditional guidance
[0079] In the sample generation stage, the CDDPM model generates high-quality remote sensing image samples through the back-diffusion process and combines conditional guidance technology to ensure that the generated samples meet specific ground object categories, such as Figure 1 As shown in "(c) Sample Generation" in Figure 1, the process starts with random noise and gradually removes the noise through multiple iterations, restoring the blurred noise state to a clear, high-quality image that conforms to the object category label. The back diffusion process gradually restores the geometric shape, texture, spectral features, etc. in the image through a series of denoising steps, allowing the image to present more realistic details.
[0080] The working principle of back diffusion is to let the model rely on the image of the previous state at each denoising step, and gradually reduce the distribution of noise through learning, so that the details in the image gradually become clear. In each iteration, the model not only removes noise, but also performs "conditional guidance" based on the ground object category label to ensure that the generated image has clear target features. This process is repeated many times to gradually transform the initial noise into a complete and detailed remote sensing image.
[0081] In order to ensure the diversity and category consistency of generated samples, the CDDPM model introduces Classifier-Free Guidance (CFG) technology. CFG enhances the flexibility and controllability of the model generation process by combining the results of unconditional generation (not dependent on category labels) and conditional generation (dependent on category labels). Specifically, CFG technology allows the model to generate diverse samples without category labels, retaining the rich details of the samples. At the same time, CFG can also strictly control the generated samples through the guidance of category labels to make them conform to the expected ground object category.
[0082] In the actual generation process, CFG performs a weighted combination of the results of unconditional and conditional generation, so that the model generates an intermediate result at each denoising step, ensuring that the generated samples are not only rich and diverse in visual details, but also strictly conform to the input object category information. Each generation step guides the denoising process according to the input category label (such as agricultural greenhouses), ensuring that the generated images are not only consistent with the real samples, but also capture different manifestations of the target category. For example, when generating remote sensing images of agricultural greenhouses, the model not only reproduces the geometric outlines and arrangement of the greenhouses, but also reflects the changes under various influencing factors such as different lighting conditions and background environments. This generation method enhances the model's performance in diversity and realism, enabling it to show better generalization capabilities when dealing with complex scenes.
[0083] In addition, the back diffusion process is based on the principle of stepwise denoising, which means that each step of the generated result is a process of transition from noise to high-quality images. With each iteration, the noise is gradually reduced and the image details are gradually restored until the final generated image has a visual effect consistent with the real remote sensing image. The generated image not only retains the structure of the real sample in terms of geometric features, but also has the spectral characteristics and texture information of the real sample. This process provides highly realistic samples for remote sensing image generation and can provide effective support for subsequent semantic segmentation tasks.
[0084] (3) Output the generated sample set
[0085] Through the condition-guided generation method, the CDDPM model in this embodiment successfully generated 2000 pairs of high-quality remote sensing image samples. These samples are not only highly consistent with real agricultural greenhouse remote sensing images in terms of geometric structure, spectral characteristics and arrangement, but also provide diverse training data for subsequent semantic segmentation tasks. Compared with traditional methods, the samples generated by CDDPM not only accurately reproduce the characteristics of the ground objects, but also significantly reduce the dependence on a large amount of manually annotated data, effectively alleviating the problem of scarce remote sensing image data. In the reverse diffusion process, the model restores random noise to detailed and realistic images through gradual denoising, ensuring that the generated samples strictly match the input category labels. These generated sample sets enrich the training data source of the model, and combined with real samples, greatly improve the accuracy and generalization ability of the segmentation model, especially in complex agricultural scenes.
[0086] 3. Color correction module and hybrid training strategy based on similarity screening
[0087] (1) Color Correction Module
[0088] Although CDDPM performs well in generating high-quality images, especially in terms of structure, texture, and details, and the generated images can accurately reproduce the key features of remote sensing samples, there is a problem of inconsistent color characteristics between the generated images and the actual samples. This color difference may be caused by the model's failure to fully capture the subtle color features and lighting conditions in the samples when learning the data distribution, which will significantly affect the model performance of subsequent tasks (such as remote sensing semantic segmentation).
[0089] To solve this problem, this embodiment draws on the remote sensing image color uniformity method and designs a color correction module (Color Correction Module) to adjust the color distribution of the image while keeping the image structure and texture unchanged to improve the authenticity and consistency of the generated image. Figure 1 As shown in “(d) Color correction module” in .
[0090] The theoretical basis of the color correction module is rooted in two key features in statistics: mean and standard deviation. These two statistics can not only accurately describe the central tendency and dispersion of image color distribution, but also play a vital role in the correction process. Calculating the mean and standard deviation of an image is a process of statistical analysis of the color values of all pixels.
[0091] Specifically, assume that in Lab color space, an image consists of three channels, corresponding to the brightness channel L and two chromaticity channels a and b. For each channel in each image, the color values of these channels are calculated pixel by pixel. Assume that an image has a total of N pixels, Xc,i represents the color value of the i-th pixel on channel c, where c can be L, a or b. Thus, the mean μ of the image c and standard deviation σ c , as shown below:
[0092]
[0093] Through the above calculation, we traverse the real sample set R and obtain the mean and standard deviation of each image in R on channel c. In order to effectively extract the color features of the image set, we need to further calculate the global mean μ of the real sample set. Rc and the global standard deviation σ Rc , and use it as the scale of the target color distribution. As shown in the following formula:
[0094]
[0095] Where M represents the total number of images in the sample set, and i is the i-th image.
[0096] Based on the comprehensive statistical characteristics of the above image set, the color distribution of the generated image g is accurately aligned with the color distribution of the real sample through linear transformation, as shown in the following formula:
[0097]
[0098] Among them, X′ gc,i is the corrected color value; X gc,i Indicates the specific pixel color value of the generated image g; μ Rc and σ Rc are the mean and standard deviation of the real image set on channel c, respectively.
[0099] The formula achieves the correction of the color distribution of the generated image by de-averaging, standard deviation scaling and mean shifting. In order to enhance the flexibility of color correction, a control parameter α is introduced, which allows a balance to be found between color consistency and diversity of generated samples. With the adjustment of the α value, a flexible choice can be made between full correction and partial retention of the original color characteristics. The color correction setting of this embodiment is α = 0.8.
[0100] (2) Hybrid training strategy based on similarity screening
[0101] The core idea of the hybrid training strategy based on similarity screening is to enhance the diversity and robustness of the training dataset by combining real samples and high-quality generated samples. Figure 1 As shown in "(e) Mixed Sample Training Segmentation Model" in . In this strategy, the generated samples are used as a supplementary data and used together with the real samples for model training. The specific steps are as follows:
[0102] ① Dataset construction: Additional virtual samples (generated sample sets) are generated by using the CDDPM model. These samples are as close to real samples as possible visually, but retain a certain degree of randomness and diversity. The real samples and generated samples are combined into an extended dataset that contains a large amount of agricultural greenhouse image data.
[0103] ② Sample screening and quality control: In order to ensure that the generated samples participating in the training have high quality, the generated samples are screened and filtered using similarity evaluation indicators (FID, KID) before mixed training. Through similarity evaluation, high-quality generated samples that are highly consistent with the real samples in terms of geometric shape, spectral characteristics, arrangement, etc. are screened, and samples with poor quality and low similarity are eliminated to ensure the quality of the generated samples.
[0104] Among them, FID measures the distribution difference between the generated image and the real image by calculating the Frechet distance in the feature space. Specifically, the pre-trained InceptionV3 model is first used to extract the high-dimensional features of the generated samples and the real samples, and then these features are fitted to a multidimensional Gaussian distribution, their mean and covariance matrix are calculated, and finally the Frechet distance between the two is obtained. A lower FID value indicates that the generated samples are closer to the real samples in visual features and distribution. In contrast, KID evaluates the distribution difference between the generated samples and the real samples in the feature space by the maximum mean difference (MMD), and does not rely on the Gaussian distribution assumption. KID uses an unbiased estimate to measure the mean difference between the two sample sets, so it shows better robustness on small-scale data sets. The combination of the two enables this embodiment to evaluate the quality of the generated samples from different angles, where FID is mainly used to measure the visual quality and diversity of the generated samples, and KID can provide more accurate evaluation results in the case of small samples. These evaluation indicators provide an objective basis for the subsequent generation sample screening and hybrid training strategies.
[0105] ③ Training set division: In the hybrid training process, the model input consists of real samples and screened high-quality generated samples in a set ratio. This combination strategy ensures that the training data has both real ground object information and the diversity of generated samples, which improves the generalization ability of the model in different scenarios.
[0106] ③Model optimization: During the training process, the generated samples provide a wide range of variability, which helps the model better learn the diverse features in remote sensing images, while the real samples provide the model with stable object label information and reliable high-resolution details. Through this combination, the model can better capture the geometric features, arrangement, spectral characteristics, etc. of the greenhouses, and improve the segmentation performance of greenhouses under different environmental conditions.
[0107] ④Optimization goal: The goal of hybrid training is to maximize the data expansion capability of generated samples and enhance the robustness of the model by combining the advantages of the two types of samples. This strategy effectively alleviates the training bottleneck caused by insufficient real samples and enhances the adaptability of the model to different remote sensing scenarios by introducing the diversity of generated samples.
[0108] The hybrid training strategy also reduces the model's reliance on a large amount of labeled data to a certain extent, while improving the model's accuracy and stability. This method significantly improves the performance of the segmentation model on large-scale remote sensing image data, allowing it to maintain efficient segmentation results when facing different geographical backgrounds and complex scenes.
[0109] 4. Remote sensing semantic segmentation based on mixed sample sets
[0110] After the generation and color correction of the generated samples are completed, the generated samples are combined with the real samples to form a mixed sample set, which is then input into the semantic segmentation model for training. The semantic segmentation model is a mature existing technology that accurately segments agricultural greenhouses in remote sensing images through hierarchical feature extraction using convolutional neural networks.
[0111] The introduction of mixed sample sets significantly enhances the generalization ability of the model. The real samples provide high-precision object annotations, while the generated samples maintain consistency with the real samples through color correction, and help the model better learn the arrangement and morphological characteristics of different greenhouses by expanding the diversity of the data set. Conventional semantic segmentation models gradually improve their recognition ability of agricultural greenhouses by extracting multi-scale features from mixed sample sets, thereby coping with segmentation tasks in different geographical backgrounds and complex environments.
[0112] The trained model can effectively identify the boundaries and locations of greenhouses and show high segmentation accuracy and stability under different conditions. Through this mixed sample set-based training method, the model not only performs well in conventional segmentation tasks, but also adapts to complex remote sensing scenes, improving the overall segmentation performance.
[0113] Embodiment 2:
[0114] Remote sensing image segmentation system, including:
[0115] The preprocessing module is configured to: obtain the original remote sensing image and preprocess it;
[0116] The virtual sample generation module is configured to: use the preprocessed remote sensing image as the real sample and obtain the generated sample using the conditional diffusion model;
[0117] The color correction module is configured to: convert the real sample and the generated sample into a set color space respectively, determine the color distribution of the real sample by calculating the color value of each channel pixel by pixel, and align the color distribution of the generated sample with the color distribution of the real sample through linear transformation to obtain the generated sample after color correction;
[0118] The mixed sample training segmentation module is configured as follows: the generated samples after color correction are screened for similarity and mixed with real samples in a set ratio. The formed mixed sample set is used as the training set of the semantic segmentation model, and the trained semantic segmentation model is used to realize the segmentation of remote sensing images.
[0119] By combining the conditional diffusion model (CDDPM) and color correction, using high spatial resolution remote sensing images as the data source, improving the spectral consistency of the generated samples, optimizing the quality of the generated samples, and adopting a mixed sample training strategy, the need for manual labeling is significantly reduced, thereby improving the accuracy and efficiency of remote sensing image interpretation.
[0120] Embodiment three:
[0121] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the remote sensing image segmentation method described in the above-mentioned embodiment 2 are implemented.
[0122] Embodiment 4:
[0123] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the remote sensing image segmentation method described in the above-mentioned embodiment 2 are implemented.
[0124] The steps involved in the above embodiments 2 to 4 correspond to those in embodiment 1. For the specific implementation, please refer to the relevant description of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0125] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A remote sensing image segmentation method, characterized in that: The following steps are involved: Obtain original remote sensing images and preprocess them; The preprocessed remote sensing images are used as real samples, and the generated samples are obtained using the conditional diffusion model; The real sample and the generated sample are converted to the set color space respectively, the color distribution of the real sample is determined by calculating the color value of each channel pixel by pixel, and the color distribution of the generated sample is aligned with the color distribution of the real sample through linear transformation to obtain the generated sample after color correction; The generated samples after color correction are screened for similarity and mixed with real samples in a set ratio. The resulting mixed sample set is used as the training set of the semantic segmentation model. The trained semantic segmentation model is used to realize the segmentation of remote sensing images.
2. The remote sensing image segmentation method according to claim 1, characterized in that: The preprocessing specifically includes: the original remote sensing image is labeled to obtain the label of the target to be segmented.
3. The remote sensing image segmentation method according to claim 1, characterized in that: The generated samples are obtained by using the conditional diffusion model. Specifically, the conditional diffusion model is trained by simultaneously performing forward diffusion and backward diffusion processes. Forward diffusion starts from the real remote sensing image and gradually adds random noise to the image, so that the image gradually degenerates into a pure noise image close to the standard normal distribution. The back diffusion process gradually removes the noise until the image is restored.
4. The remote sensing image segmentation method according to claim 1, characterized in that: The color distribution of the real sample is determined by calculating the color value of each channel pixel by pixel, including: for each image in the real sample, the color value corresponding to the brightness channel and the two chromaticity channels is calculated pixel by pixel, and the mean and standard deviation of the corresponding image are obtained, as shown in the following formula: In the formula, μ c is the mean, σ c is the standard deviation, X c,i Represents the color value of the i-th pixel on channel c, where c includes the brightness channel L, the chromaticity channel a and / or the chromaticity channel b.
5. The remote sensing image segmentation method according to claim 1, characterized in that: By calculating the color value of each channel pixel by pixel, the color distribution of the real sample is determined, which also includes: taking the global mean μ of the real sample set Rc and the global standard deviation σ Rc , as the ruler of the target color distribution, as shown in the following formula: Where M represents the total number of images in the sample set, μ c,i is the mean of the i-th image on channel c, σ c,i is the standard deviation of the i-th image on channel c.
6. The remote sensing image segmentation method according to claim 1, characterized in that: Determine the color distribution of the real sample, specifically: take the mean and standard deviation corresponding to each pixel of each image in the real sample, and the global mean and global standard deviation corresponding to the corresponding image, together as the color distribution of the real sample.
7. The remote sensing image segmentation method according to claim 1, characterized in that: Through linear transformation, the color distribution of the generated sample is aligned with the color distribution of the real sample, and the generated sample after color correction is obtained, as shown in the following formula: In the formula, X′ gc,i is the corrected color value; X gc,i Indicates the specific pixel color value of the generated image g; μ Rc and σ Rc are the mean and standard deviation of the real image set on channel c, respectively. α is a control parameter used to find a balance between color consistency and diversity of generated samples. According to the adjustment of the α value, a choice is made between complete correction and partial retention of the original color characteristics.
8. A remote sensing image segmentation system, characterized in that: include: The preprocessing module is configured to: obtain the original remote sensing image and preprocess it; The virtual sample generation module is configured to: use the preprocessed remote sensing image as the real sample and obtain the generated sample using the conditional diffusion model; The color correction module is configured to: convert the real sample and the generated sample into a set color space respectively, determine the color distribution of the real sample by calculating the color value of each channel pixel by pixel, and align the color distribution of the generated sample with the color distribution of the real sample through linear transformation to obtain the generated sample after color correction; The mixed sample training segmentation module is configured as follows: the generated samples after color correction are screened for similarity and mixed with real samples in a set ratio. The formed mixed sample set is used as the training set of the semantic segmentation model, and the trained semantic segmentation model is used to realize the segmentation of remote sensing images.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the steps in the remote sensing image segmentation method as described in any one of claims 1 to 7 are implemented.
10. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the remote sensing image segmentation method as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Dynamic federation continuous learning method and system for category overlapping scene
CN119862941A
Roof photovoltaic sample generation and segmentation method based on generative artificial intelligence
CN120164061A
High-resolution remote sensing image color correction method and system based on style migration
CN120823116A
Image parallel reasoning method
CN121168678A