CN117115675A - Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium - Google Patents

Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium Download PDF

Info

Publication number
CN117115675A
CN117115675A CN202311115889.3A CN202311115889A CN117115675A CN 117115675 A CN117115675 A CN 117115675A CN 202311115889 A CN202311115889 A CN 202311115889A CN 117115675 A CN117115675 A CN 117115675A
Authority
CN
China
Prior art keywords
hyperspectral
cross
module
model
phase
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311115889.3A
Other languages
Chinese (zh)
Inventor
王佳宁
刘一琛
黄润虎
胡金雨
华筝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN202311115889.3A priority Critical patent/CN117115675A/en
Publication of CN117115675A publication Critical patent/CN117115675A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Astronomy & Astrophysics (AREA)
  • Image Analysis (AREA)

Abstract

A cross-time phase light space spectrum feature fusion hyperspectral change detection method, a system, equipment and a medium, wherein the method comprises the following steps: preprocessing hyperspectral image data, and dividing a training set and a testing set; constructing a feature extraction network; constructing a classification network; training a feature extraction network and a classification network by using a training set and adopting a gradient descent algorithm, calculating the accuracy of the training set each time, and taking the first generation network model weight with the highest accuracy on the training set as a final detection model weight to obtain a trained model; inputting the test set into a trained model for testing to obtain a detection result, and outputting a predictive label graph of hyperspectral image data; the system, the device and the medium are used for realizing the method; according to the invention, from two aspects of refined feature extraction and cross-temporal feature fusion, model design is performed based on spatial spectrum feature extraction and cross-temporal feature fusion, and a model is simplified by using a lightweight method, so that a lightweight hyperspectral image change detection method with good performance is realized.

Description

Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a cross-time-phase lightweight spatial spectrum feature fusion hyperspectral change detection method, a system, equipment and a medium.
Background
The change detection can identify the difference between multi-temporal remote sensing images, and is widely applied to the fields of forestry and agricultural monitoring, natural disaster assessment, surface dynamic analysis and the like. Hyperspectral images typically have hundreds of dimensions of spectral channels and a unique nature of one object-to-spectrum, contain rich spectral information, and have inherent advantages over multispectral images in detecting changes in land coverage. The main challenges of using hyperspectral images for change detection are that the high dimensionality of the images and redundancy of spectrum information make it difficult for a traditional model to fully and effectively extract spatial spectrum features, the deep learning method pays little attention to the correlation of features between the cross-phase hyperspectral images, the relation between two input images cannot be fully captured to acquire the change information, and meanwhile, larger calculation cost is required.
Paper "Lwave pezJ,Garea A S,Heras D B,et al.Stacked autoencoders for multiclass change detection in hyperspectral images[C]In// IGARSS2018-2018IEEE International Geoscience and Remote Sensing Symposium.IEEE,2018:1906-1909, "a stacked self-encoder is used to extract features from the differential image of the dual-temporal hyperspectral image to detect changes, the network has a deeper network structure than the traditional model, and can extract features more fully. However, the method only considers the spectral characteristics of the pixels, but fails to consider the spatial characteristics and the naturesCan promote weak.
In the paper Song A, choi J, han Y, et al, change detection in hyperspectral images using recurrent 3D fully convolutional networks[J, remote Sensing 2018,10 (11): 1827, a cyclic three-dimensional unsupervised full convolution network framework is provided, the advantages of a three-dimensional unsupervised full convolution network and a long and short term memory convolution neural network are fused, and the joint spectrum space-time characteristics are extracted. However, this method increases the computational cost, and fails to sufficiently consider the information redundancy of the spectral domain and the spatial domain.
In the paper Wang F, jiang M, qian C, et al, residual attention network for image classification [ C ]// Proceedings ofthe IEEE conference on computer vision and pattern recovery 2017:3156-3164, it is proposed to enhance the representational capacity of convolutional neural networks by means of attention mechanisms, and a residual attention network with encoder-decoder attention modules is proposed to refine the feature map to improve network performance. However, residual attention requires more parameters for the generation of a three-dimensional attention pattern in the network, resulting in increased computational cost, while the network fails to focus on the correlation of features between cross-temporal hyperspectral images.
In summary, the existing hyperspectral feature change detection method has the problems that the spatial spectrum feature extraction is incomplete, the feature correlation among cross-time-phase hyperspectral images is less concerned, and the network model is complex.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide a cross-time-phase lightweight spatial spectrum feature fusion hyperspectral change detection method, a system, equipment and a medium, which are used for extracting spectral information by fully utilizing point convolution, extracting spatial feature information by utilizing a Ghost module, reducing the number of model parameters, simplifying a network structure and improving the network operation efficiency; and the cross-time phase characteristic fusion module is used for fully capturing the correlation relationship between cross-time phase images to acquire the change information, so that the model detection precision is improved.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
a cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method comprises the following steps:
s1, preprocessing hyperspectral image data, and dividing the hyperspectral image data into a training set and a testing set;
s2, constructing a feature extraction network consisting of two point convolution modules and four spatial spectrum feature fusion modules, and extracting image feature information;
s3, constructing a classification network consisting of an attention weighting module, a global average pooling layer and a full connection layer, and classifying the image feature information extracted by the feature extraction network;
step S4, training the feature extraction network constructed in the step S2 and the classification network constructed in the step S3 by using the training set in the step S1 through a gradient descent algorithm, performing precision calculation on the training set in each iteration in the training iteration process, and taking the first-generation network model weight with the highest precision on the training set as the final detection model weight to obtain a trained model;
and S5, inputting the test set in the step S1 into the model trained in the step S4 for testing, obtaining a final detection result, and outputting a predictive label graph of hyperspectral image data according to the detection result.
The implementation step of the step S1 comprises the following steps:
s1.1, acquiring hyperspectral image data, normalizing the acquired hyperspectral image x, and performing linear transformation on the hyperspectral image data to map the hyperspectral image data to [0,1 ]]Between them, obtain normalized hyperspectral imageWherein μ, σ are the mean and variance of the hyperspectral image data, respectively;
step S1.2, setting a sampling window of the hyperspectral image as the space size of a patch block, and sampling a sample containing spectrum and space dimension information from the normalized hyperspectral image obtained in the step S1.1;
and S1.3, sampling by using the window in the step S1.2 to obtain a patch block, taking the label of the central pixel point of the patch block as the label of the patch sample pair, randomly extracting 10% -40% of all the patch sample pairs with labels in the hyperspectral image from the variable pixels and the unchanged pixels respectively as a training set, and taking 60% -90% as a test set for testing.
In the step S2:
the two point convolution modules are used for initially extracting the characteristics of the patch block obtained in the step S1.3, and the four spatial spectrum characteristic fusion modules are sequentially connected in series behind the point convolution modules;
the spatial spectrum feature fusion module consists of a double-branch spatial spectrum feature extraction module and a cross-time-phase feature fusion module, wherein the spatial spectrum feature extraction module is used for extracting spatial spectrum fusion features of hyperspectral images, and the cross-time-phase feature fusion module is used for exploring the correlation feature information among cross-time-phase images;
each branch of the double-branch spatial spectrum characteristic extraction module consists of point convolution and Ghost light convolution; the spatial spectrum feature extraction module adopts a double-branch parallel feature extraction method to respectively extract spectrum and spatial features; the method comprises the steps of carrying out spectral feature extraction by using point convolution, and carrying out spatial feature extraction by using a Ghost module, wherein the specific process is as follows:
wherein F is l In order to input the feature map,representing a point convolution operation, W l Representing a parameter matrix->Extracting features for the spectrum branches;
wherein F is l In order to input the feature map,representing a point convolution operation, W l Representing a parameter matrix->The method is an inherent characteristic diagram of a Ghost module after dot dimension reduction;
wherein,is the ith feature map of the inherent feature map, i is 1 or 2;
wherein F is l+3 Extracting features for spectraAnd spatial extraction features->Is a fusion feature of (2);
the cross-time phase feature fusion module comprises an attention weighting module and a point convolution module; the time-phase-crossing feature fusion module firstly connects different time-phase image features in parallel, the parallel features are subjected to weight adjustment by the attention weighting module, and the weighted features use point convolution to perform time-phase-crossing feature fusion and dimension reduction, and the specific process is as follows:
wherein,respectively represent twoImage characteristics of individual phases ∈>For parallel operation, F l+1 The characteristics obtained after parallel connection;
wherein,for the weighting operation on the ith phase, +.>The characteristic obtained after the weighting operation of the ith time phase;
wherein,for point convolution for the ith phase, +.>Is the characteristic of the ith time phase after convolution.
In the step S3, a classification network composed of an attention weighting module, a global average pooling layer and a full connection layer is constructed, and the specific process is as follows:
wherein,image features representing two phases, F l+1 Obtained by subtracting image features of two phasesFeatures;
wherein,representing weighting modules, F l+2 Representing the weighted features;
F l+3 =GAP(F l+2 )
wherein GAP represents a global average pooling layer, F l+3 Is the feature after pooling;
F out =Liner(F l+3 )
wherein, liner represents a full connection layer, F out A predictive probability distribution for the output;
Y P =argmax(F out )
wherein argmax represents F out Dimension of maximum value, Y P To predict tags.
The specific implementation method of the step S4 is as follows:
s4.1, setting training parameters;
step S4.2, inputting the training set obtained in the step S1 into the feature extraction model constructed in the step S2, and inputting the output of the feature extraction model into the classification network model obtained in the step S3 to obtain a prediction label Y of the model P
Step S4.3, calculating the cross entropy loss of the predicted label and the real label in the step S4.2:
where c represents the number of categories, where c=2,and->The real label and the predictive label are respectively, and N is the number of samples input at a time;
s4.4, calculating model Loss through the cross entropy Loss function obtained in the step S4.3 during iterative optimization to obtain a gradient of the cross entropy Loss on model weightUpdating the weight according to the model weight gradient;
s4.5, calculating the overall classification precision of the current model to all training sets obtained in the step S1 in each iteration; and taking the first generation model weight with the highest classification precision of the training sample in the iteration process as the final model weight.
And 3 to 10 independent reasoning is carried out on the test set in the step S5, and the average value of the prediction precision of the reasoning result is taken as the final prediction precision.
A cross-temporal lightweight spatial-spectral feature fusion hyperspectral variation detection system, comprising:
and a data processing module: the hyperspectral image processing method is used for preprocessing hyperspectral image data and dividing the hyperspectral image data into a training set and a testing set;
and a network construction module: the method comprises the steps of constructing a feature extraction network consisting of a point convolution and four spatial spectrum feature fusion modules, and constructing a classification network consisting of an attention weighting module, a global average pooling layer and a full connection layer;
and the network training module: the method comprises the steps of training a constructed feature extraction network and a classification network by using a training set and adopting a gradient descent algorithm, performing precision calculation on the training set in each iteration in the training iteration process, and taking the first-generation network model weight with the highest precision on the training set as a final detection model weight to obtain a trained model;
and a network test module: and the test set is used for inputting the test set into the trained model for testing, obtaining a final detection result, and outputting a predictive label graph of hyperspectral image data according to the detection result.
The invention also provides cross-time-phase light space spectrum feature fusion hyperspectral change detection equipment, which comprises:
a memory: storing a computer program of the cross-time phase light space spectrum characteristic fusion hyperspectral change detection method, which is equipment readable by a computer;
a processor: the method is used for realizing the cross-time-phase lightweight spatial spectrum feature fusion hyperspectral change detection method when the computer program is executed.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program can realize the cross-time-phase lightweight spatial spectrum feature fusion hyperspectral change detection method when being executed by a processor.
Compared with the prior art, the invention has the following beneficial effects:
1. the method is based on the characteristic properties of multiple spectral dimensions and one object spectrum of the hyperspectral image, and the multi-layer point convolution lightweight model is used for extracting the spectral information in the hyperspectral image, so that the spectral dimension information can be better fused, meanwhile, the classification network can be effectively simplified due to the small number of point convolution parameters, and the complexity of the model is reduced.
2. Based on the high-redundancy information property of hyperspectral image dimension, the spatial feature information is extracted by using the Ghost convolution, the abundant feature information is extracted by the conventional convolution operation, and the redundant feature information is generated by using cheaper linear transformation operation, so that the calculation resources required by a model can be effectively reduced, and the light weight is realized.
3. Based on the characteristic of abundant spatial spectrum characteristics of the hyperspectral image, the method adopts a double-branch structure to perform characteristic fusion on the characteristics extracted by the point convolution and the Ghost convolution module, and fully extracts the effective information of the hyperspectral image.
4. Based on the property of double time phases of the change detection data, the invention connects different time phase space spectrum fusion characteristics in parallel, performs attention weighting on the parallel characteristics, enhances effective characteristics, inhibits useless characteristics, reduces dimension of the weighted characteristics to enable the weighted characteristics to be respectively matched with the different time phase characteristics, thereby fully capturing the association relation between time phase crossing images, better acquiring the change information and improving the detection precision of the model.
5. The invention only relates to convolution and attention basic knowledge to realize effective model lightweight design, has low requirement on the knowledge in the professional field, does not need a complex module design process, is suitable for tasks related to hyperspectral change detection, is easy to reproduce and has strong universality.
In conclusion, the method is based on two aspects of refined feature extraction and cross-time phase feature fusion, model design is carried out based on spatial spectrum feature extraction and cross-time phase feature fusion, and a model is simplified by using a lightweight method, so that a lightweight hyperspectral image change detection method with good performance is realized.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
Fig. 2 is a diagram of the structure of the model of the present invention.
FIG. 3 is a graph of Patch size impact analysis.
Fig. 4 is a three-domain classification effect diagram of Jiangsu, bayArea and santa barba of the present invention, wherein fig. 4 (a) is a Jiangsu dataset detection effect diagram, fig. 4 (b) is a BayArea dataset detection effect diagram, and fig. 4 (c) is a santa barba dataset detection effect diagram.
Detailed Description
Embodiments and effects of the present invention will be described more fully hereinafter with reference to the accompanying drawings, in which it is apparent that some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, the implementation steps of the present embodiment are as follows:
a cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method comprises the following steps:
s1, preprocessing hyperspectral image data, and dividing the hyperspectral image data into a training set and a testing set;
because the spectrum of the data in the hyperspectral image has different value ranges, the model reasoning can be interfered, the hyperspectral image data needs to be preprocessed, and the method is concretely realized as follows:
step S1.1, data preprocessing:
acquiring hyperspectral image data from a public website, normalizing the acquired hyperspectral image x, and performing linear transformation on the hyperspectral image data to map the hyperspectral image data to [0,1 ]]Between them, obtain normalized hyperspectral imageWherein μ, σ are the mean and variance of the hyperspectral image data, respectively;
step S1.2, data sampling:
the original hyperspectral image is a piece of data containing all ground objects, the data and the labels thereof related to each pixel point are acquired by sampling, and can be input into a model for reasoning operation, and the implementation is as follows:
step S1.2, setting a sampling window of the hyperspectral image as the space size of a patch block, and sampling a sample containing spectrum and space dimension information from the normalized hyperspectral image obtained in the step S1.1;
step S1.3, data division:
the window sampling in the step S1.2 is used for obtaining a patch block, the label of the pixel point in the center of the patch block is used as the label of the patch sample pair, in the embodiment, 20% of all the patch sample pairs with labels in the hyperspectral image are randomly extracted from the changed pixels and the unchanged pixels respectively to be used as training sets, and the remaining 80% are used as test sets to be used for testing.
The sampling is performed using a patch block of size 5 x 5 in this embodiment.
S2, constructing a feature extraction network consisting of two point convolution modules and four spatial spectrum feature fusion modules, and extracting image feature information;
as shown in fig. 2, in the step S2:
the two point convolution modules are used for initially extracting the characteristics of the patch block obtained in the step S1.3, and the four spatial spectrum characteristic fusion modules are sequentially connected in series behind the point convolution modules;
the spatial spectrum feature fusion module consists of a double-branch spatial spectrum feature extraction module and a cross-time-phase feature fusion module, wherein the spatial spectrum feature extraction module is used for extracting spatial spectrum fusion features of hyperspectral images, and the cross-time-phase feature fusion module is used for exploring the correlation feature information among cross-time-phase images;
each branch of the double-branch spatial spectrum characteristic extraction module consists of point convolution and Ghost light convolution; the spatial spectrum feature extraction module adopts a double-branch parallel feature extraction method to respectively extract spectrum and spatial features; the method comprises the steps of carrying out spectral feature extraction by using point convolution, and carrying out spatial feature extraction by using a Ghost module, wherein the specific process is as follows:
wherein F is l In order to input the feature map,representing a point convolution operation, W l Representing a parameter matrix->Extracting features for the spectrum branches;
wherein F is l In order to input the feature map,representing a point convolution operation, W l Representing a parameter matrix->The method is an inherent characteristic diagram of a Ghost module after dot dimension reduction;
wherein,is the ith feature map of the inherent feature map, i is 1 or 2;
wherein F is l+3 Extracting features for spectraAnd spatial extraction features->Is a fusion feature of (2);
the cross-time phase feature fusion module comprises an attention weighting module and a point convolution module; the time-phase-crossing feature fusion module firstly connects different time-phase image features in parallel, the parallel features are subjected to weight adjustment by the attention weighting module, and the weighted features use point convolution to perform time-phase-crossing feature fusion and dimension reduction, and the specific process is as follows:
wherein,image characteristics respectively representing two phases, +.>For parallel operation, F l+1 The characteristics obtained after parallel connection;
wherein,for the weighting operation on the ith phase, +.>The characteristic obtained after the weighting operation of the ith time phase;
wherein,for point convolution for the ith phase, +.>Is the characteristic of the ith time phase after convolution.
S3, constructing a classification network consisting of an attention weighting module, a global average pooling layer and a full connection layer, and classifying the image feature information extracted by the feature extraction network;
in the step S3, a classification network composed of an attention weighting module, a global average pooling layer and a full connection layer is constructed, and the specific process is as follows:
wherein,image features representing two phases, F l+1 The characteristics obtained by subtracting the image characteristics of the two time phases;
wherein,representing weighting modules, F l+2 Representing the weighted features;
F l+3 =GAP(F l+2 )
wherein GAP represents a global average pooling layer, F l+3 Is the feature after pooling;
F out =Liner(F l+3 )
wherein, liner represents a full connection layer, F out A predictive probability distribution for the output;
Y P =argmax(F out )
wherein argmax represents F out Dimension of maximum value, Y P To predict tags.
Step S4, training the feature extraction network constructed in the step S2 and the classification network constructed in the step S3 by using the training set in the step S1 through a gradient descent algorithm, performing precision calculation on the training set in each iteration in the training iteration process, and taking the first-generation network model weight with the highest precision on the training set as the final detection model weight to obtain a trained model;
the specific implementation method of the step S4 is as follows:
step S4.1, in the embodiment, setting a training algebra as 300, setting a single sample input amount as 72, and setting a learning rate as 0.01 initially;
step S4.2, inputting the training set obtained in the step S1 into the feature extraction model constructed in the step S2, and inputting the output of the feature extraction model into the classification network model obtained in the step S3 to obtain a prediction label Y of the model P
Step S4.3, calculating the cross entropy loss of the predicted label and the real label in the step S4.2:
wherein c represents the number of categories, where c=2,And->The real label and the predictive label are respectively, and N is the number of samples input at a time;
s4.4, calculating model Loss through the cross entropy Loss function obtained in the step S4.3 during iterative optimization to obtain a gradient of the cross entropy Loss on model weightUpdating the weight according to the model weight gradient;
step 4.5, calculating the overall classification precision of the current model to all training sets obtained in the step S1 in each iteration; and taking the first generation model weight with the highest classification precision of the training sample in the iteration process as the final model weight.
And 5, inputting the test set in the step 1 into the model trained in the step 4 for testing to obtain a final detection result, outputting a predictive label graph of hyperspectral image data according to the detection result, carrying out three independent reasoning on the test set, and taking the average value of the predictive precision of the three reasoning results as the final predictive precision.
The effects of the present invention can be further illustrated by the following experiments.
Experimental conditions:
hardware environment: the Intel W-2123 processor has a main frequency of 3.60GHz, a memory 64GB,NVIDIA GeForce GTX 2080Ti graphics processing unit GPU and a memory of 11GB.
Software environment: a 64-bit Windows 10 system and a Pytorch 1.6.0 deep learning framework.
Data set: jiangsu dataset: the material change of a certain river in Jiangsu province of China is mainly recorded after the material change is collected by a hypersonic sensor. These two multi-time images were taken at 5, 3 and 31 days 2013, 12 and 463×241 pixels in size, respectively. In the experiment, 198 wave bands are used for carrying out a change detection task after noise wave bands are removed.
BayArea dataset: obtained by avisis, mainly covering cities and farms in the united states Patterson California, these two HSIs were purchased in 2013 and 2015, respectively. The two images were 600 x 500 pixels and 224 available bands were used for the experiment.
Santa Barbara dataset: obtained by avisis, two HSIs were photographed in 2013 and 2014, respectively, above the sambacla region of california. The size is 984×740 pixels, and the spectrum band is 224.
The evaluation indexes comprise overall precision OA, KAPPA coefficient KAPPA, true positive example TP, true negative example TN, false positive example FP and false negative example FN, wherein:
the total precision OA indicates the proportion of correctly classified samples to all samples, and the larger the value is, the better the classification effect is;
the KAPPA coefficient KAPPA represents different weights in the confusion matrix, and the larger the value is, the better the classification effect is;
wherein the true positive example TP represents the number of pixels of the correctly detected change;
the true negative TN represents the unchanged number of pixels that are correctly detected;
the error positive example FP represents the number of false detection of unchanged pixels in the real class diagram;
the false negative example FN indicates the number of pixels that are erroneously classified as unchanged pixels.
Second, experimental details
Experiment one, in the patch-based approach, the patch size can have a large impact on the accuracy of the results.
The impact of patch size on classification effects was first analyzed. Attempting a patch size 1,3,5,7,9,1 ×1 for each dataset separately can be seen as classifying using only spectral information. As shown in FIG. 3, the OA values of the three data sets all obtain the most differential class precision under the condition of 1×1patch, which indicates that the introduction of spatial information is beneficial to enhancing the recognition degree of the change detection task. Along with the increase of the patch, the OA of the Jiangsu data set rises and then falls, and the optimal classification precision is obtained under the condition of 5 multiplied by 5patch, and the OA values of the other two data sets rise and then remain stable, so that the real patch size has a certain influence on the model effect, and the optimal effect is realized after the patch size reaches a certain threshold value. Thus, by the above analysis, 5×5patch was used as the optimal parameter for the subsequent experiments.
And the number of the model channels influences the complexity, the parameters and the running efficiency of the model.
In general, if the model uses an excessively large number of channels, overfitting is likely to occur, whereas if the model uses an excessively small number of channels, the amount of information is insufficient, and it is difficult to extract the features more sufficiently.
In this example, we tried to set the number of model channels to 4,8,16,32,64,128, respectively, and the results are shown in table 1. As can be seen from the table, the worst classification effect was obtained on all three data sets when the number of channels was 4. As the number of channels increases, OA gradually increases to steady and then gradually decreases. The method has the advantages that when the number of channels is low, model parameters are fewer, and the model performance cannot be fully exerted due to the fact that the knowledge capacity is small; at large channel numbers, too many model parameters result in overfitting. In addition, by further exploring the relationship among the channel number, the OA and the parameter quantity, the method can be found to keep acceptable classification performance even if the channel number is too low, which shows that the model has good feature extraction capability and can extract distinguishing features under the condition of extremely low parameter quantity. To balance model performance and efficiency, the number of channels was set to 64 in the subsequent experiments.
TABLE 1 model OA (%) of different channel numbers and parameter comparison
The third experiment and the residual connection are widely applied to convolutional neural network models, and the method can play roles in relieving gradient disappearance problems, accelerating training speed, improving model training effect and improving generalization capability of the network. However, when the network gets deeper, we experiment on the number of spatial feature fusion modules and the use of residual connections, since residual connections allow gradients to flow more easily, which may cause some gradient explosion problems. In this embodiment, we respectively try to use 2,3,4,5 spatial spectrum feature fusion modules, and respectively try to verify the model performance with or without residual connection, and the results are shown in table 2. According to the table, as the number of the spatial spectrum feature fusion modules is increased, the phenomenon that the effect is increased firstly and then is gentle appears on three data sets, and the addition of residual connection can also improve certain precision, so that a mode of adding the residual connection by adopting four spatial spectrum feature fusion modules is adopted.
TABLE 2 number of spatial spectrum feature fusion modules and accuracy of detecting whether residual error connection model exists or not
Experiment four, on the Jiangsu hyperspectral change detection data, the cross-time phase light-weight space spectrum characteristic fusion hyperspectral change detection method is used for obtaining a detection result graph and calculating an evaluation index, and the result is shown in table 3 and fig. 4 (a).
TABLE 3 accuracy of different detection methods for the Jiangsu dataset
As can be seen from Table 3, the present invention has higher OA and KAPPA coefficients on the Jiangsu hyperspectral change detection data than the existing method. Compared with the traditional method, the OA is 2.72% higher than the PCA method, 4.26% higher than the IRMAD method, and the KAPPA coefficient is 12.48% higher than the PCA method and 19.87% higher than the IRMAD method; compared with the deep learning method, the OA of the invention is higher than 1.94% of the LCNN method, 0.21% of the BCNNs method, and the KAPPA coefficient is higher than 14.57% of the LCNN method and 1.59% of the BCNNs method.
As shown in fig. 4 (a), for more clear comparison of the effects of the methods, we represent TP as white, TN as black, FP as red, FN as green, and the unmarked areas as grey, in different colors. In contrast, the results of the present invention (right-most) contained fewer misclassified pixels, indicating that the proposed method has the best performance, and is able to identify the change region well.
Experiment five, on the BayArea hyperspectral change detection data, the cross-time phase light-weight space spectrum characteristic fusion hyperspectral change detection method of the embodiment is used to obtain a detection result graph and calculate an evaluation index, and the results are shown in table 4 and fig. 4 (b).
TABLE 4 accuracy of different detection methods for BayArea datasets
As can be seen from Table 4, the present invention has higher OA and KAPPA coefficients on BayArea hyperspectral change detection data than the existing method. Compared with the traditional method, the OA is 15.25% higher than the PCA method, 15.87% higher than the IRMAD method, and the KAPPA coefficient is 30.18% higher than the PCA method and 31.33% higher than the IRMAD method; compared with the deep learning method, the OA of the invention is 0.64% higher than that of the LCNN method, 0.34% higher than that of the BCNNs method, and the KAPPA coefficient is 1.28% higher than that of the LCNN method and 0.78% higher than that of the BCNNs method.
As shown in fig. 4 (b), for more clear comparison of the effects of the methods, we represent TP as white, TN as black, FP as red, FN as green, and the unmarked areas as grey, in different colors. In contrast, the results of the present invention (right-most) contained fewer misclassified pixels, indicating that the proposed method has the best performance, and is able to identify the change region well.
Experiment six, on Santa Barbara hyperspectral change detection data, a detection result graph is obtained by using the cross-time phase lightweight spatial spectrum characteristic fusion hyperspectral change detection method of the embodiment, and evaluation indexes are calculated, and the results are shown in Table 5 and FIG. 4 (c).
TABLE 5 accuracy of different detection methods for Santa Barbara datasets
Method OA KAPPA TP TN FP FN
PCA 80.03 55.62 30425 75663 4755 21709
IRMAD 86.07 71.61 47094 66996 13422 5040
LCNN 99.32±0.04 98.58±0.08 51760 79932 486 373
BCNNs 99.56±0.02 99.10±0.05 51812 80194 223 322
Ours 99.77±0.03 99.52±0.07 51974 80320 98 160
As can be seen from Table 5, the present invention has higher OA and KAPPA coefficients on Santa Barbara hyperspectral change detection data than the prior art methods. Compared with the traditional method, the OA is 19.74% higher than the PCA method, 13.70% higher than the IRMAD method, and the KAPPA coefficient is 43.90% higher than the PCA method and 27.91% higher than the IRMAD method; compared with the deep learning method, the OA of the invention is 0.45 percent higher than that of the LCNN method, 0.21 percent higher than that of the BCNNs method, and the KAPPA coefficient is 0.94 percent higher than that of the LCNN method and 0.42 percent higher than that of the BCNNs method.
As shown in fig. 4 (c), for more clear comparison of the effects of the methods, we represent TP as white, TN as black, FP as red, FN as green, and the unmarked areas as grey, in different colors. In contrast, the results of the present invention (right-most) contained fewer misclassified pixels, indicating that the proposed method has the best performance, and is able to identify the change region well.
Experiment seven, the effectiveness of the proposed method is verified by performing ablation experiments on the proposed model spatial spectrum feature extraction module, the cross-temporal feature fusion module and the attention weighting module. The experimental results are shown in table 6, the single spectrum and the single space refer to the spatial spectrum feature extraction module and only use the spectrum feature extraction branch or the spatial feature extraction branch to perform feature extraction, the non-crossing time phase feature fusion module refers to the cross time phase feature fusion module which is deleted, and the non-attention weighting module refers to the classification network attention weighting module which is deleted.
Table 6 comparison table of ablation test results for each module
As can be seen from Table 6, the above modules all improve the model performance to a certain extent, wherein the cross-temporal feature fusion module realizes the highest performance gain in each module, which indicates that the correlation fusion of the features between cross-temporal images in the hyperspectral image change detection task is important. The spectrum and space parallel branch are used for extracting the space spectrum characteristics, which is beneficial to model extraction of more refined change characteristics. After the partial features of the classifier are differenced, the change features are weighted by the attention weighting module in local space regions, so that the distinguishing property of the important features is enhanced.
Experimental results show that the method for detecting the cross-time phase light-weight spatial spectrum feature fusion hyperspectral change solves the problems that the existing method for detecting the hyperspectral feature change is insufficient in spatial spectrum feature extraction, less attention is paid to feature correlation among cross-time phase hyperspectral images and a network model is complex, and obtains better results than the prior art under the conditions of lower calculation resource requirements and lower storage cost. The invention can also be used for detecting the change of different time phase hyperspectral ground objects.
A cross-temporal lightweight spatial-spectral feature fusion hyperspectral variation detection system, comprising:
and a data processing module: the method is used for preprocessing hyperspectral image data in the step S1 and dividing the hyperspectral image data into a training set and a testing set;
and a network construction module: the method comprises the steps of S2 and S3, wherein a feature extraction network consisting of a point convolution and four spatial spectrum feature fusion modules is constructed, and a classification network consisting of an attention weighting module, a global average pooling layer and a full connection layer is constructed;
and the network training module: the method comprises the steps of training a feature extraction network constructed in the step S2 and a classification network constructed in the step S3 by utilizing a training set in the step S1 in the step S4 through a gradient descent algorithm, performing precision calculation on the training set in each iteration in a training iteration process, and taking the first-generation network model weight with the highest precision on the training set as a final detection model weight to obtain a trained model;
and a network test module: the method is used for realizing that the test set in the step S1 is input into the model trained in the step S4 for testing in the step S5, obtaining a final detection result, and outputting a predictive label graph of hyperspectral image data according to the detection result.
The invention also provides cross-time-phase light space spectrum feature fusion hyperspectral change detection equipment, which comprises:
a memory: storing a computer program of the cross-time phase light space spectrum characteristic fusion hyperspectral change detection method, which is equipment readable by a computer;
a processor: the method is used for realizing the cross-time-phase lightweight spatial spectrum feature fusion hyperspectral change detection method when the computer program is executed.
The invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program can realize the cross-time-phase lightweight spatial spectrum feature fusion hyperspectral change detection method when being executed by a processor.
The above is only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited by this, and any modification made on the basis of the technical scheme according to the technical idea of the present invention falls within the protection scope of the claims of the present invention.

Claims (9)

1. A cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method is characterized by comprising the following steps of: the method comprises the following steps:
s1, preprocessing hyperspectral image data, and dividing the hyperspectral image data into a training set and a testing set;
s2, constructing a feature extraction network consisting of two point convolution modules and four spatial spectrum feature fusion modules, and extracting image feature information;
s3, constructing a classification network consisting of an attention weighting module, a global average pooling layer and a full connection layer, and classifying the image feature information extracted by the feature extraction network;
step S4, training the feature extraction network constructed in the step S2 and the classification network constructed in the step S3 by using the training set in the step S1 through a gradient descent algorithm, performing precision calculation on the training set in each iteration in the training iteration process, and taking the first-generation network model weight with the highest precision on the training set as the final detection model weight to obtain a trained model;
and S5, inputting the test set in the step S1 into the model trained in the step S4 for testing, obtaining a final detection result, and outputting a predictive label graph of hyperspectral image data according to the detection result.
2. The cross-phase lightweight spatial spectrum feature fusion hyperspectral variation detection method according to claim 1, wherein the method is characterized by comprising the following steps: the implementation step of the step S1 comprises the following steps:
s1.1, acquiring hyperspectral image data, normalizing the acquired hyperspectral image x, and performing linear transformation on the hyperspectral image data to map the hyperspectral image data to [0,1 ]]Between them, obtain normalized hyperspectral imageWherein μ, σ are the mean and variance of the hyperspectral image data, respectively;
step S1.2, setting a sampling window of the hyperspectral image as the space size of a patch block, and sampling a sample containing spectrum and space dimension information from the normalized hyperspectral image obtained in the step S1.1;
and S1.3, sampling by using the window in the step S1.2 to obtain a patch block, taking the label of the central pixel point of the patch block as the label of the patch sample pair, randomly extracting 10% -40% of all the patch sample pairs with labels in the hyperspectral image from the variable pixels and the unchanged pixels respectively as a training set, and taking 60% -90% as a test set for testing.
3. The cross-phase lightweight spatial spectrum feature fusion hyperspectral variation detection method according to claim 1, wherein the method is characterized by comprising the following steps: in the step S2:
the two point convolution modules are used for initially extracting the characteristics of the patch block obtained in the step S1.3, and the four spatial spectrum characteristic fusion modules are sequentially connected in series behind the point convolution modules;
the spatial spectrum feature fusion module consists of a double-branch spatial spectrum feature extraction module and a cross-time-phase feature fusion module, wherein the spatial spectrum feature extraction module is used for extracting spatial spectrum fusion features of hyperspectral images, and the cross-time-phase feature fusion module is used for exploring the correlation feature information among cross-time-phase images;
each branch of the double-branch spatial spectrum characteristic extraction module consists of point convolution and Ghost light convolution; the spatial spectrum feature extraction module adopts a double-branch parallel feature extraction method to respectively extract spectrum and spatial features; the method comprises the steps of carrying out spectral feature extraction by using point convolution, and carrying out spatial feature extraction by using a Ghost module, wherein the specific process is as follows:
wherein F is l In order to input the feature map,representing a point convolution operation, W l Representing a parameter matrix->Extracting features for the spectrum branches;
wherein F is l In order to input the feature map,representing a point convolution operation, W l Representing a parameter matrix->The method is an inherent characteristic diagram of a Ghost module after dot dimension reduction;
wherein,is an inherent characteristic diagramI takes 1 or 2;
wherein F is l+3 Extracting features for spectraAnd spatial extraction features->Is a fusion feature of (2);
the cross-time phase feature fusion module comprises an attention weighting module and a point convolution module; the time-phase-crossing feature fusion module firstly connects different time-phase image features in parallel, the parallel features are subjected to weight adjustment by the attention weighting module, and the weighted features use point convolution to perform time-phase-crossing feature fusion and dimension reduction, and the specific process is as follows:
wherein,image characteristics respectively representing two phases, +.>For parallel operation, F l+1 The characteristics obtained after parallel connection;
wherein,for the ith time phaseIs (are) weighted>The characteristic obtained after the weighting operation of the ith time phase;
wherein,for point convolution for the ith phase, +.>Is the characteristic of the ith time phase after convolution.
4. The cross-phase lightweight spatial spectrum feature fusion hyperspectral variation detection method according to claim 1, wherein the method is characterized by comprising the following steps: in the step S3, a classification network composed of an attention weighting module, a global average pooling layer and a full connection layer is constructed, and the specific process is as follows:
wherein,image features representing two phases, F l+1 The characteristics obtained by subtracting the image characteristics of the two time phases;
wherein,representing weighting modules, F l+2 Representing the weighted features;
F l+3 =GAP(F l+2 )
wherein GAP represents a global average pooling layer, F l+3 Is the feature after pooling;
F out =Liner(F l+3 )
wherein, liner represents a full connection layer, F out A predictive probability distribution for the output;
Y P =argmax(F out )
wherein argmax represents F out Dimension of maximum value, Y P To predict tags.
5. The cross-phase lightweight spatial spectrum feature fusion hyperspectral variation detection method according to claim 1, wherein the method is characterized by comprising the following steps: the specific implementation method of the step S4 is as follows:
s4.1, setting training parameters;
step S4.2, inputting the training set obtained in the step S1 into the feature extraction model constructed in the step S2, and inputting the output of the feature extraction model into the classification network model obtained in the step S3 to obtain a prediction label Y of the model P
Step S4.3, calculating the cross entropy loss of the predicted label and the real label in the step S4.2:
where c represents the number of categories, where c=2,and->The real label and the predictive label are respectively, and N is the number of samples input at a time;
s4.4, calculating model Loss through the cross entropy Loss function obtained in the step S4.3 during iterative optimization to obtain a gradient of the cross entropy Loss on model weightUpdating the weight according to the model weight gradient;
s4.5, calculating the overall classification precision of the current model to all training sets obtained in the step S1 in each iteration; and taking the first generation model weight with the highest classification precision of the training sample in the iteration process as the final model weight.
6. The cross-phase lightweight spatial spectrum feature fusion hyperspectral variation detection method according to claim 1, wherein the method is characterized by comprising the following steps: and 3 to 10 independent reasoning is carried out on the test set in the step S5, and the average value of the prediction precision of the reasoning result is taken as the final prediction precision.
7. A cross-time-phase light-weight space spectrum feature fusion hyperspectral change detection system is characterized in that: comprising the following steps:
and a data processing module: the hyperspectral image processing method is used for preprocessing hyperspectral image data and dividing the hyperspectral image data into a training set and a testing set;
and a network construction module: the method comprises the steps of constructing a feature extraction network consisting of a point convolution and four spatial spectrum feature fusion modules, and constructing a classification network consisting of an attention weighting module, a global average pooling layer and a full connection layer;
and the network training module: the method comprises the steps of training a constructed feature extraction network and a classification network by using a training set and adopting a gradient descent algorithm, performing precision calculation on the training set in each iteration in the training iteration process, and taking the first-generation network model weight with the highest precision on the training set as a final detection model weight to obtain a trained model;
and a network test module: and the test set is used for inputting the test set into the trained model for testing, obtaining a final detection result, and outputting a predictive label graph of hyperspectral image data according to the detection result.
8. A cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection device is characterized in that: comprising the following steps:
a memory: a computer program storing a cross-temporal lightweight spatial spectrum feature fusion hyperspectral variation detection method as claimed in any one of claims 1 to 6, as a computer readable device;
a processor: a cross-phase lightweight spatial spectrum feature fusion hyperspectral variation detection method for implementing any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, characterized by: the computer readable storage medium stores a computer program which, when executed by a processor, can implement a cross-temporal lightweight spatial spectrum feature fusion hyperspectral variation detection method as claimed in any one of claims 1 to 6.
CN202311115889.3A 2023-08-31 2023-08-31 Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium Pending CN117115675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311115889.3A CN117115675A (en) 2023-08-31 2023-08-31 Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311115889.3A CN117115675A (en) 2023-08-31 2023-08-31 Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN117115675A true CN117115675A (en) 2023-11-24

Family

ID=88807365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311115889.3A Pending CN117115675A (en) 2023-08-31 2023-08-31 Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN117115675A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117422711A (en) * 2023-12-14 2024-01-19 武汉理工大学三亚科教创新园 Ocean vortex hyperspectral change detection method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117422711A (en) * 2023-12-14 2024-01-19 武汉理工大学三亚科教创新园 Ocean vortex hyperspectral change detection method, device, equipment and medium
CN117422711B (en) * 2023-12-14 2024-03-26 武汉理工大学三亚科教创新园 Ocean vortex hyperspectral change detection method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN109948693B (en) Hyperspectral image classification method based on superpixel sample expansion and generation countermeasure network
CN107992891B (en) Multispectral remote sensing image change detection method based on spectral vector analysis
Venugopal Automatic semantic segmentation with DeepLab dilated learning network for change detection in remote sensing images
CN103440505B (en) The Classification of hyperspectral remote sensing image method of space neighborhood information weighting
CN110458192B (en) Hyperspectral remote sensing image classification method and system based on visual saliency
CN112580480B (en) Hyperspectral remote sensing image classification method and device
CN112308873B (en) Edge detection method for multi-scale Gabor wavelet PCA fusion image
CN114255403A (en) Optical remote sensing image data processing method and system based on deep learning
CN112115795B (en) Hyperspectral image classification method based on Triple GAN
CN112257741A (en) Method for detecting generative anti-false picture based on complex neural network
CN113887472A (en) Remote sensing image cloud detection method based on cascade color and texture feature attention
CN117115675A (en) Cross-time-phase light-weight spatial spectrum feature fusion hyperspectral change detection method, system, equipment and medium
Ma et al. Multiscale 2-D singular spectrum analysis and principal component analysis for spatial–spectral noise-robust feature extraction and classification of hyperspectral images
CN112733736A (en) Class imbalance hyperspectral image classification method based on enhanced oversampling
CN115187861A (en) Hyperspectral image change detection method and system based on depth twin network
CN116843975A (en) Hyperspectral image classification method combined with spatial pyramid attention mechanism
CN115376010A (en) Hyperspectral remote sensing image classification method
CN112381144B (en) Heterogeneous deep network method for non-European and Euclidean domain space spectrum feature learning
CN112330562B (en) Heterogeneous remote sensing image transformation method and system
CN114299382A (en) Hyperspectral remote sensing image classification method and system
CN114065831A (en) Hyperspectral image classification method based on multi-scale random depth residual error network
Song et al. Using dual-channel CNN to classify hyperspectral image based on spatial-spectral information
CN112784777A (en) Unsupervised hyperspectral image change detection method based on antagonistic learning
CN109460788B (en) Hyperspectral image classification method based on low-rank-sparse information combination network
CN116630700A (en) Remote sensing image classification method based on introduction channel-space attention mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination