A land parcel segmentation method based on SAM model

Through the plot segmentation method based on the SAM model, using medium-resolution remote sensing images and unsupervised clustering technology, the problem of strong dependence of plot segmentation on training data in existing technologies is solved, low-cost and highly generalized plot segmentation is achieved, and the accuracy and efficiency of segmentation are improved.

CN117197450BActive Publication Date: 2025-09-26哈尔滨工业大学人工智能研究院有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310895082.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2025-09-26
Estimated Expiration
2043-07-20

AI Technical Summary

Technical Problem

Existing land segmentation methods rely on training data for specific application scenarios, which makes them costly and difficult to generalize to different regions.

Method used

A land segmentation method based on the SAM model is adopted. The spatiotemporal characteristics of medium-resolution remote sensing images are used to guide segmentation. Unsupervised clustering and high-resolution satellite image processing are combined to generate cultivated land/non-cultivated land masks through sliding window cutting and morphological filtering to achieve large-scale land segmentation.

Benefits of technology

It achieves low-cost, zero-sample land segmentation, has good generalization performance, can accurately extract cultivated land in a large area, and simplifies the workflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117197450B_ABST
    Figure CN117197450B_ABST
Patent Text Reader

Abstract

The present invention provides a land parcel segmentation method based on a SAM model, and relates to the technical field of land parcel segmentation. The land parcel segmentation method based on the SAM model specifically comprises the following steps: S1. classifier training, S2. medium-resolution remote sensing image processing, S3. high-resolution satellite image processing, S4. segmentation result processing, and S5. result output. By adopting the spatiotemporal features of medium-resolution remote sensing images to generate prompt points and guide the SAM model to perform segmentation, the method avoids the problem that the traditional land parcel segmentation method has a strong dependence on training data during supervised learning during use, resulting in the current algorithm being more customized for a certain type of cultivated land in a certain area, requiring the user to collect data and design and train the model according to a specific application scenario. This method enables the method to perform effective land parcel segmentation work over a large range, and makes the workflow have the characteristics of low cost and zero sample, ensuring that the method has low cost and good generalization performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of land parcel segmentation, and in particular to a land parcel segmentation method based on a SAM model. Background Art

[0002] Land parcel segmentation refers to the process of dividing large-scale agricultural plots using satellite remote sensing imagery. Land parcel segmentation is an important basic task in precision agriculture and a prerequisite for the refined and intelligent management of large-scale agriculture. Accurate cultivated land vector boundary data is of great strategic significance to scientific research institutions and government departments.

[0003] Most existing land segmentation methods use land extraction based on remote sensing spectral information and land segmentation based on deep learning algorithms. When these methods are used, the algorithms used for supervised learning mostly rely on training data, and most algorithms are customized for a certain type of cultivated land in a certain area. They need to collect data, design and train models according to specific application scenarios. The process of collecting cultivated land vector boundaries in the corresponding area is difficult, the processing process is cumbersome, and the overall cost of use is high. Summary of the Invention

[0004] (1) Technical problems solved

[0005] In response to the shortcomings of the existing technology, the present invention provides a land segmentation method based on the SAM model, which solves the problem that the existing land segmentation method has a strong dependence on training data during supervised learning, and requires users to collect data, design and train models according to specific application scenarios.

[0006] (2) Technical solution

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: a land parcel segmentation method based on the SAM model, specifically comprising the following steps:

[0008] S1. Classifier training

[0009] Obtain multiple sets of spectral feature value data through the network, input the data into the classifier, divide the input data into n subsets, generate the union of n / 2 subsets as the training set, and the remaining subsets as the test set. Define the convolutional neural network and loss function, and train and test the classifier on the training set and test set respectively;

[0010] S2. Medium-resolution remote sensing image processing

[0011] Using the Sentinel-2 open-source device to acquire medium-resolution remote sensing images, the spatiotemporal spectral characteristics of the main crops in the target area were extracted. These characteristics were then fed into a trained and tested classifier to output the corresponding cultivated land / non-cultivated land classification results.

[0012] S3. High-resolution satellite image processing

[0013] Obtain a high-resolution satellite map image of the target area, cut the satellite map image of the target area into a series of RGB images through sliding window cutting, pass the cutting results into the SAM model, use a 32*32 regular grid point for global segmentation, reassemble the generated mask, convert it into a unified and complete vector data, and finally return the segmentation result in S2;

[0014] S4. Segmentation result processing

[0015] The cultivated land / non-cultivated land division result generated in S2 is remapped to the original image by upsampling. Based on the remapping result, the non-cultivated land part is removed and the cultivated land part that is not correctly identified in S2 is extracted. This part is subjected to binarization and morphological filtering operations to retain relatively complete areas, which are used as ROIs for the second stage segmentation.

[0016] S5. Result output

[0017] The cue points are generated through the ROI area generated by S4, and random point sampling is performed within the ROI. The point set in each cluster is clustered using an unsupervised clustering method and passed into the SAM model as a positive sample of the cue point. The segmented mask is spliced ​​and transformed, and then merged with the vector data of S2. After post-processing, the final segmentation result is returned.

[0018] Preferably, in S1, the classifier algorithm is based on a random forest algorithm.

[0019] Preferably, in S2, the spatiotemporal spectral characteristic values ​​are eight spectral characteristic values ​​for four time periods throughout the year, namely, the sowing period (DOY: 109–169), the growing period (DOY: 170–230), the harvesting period (DOY: 231–291), and the non-growing period (DOY: 310–320 & DOY: 70–80). The eight spectral characteristic values ​​are LSWI surface water index, NVSVI normalized visible spectrum variation index, RENDVI red edge normalized vegetation index, EVI2 enhanced vegetation index, REP red edge position, and SWIR1 / 2 shortwave infrared.

[0020] Preferably, in S3, the default size of the sliding window cutting is 2000*2000, and the step size is 1500.

[0021] Preferably, in S4, the default size of the opening and closing and operation kernels during the morphological filtering operation is 3*3.

[0022] Preferably, in S5, the number of sampling points for random point sampling is set to 10,000 by default.

[0023] Preferably, in S5, the two hyperparameters for performing unsupervised cluster analysis are the distance threshold ε and the minimum number of points MinPts.

[0024] Preferably, in said S5, the post-processing includes simplifying vector polygons, merging polygons based on R-tree index, and processing polygon self-intersection problems.

[0025] (3) Beneficial effects

[0026] The present invention provides a land parcel segmentation method based on the SAM model. It has the following beneficial effects:

[0027] 1. The present invention provides a land segmentation method based on the SAM model. Compared with the existing land segmentation method, the land segmentation method generates prompt points by adopting the spatiotemporal features of medium-resolution remote sensing images to guide the SAM model to perform segmentation. This method avoids the strong dependence of supervised learning on training data in traditional land segmentation methods when used, resulting in the current algorithms being more customized for a certain type of cultivated land in a certain area, requiring users to collect data, design and train models according to specific application scenarios. By adopting the 17-level map image provided by the open source medium-resolution remote sensing imaging device Sentinel-2, combined with the SAM model, the spatiotemporal features of the remote sensing image and the prompt project are extracted to guide the SAM model to perform segmentation. Through this method, effective land segmentation can be performed over a large area, and cultivated land can be accurately extracted and segmented for a large area of ​​land. The workflow of land segmentation using this method has the characteristics of low cost and zero sample, ensuring that the method has low cost and good generalization performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of the workflow of the present invention. DETAILED DESCRIPTION

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0030] Example:

[0031] like Figure 1 As shown, the embodiment of the present invention provides a land parcel segmentation method based on the SAM model, which specifically includes the following steps:

[0032] S1. Classifier training

[0033] Multiple sets of spectral feature value data are obtained through the network and input into the classifier. The input data is divided into n subsets, and the union of n / 2 subsets is generated as the training set. The remaining subsets are used as the test set. The convolutional neural network and loss function are defined. The classifier is trained and tested on the training set and the test set respectively. This is conducive to training the classifier in advance and ensuring the accuracy of the classifier when processing data. This process is implemented by the following program:

[0034]

[0035]

[0036] S2. Medium-resolution remote sensing image processing

[0037] Using the Sentinel-2 open-source device to acquire medium-resolution remote sensing images, the spatiotemporal spectral characteristics of the main crops in the target area were extracted. These characteristics were then fed into a trained and tested classifier, which then output the corresponding cultivated / non-cultivated land classification results, achieving a preliminary classification of cultivated / non-cultivated land in the region.

[0038] S3. High-resolution satellite image processing

[0039] Obtain a high-resolution satellite map image of the target area, cut it into a series of RGB images through sliding window cutting, pass the cutting results into the SAM model, use a 32*32 regular grid point for global segmentation, reassemble the generated mask, and convert it into a unified and complete vector data. Finally, return the segmentation result in S2 to process the high-resolution satellite image and fuse it with the medium-resolution remote sensing image processing results.

[0040] S4. Segmentation result processing

[0041] The cultivated land / non-cultivated land division result generated in S2 is remapped to the original image by upsampling. Based on the remapping result, the non-cultivated land part is removed and the cultivated land part that is not correctly identified in S2 is extracted. This part is subjected to binarization and morphological filtering operations to retain relatively complete areas. These areas are used as ROIs for the second stage segmentation to improve the accuracy of the segmentation process.

[0042] S5. Result output

[0043] The cue points are generated through the ROI area generated by S4, and random point sampling is performed within the ROI. The point set in each cluster is clustered using an unsupervised clustering method and passed into the SAM model as a positive sample of the cue point. The segmented mask is spliced ​​and transformed, and then merged with the vector data of S2. After post-processing, the final segmentation result is returned to realize the function of segmenting the land parcel by this method.

[0044] In S1, the classifier algorithm is based on the random forest algorithm, which makes the overall output of the classifier have high accuracy and generalization performance. In S2, the spatiotemporal spectral feature values ​​are eight spectral feature values ​​in four time periods throughout the year, namely the sowing period (DOY: 109–169), the growing period (DOY: 170–230), the harvest period (DOY: 231–291), and the non-growing period (DOY: 310–320 & DOY: 70–80). The eight spectral feature values ​​are LSWI surface water index, NVSVI normalized visible spectrum variation index, RENDVI red edge normalized vegetation index, EVI2 enhanced vegetation index, REP red edge position, SWIR1 / 2 short-wave infrared, which is conducive to improving the comprehensiveness of data obtained when using this method and improving the accuracy of segmentation results. In S3, the default size of the sliding window cutting is 2000*2000, and the step size is 1500, which is conducive to ensuring the effect of sliding window cutting. In S4, the default size of the opening and closing and operation kernel during the morphological filtering operation is 3*3, which is conducive to improving the effect of morphological filtering. In S5, the number of sampling points for random point sampling is 10000 by default, which is conducive to improving the accuracy and comprehensiveness of sampling. In S5, the two hyperparameters for unsupervised clustering analysis are the distance threshold ε and the minimum number of points MinPts. The distance threshold ε is used to determine the neighborhood range of the point, and the minimum number of points MinPts is used to indicate the minimum number of points contained in a cluster. In S5, post-processing includes simplifying vector polygons, polygon merging based on R-tree index, and processing polygon self-intersection problems, which is conducive to improving the accuracy of the output results.

[0045] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A land parcel segmentation method based on the SAM model, characterized in that: The specific steps include: S1. Classifier training Obtain multiple sets of spectral feature value data through the network, input the data into the classifier, divide the input data into n subsets, generate the union of n / 2 subsets as the training set, and the remaining subsets as the test set. Define the convolutional neural network and loss function, and train and test the classifier on the training set and test set respectively; S2. Medium-resolution remote sensing image processing Using the Sentinel-2 open-source device to acquire medium-resolution remote sensing images, the spatiotemporal spectral characteristics of crops in the target area are extracted. These characteristics are then fed into a trained and tested classifier to output the corresponding cultivated / non-cultivated land classification results. S3. High-resolution satellite image processing Obtain a high-resolution satellite map image of the target area, cut the satellite map image of the target area into a series of RGB images through sliding window cutting, pass the cutting results into the SAM model, use a 32*32 regular grid point for global segmentation, reassemble the generated mask, convert it into a unified and complete vector data, and finally return the segmentation result in S2; S4. Segmentation result processing The cultivated land / non-cultivated land division result generated in S2 is remapped to the original image by upsampling. Based on the remapping result, the non-cultivated land part is removed and the cultivated land part that is not correctly identified in S2 is extracted. This part is subjected to binarization and morphological filtering operations to retain relatively complete areas, which are used as ROIs for the second stage segmentation. S5. Result output The cue points are generated through the ROI area generated by S4, and random point sampling is performed within the ROI. The point set in each cluster is clustered using an unsupervised clustering method and passed into the SAM model as a positive sample of the cue point. The segmented mask is spliced ​​and transformed, and then merged with the vector data of S2. After post-processing, the final segmentation result is returned.

2. The land parcel segmentation method based on the SAM model according to claim 1, characterized in that: In S1, the classifier algorithm is based on the random forest algorithm.

3. The land parcel segmentation method based on the SAM model according to claim 1, characterized in that: In the S2, the spatiotemporal spectral characteristic values ​​are eight spectral characteristic values ​​for four time periods throughout the year, namely the sowing period, the growing period, the harvesting period, and the non-growing period. The eight spectral characteristic values ​​are the LSWI surface water index, the NVSVI normalized visible spectrum variation index, the RENDVI red edge normalized vegetation index, the EVI2 enhanced vegetation index, the REP red edge position, and the SWIR1 / 2 shortwave infrared.

4. The land parcel segmentation method based on the SAM model according to claim 1, characterized in that: In S3, the default size of the sliding window cutting is 2000*2000, and the step size is 1500.

5. The land parcel segmentation method based on the SAM model according to claim 1, characterized in that: In S4, the default size of the opening and closing and operation kernels during the morphological filtering operation is 3*3.

6. The land parcel segmentation method based on the SAM model according to claim 1, characterized in that: In S5, the number of sampling points for random point sampling is set to 10,000 by default.

7. The land parcel segmentation method based on the SAM model according to claim 1, characterized in that: In S5, the two hyper parameters for unsupervised cluster analysis are the distance threshold ε and the minimum number of points MinPts.

8. The land parcel segmentation method based on the SAM model according to claim 1, characterized in that: In S5, the post-processing includes simplifying vector polygons, merging polygons based on R-tree index, and processing polygon self-intersection problems.

Citation Information

Patent Citations

  • Field plot segmentation algorithm based on deep learning

    CN112949645A