Radial accumulation position coding system for hyperspectral remote sensing image classification based on VIT
By using the radial accumulation position coding method in the classification of hyperspectral remote sensing images, the data of hyperspectral remote sensing images are superimposed from the center point to the surroundings and divided into one-dimensional vectors, which solves the problem that the position coding method in the existing technology cannot effectively utilize high-dimensional space. The problem of relationship improves the pixel-level classification accuracy.
Patent Information
- Application Number
- CN202111453939.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-12-01
AI Technical Summary
Existing hyperspectral image classification methods have challenges in utilizing the spectral information and spatial information of pixels. In particular, the traditional trigonometric function position encoding method cannot effectively express the two-dimensional spatial relationship in high-dimensional hyperspectral remote sensing images, resulting in the model's distortion of the data. Spatial information is not utilized effectively.
A VIT-based radial accumulation position coding system for hyperspectral remote sensing image classification is adopted. Through data extraction preprocessing, position coding and data splitting modules, the data is radially accumulated from the center point, additional position information is added, and it is divided into one-dimensional The vector is input into the ViT model, replacing the traditional trigonometric function position encoding.
The pixel-level classification accuracy is improved, adding more effective spatial information to the data input to the ViT model, and improving the model's ability to classify hyperspectral remote sensing images.
Smart Images

Figure CN114037899B
Abstract
Description
Technical Field
[0001] The invention relates to the field of remote sensing, and in particular to a radial accumulation position coding system for hyperspectral remote sensing image classification based on VIT. Background Art
[0002] Hyperspectral image classification aims to assign each pixel to a certain category. The research work on this technology has attracted great attention from academia and industry, and has significant application value in land cover detection, urban planning and traffic monitoring. Hyperspectral images have the characteristics of high spectral feature dimension and low spatial resolution. How to make full use of the spectral information contained in each pixel and the spatial information contained in the surrounding pixels of each pixel is a considerable challenge. At present, the classification of hyperspectral images mainly adopts deep learning methods. Compared with traditional machine learning methods, the accuracy is significantly improved, but the multi-layer convolution structure also leads to a large increase in the amount of calculation. Vision Transformer (ViT) is a neural network model based on the self-attention mechanism that has emerged in recent years. It uses attention to capture global contextual information and establish long-distance dependence on the target, thereby improving the representation ability of features. Under the same receptive field, the amount of calculation is greatly reduced compared with deep learning methods.
[0003] For the ViT model, the position encoding method determines the model's effectiveness in utilizing the spatial information of the data. The commonly used position encoding method is trigonometric function position encoding, which is a commonly used position encoding method in natural language processing (NLP). It performs well in one-dimensional data, but cannot express the two-dimensional spatial relationship between pixels well, and is not suitable for high-dimensional hyperspectral remote sensing images. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a radial cumulative position coding system for hyperspectral remote sensing image classification based on VIT, so that more effective spatial information can be added to the data input to ViT, thereby improving the pixel-level classification accuracy.
[0005] To achieve the above object, the present invention adopts the following technical solution:
[0006] A radial accumulation position coding system for hyperspectral remote sensing image classification based on VIT, comprising:
[0007] The data extraction preprocessing module is used to extract data from the data set, preprocess it through PCA principal component analysis, and input the processed data into the model framework;
[0008] The position encoding module superimposes the input data from the center point to the surrounding areas, so that the data of each point is accompanied by position information;
[0009] The data splitting module divides the data into multiple block regions, stretches them into one-dimensional vectors, and inputs them into the ViT model;
[0010] The main model module contains a ViT model, which is used to process input data and output classification results.
[0011] Furthermore, the position encoding module achieves an effect of distinguishing the positions of each point similar to traditional position encoding by accumulating data radially from the center point to the surrounding areas, and makes the model absolutely rotationally invariant when the block area size is divided into 1*1.
[0012] Furthermore, when the input data is preprocessed by the PCA principal component analysis method, the dimension of the data is not changed.
[0013] Furthermore, the data splitting module divides the input data into N block regions of size 1×1 or 3×3, and stretches them into one-dimensional vectors respectively, and inputs them into the ViT model.
[0014] A VIT-based encoding method for a radial accumulation position encoding system for hyperspectral remote sensing image classification, comprising the following steps:
[0015] Step S1: extract data from the data set according to a window size, and set the category of the center point as the classification label; pre-process the data through PCA principal component analysis, and then input the processed data into the model framework;
[0016] Step S2: Use the radial accumulation position encoding method proposed in this paper to process the input data, superimpose the input data from the center point to the surrounding areas, so that the data of each point is accompanied by position information;
[0017] Step S3: Divide the input data into N block regions of size 1×1 or 3×3, and stretch them into one-dimensional vectors respectively, and input them into the ViT model;
[0018] Step S4: Input the data into the ViT model to obtain the classification result.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] The present invention enables the data input into ViT to be added with more effective spatial information, thereby improving the pixel-level classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of the system structure of the present invention;
[0022] Figure 2 is a schematic diagram of radial cumulative position coding in one embodiment of the present invention;
[0023] Figure 3 It is a schematic diagram of a superposition method in one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0025] Please refer to Figure 1 The present invention provides a VIT-based radial accumulation position coding system for hyperspectral remote sensing image classification, comprising:
[0026] The data extraction preprocessing module is used to extract data from the data set, preprocess it through PCA principal component analysis, and input the processed data into the model framework;
[0027] The position encoding module replaces the trigonometric position encoding commonly used in the ViT model, such as Figure 2 As shown in the figure, the input data is superimposed from the center point to the surrounding areas, so that the data of each point is accompanied by location information. The superposition method includes the following Figure 3 The three cases shown correspond to the current point being on the diagonal relative to the center point, between the diagonal and the perpendicular bisector, and on the perpendicular bisector;
[0028] The data splitting module divides the data into multiple block regions, stretches them into one-dimensional vectors, and inputs them into the ViT model;
[0029] The main model module contains a ViT model, which is used to process input data and output classification results.
[0030] Preferably, in this embodiment, the position encoding module achieves an effect of distinguishing the positions of each point similar to traditional position encoding by accumulating data radially from the center point to the surrounding areas, and when the block area size is divided into 1*1, the model has absolute rotation invariance.
[0031] Preferably, in this embodiment, when the input data is preprocessed by the PCA principal component analysis method, the dimension of the data is not changed.
[0032] Preferably, in this embodiment, the data splitting module divides the input data into N block areas of size 1×1 or 3×3, and stretches them into one-dimensional vectors respectively, and inputs them into the ViT model.
[0033] A VIT-based encoding method for a radial accumulation position encoding system for hyperspectral remote sensing image classification, comprising the following steps:
[0034] Step S1: extract data from the data set according to a window size, and set the category of the center point as the classification label; pre-process the data through PCA principal component analysis, and then input the processed data into the model framework;
[0035] Step S2: Use the radial accumulation position encoding method proposed in this paper to process the input data, superimpose the input data from the center point to the surrounding areas, so that the data of each point is accompanied by position information;
[0036] Step S3: Divide the input data into N block regions of size 1×1 or 3×3, and stretch them into one-dimensional vectors respectively, and input them into the ViT model;
[0037] Step S4: Input the data into the ViT model to obtain the classification result.
[0038] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A radial accumulation position coding system for hyperspectral remote sensing image classification based on VIT, It is characterized in that include: The data extraction preprocessing module is used to extract data from the data set, preprocess it through PCA principal component analysis, and input the processed data into the model framework; The position encoding module superimposes the input data from the center point to the surrounding areas, so that the data of each point is accompanied by position information; The data splitting module divides the data into multiple block regions, stretches them into one-dimensional vectors, and inputs them into the ViT model; The main model module includes a ViT model, which is used to process input data and output classification results; The position encoding module achieves an effect of distinguishing the positions of each point similar to traditional position encoding by accumulating data radially from the center point to the surrounding areas, and makes the model absolutely rotationally invariant when the block area size is divided into 1*1; When the input data is preprocessed by PCA principal component analysis method, the dimension of the data is not changed; The data splitting module divides the input data into N block regions of size 1×1 or 3×3, and stretches them into one-dimensional vectors respectively, and inputs them into the ViT model.
2. A VIT-based encoding method for radial accumulation position encoding system for hyperspectral remote sensing image classification. It is characterized in that The following steps are involved: Step S1: extract data from the data set according to a window size, and set the category of the center point as the classification label; The data is preprocessed by PCA principal component analysis and then input into the model framework; when the input data is preprocessed by PCA principal component analysis method, the dimension of the data is not changed; Step S2: Use the radial accumulation position coding method proposed in this paper to process the input data, superimpose the input data from the center point to the surrounding areas, so that the data of each point is accompanied by position information; achieve an effect of distinguishing the positions of each point similar to traditional position coding, and make the model absolutely rotation invariant when the block area size is divided into 1*1; Step S3: Divide the input data into N block regions of size 1×1 or 3×3, and stretch them into one-dimensional vectors respectively, and input them into the ViT model; Step S4: Input the data into the ViT model to obtain the classification result.
