A method and system for crop classification in irrigation areas based on remote sensing cloud platform and machine learning algorithm
By using remote sensing cloud platform and machine learning algorithm methods in the irrigation area, multiple remote sensing features are generated and the optimal feature combination is determined. Combined with the Stacking algorithm, multiple machine learning algorithms are integrated, the problem of low crop classification accuracy in irrigation area is solved, and more efficient and accurate crop distribution monitoring is achieved.
Patent Information
- Application Number
- CN202410033933.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-01-10
AI Technical Summary
In the context of complex planting structures in irrigation areas, it is difficult for the prior art to accurately reflect the distribution of crops through remote sensing data of a single time phase, and how to select characteristic bands representing the timing variation characteristics of crops and determine the optimal feature combination in multi-time phase and multi-band images is a key issue.
Using a method based on remote sensing cloud platform and machine learning algorithm, the Landsat series of remote sensing image data in the research area is obtained, and combined with crop season and phenological change information in the irrigation area, spectral index characteristics, temporal phenological characteristics, spatial texture characteristics and topographic characteristics are generated to construct a remote sensing image characteristic data set in the research area. Then, the optimal feature combination is determined using Gini importance coefficients and recursive feature elimination algorithms, and a variety of machine learning algorithms (such as CART, RF, SVM, GBDT) are integrated through the Stacking algorithm to improve crop classification accuracy.
It effectively improves the accuracy of crop classification in irrigation areas, reduces the impact of data loss, reduces the complexity of model and overfitting risks, and improves the accuracy of classification results.
Smart Images

Figure CN117953278B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural crop classification and remote sensing monitoring of natural resources, specifically relating to a method and system for classifying crops in irrigation areas based on a remote sensing cloud platform and machine learning algorithms. Background Technology
[0002] Traditional methods for identifying crop planting structure types primarily combine field surveys with statistical analysis, but these are costly, inefficient, and prone to bias. Remote sensing, as a novel method of Earth observation, has become an important tool for acquiring crop planting structure information. However, limitations in local computer processing power and storage capacity make it difficult for individual users to quickly and accurately obtain large-scale spatial distribution information of crop planting structures using traditional remote sensing methods. With the rapid development of modern science and technology, the Google Earth Engine (GEE) remote sensing cloud computing platform has quickly become an important tool for extracting large-area planting structures due to its advantages such as large data storage capacity and high processing efficiency.
[0003] Currently, due to the fragmented nature of irrigation areas in my country and the scattered planting areas, the phenomenon of "different crops with the same spectrum and the same crop with different spectrums" is prone to occur. Remote sensing data from a single time phase often cannot accurately reflect the distribution of crops. Therefore, most scholars classify crops based on the characteristic that the characteristics of crops in remote sensing images change with different time series. Yang Huan found in his study on the extraction of rapeseed and winter wheat planting information in the Jianghan Plain based on MODISEVI [J]. Land Resources Remote Sensing, 2020, 32(3):208-215 that constructing vegetation index features that can reflect the temporal change characteristics of crops can effectively identify different crops. However, Hao's study on Feature Selection of Time Series MODIS Data for Early Crop Classification Using Random Forest: A Case Study in Kansas, USA [J]. Remote Sensing, 2015, 7(5):5347-5369 also proved that under a limited number of samples, excessive coupling of feature bands, although enriching the information content of remote sensing data, increases the risk of data redundancy and the curse of dimensionality. Therefore, for multi-temporal and multi-band images, the key to solving the crop classification problem lies in how to select characteristic bands that can represent the temporal changes of crops and how to determine the optimal combination of features from too many features.
[0004] In remote sensing classification of crops, besides the selection of feature bands affecting crop extraction accuracy, machine learning algorithms are also an important component in extracting crop planting structures. He Zhaoxin, in his paper "Remote Sensing Extraction of Summer Crops in Jiangsu Province Supported by Google Earth Engine [J]. Journal of Geoinformation Science, 2019, 21(05):752-766," demonstrated that when extracting the spatial distribution of winter wheat and winter rapeseed, the classification accuracy of Naive Bayes, Support Vector Machine, and Classification Regression Tree was 28%, 5%, and 3% lower than that of Random Forest, respectively. However, Song Qian, in her paper "Research on Crop Planting Structure Extraction Method Based on GF-1 / WFV and Object-Oriented Approach [D]. Chinese Academy of Agricultural Sciences, 2016," applied Support Vector Machine and Random Forest methods to extract the planting structures of four crops (corn, soybean, rice, and spring wheat) in Bei'an City, Heilongjiang Province, and found that when the number of features was small, the classification results based on Support Vector Machine were superior to those based on Random Forest. This proves that when extracting planting structures, the classification accuracy of different machine learning algorithms is greatly affected by regional geographical and agricultural characteristics, and no single algorithm is superior to others in all circumstances. Therefore, it is essential to develop a method for crop classification that can combine the advantages of multiple machine learning algorithms, based on a remote sensing cloud platform and in the context of complex planting structures in irrigation areas. Summary of the Invention
[0005] Purpose of the invention: To address the shortcomings of existing technologies, this invention provides a method and system for classifying crops in irrigation areas based on a remote sensing cloud platform and machine learning algorithms. By utilizing an irrigation area crop classification model based on the integration of multiple differentiated models, the accuracy of crop classification in irrigation areas is effectively improved, providing a technical reference for obtaining large-scale crop distribution maps in irrigation areas with complex planting structures in my country.
[0006] Technical solution: A crop classification method for irrigation areas based on remote sensing cloud platform and machine learning algorithms, including the following steps:
[0007] S1. Obtain the geographic marker sample information of the main crops in the study area, and randomly divide the crop samples into training samples and validation samples. Based on the remote sensing cloud platform, select the Landsat series remote sensing image dataset covering the study area, and use the masking algorithm to extract the remote sensing images of the study area containing only cultivated land.
[0008] S2. Based on the extracted remote sensing images, spectral index features, temporal phenological features, spatial texture features, and topographic features are generated by combining the seasonal and phenological change information of crops in the irrigation area, and then superimposed to construct a remote sensing image feature dataset for the study area.
[0009] S3. Calculate the importance coefficient of each feature based on the remote sensing image feature dataset, sort them according to the importance coefficient, delete the low-importance features with a specified percentage, and determine the optimal feature combination based on the internal cross-validation of the remaining feature dataset using a recursive feature elimination algorithm.
[0010] S4. By stacking different machine learning algorithms, a crop classification model for irrigation areas based on the integration of multiple differentiated models under the Stacking algorithm architecture is proposed. The optimal feature combination is used for training, and the performance of different models in crop classification in irrigation areas is compared by constructing a confusion matrix to determine the optimal Stacking integrated crop classification model for irrigation areas.
[0011] S5. Using the determined optimal Stacking integrated crop classification model for irrigation areas, extract the classification results of the main crops in the irrigation areas.
[0012] Further, step S1 includes:
[0013] S1-1. In ArcGIS software, the sampling points are evenly distributed using the grid method. Combined with a high-definition electronic map, the areas with a large planting area of a single crop are circled as preset sampling points. Geographical marker sample information of the main crops in the study area is obtained, including latitude, longitude, crop type, and collection time. The crop samples are randomly divided into training samples and validation samples according to the specified ratio.
[0014] S1-2. Based on the remote sensing cloud platform, the Surface Reflectance Tier 1 atmospheric apparent reflectance product in the Landsat-8 source data is directly called to obtain the image dataset containing images from January to December of the field survey year;
[0015] S1-3. Download land use classification data with a spatial resolution of 30m×30m from the GlobeLand30 data website. In ArcGIS software, perform tile mosaicking and cropping. Select the cultivated land layer in the GlobeLand30 data and convert it from a raster layer to a vector layer. Upload it to the remote sensing cloud platform. In the cloud platform, use the MASK function to perform cultivated land masking on the selected Landsat-8 series remote sensing image dataset.
[0016] Further, in step S2, generating spectral index features includes: extracting six spectral features from Landsat-8 series remote sensing images based on the remote sensing cloud platform, including blue, green, red, near-infrared, shortwave infrared 1, and shortwave infrared 2; and calculating nine common vegetation index features, including normalized difference vegetation index, enhanced vegetation index, normalized difference water index, vegetation moisture content index, normalized decline vegetation index, normalized tillage index, chlorophyll vegetation index, improved soil-adjusted vegetation index, and normalized differential greenness index. Combining spectral reflectance and the temporal variation characteristics of vegetation indices, 15 spectral index features are calculated to play a major role in the irrigation area. The spectral index features are calculated using the median, mean, maximum, minimum, standard deviation, and specified percentile values for the growing season. For each spectral index feature, the median is calculated using the median() function. Histograms of spectral index features are calculated using the time series of spectral reflectance and vegetation index, and the percentile() function is used to calculate the 5%, 25%, 50%, 75%, and 95% percentile features. The maximum, minimum, mean, and standard deviation of the spectral index time series are calculated using the max(), min(), mean(), and stdDev() functions. A total of 150 spectral index features are obtained.
[0017] Further, in step S2, generating temporal phenological features includes: dividing the entire growing season of crops into three phenological periods based on the phenological characteristics of crops in the irrigation area, namely the sowing period, the growing period and the harvest period, and using the median() function to calculate the median of nine vegetation index features in the three phenological periods to obtain 27-dimensional temporal phenological features.
[0018] Further, in step S2, generating spatial texture features includes: performing gray-level co-occurrence matrix (GLCM) transformation on 18 indicators based on the arcsecond moment, contrast, correlation, variance, inverse difference moment, sum mean, sum variance, sum entropy, entropy, difference variance, difference entropy, information measures of correlation 1 and correlation 2, maximum correlation coefficient, dissimilarity, inertia, cluster shadow, and cluster prominence to generate 36-dimensional spatial texture features.
[0019] Furthermore, in step S2, generating terrain features includes: extracting slope, aspect, and elevation features based on SRTMDEM digital elevation data with a spatial resolution of 30m×30m.
[0020] Further, step S3 includes:
[0021] S3-1. Based on the spectral index, temporal phenology, spatial texture and topographic features generated in step S2, calculate the importance of each feature using the Gini importance coefficient, sort them by size, delete one or more of the least important features and update the feature set, repeat the above steps until the importance rating of all attributes is completed.
[0022] S3-2. Based on the remaining feature dataset, the RFE algorithm of the scikit-learn package on the Google Colab platform is used to cross-validate the selected feature set, and the optimal feature combination is determined after identifying the number of features with the highest average score.
[0023] Further, step S4 includes:
[0024] S4-1. Four machine learning models were established through the remote sensing cloud platform: Classification Decision Tree (CART), Random Forest (RF), Support Vector Machine (SVM), and Gradient Boosting Decision Tree (GBDT), and each machine learning model was trained based on the optimal feature combination.
[0025] S4-2. The four single machine learning models CART, RF, SVM and GBDT that have been trained are used as primary classifiers, and these four machine learning models are used again as secondary classifiers. The optimal parameters of the secondary classifiers are obtained through training, and the crop classification model of irrigation area based on the integration of multiple differentiated models under the Stacking algorithm architecture is obtained.
[0026] S4-3 evaluates the crop classification accuracy of four different machine learning algorithms by constructing a confusion matrix and compares the accuracy results of the Stacking integrated irrigation district crop classification model with different secondary learners to determine the optimal Stacking integrated irrigation district crop classification model. The evaluation indicators include user accuracy (UA), producer accuracy (PA), total progress (OA), and Kappa coefficient.
[0027] Furthermore, the calculation methods for each evaluation indicator are as follows:
[0028]
[0029]
[0030]
[0031]
[0032] In the formula: N is the total number of pixels; m is the number of categories; x ii x is the number of pixels on the diagonal of the confusion matrix; i+ and x j+ These represent the total number of cells in the i-th row and the j-th column, respectively.
[0033] This invention also provides a crop classification system for irrigation areas based on a remote sensing cloud platform and machine learning algorithms, comprising:
[0034] The remote sensing image preprocessing module is used to acquire the geographic marker sample information of the main crops in the study area, and randomly divide the crop samples into training samples and validation samples. Based on the remote sensing cloud platform, the Landsat series remote sensing image dataset covering the study area is screened, and the masking algorithm is used to extract the remote sensing images of the study area containing only cultivated land.
[0035] The feature dataset construction module is used to generate spectral index features, temporal phenological features, spatial texture features, and topographic features based on the extracted remote sensing images and combined with information on seasonal and phenological changes in crops in the irrigation area. These features are then overlaid to construct a remote sensing image feature dataset for the study area.
[0036] The feature data optimization module is used to calculate the importance coefficient of each feature based on the remote sensing image feature dataset, sort them according to the importance coefficient, delete a specified percentage of low-importance features, and determine the optimal feature combination based on the internal cross-validation of the remaining feature dataset using a recursive feature elimination algorithm.
[0037] The irrigation area crop classification module is used to propose an irrigation area crop classification model based on multiple differentiated models under the Stacking algorithm architecture by superimposing different machine learning algorithms. The model is trained using the optimal feature combination, and the performance of different models in irrigation area crop classification is compared by constructing a confusion matrix to determine the optimal Stacking integrated irrigation area crop classification model. Based on the determined optimal Stacking integrated irrigation area crop classification model, the classification results of the main crops in the irrigation area are extracted.
[0038] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are as follows:
[0039] (1) To address the problem of missing or severely distorted data in optical remote sensing images due to cloudy and rainy weather, we fully explored the seasonal and phenological change information of Landsat-8 images and constructed a time-series phenological feature dataset of remote sensing images, which reduced the impact caused by missing data.
[0040] (2) The optimal feature combination is determined by combining the Gini importance coefficient with recursive feature elimination, which reduces model complexity, improves model running efficiency, and avoids overfitting caused by introducing too many invalid features into the classification model.
[0041] (3) To address the problem that different single machine learning algorithms are prone to getting trapped in local optima due to their respective hypothesis spaces, a Stacking algorithm architecture based on the integration of multiple differentiated models is proposed to classify crops in irrigation areas. This model reduces the risk of getting trapped in local optima and effectively improves the classification accuracy of crops in irrigation areas by integrating and learning multiple single machine learning algorithms such as CART, RF, SVM and GBDT. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0043] Figure 2 This is a field survey map of crop types in the South Bank Irrigation District of Ordos City, Inner Mongolia Autonomous Region, taken in 2022, as shown in the example.
[0044] Figure 3 Time series curves of characteristic variables of major crop types in the South Bank Irrigation District;
[0045] Figure 4 Ranking the Gini importance coefficients of characteristic bands in the South Bank Irrigation District;
[0046] Figure 5 The overall accuracy for different feature numbers in the South Bank Irrigation District;
[0047] Figure 6 This is a crop classification model for irrigation areas based on the integration of multiple differentiated models under the Stacking algorithm architecture.
[0048] Figure 7 A comparison of the overall recognition accuracy between Stacking ensemble learning and a single machine learning model;
[0049] Figure 8 The results show the crop classification in the irrigation area based on the optimal Stacking ensemble learning model. Detailed Implementation
[0050] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0051] This invention describes a crop classification method for irrigation areas based on a remote sensing cloud platform and machine learning algorithms. Using the Google Earth Engine (GEE) remote sensing cloud platform, the study area is the South Bank Irrigation District of Ordos City, Inner Mongolia Autonomous Region. Landsat 8 remote sensing data is used to extract the planting structure distribution of the main crops (corn and sunflower) in the South Bank Irrigation District. The flowchart is shown below. Figure 1 As shown, the specific implementation includes the following steps:
[0052] Step S1: Obtain geographic marker sample information of major crops in the study area through field surveys, and randomly divide the crop samples into training samples and validation samples. Based on the GEE remote sensing cloud platform, screen the Landsat series remote sensing image dataset covering the study area, and use the masking algorithm to extract remote sensing images of the study area containing only cultivated land. This includes the following steps:
[0053] Step S1-1: In ArcGIS software, use a grid method to evenly distribute sample points in the South Bank Irrigation District. Combine this with a high-resolution Google Earth map to select areas with large single-crop planting areas as preset sampling points. During the actual survey, adjustments need to be made based on actual conditions (such as road accessibility) to ensure the number of sampling points meets the requirements for model construction and validation. Within the area, use a handheld Global Positioning System (GPS) to obtain geographic marker sample information for the main crops (corn and sunflower) in the South Bank Irrigation District. A total of 1101 crop samples were collected, including 589 corn samples and 512 sunflower samples. The crop samples were randomly divided into training and validation samples at an 8:2 ratio. The distribution of crop type field survey sample points in the South Bank Irrigation District, Ordos City, Inner Mongolia Autonomous Region in 2022 is shown below. Figure 2 ;
[0054] Step S1-2: Based on the remote sensing cloud platform, directly call the Landsat-8 source data. Surface Reflectance Tier 1 is an atmospheric apparent reflectance product that has undergone atmospheric correction and has been masked by clouds, shadows, water and snow. The projection of the data is WGS84 UTM Zone49. According to the research area of the South Bank Irrigation District, the data is cropped and calculated to form a Landsat-8 series remote sensing image dataset within the research area. The selected image time nodes cover images from January to December of the year of the field survey.
[0055] Steps S1-3: Download land use classification data with a spatial resolution of 30m×30m from the GlobeLand30 data website, mosaic and crop the tiles in ArcGIS software, select the cultivated land layer in the GlobeLand30 data and convert it from a raster layer to a vector layer, and upload it to the remote sensing cloud platform. Use the MASK function on the cloud platform to perform cultivated land masking on the selected Landsat-8 series remote sensing image dataset.
[0056] Step S2: After generating spectral index features, temporal phenological features, spatial texture features, and topographic features of remote sensing images by combining information on seasonal and phenological changes in irrigated crops, these features are overlaid to construct a remote sensing image feature dataset for the study area. This specifically includes the following steps:
[0057] Step S2-1: Spectral Index Features: Based on the remote sensing cloud platform, extract six spectral features from the Landsat-8 series remote sensing images, including blue, green, red, near-infrared (NIR), shortwave infrared 1 (SWIR1), and shortwave infrared 2 (SWIR2). Calculate nine common vegetation index features, including Normalized Difference Vegetation Index (NDVI), Enhanced Vegetation Index (EVI), Normalized Water Index (NDWI), Vegetation Moisture Index (LSWI), Normalized Decaying Vegetation Index (NDSVI), Normalized Tillage Index (NDTI), Chlorophyll Vegetation Index (GCVI), Improved Soil-Adjusted Vegetation Index (MSAVI2), and Normalized Differential Greenness Index (NDGI). Combine spectral reflectance and the temporal variation characteristics of vegetation indices to calculate the median, mean, maximum, minimum, standard deviation, and percentile values of 15 spectral index features during the main crop growing season (April-October) in the irrigation area. Specifically, for each spectral index feature (i.e., the spectral index time series), the median is calculated using the median() function; histograms of spectral index features are calculated using the spectral reflectance and vegetation index time series, and the percentile() function is used to calculate the 5%, 25%, 50%, 75%, and 95% percentile features; the max(), min(), mean(), and stdDev() functions are used to calculate the maximum, minimum, mean, and standard deviation of the spectral index time series. These features are called spectral index statistical features. A total of 150 spectral index features are obtained.
[0058] The calculation formulas for the nine vegetation index characteristics are as follows:
[0059] NDVI = (NIR - Red) / (NIR + Red)
[0060] EVI=[2.5×(NIR-Red)] / (NIR+6×Red-7.5×Blue+1)
[0061] NDWI=(Green-NIR) / (Green+NIR)
[0062] LSWI=(NIR-Swir1) / (NIR+Swir1)
[0063] NDSVI=(Swir1-Red) / (Swir1+Red)
[0064] NDTI=(Swir1-Swir2) / (Swir1+Swir2)
[0065] NDGI=(Green-Red) / (Green+Red)
[0066] GCVI = NIR / (Green-1)
[0067] MSAVI2=1 / 2×[2×NIR+1-(2×NIR+1) 2 -8×(NIR-Red) 1 / 2 ]
[0068] In the formula, Blue, Green, Red, NIR, Swir1 and Swir2 represent the surface reflectance values of the Landsat series satellites in the blue, green, red, near-infrared, shortwave infrared 1 and shortwave infrared 2 bands, respectively.
[0069] Step S2-2, Temporal phenological characteristics: The growing season of the main crops in the irrigation area is generally from April to October. Based on the phenological characteristics of crops in the irrigation area, the entire growing season (DOY is 90-300) is divided into three phenological periods: sowing period (DOY is 109-169), growing period (DOY is 170-230), and harvest period (DOY is 231-291). The median() function is used to calculate the median of nine vegetation index characteristics in the three phenological periods, resulting in 27-dimensional temporal phenological characteristics.
[0070] Step S2-3, Spatial Texture Features: Spatial texture features are extracted using the Gray-Level Co-occurrence Matrix (GLCM) transformation method based on the spatial correlation of image pixel brightness values (grayscale). Based on 18 indicators including arcsecond moment, contrast, correlation, variance, inverse difference moment, sum average, sum variance, sum entropy, entropy, difference variance, difference entropy, information measure of correlation 1 and correlation 2, maximum correlation coefficient, dissimilarity, inertia, cluster shadow, and cluster prominence, 36-dimensional spatial texture features are generated.
[0071] Step S2-4, Terrain Features: Extract slope, aspect, and elevation features based on SRTM DEM digital elevation data with a spatial resolution of 30m×30m;
[0072] The multidimensional remote sensing features used for crop type classification in the South Bank Irrigation District include spectral index features, temporal phenological features, spatial texture features, and topographic features. The remote sensing image feature dataset generated by combining seasonal and phenological variation information of crops in the irrigation district is shown in Table 1. The time-series curves of characteristic variables for the main crop types in the South Bank Irrigation District are shown in Table 1. Figure 3 In the figure, the solid colored line represents the mean curve of the crop samples, and the gray shading represents the range of one standard deviation away from the mean curve.
[0073] Table 1 Summary of Remote Sensing Image Feature Datasets
[0074]
[0075] Step S3: Calculate and sort the Gini importance coefficients of the feature dataset in descending order, remove approximately 50% of the less important features, and determine the optimal feature combination based on the remaining feature dataset using an internal cross-validation algorithm based on a recursive feature elimination algorithm. This specifically includes the following steps:
[0076] Step S3-1: Integrate the 216-dimensional spectral indices, temporal phenology, spatial texture, and topographic features calculated in Step S2, and calculate and rank their Gini importance coefficients. The ranking of Gini importance coefficients for characteristic bands in the South Bank Irrigation Area is shown below. Figure 4 ,Depend on Figure 4 It can be seen that the Gini importance coefficients of EVI, NDTI, and NDGI features are relatively high. Among them, EVI has the highest median importance during the growth period, while the Gini importance coefficient of the slope feature is the lowest, only about one-sixth of that of the feature with the highest Gini importance coefficient. Therefore, in order to select features more effectively and accurately, about 50% of the lower importance features were deleted, and 90 features were ultimately retained.
[0077] Step S3-2: The RFE cross-validation algorithm (RFECV) from the scikit-learn package on the Google Colab platform is used to perform internal cross-validation on the final retained 90-dimensional features to determine the optimal feature combination. The overall accuracy for different numbers of features in the South Bank Irrigation District is shown in [link to relevant documentation]. Figure 5 ,Depend on Figure 5 It can be seen that the cross-validation with 41-dimensional features has the highest overall accuracy. Therefore, the optimal 41-dimensional features are used for subsequent crop type classification.
[0078] Step S4: Based on the optimal feature combination determined in Step S3, different machine learning algorithms are superimposed to propose a crop classification model for irrigation areas based on the Stacking algorithm architecture and multiple differentiated models. By constructing a confusion matrix, the performance of different models in crop classification in irrigation areas is compared to determine the optimal integrated crop classification model for irrigation areas. The model is then used to extract the classification results of major crops in the South Bank Irrigation Area in 2022.
[0079] Specifically, the steps include the following:
[0080] Step S4-1: Establish four machine learning models—Classification Decision Tree (CART), Random Forest (RF), Support Vector Machine (SVM), and Gradient Boosting Decision Tree (GBDT)—through the remote sensing cloud platform. These models are trained based on 41-dimensional optimal features. The modeling of CART, RF, SVM, and GBDT is implemented using the functions smileCart, smileRandomForest, libsvm, and smileGradientTreeBoost in the remote sensing cloud platform, respectively. The number of decision trees for RF, CART, and GBDT is set to 50. For SVM, the C_SVC problem type and radial basis function are selected, and the parameter of NB is set to 0.000001.
[0081] Step S4-2: Using the four trained individual machine learning models—CART, RF, SVM, and GBDT—as primary classifiers, and then using these four models again as secondary classifiers, the optimal parameters of the secondary classifiers are obtained through training. This yields a crop classification model for irrigation areas based on the integration of multiple differentiated models under the Stacking algorithm architecture. (See [link to Stacking algorithm architecture for details]). Figure 6 ;
[0082] Step S4-3: Evaluate the crop classification accuracy of four different machine learning algorithms by constructing a confusion matrix and compare the accuracy results of the Stacking ensemble irrigation district crop classification model with different secondary learners. The evaluation metrics include User's Accuracy (UA, %), Producer's Accuracy (PA, %), Overall Accuracy (OA, %), and Kappa coefficient. The calculation formulas for each metric are as follows:
[0083]
[0084]
[0085]
[0086]
[0087] In the formula: N is the total number of pixels; m is the number of categories; x ii x is the number of pixels on the diagonal of the confusion matrix; i+ and x j+ These represent the total number of cells in the i-th row and the j-th column, respectively.
[0088] Each column of the confusion matrix represents the predicted class, and the total in each column indicates the number of data points predicted to belong to that class. Each row represents the true class of the data, and the total in each row indicates the number of data instances belonging to that class. The value in each column represents the number of true data points predicted to belong to that class. The accuracy confusion matrices for crop classification in irrigated areas using four single machine learning algorithms are shown in Tables 2-5. The crop classification accuracy of the Stacking ensemble learning model based on different secondary learners is shown in Table 6. The overall recognition accuracy comparison between Stacking ensemble learning and single machine learning models is shown in Table 6. Figure 7 From Table 6 and Figure 7 As can be seen, the black bars represent the overall recognition accuracy of different single learners, and the red bars represent the overall recognition accuracy of the Stacking model with different secondary learners using the same primary learner. The results show that the classification accuracy of crops in the irrigation area is improved through the Stacking ensemble algorithm. The Stacking ensemble learning model using support vector machines as secondary learners shows the best improvement, with an overall accuracy increase of 14.17% and a kappa coefficient increase of 0.281. The Stacking ensemble learning model using random classification as a secondary learner achieves the highest classification accuracy, reaching 98.07%, with a kappa coefficient of 0.961, both higher than other models. Based on the optimal Stacking ensemble learning model, the classification results of major crops in the Nan'an irrigation area for 2022 were extracted. The crop classification results for the irrigation area are shown below. Figure 8 .
[0089] Table 2. Crop classification accuracy confusion matrix based on random forest algorithm
[0090]
[0091]
[0092] Table 3. Crop classification accuracy confusion matrix based on support vector machine algorithm
[0093]
[0094] Table 4. Confusion matrix of crop classification accuracy based on gradient boosting classification regression tree algorithm
[0095]
[0096] Table 5. Confusion matrix of crop classification accuracy based on classification regression tree algorithm.
[0097]
[0098] Table 6. Crop classification accuracy of Stacking ensemble learning models based on different secondary learners.
[0099]
[0100] This invention also provides a crop classification system for irrigation areas based on a remote sensing cloud platform and machine learning algorithms, comprising:
[0101] The remote sensing image preprocessing module is used to acquire the geographic marker sample information of the main crops in the study area, and randomly divide the crop samples into training samples and validation samples. Based on the remote sensing cloud platform, the Landsat series remote sensing image dataset covering the study area is screened, and the masking algorithm is used to extract the remote sensing images of the study area containing only cultivated land.
[0102] The feature dataset construction module is used to generate spectral index features, temporal phenological features, spatial texture features, and topographic features based on the extracted remote sensing images and combined with information on seasonal and phenological changes in crops in the irrigation area. These features are then overlaid to construct a remote sensing image feature dataset for the study area.
[0103] The feature data optimization module is used to calculate the importance coefficient of each feature based on the remote sensing image feature dataset, sort them according to the importance coefficient, delete a specified percentage of low-importance features, and determine the optimal feature combination based on the internal cross-validation of the remaining feature dataset using a recursive feature elimination algorithm.
[0104] The irrigation area crop classification module is used to propose an irrigation area crop classification model based on multiple differentiated models under the Stacking algorithm architecture by superimposing different machine learning algorithms. The model is trained using the optimal feature combination, and the performance of different models in irrigation area crop classification is compared by constructing a confusion matrix to determine the optimal Stacking integrated irrigation area crop classification model. Based on the determined optimal Stacking integrated irrigation area crop classification model, the classification results of the main crops in the irrigation area are extracted.
[0105] It should be understood that the irrigation area crop classification system based on remote sensing cloud platform and machine learning algorithm in the embodiments of the present invention can realize all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.
[0106] This invention provides a method and system for crop classification in irrigation areas based on a remote sensing cloud platform and machine learning algorithms. Using the GEE remote sensing cloud platform, a Landsat series remote sensing image dataset containing only cultivated land is selected for the study area. Spectral index features, temporal phenological features, spatial texture features, and topographic features of the remote sensing images are generated by combining seasonal and phenological change information of crops in the irrigation area. These features are then overlaid to construct a remote sensing image feature dataset for the study area. The optimal feature combination is determined by combining the Gini importance coefficient with recursive feature elimination. Four different machine learning algorithms—classification regression tree, support vector machine, random forest, and gradient boosting classification regression tree—are overlaid to propose a Stacking algorithm architecture based on the integration of multiple differentiated models for crop classification in irrigation areas. By constructing a confusion matrix, the performance of different models in crop classification in irrigation areas is compared. Based on the optimal crop classification model, the annual classification results of major crops in the irrigation area are extracted. This method can effectively improve the accuracy of crop classification in irrigation areas and provides a technical reference for obtaining large-scale crop distribution mapping in irrigation areas with complex planting structures in my country.
Claims
1. A method for crop classification in irrigation areas based on remote sensing cloud platform and machine learning algorithm, characterized in that: The following steps are involved: S1. Obtain geographically labeled sample information of crops in the study area, and randomly divide the crop samples into training samples and verification samples. Based on the remote sensing cloud platform, filter the Landsat series remote sensing image datasets covering the study area, and use the mask algorithm to extract the remote sensing images of the study area containing only cultivated land; S2. Based on the extracted remote sensing images, the spectral index characteristics, temporal phenological characteristics, spatial texture characteristics and terrain characteristics are generated in combination with the seasonal and phenological change information of the irrigation area crops, and then superimposed to construct a remote sensing image feature dataset for the study area. Among them, generating spectral index features includes: extracting 6 spectral features from the Landsat-8 series remote sensing images based on the remote sensing cloud platform, including blue, green, red, near infrared, shortwave infrared 1 and shortwave infrared 2, and calculating 9 common vegetation index features, including normalized vegetation index, enhanced vegetation index, normalized water index, vegetation moisture content index, normalized decay vegetation index, normalized tillage index, chlorophyll vegetation index, improved soil adjusted vegetation index and normalized difference greenness index, combining spectral reflectance and vegetation index time series change characteristics to calculate 15 spectral index features in the middle of the crop growing season in the irrigation area. The median, mean, maximum, minimum, standard deviation and specified percentile values are calculated. For each spectral index feature, the median is calculated using the median() function. The spectral index feature histogram is calculated using the spectral reflectance and vegetation index time series, and the percentile percentile() function is used to calculate the 5%, 25%, 50%, 75% and 95% percentile features. The max(), min(), mean() and stdDev() functions are used to calculate the maximum, minimum, mean and standard deviation of the spectral index time series. A total of 150 dimensional spectral index features are obtained. Generating temporal phenological characteristics includes: dividing the entire growing season of crops into three phenological periods, namely, sowing period, growing period and harvest period, based on the phenological characteristics of crops in the irrigation area, and using the median() function to calculate the median of the nine vegetation index characteristics in the three phenological periods to obtain a 27-dimensional temporal phenological characteristic; The generation of spatial texture features includes: based on the normalized vegetation index and the median of the vegetation moisture content index, the 18 indicators of the moment of arc second, contrast, correlation, variance, differential inverse moment, sum average, sum variance, sum entropy, entropy, difference variance, difference entropy, information measure of correlation 1 and correlation 2, maximum correlation coefficient, dissimilarity, inertia, cluster shadow, cluster prominence, gray level co-occurrence matrix GLCM transformation is performed to generate 36-dimensional spatial texture features; Generating terrain features includes: extracting slope, aspect and elevation features based on SRTM DEM digital elevation data with a spatial resolution of 30m×30m; S3. Calculate the importance coefficient of each feature based on the remote sensing image feature data set, sort them according to the importance coefficient, delete the specified percentage of low-importance features, and perform internal cross-validation based on the recursive feature elimination algorithm on the basis of the remaining feature data set to determine the optimal feature combination, including: S3-1, based on the spectral index, temporal phenology, spatial texture and terrain characteristics generated in step S2, the Gini importance coefficient is used to calculate the importance of each feature, sort them by size, delete one or more of the least important features and update the feature set, and repeat the above steps until all attribute importance ratings are completed; S3-2. Based on the remaining feature data sets, the RFE algorithm of the scikit-learn package on the Google Colab platform is used to cross-validate the selected feature set, and the optimal feature combination is determined after identifying the number of features with the highest average score; S4. Superimpose different machine learning algorithms to propose an irrigation area crop classification model based on multiple differentiated model integration under the Stacking algorithm architecture, use the optimal feature combination for training, and compare the performance of different models in irrigation area crop classification by constructing a confusion matrix to determine the optimal Stacking integrated irrigation area crop classification model, including the following steps: S4-1. Four machine learning models, namely, classification decision tree CART, random forest RF, support vector machine SVM, and gradient boosting decision tree GBDT, were established through the remote sensing cloud platform, and each machine learning model was trained based on the optimal feature combination; S4-2, the trained four single machine learning models of CART, RF, SVM and GBDT are used as primary classifiers, and these four machine learning models are used again as secondary classifiers. The optimal parameters of the secondary classifiers are obtained through training, and the irrigation area crop classification model based on the integration of multiple differentiation models under the Stacking algorithm architecture is obtained; S4-3. Construct a confusion matrix to evaluate the crop classification accuracy of four different machine learning algorithms and compare the accuracy results of the Stacking integrated irrigation area crop classification model with different secondary learners to determine the optimal Stacking integrated irrigation area crop classification model. S5. Utilize the determined optimal Stacking integrated irrigation area crop classification model to extract the crop classification results of the irrigation area.
2. The method according to claim 1, characterized in that: The step S1 comprises: S1-1. Use the grid method in ArcGIS software to evenly arrange the sampling points. Combined with high-definition electronic maps, circle the areas with large planting areas of single crops as preset sampling points. Obtain the geographically marked sample information of crops in the study area, including latitude, longitude, crop type, and collection time. Randomly divide the crop samples into training samples and validation samples according to the specified ratio. S1-2. Directly call the Surface Reflectance Tier 1 atmospheric apparent reflectance product in the Landsat-8 source data based on the remote sensing cloud platform. The image dataset obtained includes images from January to December of the field survey year. S1-3. Download land use classification data with a spatial resolution of 30m×30m from the GlobeLand30 data website, perform tile mosaicking and cropping in ArcGIS software, select the cultivated land layer in the GlobeLand30 data to convert it from a raster layer to a vector layer, and upload it to the remote sensing cloud platform. Use the MASK function in the cloud platform to perform cultivated land mask processing on the screened Landsat-8 series remote sensing image dataset.
3. The method according to claim 1, characterized in that: The evaluation indicators in step S4-3 include user accuracy UA, producer accuracy PA, total progress OA and Kappa coefficient.
4. The method according to claim 3, characterized in that The calculation method of each evaluation index is as follows: Where: N is the total number of pixels; m is the number of categories; x ii is the number of pixels on the diagonal of the confusion matrix; x i+ and x j+ are the total number of pixels in the i-th row and j-th column respectively.
5. A crop classification system for irrigation areas based on remote sensing cloud platform and machine learning algorithm, characterized in that: include: The remote sensing image preprocessing module is used to obtain the geographically labeled sample information of crops in the study area, and randomly divide the crop samples into training samples and verification samples. Based on the remote sensing cloud platform, the Landsat series remote sensing image data sets covering the study area are screened, and the mask algorithm is used to extract the remote sensing images of the study area containing only cultivated land. The feature dataset construction module is used to generate spectral index features, temporal phenological features, spatial texture features and terrain features based on the extracted remote sensing images and combined with the seasonal and phenological change information of the irrigation area crops, and then overlay them to construct the remote sensing image feature dataset of the study area. Among them, generating spectral index features includes: extracting 6 spectral features from the Landsat-8 series remote sensing images based on the remote sensing cloud platform, including blue, green, red, near infrared, shortwave infrared 1 and shortwave infrared 2, and calculating 9 common vegetation index features, including normalized vegetation index, enhanced vegetation index, normalized water index, vegetation moisture content index, normalized decay vegetation index, normalized tillage index, chlorophyll vegetation index, improved soil adjusted vegetation index and normalized difference greenness index, combining spectral reflectance and vegetation index time series change characteristics to calculate 15 spectral index features in the middle of the crop growing season in the irrigation area. The median, mean, maximum, minimum, standard deviation and specified percentile values are calculated. For each spectral index feature, the median is calculated using the median() function. The spectral index feature histogram is calculated using the spectral reflectance and vegetation index time series, and the percentile percentile() function is used to calculate the 5%, 25%, 50%, 75% and 95% percentile features. The max(), min(), mean() and stdDev() functions are used to calculate the maximum, minimum, mean and standard deviation of the spectral index time series. A total of 150 dimensional spectral index features are obtained. Generating temporal phenological characteristics includes: dividing the entire growing season of crops into three phenological periods, namely, sowing period, growing period and harvest period, based on the phenological characteristics of crops in the irrigation area, and using the median() function to calculate the median of the nine vegetation index characteristics in the three phenological periods to obtain a 27-dimensional temporal phenological characteristic; The generation of spatial texture features includes: based on the normalized vegetation index and the median of the vegetation moisture content index, the 18 indicators of the moment of arc second, contrast, correlation, variance, differential inverse moment, sum average, sum variance, sum entropy, entropy, difference variance, difference entropy, information measure of correlation 1 and correlation 2, maximum correlation coefficient, dissimilarity, inertia, cluster shadow, cluster prominence, gray level co-occurrence matrix GLCM transformation is performed to generate 36-dimensional spatial texture features; Generating terrain features includes: extracting slope, aspect and elevation features based on SRTM DEM digital elevation data with a spatial resolution of 30m×30m; The feature data optimization module is used to calculate the importance coefficient of each feature based on the remote sensing image feature data set, sort them according to the importance coefficient, delete the specified percentage of low-importance features, and perform internal cross-validation based on the recursive feature elimination algorithm on the basis of the remaining feature data set to determine the optimal feature combination, including: S3-1. Based on the spectral index, temporal phenology, spatial texture and terrain features generated by the feature data set construction module, the Gini importance coefficient is used to calculate the importance of each feature, sort them by size, delete one or more of the least important features and update the feature set, and repeat the above steps until all attribute importance ratings are completed; S3-2. Based on the remaining feature data sets, the RFE algorithm of the scikit-learn package on the Google Colab platform is used to cross-validate the selected feature set, and the optimal feature combination is determined after identifying the number of features with the highest average score; The irrigation area crop classification module is used to superimpose different machine learning algorithms to propose an irrigation area crop classification model based on the integration of multiple differentiation models under the Stacking algorithm architecture, use the optimal feature combination for training, and compare the performance of different models in the irrigation area crop classification by building a confusion matrix to determine the optimal Stacking integrated irrigation area crop classification model. Based on the determined optimal Stacking integrated irrigation area crop classification model, the crop classification results of the irrigation area are extracted. Different machine learning algorithms are superimposed to propose an irrigation area crop classification model based on the integration of multiple differentiation models under the Stacking algorithm architecture, use the optimal feature combination for training, and compare the performance of different models in the irrigation area crop classification by building a confusion matrix to determine the optimal Stacking integrated irrigation area crop classification model, including the following steps: S4-1. Four machine learning models, namely, classification decision tree CART, random forest RF, support vector machine SVM, and gradient boosting decision tree GBDT, were established through the remote sensing cloud platform, and each machine learning model was trained based on the optimal feature combination; S4-2, the trained four single machine learning models of CART, RF, SVM and GBDT are used as primary classifiers, and these four machine learning models are used again as secondary classifiers. The optimal parameters of the secondary classifiers are obtained through training, and the irrigation area crop classification model based on the integration of multiple differentiation models under the Stacking algorithm architecture is obtained; S4-3. Construct a confusion matrix to evaluate the crop classification accuracy of four different machine learning algorithms and compare the accuracy results of the Stacking integrated irrigation area crop classification model with different secondary learners to determine the optimal Stacking integrated irrigation area crop classification model.
Citation Information
Patent Citations
Crop drawing method using Sentinel-2 time sequence image data
CN114519823A
High-resolution image and machine learning-based high-altitude region crop classification and identification method
CN114694036A