CN-121982412-A - Intelligent hyperspectral crop classification method based on spatial spectrum double-branch characteristics
Abstract
The invention relates to the technical field of hyperspectral remote sensing agricultural monitoring, in particular to an intelligent hyperspectral crop classification method based on spatial spectrum double-branch characteristics, which comprises the steps of obtaining hyperspectral satellite image data with high spatial resolution, and performing band screening and feature compression on the image data by adopting spectrum adaptation processing to generate two feature graphs which are respectively suitable for the input of a pre-training visual model and a UNet++ network model. Extracting ViT features by using ViT-L model, extracting Unet features by using UNet++ encoder network, fusing the two types of features by using bidirectional attention mechanism, and finally realizing feature up-sampling and classification prediction by using decoder to output pixel classification result of crop type. The method effectively solves the problem of feature mixing caused by low spatial resolution of the hyperspectral satellite, and improves precision and generalization capability of fine classification of crops in a complex farmland environment.
Inventors
- HE XIAONING
- LIU PAN
- WANG YIQUN
Assignees
- 西安中科西光航天科技集团有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260129
Claims (10)
- 1. The hyperspectral crop intelligent classification method based on the spatial spectrum double-branch characteristics is characterized by comprising the following steps of; Step 1, high-spatial-resolution hyperspectral satellite image data are obtained, wherein the hyperspectral image data comprise a plurality of wave bands and cover a crop area; step 2, carrying out band screening and feature compression on the hyperspectral image data through spectrum adaptation processing to generate a first feature map and a second feature map, wherein the first feature map is suitable for pre-training visual model input, and the second feature map is suitable for UNet++ network model input; Step 3, inputting the first feature map into a pre-training visual basic model to perform feature extraction to obtain ViT features, and inputting the second feature map into a UNet++ network model to perform feature extraction to obtain Unet features; step 4, fusing the ViT features and the Unet features through a bidirectional attention mechanism to generate fused features; And 5, up-sampling and classifying prediction are carried out on the fusion characteristics by adopting a decoder, and a pixel-level classification result of the crop type is output, so that the precision and generalization capability of fine classification of the crops are improved.
- 2. The intelligent classification method of hyperspectral crops based on the spatial spectrum dual-branch characteristics according to claim 1 is characterized in that in the step 1, the acquisition of hyperspectral satellite image data with high spatial resolution comprises the steps of acquiring hyperspectral images and full-color images from a West light No. 05 star, registering and fusing the hyperspectral images and the full-color images to generate fused hyperspectral images with spatial resolution of 5 meters, extracting a subset of crop planting areas from the fused images, and loading pixel-level labeling information as input data.
- 3. The hyperspectral crop intelligent classification method based on the spatial spectrum dual-branch features is characterized in that in the step 2, spectrum adaptation processing comprises the steps of carrying out spectrum dimension convolution on hyperspectral images through a first convolution layer to output an intermediate feature map, carrying out convolution on the intermediate feature through a second convolution layer to compress spectrum dimensions to target channel numbers, calculating channel weights through a channel attention mechanism to generate a weighted feature map, and finally dividing the compressed features into blocks through a first projection layer to generate a first feature map and simultaneously keeping the spatial dimensions through a second projection layer to generate a second feature map.
- 4. The intelligent classification method of hyperspectral crops based on spatial spectrum dual-branch characteristics according to claim 1 is characterized in that in step 3, the pre-training visual basic model is ViT-L model, the fine tuning of the model adopts a low-rank adaptation technology, the low-rank adaptation comprises the steps of inserting a low-rank linear layer into a query and value projection layer of an attention layer, the low-rank linear layer is composed of a matrix A and a matrix B, the matrix A is initialized through random Gaussian distribution, the matrix B is initialized through zero, and in the training process, only parameters of the matrix A and the matrix B are updated, and the weight of an original projection layer is frozen, so that the calculation cost is reduced.
- 5. The method for intelligently classifying hyperspectral crops based on spatial spectrum dual-branch characteristics as set forth in claim 1, wherein the encoder network in step 3 uses unet++ architecture for processing, comprising the specific steps of using the second feature map as an initial input feature map of the encoder Gradually extracting features through four coding levels, wherein the first coding level processes the input feature map through a convolution layer with a convolution kernel size of 3×3, and outputs the feature map A second encoding level pair After downsampling, generating a feature map through convolution operation Third coding level repeated downsampling and convolution operations to generate feature maps Generating the deepest feature map by the fourth coding level The output characteristic diagram of each coding level is connected with the corresponding level of the decoder through the layer jump connection.
- 6. The method for intelligent classification of hyperspectral crops based on spatial spectral dual branch features as set forth in claim 1, wherein the specific processing of the bidirectional attention mechanism in step 4 includes projecting ViT features into 256-dimensional feature space by 1X 1 convolution while projecting Unet features The method comprises the steps of maintaining original dimensions, performing first cross attention calculation by taking the projected ViT features as a query, taking the Unet features as keys and values, calculating an attention weight matrix, performing second cross attention calculation by taking the Unet features as the query, taking the ViT features as keys and values, calculating the attention weight matrix, and performing layer normalization processing after weighted summation on the two attention outputs to generate a final fusion feature.
- 7. The method of claim 1, wherein the processing of the decoder in step 5 includes merging features as decoder inputs, gradually upsampling by four decoding levels, and a first decoding level upsampling 2 times the input features and matching the input features with the encoder feature map The fusion result is up sampled by 2 times by the second decoding level and is fused with the feature map by the jump layer connection Fusing, repeating up-sampling operation by the third decoding level, and comparing with the feature map The method comprises the steps of merging, carrying out final up-sampling on a fourth decoding level, recovering to the original image space resolution, carrying out up-sampling on each decoding level by using transpose convolution, and outputting a prediction result through a segmentation head.
- 8. The hyperspectral crop intelligent classification method based on the spatial spectrum dual-branch characteristics according to claim 7 is characterized in that a deep supervision strategy is adopted in the decoding process, wherein the deep supervision strategy comprises the steps of respectively setting auxiliary segmentation heads at four decoding levels, outputting a prediction result of a corresponding scale by each auxiliary segmentation head, calculating a weighted loss function of the four levels, wherein weight coefficients are adaptively adjusted through network training, and the total loss function is the combination of cross entropy loss and Dice loss, and is expressed as l_total=α·l_ce+β·l_dice, wherein α and β are balance parameters.
- 9. The hyperspectral crop intelligent classification method based on the spatial spectrum dual-branch characteristics according to claim 1 is characterized by further comprising a model training process, wherein the training is carried out by using XiopmSpace-HyperCrops data sets, the data sets are divided into training sets and verification sets according to a ratio of 2:1, the optimization is carried out by adopting a random gradient descent algorithm, the learning rate is set to be 0.0002, the batch size is 30, the model performance is evaluated on the verification sets every round in the training process, and the training is terminated in advance when the performance is no longer improved.
- 10. The hyperspectral crop intelligent classification method based on the spatial spectrum double-branch characteristics is characterized by further comprising a result post-processing step of carrying out threshold processing on a classification probability map output by a network, setting a confidence coefficient threshold to be 0.5, optimizing classification results by morphological operation, including noise point removal by open operation and cavity filling by closed operation, superposing and displaying the final classification results and an original hyperspectral image, and marking different crop categories with different colors to generate a visual classification map.
Description
Intelligent hyperspectral crop classification method based on spatial spectrum double-branch characteristics Technical Field The invention relates to the technical field of hyperspectral remote sensing agricultural monitoring, in particular to an intelligent hyperspectral crop classification method based on spatial spectrum double-branch characteristics. Background The hyperspectral remote sensing technology can finely characterize spectral reflection characteristics of crops by acquiring continuous and dense spectral band information of ground objects in agricultural remote sensing monitoring so as to distinguish different crop types and growth states thereof, viT features are extracted from geometric structures and texture relations among image pixels to reflect spatial distribution and morphology of farmlands, unet features capture physiological and biochemical attributes of the crops from multiband data of each pixel, two independent processing branches are adopted based on a method of spatial spectrum double-branch features, the spatial context features and spectral discrimination features are respectively optimized and extracted, the two types of information are organically combined through feature fusion strategies to enhance robustness of integral characterization, and intelligent classification is realized by means of machine learning models such as deep learning and the like to automatically learn and integrate the double-branch features so as to realize accurate identification of crop types. The existing agricultural remote sensing monitoring technology has the technical problems that the spatial resolution of a hyperspectral satellite is low, the hyperspectral satellite is usually 30 meters, the boundaries and internal heterostructures of small crop plots in a complex farmland environment are difficult to capture clearly, for example, under a precise cultivated land resource management scene, the crop types cannot be distinguished due to insufficient resolution in a corn and soybean staggered planting area, meanwhile, the training of a deep learning model is limited due to lack of a high spatial resolution public data set, so that an algorithm is difficult to learn the spectral variation and geographic conditions of diversified crops, the algorithm is influenced by the isospectrum and the foreign matter isospectrum only when relying on a first-stage image, the model generalization capability is weak, and crop area statistics and patch accurate issuing cannot be supported accurately. Disclosure of Invention Aiming at the defects of the prior art, the invention provides a hyperspectral crop intelligent classification method based on space spectrum double-branch characteristics, which solves the technical problems of insufficient precision and weak generalization capability of a fine classification algorithm of crops in a complex farmland environment due to low space resolution of hyperspectral satellites and lack of high-resolution public data sets. In order to solve the technical problems, the invention comprises the following specific contents: the hyperspectral crop intelligent classification method based on the space spectrum double-branch characteristics comprises the following steps of; Step 1, high-spatial-resolution hyperspectral satellite image data are obtained, wherein the hyperspectral image data comprise a plurality of wave bands and cover a crop area; step 2, carrying out band screening and feature compression on the hyperspectral image data through spectrum adaptation processing to generate a first feature map and a second feature map, wherein the first feature map is suitable for pre-training visual model input, and the second feature map is suitable for UNet++ network model input; Step 3, inputting the first feature map into a pre-training visual basic model to perform feature extraction to obtain ViT features, and inputting the second feature map into a UNet++ network model to perform feature extraction to obtain Unet features; step 4, fusing the ViT features and the Unet features through a bidirectional attention mechanism to generate fused features; And 5, up-sampling and classifying prediction are carried out on the fusion characteristics by adopting a decoder, and a pixel-level classification result of the crop type is output, so that the precision and generalization capability of fine classification of the crops are improved. In the intelligent classification method of the hyperspectral crops based on the spatial spectrum double-branch characteristics, in the step 1, hyperspectral satellite image data with high spatial resolution are acquired, wherein the hyperspectral satellite image data with high spatial resolution comprise that hyperspectral images and full-color images are acquired from a West light No. 05 star, registration and fusion processing are carried out on the hyperspectral images and the full-color images, fusion hyperspectral images with the spatial resolutio