Methods, apparatus, equipment, and media for constructing training data across spatial scales based on prior knowledge.
By generating training data through multi-scale object segmentation and prior knowledge configuration of high-resolution remote sensing images and coarse-resolution prior data, the problems of high cost and low resolution accuracy of high-resolution remote sensing image annotation are solved, and efficient and accurate training data construction and model interpretation are achieved.
Patent Information
- Application Number
- CN202511687299.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-11-18
AI Technical Summary
Existing technologies consume enormous human, material, and time costs in the process of annotating high-resolution remote sensing images, and are susceptible to subjective judgment interference, which affects the accuracy of analysis. Transfer learning and domain adaptation technologies are complex and have unstable effects in the process of adapting remote sensing images.
By acquiring high-resolution remote sensing images and coarse-resolution prior data of the same geographic area, multi-scale object segmentation is performed. Core homogeneity indices are calculated to select highly homogeneous objects. Coarse-resolution prior data is used as prior knowledge to configure the dominant prior category, which is then assigned to the pixels of highly homogeneous objects to generate training data.
It reduces annotation costs and time consumption, improves the training efficiency and interpretation accuracy of high-resolution remote sensing image interpretation models, and ensures annotation precision.
Smart Images

Figure CN121147671B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of remote sensing interpretation technology, and in particular to a method, apparatus, device and medium for constructing training data across spatial scales based on prior knowledge. Background Technology
[0002] In recent years, the rapid development of Earth observation technology has led to a dramatic increase in the amount of remote sensing data, especially the widespread application of high spatial resolution remote sensing imagery, which has laid a solid data foundation for the detailed analysis of surface features. Relying on deep learning technology, particularly the superior capabilities of convolutional neural networks in image segmentation, it is possible to automatically identify minute targets such as individual buildings, roads, trees, and even vehicles from images. However, the training effect of deep learning models heavily depends on massive amounts of accurate pixel-level annotation data. This annotation data requires professionals to delineate the boundaries of each feature on the image and assign corresponding category information. This process not only consumes enormous human, material, and time costs but is also highly susceptible to interference from subjective judgment, thus affecting the accuracy of detailed analysis.
[0003] Therefore, the existing technology still needs to be improved and enhanced. Summary of the Invention
[0004] The technical problem to be solved by this application is to provide a method, apparatus, device and medium for constructing training data across spatial scales based on prior knowledge, in order to address the shortcomings of the existing technology.
[0005] To address the aforementioned technical problems, the first aspect of this application provides a method for constructing training data across spatial scales based on prior knowledge, wherein the method specifically includes:
[0006] Acquire high-resolution remote sensing images and coarse-resolution prior data for the same geographic region;
[0007] Multi-scale object segmentation is performed on the high-resolution remote sensing image to obtain a high-resolution segmented object set;
[0008] Calculate the core homogeneity index for each high-resolution segmentation object in the high-resolution segmentation object set, and select highly homogeneous objects in the high-resolution segmentation object set based on the core homogeneity index.
[0009] The coarse-resolution prior data is used as prior knowledge to configure a dominant prior category for the highly homogeneous object.
[0010] The dominant prior class of the highly homogeneous object is assigned to each pixel within the highly homogeneous object, and pixels in the high-resolution remote sensing image that are not configured with a dominant prior class are invalidated to obtain training data.
[0011] The method for constructing training data across spatial scales based on prior knowledge, wherein after acquiring high-resolution remote sensing images and coarse-resolution prior data for the same geographical region, the method further includes:
[0012] The high-resolution remote sensing image and the coarse-resolution prior data are mapped to the same coordinate system, and the mapped coarse-resolution prior data is resampled so that the resampled coarse-resolution prior data is aligned with the high-resolution remote sensing image.
[0013] The high-resolution remote sensing image and the aligned coarse-resolution prior data are simultaneously cropped according to a preset range.
[0014] The aforementioned method for constructing training data across spatial scales based on prior knowledge, wherein calculating the core homogeneity index for each high-resolution segmentation object in the high-resolution segmentation object set specifically includes:
[0015] For each high-resolution segmentation object in the set of high-resolution segmentation objects, obtain the pixels included in the high-resolution segmentation object;
[0016] The variance of the spectral values of the high-resolution segmented object is calculated based on the pixel values of all obtained pixels to obtain the core homogeneity index of the high-resolution segmented object.
[0017] The aforementioned method for constructing training data across spatial scales based on prior knowledge, wherein selecting highly homogeneous objects from the high-resolution segmented object set based on the core homogeneity index specifically includes:
[0018] Obtain the core homogeneity index set corresponding to the high-resolution segmented object set to determine the threshold for highly homogeneous objects;
[0019] Select high-resolution segmented objects whose core homogeneity index is less than or equal to the threshold of highly homogeneous objects to obtain highly homogeneous objects.
[0020] The aforementioned method for constructing training data across spatial scales based on prior knowledge, wherein configuring the dominant prior category for the highly homogeneous object using the coarse-resolution prior data as prior knowledge specifically includes:
[0021] The high-resolution remote sensing image and the coarse-resolution prior data are spatially superimposed to obtain spatially superimposed data.
[0022] The intersection area between each highly homogeneous object and the coarse pixels in the coarse resolution prior data that have an overlapping relationship is calculated based on the spatial overlay data.
[0023] The target coarse pixel corresponding to each highly homogeneous object is determined based on the intersection area, and a dominant prior category is configured for the highly homogeneous object based on the category to which the target coarse pixel belongs.
[0024] The method for constructing training data across spatial scales based on prior knowledge, wherein, before configuring a dominant prior class for the highly homogeneous object based on the category to which the target coarse pixel belongs to obtain the target highly homogeneous object, the method further includes:
[0025] Calculate the area percentage of the highly homogeneous object located within the target coarse pixel;
[0026] The highly homogeneous objects are filtered based on the area ratio.
[0027] A second aspect of this application provides a method for segmenting high-resolution images, wherein the method for segmenting high-resolution images specifically includes:
[0028] Obtain a training dataset, wherein the training dataset includes training data constructed using the prior knowledge-based cross-spatial-scale training data construction method described above;
[0029] A high-resolution remote sensing image interpretation model is trained based on the training dataset, and the high-resolution remote sensing image to be interpreted is interpreted using the high-resolution remote sensing image interpretation model to obtain the interpretation result of the high-resolution image to be segmented.
[0030] A third aspect of this application provides a training data construction apparatus for cross-spatial scales based on prior knowledge, wherein the training data construction apparatus for cross-spatial scales based on prior knowledge specifically includes:
[0031] The acquisition module is used to acquire high-resolution remote sensing images and coarse-resolution prior data for the same geographic area.
[0032] The segmentation module is used to perform multi-scale object segmentation on the high-resolution remote sensing image to obtain a high-resolution segmented object set;
[0033] The selection module is used to calculate the core homogeneity index of each high-resolution segmentation object in the high-resolution segmentation object set, and select highly homogeneous objects in the high-resolution segmentation object set based on the core homogeneity index.
[0034] The configuration module is used to configure a dominant prior category for the highly homogeneous object using the coarse-resolution prior data as prior knowledge.
[0035] A construction module is used to assign a dominant prior class to each pixel within the highly homogeneous object and invalidate pixels in the high-resolution remote sensing image that are not configured with a dominant prior class, in order to obtain training data.
[0036] A fourth aspect of this application provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the training data construction method based on prior knowledge across spatial scales as described above.
[0037] A fifth aspect of this application provides a terminal device comprising: a processor and a memory;
[0038] The memory stores a computer-readable program that can be executed by the processor;
[0039] When the processor executes the computer-readable program, it implements the steps in the training data construction method for cross-spatial scales based on prior knowledge as described above.
[0040] Beneficial Effects: Compared with existing technologies, this application provides a method, apparatus, device, and medium for constructing training data across spatial scales based on prior knowledge. The method includes acquiring high-resolution remote sensing images and coarse-resolution prior data for the same geographic region; performing multi-scale object segmentation on the high-resolution remote sensing images to obtain a high-resolution segmented object set; calculating a core homogeneity index for each high-resolution segmented object in the high-resolution segmented object set, and selecting highly homogeneous objects in the high-resolution segmented object set based on the core homogeneity index; configuring a dominant prior category for the highly homogeneous objects using the coarse-resolution prior data as prior knowledge; assigning the dominant prior category of the highly homogeneous objects to each pixel within the highly homogeneous objects, and invalidating pixels in the high-resolution remote sensing images that are not configured with a dominant prior category, to obtain training data. This application utilizes coarse-resolution remote sensing data containing annotation information to efficiently annotate high-resolution remote sensing images, fully exploring the value of existing data, reducing costs and time consumption, and improving the training efficiency of high-resolution remote sensing image interpretation models. Furthermore, this application can also ensure the accuracy of high-resolution remote sensing image annotation, further improving the interpretation accuracy of high-resolution remote sensing image interpretation models. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 A flowchart illustrating a method for constructing training data across spatial scales based on prior knowledge, provided in an embodiment of this application.
[0043] Figure 2 This is a flowchart illustrating a specific implementation of the cross-spatial scale training data construction method based on prior knowledge provided in this application embodiment.
[0044] Figure 3 A schematic diagram illustrating the principle of a method for constructing training data across spatial scales based on prior knowledge, as provided in an embodiment of this application.
[0045] Figure 4 A schematic block diagram of the terminal device provided in the embodiments of this application. Detailed Implementation
[0046] This application provides a method, apparatus, device, and medium for constructing training data across spatial scales based on prior knowledge. To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.
[0047] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0048] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0049] It should be understood that the sequence number and size of each step in this embodiment do not imply the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application embodiment.
[0050] Research has revealed that the rapid development of Earth observation technology in recent years has led to a dramatic increase in the amount of remote sensing data, especially the widespread application of high spatial resolution remote sensing imagery, which has laid a solid data foundation for the detailed analysis of surface features. Leveraging deep learning technology, particularly the superior capabilities of convolutional neural networks in image segmentation, it is possible to automatically identify minute targets such as individual buildings, roads, trees, and even vehicles from images. However, the training effectiveness of deep learning models heavily relies on massive amounts of precise pixel-level annotation data. This annotation data requires professionals to manually delineate the boundaries of each feature on the image and assign corresponding category information. This process not only consumes enormous human, material, and time resources but is also highly susceptible to subjective judgment, thus affecting the accuracy of detailed analysis.
[0051] To reduce reliance on labeled data, transfer learning and domain adaptation techniques are widely used. These techniques involve pre-training the model on large natural image datasets or a small number of remote sensing samples, then fine-tuning the model using limited labeled data from the target region to adapt to new data features. However, this method still requires a certain amount of high-quality labeled data for the target domain. Furthermore, remote sensing images are affected by various factors such as sensor type, imaging conditions, season, and geographical environment, exhibiting significant "inter-domain differences." This can lead to a substantial decrease in the effectiveness of features learned in the source domain when transferred to the target domain, resulting in a complex adaptation process and unstable performance.
[0052] To address the aforementioned issues, this application embodiment acquires high-resolution remote sensing images and coarse-resolution prior data for the same geographical region; performs multi-scale object segmentation on the high-resolution remote sensing images to obtain a high-resolution segmented object set; calculates a core homogeneity index for each high-resolution segmented object in the high-resolution segmented object set, and selects highly homogeneous objects in the high-resolution segmented object set based on the core homogeneity index; configures a dominant prior category for the highly homogeneous objects using the coarse-resolution prior data as prior knowledge; assigns the dominant prior category of the highly homogeneous objects to each pixel within the highly homogeneous objects, and invalidates pixels in the high-resolution remote sensing images that are not configured with a dominant prior category, thereby obtaining training data. This application utilizes coarse-resolution remote sensing data containing annotation information to efficiently annotate high-resolution remote sensing images, fully exploring the value of existing data, reducing costs and time consumption, and improving the training efficiency of high-resolution remote sensing image interpretation models. Furthermore, this application can also ensure the accuracy of high-resolution remote sensing image annotation, further improving the interpretation accuracy of high-resolution remote sensing image interpretation models.
[0053] The application content will be further explained below with reference to the accompanying drawings and the description of the embodiments.
[0054] This embodiment provides a method for constructing training data across spatial scales based on prior knowledge, such as... Figure 1 and Figure 2 As shown, the method includes:
[0055] S10. Acquire high-resolution remote sensing images and coarse-resolution prior data for the same geographical area.
[0056] Specifically, high-resolution remote sensing imagery and coarse-resolution prior data refer to remote sensing data of the same geographic area. For example, both high-resolution remote sensing imagery and coarse-resolution prior data are remote sensing data for region A. The high-resolution remote sensing imagery has a higher spatial resolution than the coarse-resolution prior data. The high-resolution remote sensing imagery contains multispectral bands, while the coarse-resolution prior data carries category information (such as land cover or specific land cover classifications), and this category information is the category that the high-resolution remote sensing imagery interpretation model needs to identify. High-resolution remote sensing imagery is a remote sensing imagery with a spatial resolution better than 2 meters, while coarse-resolution prior data is a remote sensing imagery with a spatial resolution of 10 meters, 30 meters, or 500 meters, and this remote sensing imagery is labeled with land cover categories.
[0057] Furthermore, since high-resolution remote sensing images and coarse-resolution prior data may be acquired through different remote sensing devices, there will be coordinate system differences between them. Therefore, after acquiring the high-resolution remote sensing images and coarse-resolution prior data, they can be preprocessed to align the preprocessed high-resolution remote sensing images and coarse-resolution prior data.
[0058] For example, after acquiring high-resolution remote sensing images and coarse-resolution prior data for the same geographical area, the method further includes:
[0059] The high-resolution remote sensing image and the coarse-resolution prior data are mapped to the same coordinate system, and the mapped coarse-resolution prior data is resampled so that the resampled coarse-resolution prior data is aligned with the high-resolution remote sensing image.
[0060] The high-resolution remote sensing image and the aligned coarse-resolution prior data are simultaneously cropped according to a preset range.
[0061] Specifically, the coordinate system can be the coordinate system of the high-resolution remote sensing image, the coordinate system of the coarse-resolution prior data, or any other arbitrarily chosen coordinate system. For example, both the high-resolution remote sensing image and the coarse-resolution prior data can be mapped to WGS84 UTM. WGS84 UTM refers to using the UTM (Universal Transverse Mercator) projection coordinate system to represent locations on Earth under the WGS84 (World Geodetic System 1984) geodetic datum. Furthermore, after mapping the high-resolution remote sensing image and the coarse-resolution prior data to the same coordinate system, resampling is used to sample the spatial resolution of the coarse-resolution prior data to the spatial resolution of the high-resolution remote sensing image. This ensures that each pixel of the coarse-resolution prior data is aligned with the correct geographical location on the high-resolution remote sensing image. Resampling can be performed using a high-order polynomial correction model and sub-pixel-level precision resampling methods, such as cubic convolution sampling.
[0062] The preset range is pre-defined and used to crop the region of interest from the high-resolution remote sensing image and the coarse-resolution prior data. In other words, the image region corresponding to the preset range is cropped from the high-resolution remote sensing image and the coarse-resolution prior data respectively. The cropped high-resolution remote sensing image region is used as the subsequent high-resolution remote sensing image, and the cropped coarse-resolution prior data region is used as the subsequent coarse-resolution prior data. This can remove useless regions from the high-resolution remote sensing image and the coarse-resolution prior data, saving the amount of computation required for useless regions, and also avoiding the influence of feature information in useless regions on the region of interest.
[0063] It should be noted that in practical applications, the coarse-resolution prior data may include not only the image information needed for labeling high-resolution remote sensing images, but also some invalid image information (such as clouds, snow, and shadows) and non-interested image information that does not require land cover categories when labeling high-resolution remote sensing images. This invalid and non-interested image information can interfere with the image information of interest. Therefore, after simultaneously cropping the high-resolution remote sensing images and the aligned coarse-resolution prior data, invalid and non-interested image information in the coarse-resolution prior data can be identified. Then, the identified invalid and non-interested image information is masked to prevent it from interfering with the generation of training data, thereby improving the generation speed and labeling accuracy of the training data.
[0064] S20. Perform multi-scale object segmentation on the high-resolution remote sensing image to obtain a high-resolution segmented object set.
[0065] Specifically, the high-resolution segmentation object set includes several high-resolution segmentation objects, which are the basic units for classifying high-resolution remote sensing images. In other words, by performing multi-scale object segmentation on the high-resolution remote sensing image, the pixel set in the high-resolution remote sensing image is reassembled into internally homogeneous image objects.
[0066] Furthermore, when performing multi-scale object segmentation on high-resolution remote sensing images, a multi-scale segmentation algorithm can be used. This algorithm can automatically calculate scale parameters based on the ESP2 (Earth Trend Modeler-Structural Change Detection) algorithm, and then segment the high-resolution remote sensing image based on these parameters to obtain a high-resolution segmented object set. The objective function used in calculating the scale parameters can be:
[0067] ,
[0068] ,
[0069] ,
[0070] in, Represent the objective function; This represents the change in spectral heterogeneity after merging adjacent objects, and is usually calculated using the weighted sum of standard deviations. The amount of change in shape heterogeneity; Indicates the spectral weighting coefficient; Indicates the shape weighting coefficient; This represents the compactness weighting coefficient; This indicates the amount of change in compactness; This indicates the amount of change in smoothness.
[0071] It should be noted that in this embodiment, the spectrum is the primary factor, thus the spectral weighting coefficient is greater than the shape weighting coefficient. For example, the value range of the spectral weighting coefficient is 0.7-0.9. In practical applications, the spectral weighting coefficient and the shape weighting coefficient can be adjusted according to requirements. No specific restrictions are imposed here; only a specific example is given.
[0072] Furthermore, the high-resolution segmented object set is represented as , Represents a high-resolution segmented object set. Represents high-resolution segmented objects. This indicates the number of objects in the high-resolution segmentation object set. Each high-resolution segmentation object in your high-resolution segmentation object set... Each is a polygonal vector, and its internal pixels are highly homogeneous in both spectrum and space.
[0073] S30. Calculate the core homogeneity index of each high-resolution segmentation object in the high-resolution segmentation object set, and select highly homogeneous objects in the high-resolution segmentation object set based on the core homogeneity index.
[0074] Specifically, the core homogeneity index is used as the selection criterion for highly homogeneous objects. In other words, the high-resolution segmentation object set is filtered based on the core homogeneity index of the high-resolution segmentation objects to obtain highly homogeneous objects within the set. The core homogeneity index can be determined based on the feature values of all pixels within a highly homogeneous object; for example, it can be determined based on the spectral values of pixels or the vegetation index of pixels, etc.
[0075] In one embodiment, calculating the core homogeneity metric for each high-resolution segmented object in the high-resolution segmented object set specifically includes:
[0076] For each high-resolution segmentation object in the set of high-resolution segmentation objects, obtain the pixels included in the high-resolution segmentation object;
[0077] The variance of the spectral values of the high-resolution segmented object is calculated based on the pixel values of all obtained pixels to obtain the core homogeneity index of the high-resolution segmented object.
[0078] Specifically, the core homogeneity index is the variance of the spectral values of the high-resolution segmented object. This index reflects the dispersion of pixels within the high-resolution segmented object; a smaller core homogeneity index indicates a more homogeneous high-resolution segmented object, while a larger index indicates a less homogeneous object. Therefore, the core homogeneity index can be used as a criterion for selecting highly homogeneous objects.
[0079] When calculating the core homogeneity index of a high-resolution segmented object, since the high-resolution segmented object is a polygonal vector, it includes multiple pixels, and each pixel corresponds to a spectral value. Therefore, the spectral value of each pixel in the high-resolution segmented object can be obtained first, and then the spectral value variance of the high-resolution segmented object can be calculated based on the spectral value of each pixel. The calculated spectral value variance is then used as the core homogeneity index of the high-resolution segmented object. The formula for calculating the core homogeneity index is as follows:
[0080] ,
[0081] ,
[0082] in, Indicates the core homogeneity indicator, This indicates the number of pixels in a high-resolution segmented object. This represents the spectral values of pixels in a high-resolution segmented object. This represents the mean spectral value of a high-resolution segmented object.
[0083] Furthermore, after obtaining the core homogeneity index for each high-resolution segmented object, the high-resolution segmented objects in the high-resolution segmented object set can be filtered based on the core homogeneity index to obtain highly homogeneous objects. When selecting highly homogeneous objects, a pre-set threshold for highly homogeneous objects can be used, or an adaptive threshold for highly homogeneous objects determined based on the core homogeneity index of the high-resolution segmented objects can be used.
[0084] For example, selecting highly homogeneous objects from the high-resolution segmented object set based on the core homogeneity index specifically includes:
[0085] Obtain the core homogeneity index set corresponding to the high-resolution segmented object set to determine the threshold for highly homogeneous objects;
[0086] Select high-resolution segmented objects whose core homogeneity index is less than or equal to the threshold of highly homogeneous objects to obtain highly homogeneous objects.
[0087] Specifically, the highly homogeneous object threshold is an adaptive threshold. By using this adaptive threshold to select highly homogeneous objects, the limitations of manually setting a fixed threshold can be avoided, thus improving the accuracy of highly homogeneous object selection. The process of obtaining the highly homogeneous object threshold can be as follows: obtain the core homogeneity index for each high-resolution segmentation object, and use the set of all core homogeneity indices as the core homogeneity index set corresponding to the high-resolution segmentation object set. Then, calculate the statistical quantile of the core homogeneity index set and use this statistical quantile as the highly homogeneous object threshold. For example, the 25th percentile can be used as the highly homogeneous object threshold. Of course, in practical applications, other methods can also be used to determine the highly homogeneous object threshold, such as using the mean of the core homogeneity index set as the highly homogeneous object threshold.
[0088] Furthermore, after obtaining the high homogeneity object threshold, the core homogeneity index of each high-resolution segmented object is compared with the high homogeneity object threshold to select high-resolution segmented objects whose core homogeneity index is less than or equal to the high homogeneity object threshold. All selected high-resolution segmented objects are then designated as high homogeneous objects. In other words, the selection rule for high homogeneous objects is as follows:
[0089] like If so, the high-resolution segmented object is a highly homogeneous object; if In this case, the high-resolution segmented object is a non-highly homogeneous object; among which, This represents the threshold for highly homogeneous objects.
[0090] This application uses spectral variance as the core homogeneity index to reflect the dispersion of pixels in high-resolution segmented objects. Then, based on the adaptive high homogeneity object threshold and the core homogeneity index, high homogeneous objects are selected from the high-resolution segmented object set. This not only selects high homogeneous objects according to the dispersion of pixels, but also adapts to the contrast and noise levels of different high-resolution remote sensing images, dynamically filtering out homogeneous high-resolution segmented objects in each high-resolution remote sensing image, thus improving the accuracy of high homogeneous objects.
[0091] S40. Configure a dominant prior category for the highly homogeneous object using the coarse-resolution prior data as prior knowledge.
[0092] Specifically, the coarse-resolution prior data carries category information, and the dominant prior category is configured for highly homogeneous objects based on the category information carried by the coarse-resolution prior data. For example, coarse pixels corresponding to highly homogeneous objects can be found in the coarse-resolution prior data, and then the category information of the coarse pixels can be used as the dominant prior category of the highly homogeneous objects; or, coarse pixels that intersect with highly homogeneous objects can be selected in the coarse-resolution prior data, and then the dominant prior category of the highly homogeneous objects can be determined based on the category information of all selected coarse pixels, etc.
[0093] In one embodiment, configuring a dominant prior category for the highly homogeneous object using the coarse-resolution prior data as prior knowledge to obtain the target highly homogeneous object specifically includes:
[0094] The high-resolution remote sensing image and the coarse-resolution prior data are spatially superimposed to obtain spatially superimposed data.
[0095] The intersection area between each highly homogeneous object and the coarse pixels in the coarse resolution prior data that have an overlapping relationship is calculated based on the spatial overlay data.
[0096] The target coarse pixel corresponding to each highly homogeneous object is determined based on the intersection area, and a dominant prior category is configured for the highly homogeneous object based on the category to which the target coarse pixel belongs to obtain the target highly homogeneous object.
[0097] Specifically, since coarse-resolution prior data is needed as prior knowledge, high-resolution remote sensing images and coarse-resolution prior data can be spatially overlaid to form spatial overlay data. This spatial overlay data can include two image layers: one image layer is the high-resolution remote sensing image, and the other image layer is the coarse-resolution prior data. This allows the coarse-resolution prior data to serve as a prior knowledge reference layer for the high-resolution remote sensing image. This prior knowledge reference layer can then be used to assign a dominant prior category to highly homogeneous objects in the high-resolution remote sensing image. Due to the resolution difference between the coarse-resolution prior data and the high-resolution remote sensing image, a single coarse pixel in the coarse-resolution prior data typically contains multiple high-resolution objects. Conversely, a high-resolution object in the high-resolution remote sensing image may reside entirely within a single coarse pixel or may span the boundaries of multiple coarse pixels. Each coarse pixel in the coarse-resolution prior data corresponds to a category.
[0098] Furthermore, after acquiring the spatial overlay data, for each highly homogeneous object, coarse pixels that overlap with the object are selected from the coarse-resolution prior data. The intersection area between the highly homogeneous object and each coarse pixel is calculated. The coarse pixel with the largest intersection area is then taken as the target coarse pixel corresponding to the highly homogeneous object, and the category to which the target coarse pixel belongs is taken as the dominant prior category of the highly homogeneous object. In other words, the target highly homogeneous object is a highly homogeneous object carrying the dominant prior category.
[0099] It should be noted that after selecting coarse pixels that overlap with the highly homogeneous object in the coarse resolution prior data, the dominant prior category of the highly homogeneous object can be used, which will not be explained in detail here.
[0100] In one embodiment, before configuring a dominant prior class for the highly homogeneous object based on the category to which the target coarse pixel belongs to obtain the target highly homogeneous object, the method further includes:
[0101] Calculate the area percentage of the highly homogeneous object located within the target coarse pixel;
[0102] The highly homogeneous objects are filtered based on the area ratio.
[0103] Specifically, the area ratio is used to determine whether a highly homogeneous object is located at the boundary of the target coarse pixel, i.e., whether the highly homogeneous object is at the category boundary. The highly homogeneous objects are filtered based on this area ratio, with the following filtering rules: if the area ratio is less than a preset ratio threshold, the highly homogeneous object is filtered out; if the area ratio is greater than or equal to the preset ratio threshold, the highly homogeneous object is retained. Then, a dominant prior category is configured for the highly homogeneous object based on the category to which the target coarse pixel belongs to obtain the target highly homogeneous object. The preset ratio threshold can be 0.7, 0.65, etc.
[0104] S50. Assign the dominant prior class of the highly homogeneous object to each pixel within the highly homogeneous object, and invalidate pixels in the high-resolution remote sensing image that are not configured with a dominant prior class, in order to obtain training data.
[0105] Specifically, the training data includes high-resolution remote sensing images and label maps. The label maps are the same size as the high-resolution remote sensing images and are spatially aligned. Highly homogeneous objects in the label maps are assigned category labels, while regions other than highly homogeneous objects (such as non-homogeneous objects, low-proportion objects, and masked regions) are assigned invalid values (such as 0 or 255).
[0106] After obtaining the dominant prior class of a highly homogeneous object, this dominant prior class can be used as the dominant prior class for each pixel within the highly homogeneous object. Then, the pixels in the invalid high-resolution remote sensing image that are not configured with a dominant prior class are used to obtain a clean, pixel-level training data.
[0107] Furthermore, after obtaining the training data, post-processing can be performed on the training data and the training dataset it constitutes. This post-processing can include small patch removal and sample balancing. Small patch removal involves applying morphological opening operations or area-based filtering to remove excessively small sample blocks caused by noise. Sample balancing involves statistically analyzing the number of pixels for each category in the generated training data, and when the difference in pixel count meets a preset requirement, randomly downsampling the training data for the category with the largest number of pixels to avoid class imbalance during model training.
[0108] It should be noted that after obtaining the training dataset, quality assessment can be performed on the training dataset, and a model can be trained based on the training dataset to obtain a high-resolution remote sensing image interpretation model. Quality assessment involves randomly selecting several sample blocks from the training data and comparing them with the results of manual visual interpretation, calculating the accuracy and Kappa coefficient of the generated samples to quantitatively evaluate the reliability of the training dataset. The training process for the high-resolution remote sensing image interpretation model involves inputting the training data into a pre-defined deep learning segmentation network (such as the U-Net model or DeepLab model) for training to obtain the high-resolution remote sensing image interpretation model.
[0109] In summary, this embodiment provides a method, apparatus, device, and medium for constructing training data across spatial scales based on prior knowledge. The method includes segmenting high-resolution remote sensing images to obtain a high-resolution segmentation object set; calculating a core homogeneity index based on the high-resolution segmentation objects to select highly homogeneous objects; and configuring dominant prior categories for highly homogeneous objects using coarse-resolution prior data as a prior knowledge reference layer to obtain training data. This application utilizes coarse-resolution remote sensing data containing annotation information for efficient annotation of high-resolution remote sensing images, fully exploring the value of existing data, reducing costs and time consumption, and improving the training efficiency of high-resolution remote sensing image interpretation models. Furthermore, this application can ensure the accuracy of high-resolution remote sensing image annotation, further improving the interpretation accuracy of high-resolution remote sensing image interpretation models.
[0110] Based on the aforementioned method for constructing training data across spatial scales based on prior knowledge, this embodiment provides a high-resolution image segmentation method, wherein the high-resolution image segmentation method specifically includes:
[0111] Obtain a training dataset, wherein the training dataset includes training data constructed using the prior knowledge-based cross-spatial-scale training data construction method described above;
[0112] A high-resolution remote sensing image interpretation model is trained based on the training dataset, and the high-resolution remote sensing image to be interpreted is interpreted using the high-resolution remote sensing image interpretation model to obtain the interpretation result of the high-resolution image to be segmented.
[0113] Based on the above-described method for constructing training data across spatial scales based on prior knowledge, this embodiment provides a device for constructing training data across spatial scales based on prior knowledge, such as... Figure 3 As shown, the device for constructing training data across spatial scales based on prior knowledge specifically includes:
[0114] The acquisition module 100 is used to acquire high-resolution remote sensing images and coarse-resolution prior data of the same geographic area.
[0115] The segmentation module 200 is used to perform multi-scale object segmentation on the high-resolution remote sensing image to obtain a high-resolution segmented object set.
[0116] The selection module 300 is used to calculate the core homogeneity index of each high-resolution segmentation object in the high-resolution segmentation object set, and select highly homogeneous objects in the high-resolution segmentation object set based on the core homogeneity index.
[0117] Configuration module 400 is used to configure a dominant prior category for the highly homogeneous object using the coarse-resolution prior data as prior knowledge;
[0118] The construction module 500 is used to assign the dominant prior class of the highly homogeneous object to each pixel within the highly homogeneous object, and to invalidate pixels in the high-resolution remote sensing image that are not configured with a dominant prior class, in order to obtain training data.
[0119] Based on the above-described method for constructing training data across spatial scales based on prior knowledge, this embodiment provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the method for constructing training data across spatial scales based on prior knowledge as described in the above embodiment.
[0120] Based on the aforementioned method for constructing training data across spatial scales based on prior knowledge, this application also provides a terminal device, such as... Figure 4 As shown, it includes at least one processor 20; a display screen 21; and a memory 22, and may also include a communications interface 23 and a bus 24. The processor 20, display screen 21, memory 22, and communications interface 23 can communicate with each other via the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setup mode. The communications interface 23 can transmit information. The processor 20 can invoke logical instructions in the memory 22 to execute the methods described in the above embodiments.
[0121] Furthermore, the logical instructions in the aforementioned memory 22 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0122] The memory 22, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 22, thereby implementing the methods in the above embodiments.
[0123] The memory 22 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 22 may include high-speed random access memory (RAM) and non-volatile memory. Examples include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as transient storage media.
[0124] Furthermore, the specific process of loading and executing multiple instruction processors in the aforementioned storage medium and terminal device has been described in detail in the above method, and will not be repeated here.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for constructing training data across spatial scales based on prior knowledge, characterized in that, The prior knowledge-based cross-space scale training data construction method specifically comprises: acquire high-resolution remote sensing images and coarse-resolution prior data of the same geographical area; perform multi-scale object segmentation on the high-resolution remote sensing images to obtain a high-resolution segmented object set; calculate a core homogeneity index of each high-resolution segmented object in the high-resolution segmented object set, and select highly homogeneous objects in the high-resolution segmented object set based on the core homogeneity index; configure a dominant prior class for the highly homogeneous objects using the coarse-resolution prior data as prior knowledge; assign the dominant prior class of the highly homogeneous objects to each pixel within the highly homogeneous objects, and invalidate pixels in the high-resolution remote sensing images that are not configured with a dominant prior class, to obtain training data; wherein the calculation of the core homogeneity index of each high-resolution segmented object in the high-resolution segmented object set specifically comprises: for each high-resolution segmented object in the high-resolution segmented object set, acquire the pixels included in the high-resolution segmented object; calculate the spectral value variance of the high-resolution segmented object according to the pixel values of all the acquired pixels, to obtain the core homogeneity index of the high-resolution segmented object; the selection of highly homogeneous objects in the high-resolution segmented object set based on the core homogeneity index specifically comprises: determine a highly homogeneous object threshold based on the core homogeneity index set corresponding to the high-resolution segmented object set; select high-resolution segmented objects with a core homogeneity index less than or equal to the highly homogeneous object threshold, to obtain highly homogeneous objects. 2.The priori knowledge based cross-space scale training data construction method according to claim 1, characterized in that, After acquiring the high-resolution remote sensing images and coarse-resolution prior data of the same geographical area, the method further comprises: map the high-resolution remote sensing images and coarse-resolution prior data to the same coordinate system, and resample the mapped coarse-resolution prior data to align the resampled coarse-resolution prior data with the high-resolution remote sensing images; synchronously crop the high-resolution remote sensing images and the aligned coarse-resolution prior data according to a preset range. 3.The priori knowledge based cross-space scale training data construction method according to claim 1, wherein, The configuration of a dominant prior class for the highly homogeneous objects using the coarse-resolution prior data as prior knowledge specifically comprises: spatially superimpose the high-resolution remote sensing images and the coarse-resolution prior data to obtain spatial superimposition data; calculate the intersection area of each highly homogeneous object and the coarse pixels in the coarse-resolution prior data that have an overlapping relationship with the highly homogeneous object based on the spatial superimposition data; determine the target coarse pixel corresponding to each highly homogeneous object based on the intersection area, and configure a dominant prior class for the highly homogeneous object based on the class to which the target coarse pixel belongs. 4.The priori knowledge based cross-space scale training data construction method according to claim 3, characterized in that, Before the configuration of a dominant prior class for the highly homogeneous objects based on the class to which the target coarse pixel belongs to obtain a target highly homogeneous object, the method further comprises: calculate the area proportion of the highly homogeneous object located within the target coarse pixel; filter the highly homogeneous object based on the area proportion.
5. A method for segmenting a high resolution image, characterized in that, The high-resolution image segmentation method specifically comprises: Obtaining a training data set, wherein the training data set comprises training data constructed by the prior knowledge-based cross-spatial scale training data construction method of any one of claims 1-4; Training a high-resolution remote sensing image interpretation model based on the training data set, and interpreting a to-be-interpreted high-resolution image by the high-resolution remote sensing image interpretation model to obtain an interpretation result of the to-be-interpreted high-resolution image.
6. An a priori knowledge based cross spatial scale training data construction apparatus, characterized by, The prior knowledge-based cross-spatial scale training data construction device specifically comprises: An obtaining module configured to obtain a high-resolution remote sensing image and coarse-resolution prior data of a same geographic region; A segmentation module configured to perform multi-scale object segmentation on the high-resolution remote sensing image to obtain a high-resolution segmented object set; A selecting module configured to calculate a core homogeneity index of each high-resolution segmented object in the high-resolution segmented object set, and select a highly homogeneous object in the high-resolution segmented object set based on the core homogeneity index; A configuring module configured to configure a dominant prior class for the highly homogeneous object by taking the coarse-resolution prior data as prior knowledge; A constructing module configured to assign the dominant prior class of the highly homogeneous object to each pixel within the highly homogeneous object, and invalidate pixels in the high-resolution remote sensing image that are not configured with a dominant prior class, to obtain training data; The calculation of the core homogeneity index of each high-resolution segmented object in the high-resolution segmented object set specifically comprises: For each high-resolution segmented object in the high-resolution segmented object set, obtaining pixels included in the high-resolution segmented object; Calculating a spectral value variance of the high-resolution segmented object according to pixel values of all the obtained pixels, to obtain the core homogeneity index of the high-resolution segmented object; The selection of the highly homogeneous object in the high-resolution segmented object set based on the core homogeneity index specifically comprises: Obtaining a highly homogeneous object threshold based on a core homogeneity index set corresponding to the high-resolution segmented object set; Selecting a high-resolution segmented object with a core homogeneity index less than or equal to the highly homogeneous object threshold, to obtain a highly homogeneous object.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more programs executable by one or more processors to implement the steps in the prior knowledge-based cross-spatial scale training data construction method of any one of claims 1-4.
8. A terminal device, comprising: Comprise: A processor and a memory; The memory stores a computer readable program executable by the processor; The processor executes the computer readable program to implement the steps in the prior knowledge-based cross-spatial scale training data construction method of any one of claims 1-4.
Citation Information
Patent Citations
High-resolution FAPAR estimation method based on downscaling of low-resolution remote sensing product
CN111242022A
Crop lodging parameter inversion method and system, terminal equipment and storage medium
CN118506199A