UAV hyperspectral vegetation species classification method and system based on deep learning
Through the mobile three-dimensional cavity convolution visual Transformer model and the fusion vegetation index feature extraction module, the problems of low spectral information similarity and increased spatial heterogeneity in the drone hyperspectral image are solved, and efficient and accurate grass vegetation species are achieved Classification.
Patent Information
- Application Number
- CN202410104064.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-01-25
AI Technical Summary
In the classification of grassland vegetation species, the hyperspectral image faces the problem of increasing intra-class variance caused by low spectral information similarity and increased spatial heterogeneity. Traditional methods are difficult to deal with massive high-dimensional data, and deep learning models are not effective. Capture local spatial spectral fusion information.
Using the mobile three-dimensional hollow convolution visual Transformer model, a multi-level structure is constructed to extract global ‘empty spectrum’ information through the combination of three-dimensional convolution and visual Transformer, and a fusion vegetation index feature extraction module is designed to improve classification accuracy.
The accuracy and efficiency of the classification of grass vegetation species by drone hyperspectral image is improved, the characteristic spectral information between vegetation is enhanced, and the vegetation types can be more accurately distinguished, solving the shortcomings of traditional methods in high-dimensional nonlinear data processing.
Smart Images

Figure CN117935090B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle (UAV) hyperspectral image processing, and in particular to a UAV hyperspectral vegetation species classification method and system based on deep learning. Background Art
[0002] Grassland ecosystems are one of the largest and most widely distributed terrestrial ecosystems, accounting for about 40% of the Earth's surface area. However, in recent decades, half of the world's grasslands have been degraded due to human and natural factors. Accurate quantitative evaluation of grassland degradation is the basis for grassland protection and rational utilization in areas with fragile grassland ecological environment. Currently, we urgently need a dynamic monitoring method to understand the overall spatial distribution of grassland ecosystem degradation.
[0003] Grassland degradation is often accompanied by a decrease or even disappearance of the number of plant community-building species and dominant species, and grassland vegetation types and community structure characteristics often change significantly. In the monitoring of grassland degradation, field sample survey methods are difficult to obtain the overall situation of grassland degradation at the regional scale, and the grassland degradation species classification method based on traditional remote sensing cannot accurately reflect the species composition of vegetation. UAV remote sensing has the capabilities of low operating cost, high flexibility, high resolution and real-time data acquisition. Hyperspectral images have the characteristics of high spectral resolution and continuous bands. Airborne hyperspectral data has become an important data source for remote sensing monitoring. However, UAV hyperspectral images still face the following challenges when finely classifying multiple types of grassland species. On the one hand, the spectral information between different grass species is similar, and the inter-species differences are small; on the other hand, with the improvement of the spatial resolution of UAV hyperspectral images, the spatial heterogeneity of the ground objects gradually increases, which in turn aggravates the spectral variability of the ground objects, resulting in an increase in the intra-class variance of the same grass species. In addition, due to the ultra-high spectral resolution and spatial resolution of UAV hyperspectral images, the data is massive and high-dimensional. Therefore, an efficient, accurate and stable data processing method is required.
[0004] At present, the classification methods of hyperspectral remote sensing images mainly include traditional machine learning classification methods and deep learning classification methods. Traditional machine learning methods rely on manual feature design based on expert knowledge, which is difficult to apply to drone hyperspectral images with massive high-dimensional nonlinear data structures. Compared with machine learning methods, deep learning automatically learns and extracts abstract and discriminative deep semantic information in images by building multi-layer network models and using massive training data, reducing the dependence on expert knowledge, thereby improving the accuracy and efficiency of classification. At present, convolutional neural networks and visual transformers have been widely used in remote sensing image analysis. Convolutional neural networks mainly divide spatial blocks, and select three-dimensional spatial blocks of the neighborhood with the marked pixels as the center as the input of the network. This strategy can only use local "space spectrum" information and it is difficult to establish long-distance dependencies. The visual transformer model completely abandons the convolution operation and instead adopts a pure attention mechanism to capture the dependencies in different regions of the input data within a large spatial range. Although the visual transformer network solves the long-distance dependency problem of spectral features well, it fails to capture the local spatial spectral fusion information well. Summary of the invention
[0005] In order to solve the technical problems in the above background, the present invention fully utilizes the mobile three-dimensional void convolution visual Transformer model that integrates vegetation index to perform grassland vegetation species classification processing flow of drone hyperspectral images at the community scale.
[0006] To achieve the above object, the present invention provides a UAV hyperspectral vegetation species classification method based on deep learning, the steps comprising:
[0007] Using drones to collect hyperspectral images;
[0008] Preprocessing the collected hyperspectral image to obtain a preprocessed image, and splicing and mosaicking the preprocessed image to obtain a hyperspectral orthophoto;
[0009] Annotating the hyperspectral orthophoto to obtain a label data set;
[0010] Performing vegetation index fusion on the hyperspectral orthophoto to obtain a hyperspectral orthophoto fused with vegetation index;
[0011] Based on the hyperspectral orthophoto fused with vegetation index and the label data set, a grassland vegetation classification model is constructed, and the grassland vegetation classification model is used to complete vegetation species classification.
[0012] Preferably, the method for performing the preprocessing includes: lens calibration, reflectivity calibration and atmosphere calibration.
[0013] Preferably, the method for obtaining a hyperspectral orthophoto includes: importing the preprocessed image into a stitching software, inputting the flight altitude of the drone when acquiring the image, and manually removing abnormal images; then setting stitching parameters and previewing the effect until the stitching result meets the expectations, and finally performing full-band stitching and mosaicking of the image to generate the hyperspectral orthophoto of the study area.
[0014] Preferably, the method for obtaining the labeled data set includes: first, importing the hyperspectral orthophoto into a label annotation software, extracting spectral features of the hyperspectral orthophoto, and labeling different vegetation species in the label annotation software according to the spectral features of different vegetation species by manual visual interpretation to obtain the region of interest of each vegetation species in the image; then, converting the labeled region of interest into a label raster file; finally, after obtaining the label raster file, dividing it into a training set and a test set.
[0015] Preferably, the method for obtaining a hyperspectral orthophoto fused with vegetation index includes: firstly selecting infrared and near-infrared bands for the hyperspectral orthophoto, and then calculating normalized vegetation index values, difference vegetation index values and ratio vegetation index values for the hyperspectral orthophoto according to the selected infrared and near-infrared bands to obtain corresponding raster images respectively; thereafter, fusing the obtained raster image into the band of the hyperspectral orthophoto in the form of a band to obtain the hyperspectral orthophoto fused with vegetation index.
[0016] Preferably, the grassland vegetation classification model includes a mobile three-dimensional atrous convolutional visual Transformer model, and the mobile three-dimensional atrous convolutional visual Transformer model structure is a multi-level structure design, consisting of three stages and five modules, including: three-dimensional convolution, three-dimensional atrous convolution, mobile convolutional visual Transformer, reverse residual structure and convolutional visual Transformer; wherein, stage 1 includes three-dimensional convolution, three-dimensional atrous convolution and mobile convolutional visual Transformer modules, stage 2 includes three-dimensional atrous convolution and mobile convolutional visual Transformer modules, and stage 3 includes reverse residual structure and convolutional visual Transformer modules.
[0017] The present invention also provides a UAV hyperspectral vegetation species classification system based on deep learning, the system is used to implement the above method, including: a collection module, a splicing module, a labeling module, a fusion module and a construction module;
[0018] The acquisition module is used to collect hyperspectral images using a drone;
[0019] The stitching module is used to preprocess and stitch the hyperspectral images to obtain a hyperspectral orthophoto;
[0020] The labeling module is used to label the hyperspectral orthophoto to obtain a label data set;
[0021] The fusion module is used to fuse the hyperspectral orthophoto with vegetation index to obtain a hyperspectral orthophoto with fused vegetation index;
[0022] The construction module is used to construct a grassland vegetation classification model based on the hyperspectral orthophoto fused with the vegetation index and the label data set, and complete the vegetation species classification using the grassland vegetation classification model.
[0023] Preferably, the grassland vegetation classification model includes a mobile three-dimensional atrous convolutional visual Transformer model, and the mobile three-dimensional atrous convolutional visual Transformer model structure is a multi-level structure design, consisting of three stages and five modules, including: three-dimensional convolution, three-dimensional atrous convolution, mobile convolutional visual Transformer, reverse residual structure and convolutional visual Transformer; wherein, stage 1 includes three-dimensional convolution, three-dimensional atrous convolution and mobile convolutional visual Transformer modules, stage 2 includes three-dimensional atrous convolution and mobile convolutional visual Transformer modules, and stage 3 includes reverse residual structure and convolutional visual Transformer modules.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] First, the present invention introduces a three-dimensional hole convolution layer, which can reduce data feature loss and expand the receptive field of the convolution layer compared to the traditional convolution layer, solve the problem of joint extraction of information of two bands with a long distance in hyperspectral images, learn more "space spectrum" features, and improve the final classification accuracy; the fusion architecture that integrates three-dimensional convolution and visual Transformer can realize global "space spectrum" information fusion, and the reasoning speed and accuracy are greatly improved compared to the simple use of visual Transformer and three-dimensional convolutional neural network, achieving excellent performance while maintaining computational efficiency;
[0026] Secondly, a feature extraction module that integrates vegetation indices was designed. The black-box characteristics of the existing deep learning algorithms based on hyperspectral vegetation classification make it difficult to interpret the ecological significance of vegetation in the images. In addition, the spectral layers of various types of vegetation in the images are highly correlated, and the spectral features that can distinguish vegetation types are weak. This module can enhance the characteristic spectral information between vegetation and improve the ability to distinguish vegetation species. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0028] Figure 1 A schematic diagram of a method flow of an embodiment of the present invention;
[0029] Figure 2 This is a schematic diagram of the UAV hyperspectral data collection process according to an embodiment of the present invention;
[0030] Figure 3 Schematic diagram of the grassland vegetation classification model structure of an embodiment of the present invention; wherein, Figure 3 (a) is the process of fusing vegetation indices; Figure 3 (b) is the structure of the mobile 3D hole convolution visual Transformer; Figure 3 (c) is the convolutional visual Transformer encoder;
[0031] Figure 4 Schematic diagram of a three-dimensional convolution structure and a three-dimensional hole convolution structure according to an embodiment of the present invention; wherein: Figure 4 (a) is a three-dimensional convolution structure; Figure 4 (b) is a three-dimensional hole convolution structure;
[0032] Figure 5 Schematic diagram of the structure of the mobile convolutional vision Transformer module of an embodiment of the present invention;
[0033] Figure 6 Schematic diagram of the reverse residual structure of an embodiment of the present invention;
[0034] Figure 7 Schematic diagram of the system structure of an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] Before explaining, let me first introduce the drawbacks of current technology.
[0038] (1) Disadvantages of the sample plot field survey method: Traditional grassland vegetation research mostly uses the field sample plot survey method, which has the disadvantages of being time-consuming, labor-intensive, costly, and having a long data collection cycle.
[0039] Cause: The field sample survey method requires a lot of time, manpower and financial resources to conduct a survey of grassland vegetation in the wild, including the composition of sample vegetation, the height of each type of vegetation, the coverage of each type of vegetation, and the collection of visible light images of vegetation canopy. It is difficult to conduct a detailed survey of an area in a short period of time, and it is even more difficult to obtain data in remote areas with inconvenient transportation and high altitude areas that are difficult to reach.
[0040] (2) Disadvantages of traditional satellite remote sensing technology: Traditional satellite remote sensing technology has difficulty distinguishing different grassland vegetation species.
[0041] Cause: Due to the limitations of spatial resolution and spectral resolution, traditional satellite remote sensing technology can only monitor large-scale vegetation communities. It is difficult to describe the growth of vegetation species in small-scale sample plots and obtain real-time data. In addition, the characteristics of grassland vegetation structure, such as low, small and mixed growth, have certain limitations in the identification of grassland plant species.
[0042] (3) Disadvantages of traditional hyperspectral image classification algorithms: Early machine learning classifications applied to hyperspectral image classification, such as support vector machines, K nearest neighbors, naive Bayes, decision trees, and extreme learning machines, are all based on the spectral features of hyperspectral images. They do not take into account the spatial information of each vegetation type in the hyperspectral image, and the classification effect is not ideal. Although deep learning methods have achieved good results in hyperspectral image classification, conventional deep learning-based UAV hyperspectral image classification methods still have certain defects in the fine classification of grassland vegetation.
[0043] Cause: Traditional hyperspectral classification algorithms adopt a "model-driven" research paradigm, but the manually designed features and models can only represent simple morphological, texture, and spectral characteristics of the objects, and do not have more abstract semantic information. In addition, affected by the high-dimensional nonlinearity of hyperspectral data and factors such as "different objects with the same spectrum, and different objects with the same spectrum", traditional hyperspectral interpretation algorithms are difficult to extract grassland vegetation characteristics with complex population structures. Conventional hyperspectral image classification methods based on deep learning are mainly based on convolutional neural networks, and convolutional neural networks usually select three-dimensional spatial blocks of the neighborhood centered on the labeled pixels as the network input. This strategy can only use local "space spectrum" information, which ultimately leads to unsatisfactory classification results.
[0044] Embodiment 1
[0045] In view of the above problems, this embodiment provides a UAV hyperspectral vegetation species classification method based on deep learning, such as Figure 1 As shown, the steps include:
[0046] S1. Use drones to collect hyperspectral images of vegetation in the sample area.
[0047] In this embodiment, hyperspectral image data is collected by a drone equipped with a hyperspectral camera. In this embodiment, the drone is a DJI M600PRO, which is an electric six-rotor aircraft powered by six removable batteries. The maximum load is 6kg, the maximum endurance under this load is about 16min, and the maximum flight speed is 65km / h. The hyperspectral camera is a push-broom hyperspectral imager (Gaiasky-mini2-vn), which has a spectral wavelength range of 400-1000nm, a spectral resolution of 3.5nm, and a spectral channel number of 176. The focal length of the lens is 23mm, the lateral field of view is 21.5°, and the total weight is 1.5kg. The spatial dimension size of each image acquired is 960 pixels × 1040 pixels, the image format is .raw, and each image can be used directly.
[0048] Data collection was carried out according to the vegetation growth and alpine grassland climate characteristics in the study area. First, the UAV hyperspectral data was collected. Data collection was carried out between 10:00 and 14:00, when there was no wind or light wind, and the weather was clear and cloudless or the cloud cover was less than 2%, to ensure that there was sufficient light during the collection period and the collected aerial photographs had few shadows. Before obtaining UAV image data, multiple ground control points were set up. A 40cm×60cm positioning sign was placed at each ground control point for subsequent ground data surveys, and it could be accurately positioned on the airborne hyperspectral image. A 1m×1m vegetation ground survey plot was set near each ground control point. The imaging spectrometer was calibrated with a standard plate before and after each flight to measure the correct exposure value. Based on the accurate extraction of community species at the plot scale, the flight altitude and sample area size were designed, and the battery life of the UAV, gimbal and hyperspectral instrument should be considered at the same time. The flight altitude of the UAV was set to 50 meters, the sample size was 50×50 meters, the image heading overlap rate and lateral overlap rate were set to 80% and 75% respectively, and the spatial resolution of the remote sensing image obtained was about 1.0-1.5 cm.
[0049] S2. Preprocess the collected hyperspectral images to obtain preprocessed images, and perform full-band mosaicking processing on the preprocessed images to obtain hyperspectral orthophotos.
[0050] First, preprocess the airborne hyperspectral remote sensing image, including lens calibration, reflectance calibration and atmosphere calibration, to obtain a single-scene hyperspectral image after preprocessing. Lens calibration, by selecting background data and correction data to calibrate the original data, eliminate or reduce lens distortion, and compensate for common lens optical defects; reflectance calibration, by calibrating the dark background and whiteboard data taken before the UAV flight, eliminate the burrs caused by many noises (instrument noise, environmental noise, etc.) in the response curve; atmosphere calibration, remove the influence of clouds and aerosols on the data, and obtain the true reflectance of the surface. Standard gray cloth is used as a reference for atmospheric correction. Standard gray cloth with a reflectance of 40% and 60% close to grassland vegetation is used. The overall collection process is as follows: Figure 2 shown.
[0051] The preprocessed images were imported into the stitching software, the flight altitude of the drone when acquiring the images (50 meters) was input, and some abnormal images were removed. Then the stitching parameters were set and the effects were previewed until the stitching results met the expectations. Finally, the image position was corrected and full-band stitching was performed to generate a hyperspectral orthophoto of the study area.
[0052] S3. Annotate the hyperspectral orthophoto to obtain a label dataset;
[0053] On the basis of ground survey, combined with visual interpretation method, the hyperspectral orthophotos are annotated. First, while the UAV is collecting hyperspectral images, field ground surveys are carried out, including recording the names of vegetation species, vegetation height and coverage in the sample plot, and using a camera to take visible light images of the vegetation canopy. In this example, four types of grass species, Stipa purpurogena, Leontopodium foetida, Artemisia kunlunensis and Carex tibetica, are selected as research objects. Secondly, the hyperspectral orthophotos are input into Envi software, and the spectral features of the hyperspectral orthophotos are extracted in Envi software. In Envi software, manual visual interpretation is performed according to the spectral features of different vegetation species. Different grassland vegetation species are annotated with "regions of interest (ROI)" to obtain the ROI of the image; then the annotated ROI is converted into a label raster file. After the annotation is completed, the labeled data is divided into a training set and a test set.
[0054] In this embodiment, the data set has a total of 61,587 data samples, including 21,251 purple needlegrass, 5,254 Kunlun Artemisia, 14,985 weak fireweed, 1,889 Tibetan moss, bare soil and others. Before model training, the code is used to randomly select 8,000 sample points from all pixels in each category as a training set, and the remaining pixels are used as a test set. The categories with less than 8,000 sample points are used as training sets according to half of the number of existing sample points, and the other half are used as test sets. The training set of this data set has a total of 27,571 samples, and the test set has a total of 34,016 samples.
[0055] S4. Vegetation index fusion of hyperspectral orthophotos.
[0056] First, the infrared and near-infrared bands of the hyperspectral orthophoto are selected (in this example, the infrared band is 650.8 nm and the near-infrared band is 861.7 nm), and the normalized difference vegetation index (NDVI) value, the difference vegetation index (DVI) value, and the ratio vegetation index (RVI) value are calculated. The calculation formula is shown in Table 1, and finally the corresponding NDVI, DVI, and RVI raster images are obtained.
[0057] Table 1
[0058]
[0059] In the table, ρ RED is the infrared band, ρ NIR It is the near infrared band.
[0060] Afterwards, the obtained NDVI, DVI and RVI raster data are fused into the bands of the hyperspectral orthophoto in the form of bands to obtain the hyperspectral orthophoto of the fused vegetation index. The fusion process is as follows: Figure 3 (a) shown.
[0061] S5. Based on the hyperspectral orthophotos and label datasets fused with vegetation indices, a grassland vegetation classification model is constructed, and the grassland vegetation classification model is used to complete the vegetation species classification.
[0062] In this embodiment, the grassland vegetation classification model is a mobile three-dimensional hole convolutional visual Transformer, which draws on the multi-level structure design of the convolutional neural network, such as Figure 3 As shown in (b), the model has a multi-level hierarchical structure, consisting of three stages and five modules, including: 3D convolution, 3D hole convolution, mobile convolution visual Transformer, reverse residual structure and convolution visual Transformer; among them, stage 1 contains 3D convolution, 3D hole convolution and mobile convolution visual Transformer modules, stage 2 contains 3D hole convolution and mobile convolution visual Transformer modules, and stage 3 contains reverse residual structure and convolution visual Transformer modules.
[0063] The specific steps of model construction include:
[0064] S501. The hyperspectral orthophoto image and label training set of the fused vegetation index obtained in the above steps are input into the model for training. First, Figure 3 The three-dimensional convolution in stage 1 in b downsamples the input three-dimensional Patches. The structure of the three-dimensional convolution is as follows: Figure 4(a) shown.
[0065] Afterwards, the result of the 3D convolution operation is passed through a 3D dilated convolution layer to expand the receptive field of the convolution kernel while retaining more information. The structure of the 3D dilated convolution layer is as follows: Figure 4 (b) as shown.
[0066] Finally, the feature map obtained by the three-dimensional hole convolution operation is passed through the N1 layer mobile convolution vision Transformer module (this module is as follows Figure 5 As shown in the figure, it aims to accelerate the modeling of local and global information of the input tensor. In the mobile convolutional vision Transformer module, the ordinary 3D convolution is decomposed into depth convolution and point convolution through depthwise separable convolution. The feature map is first subjected to 3×3 depthwise convolution for local feature modeling, and then the tensor is projected into a high-dimensional space using 1×1 point convolution to learn the linear combination of the input channels. Then, the global long-distance dependent features are extracted through the Transformer module with the "expand-Transformer encoder-fold" mechanism. This structure helps to reduce the number of parameters in the self-attention mechanism. The number of channels is then adjusted back to the original size through a 1×1 point convolution. Finally, the feature map is simply connected to the original input map along the channel direction with the help of the shortcut residual branch, and these features are fused through a 3×3 depthwise convolution to obtain the final global feature output.
[0067] S502. Input the feature results obtained in stage 1 of step S501 into stage 2, aiming to further extract deeper features (high-level semantic features). In stage 2, the number of tokens (feature resolution) is further reduced and the width of the token (feature dimension) is increased through the three-dimensional hole convolution layer, which enables the token to represent more and more complex visual patterns in an increasingly larger spatial range. The obtained feature results are passed through the N2-layer mobile convolutional visual Transformer module to further extract local features in the hyperspectral image blocks and global features of the entire image. Note that the mobile convolutional visual Transformer module has the same structure as the mobile convolutional visual Transformer module in stage 1, and the process is basically the same, but the number of stacked layers N of the Transformer encoder is different. Its specific structure is as follows: Figure 5 shown.
[0068] S503. Input the feature result obtained in step S502 into the inverse residual structure in stage 3 (the structure is as follows Figure 6 This structure can reduce the number of parameters brought by three-dimensional convolution and achieve a balance between data volume and extraction efficiency.
[0069] Afterwards, a classification mark is artificially added to the obtained feature vector for the final classification.
[0070] After the classification mark is added, the obtained feature vector is input into the convolutional vision Transformer encoder, which has the following structure: Figure 3 (c) It is worth noting that this layer uses depth-wise separable convolutions instead of the linear mapping in the standard Transformer encoder.
[0071] Finally, the output results with classification labels use the classification layer (MLPHead) to predict the output category and finally get the classification result.
[0072] After the grassland vegetation classification model is trained, the deep learning model classification result evaluation index is constructed. The three accuracy indicators of overall classification accuracy (OA), average classification accuracy (AA) and Kappa coefficient are used. The quality of the training model is verified by testing on the test set to further verify the model's classification of vegetation.
[0073] Embodiment 2
[0074] In order to further evaluate the classification effect and performance of the model method of the present invention, the Vegetation Index-Mobile three-dimensional atrous convolution vision Transformer (VI-MDACvT) model fused with vegetation index is compared with the benchmark model Mobile three-dimensional convolution vision Transformer (MDvT), the benchmark model only adds the feature extraction module fused with vegetation index (VI-MDvT), the benchmark model only adds the three-dimensional atrous convolution module (MDACvT), 3DCNN and ViT models. At the same time, to ensure fairness, all experiments use the same preprocessing method and are carried out in the same experimental environment. The same sample data is still used to classify and identify grassland vegetation species in the study area. The classification results are shown in Table 2.
[0075] Table 2
[0076]
[0077] It can be seen from this embodiment that the technology of the present invention has high classification accuracy and good effect on grassland vegetation species, can accurately identify the spatial distribution of each vegetation species, and is relatively consistent with the spatial distribution of actual objects.
[0078] Embodiment 3
[0079] like Figure 7 As shown, the present embodiment also provides a UAV hyperspectral vegetation species classification system, including: an acquisition module, a stitching module, a labeling module, a fusion module and a construction module; the acquisition module is used to use the UAV to collect hyperspectral images; the stitching module is used to preprocess and stitch the hyperspectral images to obtain hyperspectral orthophotos; the labeling module is used to label the hyperspectral orthophotos to obtain a label data set; the fusion module is used to fuse the hyperspectral orthophotos with vegetation indices to obtain hyperspectral orthophotos with fused vegetation indices; the construction module is used to construct a grassland vegetation classification model based on the hyperspectral orthophotos with fused vegetation indices and the label data set, and use the grassland vegetation classification model to complete vegetation species classification.
[0080] The following will explain in detail how the present invention solves technical problems in real life in conjunction with this embodiment.
[0081] First, the acquisition module is used to obtain UAV hyperspectral images.
[0082] In this embodiment, a drone equipped with a hyperspectral camera is used to collect hyperspectral images. In this embodiment, the drone is a DJI M600PRO, which is an electric six-rotor aircraft powered by six removable batteries. The maximum load is 6kg, the maximum endurance under this load is about 16min, and the maximum flight speed is 65km / h. The hyperspectral camera is a push-broom hyperspectral imager Gaiasky-mini2-vn, which has a spectral wavelength range of 400-1000nm, a spectral resolution of 3.5nm, and 176 spectral channels. The focal length of the lens is 23mm, the lateral field of view is 21.5°, and the total weight is 1.5kg. The spatial dimension size of each image acquired is 960 pixels × 1040 pixels, the image format is .raw, and each image can be used directly.
[0083] Data collection was carried out according to the vegetation growth and alpine grassland climate characteristics in the study area. First, the UAV hyperspectral data was collected. Data collection was carried out between 10:00 and 14:00, when there was no wind or light wind, and the weather was clear and cloudless or the cloud cover was less than 2%, to ensure that there was sufficient light during the collection period and the collected aerial photographs had few shadows. Before acquiring the image, multiple ground control points were set up, and a 40cm×60cm positioning sign was placed at each ground control point for subsequent ground data surveys, and it could be accurately positioned on the airborne hyperspectral image. A 1m×1m vegetation community ground sample was set near each ground control point. The imaging spectrometer was calibrated with a standard plate before and after each flight to measure the correct exposure value. Based on the accurate extraction of community species at the sample plot scale, the flight altitude and sample area size were designed, and the battery life of the UAV, gimbal and hyperspectral instrument should be considered at the same time. The flight altitude of the UAV was set to 50 meters, the sample size was 50×50 meters, the image heading overlap rate and lateral overlap rate were set to 80% and 75% respectively, and the spatial resolution of the remote sensing image obtained was about 1.0-1.5 cm.
[0084] Afterwards, the stitching module preprocesses and stitches the hyperspectral images to obtain hyperspectral orthophotos.
[0085] The preprocessing of airborne hyperspectral remote sensing images is performed using SpectraVIEW software, including lens calibration, reflectance calibration, and atmosphere calibration to obtain processed images. Lens calibration, by selecting background data and correction data to calibrate the original data, eliminate or reduce lens distortion, and help compensate for common lens optical defects; reflectance calibration, by calibrating the dark background and whiteboard data taken before the UAV flight, eliminates burrs caused by many noises (instrument noise, environmental noise, etc.) in the response curve; atmosphere calibration, removes the influence of clouds and aerosols on the data, and obtains the true reflectance of the surface. Standard gray cloth is used as a reference for atmospheric correction. Standard gray cloths of 40% and 60% that are close to the reflectance of grassland vegetation are used. The overall collection process is as follows: Figure 2 shown.
[0086] The preprocessed images were imported into the stitching software SpecStitcher, the flight altitude of the drone when acquiring the images (50m) was input, and some abnormal images were manually removed. Then, the stitching parameters were set multiple times and the effects were previewed until the stitching results met the expectations. Finally, the image position was corrected and full-band stitching was performed to generate a hyperspectral orthophoto of the study area.
[0087] The labeling module labels the hyperspectral orthophotos to obtain a label dataset.
[0088] In order to obtain the data of the real distribution of alpine grassland vegetation in the study area, a field ground survey was carried out while the drone was collecting data. The field ground survey includes recording the species name, average height and coverage of vegetation in the sample plot, and taking visible light images of the vegetation canopy with a camera. In this example, four types of grass species, Stipa purpurogena, Leontopodium foetida, Artemisia kunlunensis and Carex tibetica, are selected as the research objects. Based on the extensive ground survey, the hyperspectral orthophotos are annotated in combination with the visual interpretation method. The specific process includes: inputting the hyperspectral orthophotos into the Envi software, extracting the spectral features of the hyperspectral orthophotos in the Envi software, and performing manual visual interpretation in the Envi software according to the spectral features of different vegetation species. The "region of interest (ROI)" of different grassland vegetation species is annotated to obtain the ROI of the image; and then the annotated ROI is converted into a label raster file. After the annotation is completed, the labeled data is divided into a training set and a test set.
[0089] In this embodiment, the data set has a total of 61,587 data samples, including 21,251 purple needlegrass, 5,254 Kunlun Artemisia, 14,985 weak fireweed, 1,889 Tibetan moss, bare soil and others. Before model training, the code is used to randomly select 8,000 sample points from all pixels in each category as a training set, and the remaining pixels are used as a test set. The categories with less than 8,000 sample points are used as training sets according to half of the number of existing sample points, and the other half are used as test sets. The training set of this data set has a total of 27,571 samples, and the test set has a total of 34,016 samples.
[0090] The fusion module performs vegetation index fusion on the hyperspectral orthophoto to obtain a hyperspectral orthophoto with fused vegetation index.
[0091] First, the infrared and near-infrared bands of the hyperspectral orthophoto are selected, and then the normalized difference vegetation index (NDVI), difference vegetation index (DVI) and ratio vegetation index (RVI) values are calculated according to the selected infrared and near-infrared bands. The calculation formula is shown in Table 1, and finally the corresponding NDVI, DVI and RVI raster images are obtained.
[0092] Table 1
[0093]
[0094] In the table, ρ RED is the infrared band, ρ NIR It is a near-infrared band (in this example, the infrared band is 650.8nm and the near-infrared band is 861.7nm).
[0095] Afterwards, the obtained NDVI, DVI and RVI raster images are fused into the bands of the hyperspectral orthophoto in the form of bands to obtain the hyperspectral orthophoto of the fused vegetation index. The process of fusion vegetation index is as follows: Figure 3 (a) shown.
[0096] Finally, the construction module constructs a grassland vegetation classification model based on the hyperspectral orthophoto and label dataset that integrates the vegetation index, and uses the grassland vegetation classification model to complete the vegetation species classification.
[0097] In this embodiment, the grassland vegetation classification model is a mobile three-dimensional hole convolutional visual Transformer, which draws on the multi-layer structure design of the convolutional neural network, such as Figure 3 As shown in (b), the model has a multi-level hierarchical structure, consisting of three stages and five modules, including: 3D convolution, 3D hole convolution, mobile convolution visual Transformer, reverse residual structure and convolution visual Transformer; among them, stage 1 contains 3D convolution, 3D hole convolution and mobile convolution visual Transformer modules, stage 2 contains 3D hole convolution and mobile convolution visual Transformer modules, and stage 3 contains reverse residual structure and convolution visual Transformer modules.
[0098] The specific process of model construction includes:
[0099] S501. The hyperspectral orthophoto image and label training set of the fused vegetation index obtained in the above process are input into the model for training. First, Figure 3 The three-dimensional convolution in stage 1 in b downsamples the input three-dimensional Patches. The structure of the three-dimensional convolution is as follows: Figure 4 (a) shown.
[0100] Afterwards, the result of the 3D convolution operation is passed through a 3D dilated convolution layer to expand the receptive field of the convolution kernel while retaining more information. The structure of the 3D dilated convolution layer is as follows: Figure 4 (b) as shown.
[0101] Finally, the feature map obtained by the three-dimensional hole convolution operation is passed through the N1 layer mobile convolution vision Transformer module (this module is as follows Figure 5As shown in the figure, it aims to accelerate the modeling of local and global information of the input tensor. In the mobile convolutional vision Transformer module, the ordinary 3D convolution is decomposed into depth convolution and point convolution through depthwise separable convolution. The feature map is first subjected to 3×3 depthwise convolution for local feature modeling, and then the tensor is projected into a high-dimensional space using 1×1 point convolution to learn the linear combination of the input channels. Then, the global long-distance dependent features are extracted through the Transformer module with the "expand-Transformer encoder-fold" mechanism. This structure helps to reduce the number of parameters in the self-attention mechanism. The number of channels is then adjusted back to the original size through a 1×1 point convolution. Finally, the feature map is simply connected to the original input map along the channel direction with the help of the shortcut residual branch, and these features are fused through a 3×3 depthwise convolution to obtain the final global feature output.
[0102] S502. Input the feature results obtained in stage 1 of process S501 into stage 2, aiming to further extract deeper features (high-level semantic features). In stage 2, the number of tokens (feature resolution) is further reduced and the width of the token (feature dimension) is increased through the three-dimensional hole convolution layer, which enables the token to represent more and more complex visual patterns in an increasingly larger spatial range. The obtained feature results are passed through the N2-layer mobile convolutional visual Transformer module to further extract local features in the hyperspectral image blocks and global features of the entire image. Note that the mobile convolutional visual Transformer module has the same structure as the mobile convolutional visual Transformer module in stage 1, and the process is basically the same, but the number of stacked layers N of the Transformer encoder is different. Its specific structure is as follows: Figure 5 shown.
[0103] S503. Input the feature result obtained in process S502 into the inverse residual structure in stage 3 (the structure is as follows Figure 6 This structure can reduce the number of parameters brought by three-dimensional convolution and achieve a balance between data volume and extraction efficiency.
[0104] Afterwards, a classification mark is artificially added to the obtained feature vector for the final classification.
[0105] After the classification mark is added, the obtained feature vector is input into the convolutional vision Transformer encoder, which has the following structure: Figure 3 (c) It is worth noting that this layer uses depth-wise separable convolutions instead of the linear mapping in the standard Transformer encoder.
[0106] Finally, the output results with classification labels use the classification layer (MLPHead) to predict the output category and finally get the classification result.
[0107] After the grassland vegetation classification model is trained, the deep learning model classification result evaluation index is constructed. The three accuracy indicators of overall classification accuracy (OA), average classification accuracy (AA) and Kappa coefficient are used. The quality of the training model is verified by testing on the test set to further verify the model's classification of vegetation.
[0108] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. UAV hyperspectral vegetation species classification method based on deep learning, It is characterized in that the steps include: Use drones and airborne hyperspectral instruments to collect hyperspectral images of vegetation in the sample area; Preprocessing the collected hyperspectral image to obtain a preprocessed image, and splicing and mosaicking the preprocessed image to obtain a hyperspectral orthophoto; The hyperspectral orthophoto is labeled to obtain a label data set; the method for obtaining the label data set includes: first, importing the hyperspectral orthophoto into label labeling software, extracting spectral features of the hyperspectral orthophoto, and manually visually interpreting the spectral features of different vegetation species in the label labeling software to label different vegetation species respectively, so as to obtain the region of interest of each vegetation species in the image; then, converting the labeled region of interest into a label raster file; finally, after obtaining the label raster file, dividing it into a training set and a test set; Vegetation index fusion is performed on the hyperspectral orthophoto to obtain a hyperspectral orthophoto fused with vegetation index; the method for obtaining the hyperspectral orthophoto fused with vegetation index includes: firstly, infrared and near-infrared bands are selected for the hyperspectral orthophoto, and then normalized vegetation index values, difference vegetation index values and ratio vegetation index values are calculated for the hyperspectral orthophoto according to the selected infrared and near-infrared bands to obtain corresponding raster images respectively; then, the obtained raster image is fused into the band of the hyperspectral orthophoto in the form of bands to obtain the hyperspectral orthophoto fused with vegetation index; Based on the hyperspectral orthophoto fused with vegetation index and the label data set, a grassland vegetation classification model is constructed, and the grassland vegetation classification model is used to complete vegetation species classification; the grassland vegetation classification model includes a mobile three-dimensional hole convolution vision Transformer model, and the mobile three-dimensional hole convolution vision Transformer model structure is a multi-level structure design, consisting of three stages and five modules, including: three-dimensional convolution, three-dimensional hole convolution, mobile convolution vision Transformer, reverse residual structure and convolution vision Transformer; among them, stage 1 includes three-dimensional convolution, three-dimensional hole convolution and mobile convolution vision Transformer modules, stage 2 includes three-dimensional hole convolution and mobile convolution vision Transformer modules, and stage 3 includes reverse residual structure and convolution vision Transformer modules.
2. The method for classifying vegetation species using drone hyperspectral images based on deep learning according to claim 1, It is characterized in that The method for performing the preprocessing includes: lens calibration, reflectivity calibration and atmosphere calibration.
3. The method for classification of vegetation species using a drone's hyperspectral image based on deep learning according to claim 1, It is characterized in that The method for obtaining a hyperspectral orthophoto includes: importing the preprocessed image into a stitching software, inputting the flight altitude of the drone when acquiring the image, and manually removing abnormal images; then setting stitching parameters and previewing the effect until the stitching result reaches the expected result, and finally performing full-band stitching and mosaicking of the image to generate the hyperspectral orthophoto of the study area.
4. A UAV hyperspectral vegetation species classification system based on deep learning, the system is used to implement the method described in any one of claims 1 to 3, It is characterized in that include: Acquisition module, splicing module, annotation module, fusion module and construction module; The acquisition module is used to collect hyperspectral images using a drone; The stitching module is used to preprocess and stitch the hyperspectral images to obtain a hyperspectral orthophoto; The labeling module is used to label the hyperspectral orthophoto to obtain a label data set; the process of obtaining the label data set includes: first, importing the hyperspectral orthophoto into the labeling software, extracting the spectral features of the hyperspectral orthophoto, and labeling different vegetation species in the labeling software according to the spectral features of different vegetation species by manual visual interpretation, so as to obtain the region of interest of each vegetation species in the image; then, converting the labeled region of interest into a label raster file; finally, after obtaining the label raster file, dividing it into a training set and a test set; The fusion module is used to fuse the hyperspectral orthophoto with vegetation index to obtain a hyperspectral orthophoto with fused vegetation index; the process of obtaining the hyperspectral orthophoto with fused vegetation index includes: firstly, selecting infrared and near-infrared bands for the hyperspectral orthophoto, and then calculating the normalized vegetation index value, the difference vegetation index value and the ratio vegetation index value for the hyperspectral orthophoto according to the selected infrared and near-infrared bands to obtain corresponding raster images respectively; then, the obtained raster image is fused into the band of the hyperspectral orthophoto in the form of a band to obtain the hyperspectral orthophoto with fused vegetation index; The construction module is used to construct a grassland vegetation classification model based on the hyperspectral orthophoto fused with vegetation index and the label data set, and use the grassland vegetation classification model to complete vegetation species classification; the grassland vegetation classification model includes a mobile three-dimensional hole convolution vision Transformer model, and the mobile three-dimensional hole convolution vision Transformer model structure is a multi-level structure design, consisting of three stages and five modules, including: three-dimensional convolution, three-dimensional hole convolution, mobile convolution vision Transformer, reverse residual structure and convolution vision Transformer; among them, stage 1 includes three-dimensional convolution, three-dimensional hole convolution and mobile convolution vision Transformer modules, stage 2 includes three-dimensional hole convolution and mobile convolution vision Transformer modules, and stage 3 includes reverse residual structure and convolution vision Transformer modules.
