Remote sensing training sample automatic generation method based on adaptive step length slicing strategy

The remote sensing training sample generation method based on the adaptive step-size slicing strategy solves the shortcomings of multi-source data fusion and the fixed step-size strategy, achieves efficient generation of high-quality remote sensing training samples, and improves the training efficiency and accuracy of the model.

CN120599397APending Publication Date: 2025-09-05CHINA GEOLOGICAL SURVEY CHANGSHA NATURAL RESOURCES COMPREHENSIVE SURVEY CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510591759.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing remote sensing training sample generation methods fail to effectively integrate the complementary features of multi-source data, resulting in limited sample feature expression capabilities, and the fixed step size strategy cannot be adaptively adjusted according to the complexity of the image content, resulting in sample redundancy and uneven distribution.

Method used

An adaptive step-size slicing strategy is adopted. Through multi-source remote sensing data fusion and label rasterization processing, combined with an adaptive step-size slicing strategy, the slicing step size is dynamically adjusted to generate high-quality training samples.

Benefits of technology

It enhances the richness and expressiveness of sample features, reduces redundant samples, ensures that details of complex areas of land features are fully collected, and improves the training efficiency and accuracy of deep learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599397A_ABST
    Figure CN120599397A_ABST
Patent Text Reader

Abstract

The invention provides a remote sensing training sample automatic generation method based on an adaptive step length slicing strategy, and relates to the field of remote sensing image processing, and the method comprises the steps: obtaining multi-source remote sensing data, and carrying out the fusion, and obtaining a fusion image; obtaining ground feature label data, performing rasterization processing, and converting the ground feature label data into a label grid image aligned with the fused image to obtain label data of the fused image; an effective window is determined by fusing the image and the label data in combination with a self-adaptive step length slicing strategy; and intercepting a corresponding image block of the fused image and a corresponding label block of the label grid image through the effective window to obtain final remote sensing image training data. Through multi-source data space alignment and feature fusion, the slice step length is dynamically adjusted in combination with the image content, and a high-quality and low-redundancy remote sensing training sample is automatically generated, so that the generalization performance and efficiency of a deep learning model in tasks such as ground feature classification and target detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of remote sensing image processing, and in particular to a method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy. Background Art

[0002] With the rapid development of remote sensing technology, the ability to acquire multi-source remote sensing data (such as multispectral images, panchromatic images, digital elevation models (DEMs), etc.) has been significantly improved, providing a rich data foundation for tasks such as object classification, target detection, and change detection. Deep learning technology has achieved remarkable results in remote sensing image processing due to its powerful feature extraction and pattern recognition capabilities. However, the training of deep learning models is highly dependent on a large number of labeled samples, and the generation of training samples, as a key step in data preprocessing, directly affects the training effect and generalization ability of the model. Existing remote sensing training sample generation methods still have the following shortcomings:

[0003] 1. Insufficient utilization of multi-source data: Existing methods are usually based on a single data source and fail to effectively integrate the complementary features of multi-source data (such as spectrum, texture, and terrain information), resulting in limited sample feature expression capabilities.

[0004] 2. Sample redundancy and lack of flexibility: When using a fixed step size for image slicing, a large number of duplicate samples will be generated in large areas of a single category, resulting in data redundancy. In areas with complex distribution of object categories, a fixed step size may skip certain key areas and miss details. The fixed step size strategy cannot adaptively adjust to the complexity of the image content and is difficult to cope with the diverse scales and complex boundaries of objects in remote sensing images. When the image contains both large uniform areas and areas with rich details, the fixed step size strategy cannot balance efficiency and detail integrity, resulting in samples being concentrated in the dominant category and uneven sample distribution.

[0005] To address the above issues, there is an urgent need for a new method that can fully utilize the advantages of multi-source remote sensing data and dynamically adjust the slice step size according to the image content, so as to reduce sample redundancy, improve sample diversity and quality, and better meet the needs of deep learning in the remote sensing field for high-quality training data. Summary of the Invention

[0006] The purpose of the present invention is to provide a method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy in order to solve the problems of insufficient multi-source data fusion, sample redundancy and lack of adaptive flexibility in existing multi-source remote sensing data processing methods.

[0007] The above-mentioned purpose of this application is achieved through the following technical solutions:

[0008] S1: Acquire multi-source remote sensing data and fuse them to obtain a fused image;

[0009] S2: Acquire object label data and perform rasterization processing to convert the object label data into a label raster image aligned with the fused image to obtain label data of the fused image;

[0010] S3: Determine the effective window by fusing image and label data and combining adaptive step-size slicing strategy;

[0011] S4: Through the effective window, intercept the corresponding image blocks of the fused image and the corresponding label blocks of the label raster image to obtain the final remote sensing image training data.

[0012] Optionally, step S1 includes:

[0013] Multi-source remote sensing data includes: multispectral images and DEM data;

[0014] Select multispectral images from multi-source remote sensing data as reference images;

[0015] Spatial alignment of vector data and DEM data is performed using WarpedVRT projection transformation and resampling technology;

[0016] The aligned multi-source data are stacked and fused along the band dimension to generate a multi-band fused image.

[0017] Optionally, step S2 includes:

[0018] rasterizing the feature label data in vector format to convert the feature label data into a label raster image aligned with the fused image;

[0019] Different feature categories of the label raster image are mapped to predetermined integer code values ​​as label data of training samples.

[0020] Optionally, step S3 includes:

[0021] Set slicing parameters according to task requirements, including: image block size, basic preset step size, maximum step size multiple, and minimum effective pixel ratio threshold;

[0022] Use the sliding window to traverse the fused image and its corresponding label data in a double loop of rows and columns to generate candidate slice windows on the fused image;

[0023] Perform validity check on each candidate slice window;

[0024] Determine the slice step size based on the content complexity of the image in the candidate slice window that passes the validity check;

[0025] The effective window is determined by the slicing step.

[0026] Optionally, the specific steps of checking the validity of each candidate slice window include: calculating the effective pixel ratio of the image in the candidate slice window; if the effective pixel ratio is lower than a preset threshold, it is regarded as an invalid window, no sample is generated, and the candidate slice window is directly skipped according to the basic preset step size.

[0027] Optionally, the specific step of determining the slice step size based on the content complexity of the image in the candidate slice window that passes the validity check includes:

[0028] If the label of the current candidate slice window or the next candidate slice window contains two or more feature categories, it is determined that the feature distribution in the candidate slice window area is complex, and the basic preset step size is continued to be used for slicing;

[0029] If the labels of the candidate slicing window and its next candidate slicing window contain only one category, the content complexity of the area is determined to be low, and the step size is adjusted to the basic preset step size multiplied by the maximum step size multiple for slicing.

[0030] An electronic device includes a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device performs a method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy.

[0031] A computer-readable storage medium stores instructions. When the instructions are executed, a method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy is executed.

[0032] The beneficial effects of the technical solution provided by this application are:

[0033] The fusion of multi-source data allows samples to contain multi-dimensional information such as spectrum, texture, and topography, enhancing the richness and expressiveness of sample features. The adaptive step-size slicing strategy dynamically adjusts sampling density based on image content, reducing redundant samples in large, homogeneous areas. This significantly improves sample generation efficiency while ensuring that details in complex areas are fully captured.

[0034] By introducing the alignment and fusion of multi-source data and dynamically adjusting the step size based on the complexity of the image content, this method efficiently generates high-quality remote sensing training samples, reduces invalid and redundant data, and improves the efficiency and accuracy of deep learning model training. This method is suitable for generating training samples for deep learning models used in remote sensing image analysis tasks such as object classification, target detection, and change monitoring. The generated samples are well-distributed and highly diverse, effectively alleviating the problem of class imbalance and improving the model's generalization performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The present application will be further described below with reference to the accompanying drawings and embodiments, in which:

[0036] Figure 1 is a flow chart in an embodiment of the present application;

[0037] Figure 2 Schematic diagram of the adaptive step size adjustment principle in the embodiment of the present application;

[0038] Figure 3 is a schematic comparison diagram of sample images and labels in the embodiments of the present application;

[0039] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to have a clearer understanding of the technical features, purposes and effects of this application, the specific implementation methods of this application are now described in detail with reference to the accompanying drawings.

[0041] The embodiments of the present application provide a method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy.

[0042] Please refer to Figure 1 , Figure 1 This is a flowchart of a method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy in an embodiment of the present application, including:

[0043] S1: Acquire multi-source remote sensing data and fuse them to obtain a fused image;

[0044] S2: Acquire object label data and perform rasterization processing to convert the object label data into a label raster image aligned with the fused image to obtain label data of the fused image;

[0045] S3: Determine the effective window by fusing image and label data and combining adaptive step-size slicing strategy;

[0046] S4: Through the effective window, intercept the corresponding image blocks of the fused image and the corresponding label blocks of the label raster image to obtain the final remote sensing image training data.

[0047] As an embodiment, for each valid window selected by the adaptive step size strategy, the corresponding image block of the fused image and the corresponding label block of the label raster image are intercepted to ensure that the generated image block and the label block correspond one to one in spatial position. The output data format is selected as needed, and the image block and the label block are saved as a specified format file. Multiple output formats are supported (such as .npy, .tif, .hdf5), and they are stored in the predetermined image sample directory and label sample directory respectively. Format conversion: Multiple output formats are supported (such as .npy, .tif, .hdf5), which are stored in the images and labels directories respectively.

[0048] Step S1 includes:

[0049] Multi-source remote sensing data includes: multispectral images and DEM data;

[0050] Select multispectral images from multi-source remote sensing data as reference images;

[0051] Spatial alignment of vector data and DEM data is performed using WarpedVRT projection transformation and resampling technology;

[0052] As an embodiment, a reference image (such as a multispectral image) is selected as a benchmark, and remote sensing data from other sources (such as a digital elevation model DEM, etc.) are spatially aligned through WarpedVRT projection transformation and resampling technology to ensure that all data sources are consistent in coordinate system, resolution and spatial range.

[0053] The aligned multi-source data are stacked and fused along the band dimension to generate a multi-band fused image.

[0054] As an embodiment, a 4-band multispectral image is fused with a 1-band DEM to form a 5-band image.

[0055] Step S2 includes:

[0056] rasterizing the feature label data in vector format to convert the feature label data into a label raster image aligned with the fused image;

[0057] Different feature categories of the label raster image are mapped to predetermined integer coding values ​​as label data of training samples.

[0058] Step S3 includes:

[0059] Set slicing parameters according to task requirements, including: image block size, basic preset step size, maximum step size multiple, and minimum effective pixel ratio threshold;

[0060] As an embodiment, the slice parameter selection can be flexibly adjusted according to the scale of the object, the image resolution and the task type.

[0061] Use a sliding window to traverse the fused image and its corresponding label data in a double loop of rows and columns to generate candidate slice windows on the fused image;

[0062] Perform validity check on each candidate slice window;

[0063] Determine the slice step size based on the content complexity of the image in the candidate slice window that passes the validity check;

[0064] The effective window is determined by the slicing step.

[0065] The specific steps of checking the validity of each candidate slice window include: calculating the effective pixel ratio of the image in the candidate slice window; if the effective pixel ratio is lower than a preset threshold, it is considered an invalid window, no sample is generated, and the candidate slice window is directly skipped according to the basic preset step size.

[0066] As an embodiment, the effective pixel ratio of the image in the candidate slice window is calculated (the effective pixel ratio is the ratio of non-zero pixels). If it is lower than the set threshold, it is regarded as an invalid window, no sample is generated, and the window is directly skipped according to the basic preset step size to avoid generating invalid sample data.

[0067] The specific steps of determining the slice step size based on the content complexity of the image in the candidate slice window that passes the validity check include:

[0068] If the label of the current candidate slice window or the next candidate slice window contains two or more feature categories, it is determined that the feature distribution in the candidate slice window area is complex, and the basic preset step size is continued to be used for slicing;

[0069] If the labels of the candidate slicing window and its next candidate slicing window contain only one category, the content complexity of the area is determined to be low, and the step size is adjusted to the basic preset step size multiplied by the maximum step size multiple for slicing.

[0070] As an embodiment, for windows that pass the validity check, the slicing step size is further dynamically determined based on the complexity of their image content: if the label of the current window or the adjacent area on the right contains multiple land object categories, it is determined that the land object distribution in the area is complex, and the basic step size is continued to be used for slicing to ensure that details are not missed; conversely, if the land object categories in the current window and the adjacent area on the right are all single, it is determined that the content of the area is simple and the changes are small, and the step size can be adjusted to the basic step size multiplied by the maximum step size multiple to reduce repeated sampling of homogeneous areas.

[0071] As an example, Figure 1It is a flowchart of the method of the present invention, showing the complete processing flow from data input, multi-source data fusion, adaptive step size slicing to sample data output, and highlighting the strategy of dynamically adjusting the step size according to the image content.

[0072] As an example, Figure 2 It is a diagram of the principle of adaptive step size adjustment, which compares the slicing effects of the fixed step size strategy and the dynamic step size strategy of the present invention in different areas: in the large area of ​​a single category on the left, the present invention uses a larger step size (basic step size * multiple) to reduce redundant slicing; in the complex area on the right, the basic step size is used for fine-grained slicing.

[0073] This application provides an embodiment as follows: Generation of land feature classification samples in a rural area: For the land feature classification task in a rural area, the method of the present invention is applied to generate remote sensing image samples required for deep learning model training. The source data of the area includes: a multispectral remote sensing image (spatial resolution 10m, including 4 bands), digital elevation model (DEM) data of the corresponding coverage area (spatial resolution 30m, single band), and land feature classification vector labels of the area (including categories such as buildings, roads, and vegetation). The specific implementation steps are as follows:

[0074] Step 1: Multi-source data fusion

[0075] First, data preprocessing and alignment were performed. Using the multispectral image as a reference, the low-resolution DEM data was reprojected to a 10-meter resolution using the WarpedVRT resampling technique, ensuring strict alignment with the reference image in terms of spatial extent and resolution. After alignment, the four-band multispectral image was stacked and fused with the aligned one-band DEM in the band dimension, resulting in a five-band fused image. Second, the provided feature classification vector labels were rasterized using the aforementioned method to generate a labeled raster image. The feature categories were coded as follows: 1 for transportation land, 2 for residential land, 3 for public administration and public service land, 4 for other land, 5 for garden land, 6 for industrial and mining storage land, 7 for forest land, 8 for water areas and water conservancy facilities land, 9 for cultivated land, and 10 for grassland. This labeled image was fully aligned with the fused image on the pixel grid. This completes the multi-source data fusion process, resulting in a fused image for slicing and its corresponding labeled image.

[0076] Step 2: Adaptive slicing

[0077] The slice parameters are set according to the image size and the distribution of the objects: in this embodiment, the window size is selected as 256×256 pixels, the basic step size is 128 pixels, the maximum step size multiplier is set to 2 times, and the effective pixel ratio threshold is set to 0.1. Then, the sliding window method is used to traverse the fused image and the label image (such as Figure 1 (As shown in the process), candidate window areas are generated row by row and column by column. By calculating the proportion of non-zero pixels in the window, if it is less than 0.1, the window is considered invalid, no samples are generated, and the window is directly skipped according to the basic step size. For windows that pass the validity test, their label content is further checked: if the window or the adjacent window contains multiple ground object categories, it is determined that the window is in a complex ground object area, and the basic step size (128 pixels) is continued to be used to slide with a fine step size to ensure that the details are captured; if all the pixels in the window belong to the same category and the category in the adjacent area to the right is the same, it is considered that the ground object distribution in the current area is single and the change is slow, and the step size is appropriately increased to 256 pixels (that is, twice the basic step size) to jump to the next window position, thereby reducing the number of repeated sampling of the uniform area.

[0078] Step 3: Sample Storage

[0079] During the traversal process, whenever a window is identified as a valid sample, the corresponding area of ​​the fused image is captured as an image block, and the corresponding area of ​​the label image is captured as a label block. This pair of image blocks and label blocks is saved as training samples. The output format is selected as needed. In this example, the samples are saved as .npy files in the pre-established images and labels directories, respectively.

[0080] Result analysis: Through the above steps, about 39,213 groups of valid samples were generated. The sample images and labels are shown in the following figure. Figure 3 As shown, compared with the traditional fixed step size method (generating about 41465 groups of samples), the number of samples is reduced by 2252 and the redundancy is significantly reduced.

[0081] This application also discloses an electronic device. Figure 4 , Figure 4 Schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. The electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.

[0082] The communication bus 502 is used to implement the connection and communication between these components.

[0083] The user interface 503 may include a display screen, and the optional user interface 503 may also include a standard wired interface or a wireless interface.

[0084] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0085] The present application also discloses a computer-readable storage medium storing a plurality of instructions suitable for loading by a processor to execute the above-mentioned method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy.

[0086] The above are merely exemplary embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. In other words, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure.

[0087] This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not described herein. The description and examples are to be considered as exemplary only, and the scope and spirit of the present disclosure are to be defined by the claims.

Claims

1. A method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy, characterized in that: The method comprises the following steps: S1: Acquire multi-source remote sensing data and fuse them to obtain a fused image; S2: Acquire object label data and perform rasterization processing to convert the object label data into a label raster image aligned with the fused image to obtain label data of the fused image; S3: Determine the effective window by fusing image and label data and combining adaptive step-size slicing strategy; S4: Through the effective window, intercept the corresponding image blocks of the fused image and the corresponding label blocks of the label raster image to obtain the final remote sensing image training data.

2. The method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy according to claim 1, characterized in that: Step S1 includes: Multi-source remote sensing data includes: multispectral images and DEM data; Select multispectral images from multi-source remote sensing data as reference images; Spatial alignment of vector data and DEM data is performed using WarpedVRT projection transformation and resampling technology; The aligned multi-source data are stacked and fused along the band dimension to generate a multi-band fused image.

3. The method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy according to claim 1, wherein: Step S2 includes: rasterizing the feature label data in vector format to convert the feature label data into a label raster image aligned with the fused image; Different feature categories of the label raster image are mapped to predetermined integer code values ​​as label data of training samples.

4. The method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy according to claim 1, wherein: Step S3 includes: Set slicing parameters according to task requirements, including: image block size, basic preset step size, maximum step size multiple, and minimum effective pixel ratio threshold; Use the sliding window to traverse the fused image and its corresponding label data in a double loop of rows and columns to generate candidate slice windows on the fused image; Perform validity check on each candidate slice window; Determine the slice step size based on the content complexity of the image in the candidate slice window that passes the validity check; The effective window is determined by the slicing step.

5. The method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy according to claim 4, characterized in that: The specific steps of checking the validity of each candidate slice window include: calculating the effective pixel ratio of the image in the candidate slice window; if the effective pixel ratio is lower than a preset threshold, it is considered an invalid window, no sample is generated, and the candidate slice window is directly skipped according to the basic preset step size.

6. The method for automatically generating remote sensing training samples based on an adaptive step-size slicing strategy according to claim 4, characterized in that: The specific steps of determining the slice step size based on the content complexity of the image in the candidate slice window that passes the validity check include: If the label of the current candidate slice window or the next candidate slice window contains two or more feature categories, it is determined that the feature distribution in the candidate slice window area is complex, and the basic preset step size is continued to be used for slicing; If the labels of the candidate slicing window and its next candidate slicing window contain only one category, the content complexity of the area is determined to be low, and the step size is adjusted to the basic preset step size multiplied by the maximum step size multiple for slicing.

7. An electronic device, characterized in that: It includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed by a computer, the method according to any one of claims 1 to 6 is executed.