High spectrum image sky based on 3DCNN composes joint classification method
Technical field
The invention belongs to remote sensing information process technical fields, are related to a kind of classification method of high spectrum image, and in particular to
A kind of high spectrum image sky spectrum joint classification method based on 3DCNN.
Background technique
High-spectrum remote sensing spectral resolution is high, imaging band is more, contains much information, and obtains extensively in remote sensing application field
Using.Classification hyperspectral imagery technology is highly important content in Hyperspectral imagery processing technology, mainly includes feature extraction
And classification two parts, wherein the extraction feature from former high spectrum image, which influences the nicety of grading of high spectrum image
Huge: the strong robustness of characteristic of division can greatly improve nicety of grading;On the contrary, the poor characteristic of division of robustness then can be bright
It is aobvious to reduce classifying quality.
In recent years, deep learning was made outstanding achievements in terms of feature extraction, to improve classification hyperspectral imagery precision, various depths
Degree model is introduced in the classification of high spectrum image, and on the basis of spectrum signature, introduces space characteristics, utilize depth
Model is practised, the autonomous empty spectrum signature for extracting high spectrum image effectively raises classification hyperspectral imagery precision.
However, existing these extract these methods of high spectrum image sky spectrum signature using depth model, it is empty extracting
The sufficiently complex elder generation of way when spectrum signature generally requires first to carry out former high spectrum image the dimensionality reduction on spectral space, then by dimensionality reduction
Information later obtains sky spectrum signature in conjunction with spectrum information.Dimension-reduction treatment is computationally intensive, and has lost certain spectrum information, influences
Precision.
Summary of the invention
Technical problems to be solved
In order to avoid the shortcomings of the prior art, the present invention proposes a kind of high spectrum image sky spectrum connection based on 3DCNN
Classification method is closed, overcomes and needs to carry out the pretreatment such as complicated spectral space dimensionality reduction when extracting space characteristics, make full use of spectrum information
And spatial information, it is autonomous to extract high spectrum image depth sky spectrum signature in conjunction with the advantage of deep learning autonomous learning, improve classification
Precision.
Technical solution
A kind of high spectrum image sky spectrum joint classification method based on 3DCNN, it is characterised in that steps are as follows:
Step 1: input hyperspectral image data is normalized;
Step 2 takes original empty spectrum signature: adjacent from the n × n × L extracted centered on pixel to be sorted in high spectrum image
Data block P within the scope of domainn×n×L, using the data block as the original empty spectrum signature for the pixel for being located at data block center;
Step 3: in the data containing label extracted in step 2, randomly selecting the number of half or less than half
According to the data as training 3DCNN
Step 4: the network of 3DCNN is constructed, network overall structure is divided into two parts, and first part includes one layer of input layer,
Connection excitation operation layer, excitation operation layer are carried out using unsaturation excitation function ReLU after every layer of convolutional layer of two layers of Three dimensional convolution layer
Excitation operation;Second part includes one layer of full articulamentum, one layer of softmax classification layer;Network overall structure includes seven layers, network
Integral operation include preceding to operation, reversed derivation, convolution kernel updates three parts operation;
Step 5 is trained 3DCNN using training data: stochastic gradient descent method is used in network training data
Training network parameter, the 3DCNN can independently extract the empty spectrum signature of high spectrum image and complete to classify after the completion of training;
Step 6: data to be sorted being inputted into trained 3DCNN, high spectrum image sky is completed and composes joint classification.
Beneficial effect
A kind of high spectrum image sky based on 3DCNN proposed by the present invention composes joint classification method, for high spectrum image
The characteristics of data are three-dimensional structure, the Three dimensional convolution network that building is suitable for high spectrum image complete high spectrum image sky spectrum joint
Classification.Firstly, from original high spectrum image, extract in certain contiguous range using centered on pixel to be sorted data block as
Initial sky spectrum signature, and the 3DCNN network for combining the label training of pixel to be sorted to build.Then, utilization is trained
3DCNN completes high spectrum image sky and composes joint classification.
The beneficial effects of the present invention are: 1) it solves and needs to carry out spectral space dimensionality reduction or pressure in existing sorting technique
The problem of complex process of contracting;2) 3DCNN of the hyperspectral image data suitable for three-dimensional structure is constructed, is on the one hand sufficiently sent out
The ability of the autonomous extraction feature of deep learning has been waved, it is on the other hand autonomous to extract depth characteristic, take full advantage of high spectrum image
Information abundant simultaneously eliminates the trouble for artificially presetting feature;3) the high spectrum image sky based on 3DCNN composes joint classification
Method extends the application range of deep learning, also provides new approaches for classification hyperspectral imagery.4) EO-1 hyperion is improved
Image classification accuracy.
Detailed description of the invention
Fig. 1: the empty spectrum joint hyperspectral image classification method flow chart based on 3DCNN
Specific embodiment
Now in conjunction with embodiment, attached drawing, the invention will be further described:
Step 1 inputs hyperspectral image data, according to formula pairBehaviour is normalized to data
Make.Wherein xijsIndicate a pixel in high spectrum image, i, j respectively indicate the coordinate that the pixel is located in high spectrum image
Position, s indicate that the spectral coverage of high spectrum image, existing high spectrum image generally comprise 100-240 spectral coverage, x··smax、x··smin
Respectively indicating indicates three-dimensional high spectrum image in the maximum value and minimum value of s wave band.
Step 2 extracts original empty spectrum signature, from the certain neighborhood extracted centered on pixel to be sorted in high spectrum image
Data block P in rangen×n×L, n indicates the size of neighborhood block, generally takes 5 or 7, and L indicates spectral coverage sum, data block Pn×n×LIt is n
The three-dimensional structure of × n × L, the data block are the original empty spectrum signatures of the pixel positioned at data block center.
A certain amount of data for containing label are randomly selected in the data that step 3 is extracted from step 2 as training
The data of 3DCNN, the general data for choosing the half or less than half that have label data total amount are as training data.
Step 4 building 3DCNN is simultaneously trained 3DCNN using training data.Network overall structure is divided into two parts, the
A part includes one layer of input layer, and (first layer convolutional layer includes 2 three dimensional convolution kernels, second layer convolution to two layers of Three dimensional convolution layer
Layer includes four three dimensional convolution kernels, and the Spatial Dimension of every layer of convolution kernel is set as 3, and spectral Dimensions are set as 2-9), after every layer of convolutional layer
Connection excitation operation layer, excitation operation layer carry out excitation operation using unsaturation excitation function ReLU, and it includes five which, which has altogether,
Layer network.Second part includes one layer of full articulamentum, and one layer of softmax classification layer, network overall structure includes seven layers.Network
Integral operation mainly include before to operation, reversed derivation, convolution kernel updates three parts operation:
4a) forward direction operation is broadly divided into before convolutional layer to operation, to operation before excitation function, to operation three before classifier
Point, wherein to the formula of operation before middle convolutional layer are as follows:
After indicating convolution algorithm, i-th layer of network, jth opens the value of position (x, y, z) on characteristic pattern.Pi、Qi、RiTable
Showing the size of convolution kernel space dimension and spectrum dimension, k indicates convolution kernel,I-th layer of network of expression is without the number before convolution operation
According to.
The forward direction operation of convolutional layer is completed before utilizing unsaturated excitation function ReLU to complete excitation later to operation, formula
Are as follows:
The value of the position (x, y, z) after excitation operation, to the formula of operation before final step classifier are as follows:
C indicates the number of the true classification of current sample data in formula, and a shared D indicates classification sum
4b) reversed derivation corresponds to preceding to operation, also comprising the derivation to convolutional layer, the derivation to excitation function, to point
The derivation of class device.It is according to the mathematical formulae on basis to operational formula derivation to before operational formula and excitation function to before convolutional layer
It can derive, the practical form that convolution is generally taken during writing code completes the derivation process of convolutional layer, third portion
Divide the derivation formula to classifier are as follows:
OD=cIt indicates that teacher signal is the one-dimensional vector that dimension is D, is d in current true class number, is i.e. is taken at d=c
Value be 1 remaining value is 0. everywhere
4c) convolution kernel update is completed in reversed derivative operation, and the local derviation for calculating convolution kernel later carries out convolution kernel
The single stepping of update, more new formula are as follows:
kl+1=kl+vl+1
L indicates the number of iterations, and ε indicates that learning rate, learning rate generally choose 0.01.
Step 5, using stochastic gradient descent method training network parameter, takes 20-100 in network training data at random every time
A sample, the quantity for randomly selecting sample every time are generally to choose data to be sorted depending on the classification number of data to be sorted
The integral multiple of classification number, the 3DCNN can independently extract the empty spectrum signature of high spectrum image and complete to classify after training is completed.
Data to be sorted are inputted trained 3DCNN by step 6, are completed high spectrum image sky and are composed joint classification.