Hyperspectral image classification method based on proxy-assisted multi-objective evolutionary neural architecture search
Through the agent-assisted multi-objective evolutionary neural architecture search method, an efficient convolutional neural network is automatically designed, solving the problems of manual design complexity and computing resource consumption, achieving high-precision and efficient hyperspectral image classification, and adapting to multi-scale features. extract.
Patent Information
- Application Number
- CN202410686902.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Among the existing hyperspectral image classification methods, the artificially designed neural network architecture is complex and inefficient, consumes a lot of computing resources, and is difficult to meet the requirements of high classification accuracy and high computing efficiency, and the existing technology cannot effectively search the input image block size and size of the model. Spectral dimension affects classification accuracy.
Using a method based on agent-assisted multi-objective evolutionary neural architecture search, through tree chromosome encoding and GIN agent models, a convolutional neural network model that meets high classification accuracy and high computational efficiency is automatically designed, reducing network model complexity and calculation time, and enhancing Feature extraction and multi-scale feature fusion capabilities.
It achieves high classification accuracy while greatly reducing the calculation time of evolutionary optimization, avoiding errors and complexity caused by manual design, improving the efficiency and accuracy of the model, adapting to neural network structures of different depths, and suitable for hyperspectral images. Multi-scale feature extraction.
Smart Images

Figure CN118658060A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hyperspectral image classification, and in particular relates to a hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search. Background Art
[0002] In recent years, hyperspectral images have been widely used in geological exploration, agriculture and other fields. With the large-scale generation of hyperspectral images, the industry has raised new challenges to the task of land object classification.
[0003] The patent application document with the publication number CN109376804A proposes a hyperspectral remote sensing image classification method based on the attention mechanism and convolutional neural network. This method uses an artificially constructed convolutional neural network to solve the hyperspectral image classification problem. The steps of this method are as follows: (1) using the principal component analysis method to divide and sample the original hyperspectral image; (2) performing 3D convolution and pooling operations on the sample blocks to obtain feature maps; (3) passing the feature maps through the spectral and spatial attention modules, and performing 3D convolution and pooling operations again; (4) inputting the final feature maps into the classifier to complete the hyperspectral image classification. This method improves the classification accuracy of hyperspectral images. However, this scheme uses artificially designed neural networks to achieve classification, which has high requirements on the designer's model design experience and hyperspectral related knowledge. For different hyperspectral images, the workload of artificially designing the neural network architecture is too large, and the artificially designed neural network architecture is prone to structural redundancy and human errors, affecting the classification efficiency and classification accuracy.
[0004] The patent application document with publication number CN114882294A proposes a multi-objective evolutionary convolutional neural network for hyperspectral image classification. The method uses a tree-shaped multi-branch super network structure as the basic structure of the network block to realize the extraction and fusion of multi-scale features, and at the same time encodes the size of the input image block and the spectral dimension of the input image block. The classification accuracy and network complexity are simultaneously used as optimization targets to realize the search for a convolutional neural network with high classification accuracy and low network structure complexity. The specific implementation steps include: (1) initializing architecture information and encoding the convolutional neural network to be constructed; (2) generating a data set of gene individuals and using principal component analysis PCA to reduce the dimension of the input spectrum; (3) constructing a convolutional neural network corresponding to each gene individual in the population and training it; (4) calculating two fitness of the convolutional neural network and performing crossover and mutation on the individuals in the population; (5) taking the population with the maximum number of iterations as the optimal population, and taking the convolutional neural network corresponding to the gene individual with the highest classification accuracy in the optimal population as the optimal convolutional neural network and performing hyperspectral image classification. However, this method requires a large amount of network model training and evaluation during the multi-objective evolution process, which leads to huge consumption of computing resources and low search efficiency.
[0005] The patent application document with application publication number CN 113780146 A proposes a lightweight neural architecture search technology for hyperspectral image classification. The technology constructs a super network composed of modular lightweight operations, optimizes it using a double-layer gradient optimization method, and uses a sub-network weight sharing mechanism to improve the model search efficiency. The specific implementation steps include: (1) defining a unit-based search space, constructing a super network by superimposing multiple repeated units, and setting a series of candidate operations; (2) training the constructed super network using a selected training sample set to obtain a lightweight deep neural network architecture suitable for hyperspectral image classification; (3) training the obtained lightweight deep neural network architecture using a training set and verifying it using a test set. Once the predicted label of the test sample meets the predetermined condition, the hyperspectral remote sensing image to be classified is input into the trained lightweight deep neural network architecture to obtain the classification result. This technology effectively solves the limitations of manually designed convolutional neural networks and further improves the classification accuracy. However, the gradient-based neural network structure search method used in the prior art requires large computing resources and is difficult to apply in practical problems. In addition, the technology cannot search the size and spectral dimension of the input image blocks of the model, which will affect the classification accuracy of the model to a certain extent.
[0006] Chaochao Zhang et al. proposed a hyperspectral image classification method based on deep learning architecture search based on particle swarm optimization in their paper "Particle Swarm Optimization Based Deep Learning Architecture Search for Hyperspectral Image Classification" (IGARSS 2020-2020IEEE International Geoscience and Remote Sensing Symposium, 2020, pp.509-512). This method uses a particle swarm optimization algorithm to implement a unit-based CNN architecture search method. The steps of this method are: (1) establishing a unit-based search space framework; (2) using a direct encoding method to map the architecture to particles; (3) using the particle swarm algorithm to search for the optimal deep learning architecture in the particle swarm. This method shows excellent performance on two commonly used hyperspectral image datasets. The prior art is a hyperspectral image classification method based on deep learning architecture search based on particle swarm optimization. This method can only extract features of a single scale, and the feature extraction ability of the model is limited, which directly affects its classification accuracy. Although this method reduces the search time, it has little advantage on complex data sets. During the search process, a large number of model evaluations will consume huge computing resources, resulting in low search efficiency. Summary of the invention
[0007] In order to overcome the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search. By adopting classification accuracy and floating-point number calculation complexity as environmental selection targets at the same time, a network model that meets high classification accuracy and high calculation efficiency can be automatically designed, reducing the complexity of the network model and reducing the calculation time of the network model; through an agent-assisted scheme of a nonlinear convolutional neural network, the tree chromosome encoding is converted into graph representation data and embedded in the GIN agent model, thereby improving the classification accuracy and reducing the evolutionary optimization time; by taking the tree subnet as the basic unit of the architecture search space, the feature extraction capability and the multi-scale feature fusion capability can be enhanced; by optimizing the convolutional neural network under multi-objective indicators through an evolutionary algorithm, the high cost and structural redundancy of the artificially designed convolutional neural network can be solved, the classification accuracy can be improved, and the complexity of the network structure can be reduced; by designing crossover and mutation operators based on tree data structures and multi-objective environmental selection, the network depth and chromosome genes can be adaptively adjusted, the algorithm search capability can be enhanced, and the classification efficiency can be improved.
[0008] In order to achieve the above object, the technical solution adopted by the present invention is:
[0009] A hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search, comprising the following steps:
[0010] S1. Initialize neural architecture information:
[0011] A tree-shaped multi-branch supernet is used as the basic unit of the search space, and a tree-based data structure encoding strategy is used to mix the proxy model parameters and structures into a tree chromosome. Three tree subnets are set in the initial search space, and the three tree subnets form the high-level network architecture of the search.
[0012] S2. Generate training and validation sets for each tree chromosome:
[0013] The principal component analysis method PCA is used to reduce the dimensionality of the input spectrum of the hyperspectral image to be classified and denoise it. The ground object label of the central pixel of each image block in the hyperspectral image after dimensionality reduction and denoising is used as the input data label, and all image blocks are divided into training set and validation set according to the preset ratio.
[0014] S3. Construct a convolutional neural network based on the tree chromosome generated in step S1:
[0015] Traverse all nodes of the first branch of the tree encoding, generate a convolution layer for each node, connect the convolution layers to generate a branch network, connect all branch subnetworks in parallel, build the first tree network block, aggregate the outputs of all branch subnetworks as the output of the first tree network block; decode other attributes contained in the network from the root node features, and complete the integration of the tree network block according to these attribute encodings; build all tree network blocks, connect the input and output of all tree network blocks, and finally obtain the convolutional neural network corresponding to the tree chromosome;
[0016] S4. Agent model assisted multi-objective evolutionary search:
[0017] The chromosome population P encoded by the random initialization step S1 n , initialize the maximum number of iterations, population size, the accuracy tau of the proxy model on the proxy database R and the elite population P n ′, if the conditional accuracy tau < 0.9 is met, use the convolutional neural network construction method in step S3 to construct the population P n The corresponding convolutional neural network uses the training set and validation set divided in step S2 to train the population P n The corresponding convolutional neural network is actually trained and evaluated, and the classification accuracy is obtained. The data set is added to the proxy database R, and the proxy database R is divided into proxy training sets in proportion. and proxy test set Using a Proxy Training Set Train the GIN proxy model on the proxy test set The upper test accuracy tau, if the condition is not met, the GIN proxy model is used to predict the population P n The fitness of {y1,y2,..,y N}; Calculate the population P n The floating point operation complexity fitness of {q1,q2,..,q N}; Combine parent population and elite population;
[0018] S5, using a multi-objective selection algorithm to select a new elite population for the parent population and the elite population combined in step S4;
[0019] S6, performing a crossover operation on the new elite population in step S5 according to probability to generate a crossover population;
[0020] S7, performing mutation operation on the individuals in the crossover population obtained in step S6, and forming a mutation population with all the mutant offspring;
[0021] S8, using the mutant population obtained in step S7 as the next generation population;
[0022] S9, iterating the population obtained in step S8, if the current number of iterations is equal to the maximum number of iterations, taking the current iterated population as the optimal population, and performing real training evaluation on the optimal population, and selecting the convolutional neural network corresponding to the individual with the highest classification accuracy as the optimal convolutional neural network;
[0023] S10, input the hyperspectral image to be classified into the trained optimal convolutional neural network selected in step S9, obtain the final classification result, and calculate the classification accuracy of the convolutional neural network for all samples to be classified in the hyperspectral image, and output the corresponding classification accuracy as the result.
[0024] Specifically, the hybrid encoding method in step S1 is:
[0025] First, the number of branches of each tree subnetwork is initialized. In the initial search space, each tree subnetwork has at most three branches. Then, the nodes of each branch are initialized. Each branch has at most three nodes at the time of initialization. The tree chromosome includes the root node and other nodes. The characteristics of the root node include: the number of subnetwork output channels, the jump connection flag, the downsampling operation and the attention model information. The characteristics of other nodes include: the number of convolutional layer output channels, the convolution operation type and the convolution kernel size.
[0026] Specifically, the specific steps of generating the training set and the validation set in step S2 are:
[0027] S201, using principal component analysis (PCA) to reduce the dimensionality of the input spectrum of the hyperspectral image to be classified and remove noise, so that its spectrum dimension is equal to the input spectrum dimension corresponding to the gene individual;
[0028] S202, taking each labeled pixel in the hyperspectral image after dimensionality reduction and denoising in step S201 as the center, intercepting a rectangular block of the pixel, the width and height of the rectangular block are equal to the image block size corresponding to the gene individual, and the label of the central pixel is used as the label of the rectangular block, all image blocks are divided into training set and verification set according to a preset ratio, and the accuracy calculation formula of the model classification result on the verification set is:
[0029]
[0030] Among them, A c The network model corresponding to the tree chromosome encoding c, |D Test | represents the size of the validation set, X i is the i-th image block data in the verification data set, y i is the object category label of the ith image block, F(·) is the prediction result output by the network model, and the function equal(·) is used to compare the difference between the prediction result and the true label. When the predicted value is the same as the true label, its value is equal to 1.
[0031] Specifically, the step S4 is as follows:
[0032] S401, randomly initialize the chromosome population P encoded in step S1 n , initialize the maximum number of iterations M, the population size N, the accuracy of the proxy model on the proxy database R tau = 0 and the elite population
[0033] S402: If the conditional accuracy tau < 0.9 is met, use the convolutional neural network construction method in step S3 to construct the population P n The corresponding convolutional neural network uses the training set and validation set divided in step S202 to train the population P n The corresponding convolutional neural network is actually trained and evaluated, and the classification accuracy is obtained and then the dataset is added to the proxy database R; the tree chromosome encoding is converted into graph data available for GIN, and the tree chromosome encoding is used to obtain the graph node representation according to the node generation sequence number. The adjacency matrix and node features are generated according to the tree branch connection, root node attributes and other node attributes. For the attribute information of all nodes, binary encoding is used to convert it into node features to enrich the amount of information embedded in the graph representation; the proxy database R is divided into proxy training sets in proportion and proxy test set Using a Proxy Training Set Train the GIN proxy model on the proxy test set The test accuracy is tau; the GIN-based proxy model adopts a double-end input and weight sharing structure. In each batch of training data, the input model is combined in pairs to learn the sorting information; in training, SME-TCNN uses a loss function that emphasizes pairwise sorting learning
[0034]
[0035] γ(θ)=log(1+e -θ )
[0036] Among them, w is a learnable parameter, n is the batch data size, c is the tree chromosome, y is the true classification accuracy corresponding to the chromosome, g(·) is the prediction accuracy of the proxy model output, and γ(·) is the logistic regression function. λ is used as the proportional parameter of the ranking loss and the MSE loss. According to the output of GIN, the prediction accuracy of GIN for the fitness ranking of the current batch data is calculated. The formula is:
[0037]
[0038] Among them, the function rank(·) indicates whether the ranking relationship predicted by the proxy model and the actual ranking relationship of a pair of chromosome data match. It is 1 when the relationship matches and 0 when the relationship contradicts.
[0039] S403. If the conditions are not met, use the GIN proxy model to predict the population P n The fitness of {y1,y2,..,y N}, the input processing of the GIN proxy model is the same as step S402;
[0040] S404, calculate population P n The floating point operation complexity fitness of {q1,q2,..,q N}, combined parent population and elite population; population P n The calculation formula of the floating point operation complexity fitness is:
[0041]
[0042] Among them, flops c is the number of floating point operations calculated by the real neural network model corresponding to the tree chromosome c after one forward inference, flops max and flops min They represent the maximum and minimum number of floating-point operations in all chromosomes of the current population, respectively. H and W are the width and height of the input data. K, C inand C out They are the convolution kernel size of the convolution layer, the dimensions of the input and output channels, and I and U represent the dimensions of the input and output of the fully connected layer.
[0043] Specifically, in step S6, the crossover operation performed on the population is specifically as follows:
[0044] S601. Randomly select two chromosome individuals corresponding to the convolutional neural network to be optimized from the parent population of the current iteration;
[0045] S602, perform a crossover operation on the two selected chromosome individuals according to the crossover probability cp, generate a random number that satisfies a 0-1 uniform distribution for each pair of selected chromosome individuals, if the random number is less than cp, 0≤cp≤1, for the first tree of the parent generation, randomly select and exchange branches from the two parent chromosomes; for all branches in the same tree subnet, the number of output channels of the convolutional layer of the leaf node needs to be re-set according to the attributes of the root node;
[0046] S603, determine whether all chromosome individuals have been selected in the parent population after the current iteration. If so, form a crossover population with all chromosome individuals obtained through the above crossover operation in the parent population after the current iteration and then execute step S7; otherwise, execute step S601.
[0047] Specifically, in step S7, the mutation operation performed on the population is specifically as follows:
[0048] S701, performing mutation operation on the chromosome individuals in the crossover population in step S603 according to probability; generating a random number satisfying 0-1 uniform distribution for each selected chromosome individual, and if the random number is less than mp, 0≤mp≤1, performing mutation operation on the chromosome;
[0049] S702, all the chromosome individuals obtained through the above mutation operation in the crossover population of step S603 are combined into a mutation population.
[0050] In step S3, all nodes of the first branch of the tree encoding are traversed, and a convolution layer is generated for each node. The convolution operation types include 3D separable convolution and ordinary 3D convolution. The convolution kernel sizes include three sizes of {3×3, 5×5, 7×7}, and the value range of the number of output channels of the convolution layer is {16, 32, 48, 64}.
[0051] The aggregation method in step S3 includes: summation, weighted summation or spectral dimension splicing.
[0052] In the root node feature decoded in step S3, the number of subnet output channels refers to the convolution output of all leaf nodes of the current subtree, which is used to aggregate the results of all branches, and the value range is {16, 32, 48, 64}.
[0053] The mutation operation in step S701 includes any one of the following (1)-(5):
[0054] (1) Deleting randomly selected branches, if this results in a tree without any branches, generates new branches by randomly selecting new nodes from the search space;
[0055] (2) Generate a new branch containing three nodes, where the nodes are randomly selected from the search space;
[0056] (3) A new node is added to the branch of the tree, and the convolution kernel size and the number of output channels of the new node are randomly selected from the search space;
[0057] (4) Delete a node from a branch of the tree;
[0058] (5) The value of the skip connection flag is inverted and a skip connection is added.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] (1) At present, most hyperspectral image classification models are obtained through manual design, which has high requirements on the designer's model design experience and hyperspectral related knowledge, and the errors caused by manual design are not conducive to improving the classification accuracy of the model. To solve this problem, a neural network structure search method designed in the present invention automatically designs a neural network structure on a hyperspectral image by encoding, evolving and decoding the network in a defined search space, thereby reducing the requirements and errors of manual design.
[0061] (2) The prior art only considers the classification accuracy of the model. As the industry's requirements for hyperspectral image classification models become increasingly higher, the classification efficiency of the model is receiving more and more attention. The present invention designs a multi-objective neural network structure search method that uses classification accuracy and floating-point calculation complexity as environmental selection targets at the same time, so that individuals with both fitness levels are retained, and a network model that meets both high classification accuracy and high calculation efficiency is automatically designed. It avoids the human errors caused by manually constructing convolutional neural networks, solves the problem of excessive complexity of the network model and excessive demand for computing resources caused by single-objective search, and simplifies the complexity of the network model as much as possible while ensuring the high classification accuracy of the model, which has the advantages of reducing the complexity of the network model and reducing the calculation time of the network model.
[0062] (3) In the neural network structure search, the performance of a large number of network models needs to be evaluated, and the computing resources consumed are very huge. As the industry's requirements for hyperspectral image classification models become higher and higher, the search efficiency of the model is increasingly valued. The present invention designs a proxy-assisted neural network structure search method, which converts the tree chromosome encoding into graph representation data and embeds it into the GIN proxy model through a proxy-assisted scheme of a nonlinear convolutional neural network, and fits the classification accuracy labels of the chromosome corresponding network based on the idea of pairwise sorting. Under the premise of ensuring the high classification accuracy of the model, the model evaluation is reduced as much as possible, and the model performance is directly predicted. Finally, high classification accuracy is achieved while greatly reducing the calculation time of evolutionary optimization, which has the advantages of reducing costs and saving computing resources.
[0063] (4) Most existing models adopt a sequential series structure, which lacks the ability to extract multi-scale features of hyperspectral images, thus affecting the classification accuracy of the model. The present invention adopts a tree-shaped multi-branch network structure to extract multi-scale features from hyperspectral images, and uses the tree subnet as the basic unit of the architecture search space. Each tree subnet contains multiple branches, and each branch consists of multiple nodes, which are encoded as convolutional layers of convolutional neural networks. The tree network has a strong ability to extract multi-branch features. The scheme of adding attention weights to the output of each branch helps to fuse multi-scale features, and multi-scale fusion of the features of each branch is performed, thereby improving the feature extraction ability of the model.
[0064] (5) The existing neural network structure search method for hyperspectral image classification cannot search the input resolution of the model, and the input resolution determines how much effective information the input image provides to the model. An unsuitable input resolution cannot provide the amount of information required by the model, resulting in low classification accuracy. The present invention designs a neural network structure search method based on evolutionary computing, which incorporates the input resolution in discrete space into the search space, and designs crossover and mutation operators so that individuals can obtain neural network models of different depths through crossover and mutation operations, adaptively adjust the network depth, and improve the network search capability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 This is a schematic diagram of the chromosome decoding network of the present invention.
[0066] Figure 2 It is a schematic diagram of the graph representation embedding and GIN proxy model training of the tree encoding of the present invention.
[0067] Figure 3 It is a schematic diagram of the chromosome crossover operator of the present invention.
[0068] Figure 4 is a schematic diagram of the chromosome mutation operator of the present invention, wherein, Figure 4(a) is the parent tree encoding graph, Figure 4 (b) is the deleted branch graph, Figure 4 (c) is to add a branch diagram, Figure 4 (d) is to add a node graph, Figure 4 (e) is the deleted node graph, Figure 4 (f) is the graph with added skip connections.
[0069] FIG5 is a diagram showing the classification results of the Indian Pines hyperspectral image by the present invention and the prior art, wherein FIG5(a) is a true annotation diagram, FIG5(b) is a diagram showing the classification results of the present invention, FIG5(c) is a diagram showing the classification results of AE-CNN, and FIG5(d) is a diagram showing the classification results of 3-D-ANAS.
[0070] FIG6 is a diagram showing the classification results of the present invention and the prior art for the PaviaU hyperspectral image, wherein FIG6(a) is a true annotation diagram, FIG6(b) is a diagram showing the classification results of the present invention, FIG6(c) is a diagram showing the classification results of AE-CNN, and FIG6(d) is a diagram showing the classification results of 3-D-ANAS.
[0071] FIG7 is a diagram showing the classification results of the Houston 2013 hyperspectral image by the present invention and the prior art, wherein FIG7(a) is a true annotation diagram, FIG7(b) is a diagram showing the classification results of the present invention, FIG7(c) is a diagram showing the classification results of AE-CNN, and FIG7(d) is a diagram showing the classification results of 3-D-ANAS. DETAILED DESCRIPTION
[0072] The technical solution adopted by the present invention is further introduced below in conjunction with the accompanying drawings.
[0073] A hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search, comprising the following steps:
[0074] like Figure 1 As shown, S1, initialize neural architecture information:
[0075] The present invention adopts a tree-shaped multi-branch supernet as the basic unit of the search space, and uses a coding strategy based on the tree data structure to mix and encode the proxy model parameters and structure into a tree-shaped chromosome. Three tree-shaped subnets are set in the initial search space. The three tree-shaped subnets constitute the high-level network architecture of the search, and the chromosomes are randomly initialized from the search space to form the initial population.
[0076] Specifically, the hybrid encoding method in step S1 is:
[0077] First, the number of branches of each tree subnetwork is initialized. In the initial search space, each tree subnetwork has at most three branches; then the nodes of each branch are initialized. Each branch has at most three nodes at the time of initialization. The tree chromosome includes the root node and other nodes. The root node and other nodes of the tree chromosome contain different features. The features of the root node include: the number of subnetwork output channels, skip connection flags, downsampling operations, and attention model information; the features of other nodes include: the number of convolutional layer output channels, convolution operation types, and convolution kernel sizes; the depth and width of the tree encoding corresponding model can be adaptively adjusted according to the tree depth and the number of tree branches.
[0078] S2. Generate training and validation sets for each tree chromosome:
[0079] The principal component analysis (PCA) method is used to reduce the dimensionality of the input spectral dimension of the hyperspectral image to be classified and denoise it. The object label of the central pixel of each image block in the hyperspectral image after dimensionality reduction and denoising is used as the input data label, and all image blocks are divided into training set and validation set according to a preset ratio.
[0080] Specifically, the specific steps for generating the training set and the validation set in step S2 are:
[0081] S201, using principal component analysis (PCA) to reduce the dimensionality of the input spectrum of the hyperspectral image to be classified and remove noise, so that its spectrum dimension is equal to the input spectrum dimension corresponding to the gene individual;
[0082] S202, taking each labeled pixel in the hyperspectral image after dimensionality reduction and denoising in step S201 as the center, intercepting a rectangular block of the pixel, the width and height of the rectangular block are equal to the image block size corresponding to the gene individual, and the label of the central pixel is used as the label of the rectangular block, all image blocks are divided into training set and verification set according to a preset ratio, and the accuracy calculation formula of the model classification result on the verification set is:
[0083]
[0084] Among them, A c The network model corresponding to the tree chromosome encoding c, |D Test | represents the size of the validation set, X i is the i-th image block data in the verification data set, y i is the object category label of the ith image block, F(·) is the prediction result output by the network model, and the function equal(·) is used to compare the difference between the prediction result and the true label. When the predicted value is the same as the true label, its value is equal to 1.
[0085] S3. Construct a convolutional neural network based on the tree chromosome generated in step S1:
[0086] Traverse all nodes of the first branch of the tree code, generate a convolution layer for each node, connect the convolution layers to generate a branch network, connect all branch subnetworks in parallel to build the first tree network block, and aggregate the outputs of all branch subnetworks as the output of the first tree network block; decode other attributes contained in the network from the root node features, and complete the integration of the tree network block according to these attribute encodings; build multiple tree network blocks, connect the input and output of all tree network blocks, and finally obtain the convolution neural network corresponding to the tree chromosome;
[0087] Specifically, step S3 is as follows:
[0088] S301, traverse all nodes of the first branch of the tree encoding, generate a convolution layer for each node, the convolution operation types include 3D separable convolution and ordinary 3D convolution, the convolution kernel size includes three sizes of {3×3, 5×5, 7×7}, and the value range of the number of output channels of the convolution layer is {16, 32, 48, 64};
[0089] S302, connecting the convolutional layers generated in step S301 to generate a branch network, and connecting all branch subnetworks in parallel to construct a first tree network block, and the outputs of all branch subnetworks are aggregated as the output of the first tree network block;
[0090] Aggregation methods include: summation, weighted summation, or spectral dimension concatenation;
[0091] S303, decoding other attributes contained in the network from the root node features, and completing the integration of the tree-shaped sub-network blocks according to these attribute encodings;
[0092] Among them, in the root node feature decoded in step S303, the number of subnet output channels refers to the convolution output of all leaf nodes of the current subtree, which is used to aggregate the results of all branches, and the value range is {16, 32, 48, 64}; the attention model information refers to adding an attention module in the current subnet according to the encoding to increase the weight of more valuable features, thereby improving the feature extraction ability of the model, including a spatial attention module, a channel attention module and a spatial-channel attention module; the downsampling operation includes averaging and maximum pooling; the jump connection flag indicates whether to add a residual connection between the input and output of the network block, which is represented by a Boolean value. The tree-shaped multi-branch super network extracts features of different scales through multiple branches, which can overcome the disadvantage of weak feature extraction ability of a single scale, and has the advantages of enhancing the feature extraction ability of the network and improving classification accuracy.
[0093] S304, executing steps S301 to S303 multiple times, building all tree network blocks, connecting the input and output of all tree network blocks, and finally obtaining a hyperspectral image classification network model corresponding to the tree chromosome.
[0094] like Figure 2 As shown in S4, agent model assisted multi-objective evolutionary search:
[0095] The chromosome population P encoded by the random initialization step S1 n , initialize the maximum number of iterations, population size, the accuracy tau of the proxy model on the proxy database R and the elite population P n ′, if the conditional accuracy tau < 0.9 is met, use the convolutional neural network construction method in step S3 to construct the population P n The corresponding convolutional neural network uses the training set and validation set divided in step S2 to train the population P n The corresponding convolutional neural network is actually trained and evaluated, and the classification accuracy is obtained. The data set is added to the proxy database R, and the proxy database R is divided into proxy training sets in proportion. and proxy test set Using a Proxy Training Set Train the GIN proxy model on the proxy test set The upper test accuracy tau, if the condition is not met, the GIN proxy model is used to predict the population P n The fitness of {y1,y2,..,y N}; Calculate the population P n The floating point operation complexity fitness of {q1,q2,..,q N}; Combine the parent population and the elite population.
[0096] Specifically, step S4 is as follows:
[0097] S401, randomly initialize the chromosome population P encoded in step S1 n , initialize the maximum number of iterations M, the population size N, the accuracy of the proxy model on the proxy database R tau = 0 and the elite population
[0098] S402: If the conditional accuracy tau < 0.9 is met, use the convolutional neural network construction method in step S3 to construct the population P n The corresponding convolutional neural network uses the training set and validation set divided in step S202 to train the population P nThe corresponding convolutional neural network is trained and evaluated, and the classification accuracy is obtained. The data set is added to the proxy database R; the tree chromosome encoding is converted into graph data that can be used by GIN. Since GIN can input graphs of different sizes, the three trees are directly generated according to the node generation sequence to obtain the graph node representation. Then, the adjacency matrix and node features are generated according to the tree branch connection, root node attributes and other node attributes. For the attribute information of all nodes, binary encoding needs to be converted into node features to enrich the amount of information embedded in the graph representation and improve the feature extraction performance of GIN for tree chromosomes. The proxy database R is divided into proxy training sets in proportion. and proxy test set Using a Proxy Training Set Train the GIN proxy model on the proxy test set The test accuracy is tau; the GIN-based proxy model adopts a double-end input and weight sharing structure. In each batch of training data, the input model is combined in pairs to learn the sorting information; in training, SME-TCNN uses a loss function that emphasizes pairwise sorting learning
[0099]
[0100] γ(θ)=log(1+e -θ )
[0101] Among them, w is a learnable parameter, n is the batch data size, c is the tree chromosome, y is the true classification accuracy corresponding to the chromosome, g(·) is the prediction accuracy of the proxy model output, and γ(·) is the logistic regression function. In order to smooth the output of GIN, λ is used as the proportional parameter of the ranking loss and the MSE loss. According to the output of GIN, the prediction accuracy of GIN for the fitness ranking of the current batch data can be calculated. The formula is:
[0102]
[0103] Among them, the function rank(·) indicates whether the ranking relationship predicted by the proxy model and the actual ranking relationship of a pair of chromosome data match. It is 1 when the relationship matches and 0 when the relationship contradicts.
[0104] S403. If the conditions are not met, use the GIN proxy model to predict the population P n The fitness of {y1,y2,..,y N}, the input processing of the GIN proxy model is the same as step S402;
[0105] S404, calculate population P n The floating point operation complexity fitness of {q1,q2,..,q N}. Combine the parent population and the elite population; population P n The calculation formula of the floating point operation complexity fitness is:
[0106]
[0107] Among them, flops c is the number of floating point operations calculated by the real neural network model corresponding to the tree chromosome c after one forward inference, flops max and flops min They represent the maximum and minimum number of floating-point operations in all chromosomes of the current population, respectively. H and W are the width and height of the input data. K, C in and C out They are the convolution kernel size of the convolution layer, the dimensions of the input and output channels, and I and U represent the dimensions of the input and output of the fully connected layer.
[0108] S5. For the parent population and elite population combined in step S4, a new elite population is selected using a multi-objective selection algorithm.
[0109] like Figure 3 As shown, S6, performing a crossover operation on the new elite population in step S5 according to probability to generate a crossover population;
[0110] Specifically, in step S6, the crossover operation performed on the population is specifically as follows:
[0111] S601. Randomly select two chromosome individuals corresponding to the convolutional neural network to be optimized from the parent population of the current iteration;
[0112] S602, perform a crossover operation on the two selected chromosome individuals according to the crossover probability cp, generate a random number that satisfies a 0-1 uniform distribution for each pair of selected chromosome individuals, if the random number is less than cp, 0≤cp≤1, for the first tree of the parent generation, randomly select and exchange branches from the two parent chromosomes; for all branches in the same tree subnet, the number of output channels of the convolutional layer of the leaf node needs to be re-set according to the attributes of the root node;
[0113] S603, determine whether all chromosome individuals have been selected in the parent population after the current iteration. If so, form a crossover population with all chromosome individuals obtained through the above crossover operation in the parent population after the current iteration and then execute step S7; otherwise, execute step S601.
[0114] like Figure 4 As shown, S7, perform mutation operation on the individuals in the crossover population obtained in step S6, and form a mutation population with all the mutant offspring.
[0115] Specifically, in step S7, the mutation operation performed on the population is specifically as follows:
[0116] S701, performing mutation operation on the chromosome individuals in the crossover population in step S603 according to probability; generating a random number satisfying 0-1 uniform distribution for each selected chromosome individual, and if the random number is less than mp, 0≤mp≤1, performing mutation operation on the chromosome;
[0117] The mutation operation in step S701 includes any one of the following (1)-(5):
[0118] (1) Delete randomly selected branches. If this operation results in a tree without any branches, generate new branches by randomly selecting new nodes from the search space.
[0119] (2) Generate a new branch containing three nodes, where the nodes are randomly selected from the search space;
[0120] (3) A new node is added to the branch of the tree, and the convolution kernel size and the number of output channels of the new node are randomly selected from the search space;
[0121] (4) Delete a node from a branch of the tree;
[0122] (5) The value of the skip connection flag is inverted and a skip connection is added.
[0123] S702, all the chromosome individuals obtained through the above mutation operation in the crossover population of step S603 are combined into a mutation population.
[0124] S8. Use the mutant population obtained in step S7 as the next generation population.
[0125] S9. Iterate the population obtained in step S8. If the current number of iterations is equal to the maximum number of iterations, take the current iterative population as the optimal population, and conduct a real training evaluation on the optimal population, and select the convolutional neural network corresponding to the individual with the highest classification accuracy as the optimal convolutional neural network.
[0126] S10, input the hyperspectral image to be classified into the trained optimal convolutional neural network selected in step S9, obtain the final classification result, and calculate the classification accuracy of the convolutional neural network for all samples to be classified in the hyperspectral image, and output the corresponding classification accuracy as the result.
[0127] The advantages of the present invention are:
[0128] (1) The present invention uses three tree-shaped hybrid coding subnets to represent the convolutional neural network, and uses multi-objective selection, crossover, and mutation to iteratively update the population. The evolutionary algorithm is used to optimize the convolutional neural network under multi-objective indicators, which solves the problems of high cost and structural redundancy caused by the artificial design of convolutional neural networks in the prior art, and has the advantages of improving classification accuracy and reducing the complexity of network structure.
[0129] (2) The present invention uses classification accuracy and floating-point number calculation complexity as the environment selection target at the same time, so that individuals with both fitness levels are retained, and a network model that meets high classification accuracy and high calculation efficiency is automatically designed. This avoids the human error caused by manually constructing a convolutional neural network, solves the problem of high complexity of the network model and excessive demand for computing resources caused by single-target search, and has the advantages of reducing the complexity of the network model and reducing the calculation time of the network model;
[0130] (3) The present invention designs a tree subnet as the basic unit of the architecture search space. Each tree subnet contains multiple branches, each branch consists of multiple nodes, and these nodes are encoded as convolutional layers of convolutional neural networks. The tree network has a strong ability to extract multi-branch features, and the scheme of adding attention weights to the output of each branch is conducive to the fusion of multi-scale features;
[0131] (4) The present invention designs a proxy-assisted scheme for nonlinear convolutional neural networks, converts tree-shaped chromosome encoding into graph representation data and embeds it into the GIN proxy model, and fits the classification accuracy labels of the chromosome corresponding network based on the idea of pairwise sorting, ultimately achieving high classification accuracy while significantly reducing the computational time of evolutionary optimization;
[0132] (5) The present invention designs crossover, mutation operators and multi-target environment selection based on tree data structure, so that individuals can obtain neural network models of different depths through crossover and mutation operations, adaptively adjust the network depth and chromosome genes, and thus obtain suitable multi-scale features, which has the advantages of enhancing algorithm search capabilities and improving classification efficiency.
[0133] 1. Simulation experiment conditions:
[0134] The hardware platform of the simulation experiment of the present invention is: Nvidia GeForce RTX 3090 GPU model.
[0135] The software platform of the simulation experiment of the present invention is: Ubuntu 22.10 system, Python 3.9, PyTorch1.13.
[0136] The input images used in the simulation experiment of the present invention are: IndianPines hyperspectral dataset, PaviaU hyperspectral dataset and Houston2013 hyperspectral dataset.
[0137] The population size N and the maximum number of iterations M in evolutionary computation are set to 100 and 30 respectively, and the probability of crossover operation p c and the probability of mutation operation p m They are set to 0.7 and 0.3 respectively. The performance threshold of the proxy model is set to 0.9, and the hidden dimension of the GIN network is set to 48. Due to the use of tree coding and graph representation embedding, it is difficult to add hyperparameter search for input image block size and spectral resolution under the condition of matching dimensions of different tree coding conversions. Therefore, based on experience, in the experiment, for the IndianPines dataset, they are set to 19 and 55 respectively; for the PaviaU dataset, they are set to 23 and 55 respectively; for the Houston2013 dataset, they are set to 29 and 90 respectively. The present invention uniformly sets the input image block size of all comparison methods on the same dataset to the above settings, and the spectral dimension is processed according to the original text of the comparison method. In addition, the model training hyperparameters of all methods are uniformly set to: the number of training rounds is set to 150, the optimizer uses Adam, the momentum is 0.9, the learning rate is 0.001, the batch size is set to 16, and the weight decay coefficient of L2 regularization is 0.0003.
[0138] 2. Simulation content and result analysis:
[0139] The simulation experiment of the present invention adopts the present invention and the prior art AE-CNN and 3-D-ANAS to perform classification tests on the labeled samples in the Indian Pines hyperspectral dataset, the Pavia U hyperspectral dataset and the Houston 2013 hyperspectral dataset respectively.
[0140] The prior art AE-CNN refers to: Sun et al. proposed an evolution-based convolutional neural network structure search method for solving the problem of hyperspectral image object classification in "Completely automated CNN architecture design based on blocks. IEEE Transactions on Neural Networks and Learning Systems, 2020, 31(4): 1242–1254.", referred to as AE-CNN.
[0141] The prior art 3-D-ANAS refers to: Zhang et al. proposed a neural network structure search method based on echelon descent for solving the problem of hyperspectral image object classification in "3-d-anas: 3-d asymmetric neural architecture search for fast hyperspectral image classification. IEEE Transactions on Geoscience and Remote Sensing, 2022, 60: 1–19.", referred to as 3-D-ANAS.
[0142] The simulation contents of the present invention are:
[0143] Simulation experiment 1 is to use the present invention and the prior art AE-CNN and 3-D-ANAS to conduct simulation experiments on Indian Pines hyperspectral image data. Indian Pines is the earliest test data for hyperspectral image classification. In 1992, an Indian pine forest in Indiana, USA was imaged by the Airborne Visible Infrared Imaging Spectrometer (AVIRIS). The imaging wavelength range is 0.4-2.5μm. The ground objects are continuously imaged in 220 consecutive bands. Since the 104-108, 150-163 and 220 bands cannot be reflected by water, 200 bands are left after correction as the research object, and then pixels with a size of 145×145 are intercepted and annotated as hyperspectral image classification test data. The real annotation map used in the simulation experiment of the present invention is shown in Figure 5(a). There are 16 types of objects in the image of FIG5(a). The colors of the regions in the image represent categories 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 16 from dark to light, and the total number of labeled samples is 10249. Simulation experiment 1 samples 5% of the labeled samples of the objects in the image to form a training set, 5% of the labeled samples to form a validation set, and 100% of the labeled samples to form a test set, and then performs simulation to obtain the classification results of each sample in the test set by the present invention, the prior art AE-CNN and 3-D-ANAS, and the classification results obtained by the present invention, the prior art AE-CNN and 3-D-ANAS are plotted as the classification result diagrams shown in FIG5(b), FIG5(c) and FIG5(d), respectively.
[0144] By comparing the classification result maps shown in Figures 5(b), 5(c) and 5(d) with the true annotation map shown in Figure 5(a), it can be seen that in the classification result maps obtained by the method of the present invention, although there are misclassified samples in a small number of categories, the classification results of most samples are correct and very close to the true annotation map shown in Figure 5(a). In the classification result maps obtained by the prior art AE-CNN and 3-D-ANAS, there are not only a large number of small area misclassified samples, but also a large number of concentrated misclassified samples of some ground objects, and the errors are more obvious and widely distributed.
[0145] In order to verify the effect of the simulation experiment 1 of the present invention, the classification results of the method of the present invention and the prior art AE-CNN and 3-D-ANAS are quantified using three indicators, namely, the classification accuracy of each type of ground objects, the overall classification accuracy and the average classification accuracy.
[0146] The calculation formulas of the following three indicators are used to quantify various types of ground objects in the results of simulation experiment 1. The results are shown in Table 1.
[0147]
[0148] Table 1. Quantitative results of simulation experiment 1
[0149]
[0150] Table 1 lists the calculation results of the classification accuracy of each type of objects, the average classification accuracy and the overall classification accuracy of the present invention and the prior art AE-CNN and 3-D-ANAS. It can be seen from Table 1 that the overall accuracy of the present invention method is improved by 0.47% and 3.48% compared with the prior art AE-CNN and 3-D-ANAS, respectively, and the average accuracy is improved by 3.38% compared with the prior art AE-CNN, and it is reduced by 0.65% compared with the prior art 3-D-ANAS. In the comparison of the classification accuracy of each type of objects, the classification accuracy of the present invention method is improved in seven types of objects, namely, category 4, category 5, category 7, category 8, category 9, category 10 and category 11, compared with the prior art AE-CNN. Among them, category 8 has obtained the best classification accuracy in the present invention method, and the classification accuracy of other objects is reduced compared with the prior art AE-CNN. Compared with the prior art 3-D-ANAS, the classification accuracy of the present invention method in six types of objects, namely, category 1, category 3, category 6, category 7, category 9 and category 16, is not improved, and the classification accuracy of other objects is improved compared with the prior art 3-D-ANAS.
[0151] Simulation experiment 2 is to use the present invention and the prior art AE-CNN and 3-D-ANAS to conduct simulation experiments on PaviaU data. PaviaU data is part of the hyperspectral data taken by the German airborne reflective optical spectroscopic imager in Pavia, Italy in 2003. The original number of bands of PaviaU data is 115, the spectral range is 430-860nm, and the spatial resolution is 1.3m. In the experiment, the original image is preprocessed, 12 bands with low signal-to-noise ratio are removed from the original 115 bands, and 103 bands remain. Some samples in the original image that do not contain any information are removed to obtain hyperspectral image classification data with a size of 610×340. Its real annotation image is shown in Figure 6(a). There are a total of 9 types of ground objects in Figure 6(a). The color of the area in the image from dark to light represents category 1, category 2, category 3, category 4, category 5, category 6, category 7, category 8, category 9, and the total number of annotated samples is 42776. In simulation experiment 2, 200 and 100 labeled data are extracted from the ground objects in the image as the training set and the verification set, respectively. The whole labeled data set is used as the test set for simulation, and the classification results of each sample in the verification set are obtained by the present invention and the prior art AE-CNN and 3-D-ANAS. The classification results obtained by the present invention and the prior art AE-CNN and 3-D-ANAS are plotted as the classification result diagrams shown in Figure 6(b), Figure 6(c) and Figure 6(d), respectively.
[0152] By comparing the classification result images shown in Figures 6(b), 6(c) and 6(d) with the true annotation image shown in Figure 6(a), it can be seen that in the classification result images obtained by the method of the present invention, almost most of the samples have obtained correct classification results, and the overall effect is very close to the true annotation image shown in Figure 6(a). However, in the classification result images obtained by the prior art AE-CNN and 3-D-ANAS, there are still many misclassified samples of some types of ground objects.
[0153] In order to verify the effect of the simulation experiment 2 of the present invention, the classification results of the method of the present invention and the prior art AE-CNN and 3-D-ANAS are quantified using three indicators, namely, the classification accuracy of each type of ground objects, the overall classification accuracy and the average classification accuracy.
[0154] Using the same calculation formulas of the three indicators as those in simulation experiment 1, various types of ground objects in the results of simulation experiment 2 are quantified, and the results are shown in Table 2.
[0155] Table 2. Quantitative results of simulation experiment 2
[0156]
[0157]
[0158] Table 2 lists the classification accuracy of each type of objects, the average classification accuracy and the calculation results of the overall classification accuracy of the present invention and the prior art AE-CNN and 3-D-ANAS. It can be seen from Table 2 that the overall accuracy of the present invention method is improved by 2.29% and 2.26% respectively compared with the prior art AE-CNN and 3-D-ANAS, and the average accuracy is improved by 6.49% and 3.44% respectively compared with the prior art AE-CNN and 3-D-ANAS. In the comparison of the classification accuracy of each type of objects between the present invention and the prior art AE-CNN, except for category 1, category 5 and category 6, the classification accuracy of other objects is improved compared with the prior art AE-CNN. In the comparison of the classification accuracy of each type of objects between the present invention and the prior art 3-D-ANAS, except for category 1, category 4, category 5 and category 9, the classification accuracy of other objects is improved compared with the prior art 3-D-ANAS.
[0159] Simulation experiment 3 uses the present invention and the prior art AE-CNN and 3-D-ANAS to conduct simulation experiments on Houston2013 data. The Houston2013 data set was acquired by the ITRES CASI-1500 sensor on the campus of the University of Houston and the adjacent urban area in the 2013 IEEE GRSS data fusion competition. Houston2013 contains 144 bands with a spectral range of 380-1050nm, a spatial resolution of 2.5m, and an image size of 349×1905. Its real annotation map is shown in Figure 7(a). In Figure 7(a), there are 15 types of ground objects. The color of the area in the image from dark to light represents category 1, category 2, category 3, category 4, category 5, category 6, category 7, category 8, category 9, category 10, category 11, category 12, category 13, category 14, category 15, and the total number of labeled samples is 15029. In simulation experiment 3, 200 and 100 labeled data are respectively extracted from the ground objects in the image as the training set and the verification set, and the whole labeled data set is used as the test set for simulation, and the classification results of each sample in the verification set by the present invention and the prior art AE-CNN and 3-D-ANAS are obtained, and the classification results obtained by the present invention and the prior art AE-CNN and 3-D-ANAS are respectively plotted as the classification result diagrams shown in Figures 7(b), 7(c) and 7(d).
[0160] By comparing the classification result maps shown in Figures 7(b), 7(c) and 7(d) with the true annotation map shown in Figure 7(a), it can be seen that in the classification result maps obtained by the method of the present invention, except for a small number of ground object samples with classification errors, most of the sample classifications are correct and very close to the true annotation map shown in Figure 7(a). In the classification result maps obtained by the prior art AE-CNN and 3-D-ANAS, some types of ground objects have samples with obvious classification errors, and the number is large and the distribution is wide.
[0161] In order to verify the effect of the simulation experiment 3 of the present invention, the classification results of the method of the present invention and the prior art AE-CNN and 3-D-ANAS are quantified using three indicators, namely, the classification accuracy of each type of ground objects, the overall classification accuracy and the average classification accuracy.
[0162] Using the same calculation formulas of the three indicators as those in simulation experiment 1, various types of ground objects in the results of simulation experiment 3 are quantified, and the results are shown in Table 3.
[0163] Table 3. Quantitative results of simulation experiment 3
[0164]
[0165] Table 3 lists the classification accuracy of each type of objects, the average classification accuracy and the calculation results of the overall classification accuracy of the present invention and the prior art AE-CNN and 3-D-ANAS. It can be seen from Table 3 that the overall accuracy of the present invention method is improved by 4.30% and 3.39% respectively compared with the prior art AE-CNN and 3-D-ANAS, and the average accuracy is improved by 3.47% and 2.43% respectively compared with the prior art AE-CNN and 3-D-ANAS. In the comparison of the classification accuracy of each type of objects between the present invention and the prior art AE-CNN, the classification accuracy of the five types of objects, namely, category 5, category 6, category 10, category 11 and category 13, has not been improved, among which category 14 has obtained the best classification accuracy in the present invention method, and the classification accuracy of other objects has been improved compared with the prior art AE-CNN. In the comparison of the classification accuracy of each type of objects between the present invention and the prior art 3-D-ANAS, the classification accuracy of the five types of objects, namely, category 4, category 6, category 12, category 13 and category 15, has not been improved, and the classification accuracy of other objects has been improved compared with the prior art 3-D-ANAS.
[0166] Simulation experiment 4 is a simulation experiment of the network architecture search time cost and overall accuracy on three types of data using the present invention and the prior art AE-CNN.
[0167] Table 4. Quantitative results of simulation experiment 4
[0168]
[0169] Table 4 lists the calculation results of the overall accuracy and GPU days of the present invention and the prior art AE-CNN on three types of data. It can be seen from Table 4 that the overall accuracy of the present invention method on IndianPines is improved by 0.93% compared with the prior art, and the GPU days are reduced by 9.4981 days compared with the prior art. The overall accuracy of the present invention method on PaviaU is improved by 1.83% compared with the prior art, and the GPU days are reduced by 7.537 days compared with the prior art. The overall accuracy of the present invention method on Houston2013 is improved by 3.07% compared with the prior art, and the GPU days are reduced by 7.2682 days compared with the prior art. Therefore, the present invention is superior to the prior art AE-CNN in terms of search time cost and classification accuracy.
[0170] The above simulation experiments show that the method of the present invention uses a multi-objective evolutionary algorithm to automatically search for convolutional neural networks, and constructs a multi-branch parallel tree network structure to enhance the network's extraction of hyperspectral image features. It can search for a simpler and more effective convolutional neural network architecture while ensuring high classification accuracy of ground object samples, reducing the complexity and number of parameters of the network model, and greatly improving the efficiency of convolutional neural networks in hyperspectral image ground object classification tasks. At the same time, the GIN proxy model is added in the evolutionary process, which reduces the burden of traditional neural architecture search, significantly reduces the search time, and improves the prediction accuracy of the proxy model.
[0171] Application prospects of the present invention
[0172] As hyperspectral images are widely used in military and civilian fields, the demand for hyperspectral image classification is increasing. The traditional artificially designed neural network model is no longer sufficient to meet the model design requirements for massive hyperspectral images. In addition, as the industry's requirements for hyperspectral image classification are getting higher and higher, the existing technology can no longer meet the industry's requirements for high precision and high efficiency at the same time. The present invention: (1) uses classification accuracy and floating-point calculation complexity as environmental selection targets at the same time, so that individuals with both fitness levels are retained, and automatically designs a network model that meets high classification accuracy and high calculation efficiency. It avoids the human errors caused by manually constructing convolutional neural networks, solves the problem of high complexity of network models and excessive demand for computing resources caused by single-target search, and has the advantages of reducing the complexity of network models and reducing the calculation time of network models; (2) It designs an agent-assisted scheme for nonlinear convolutional neural networks, converts the tree-shaped chromosome encoding into graph representation data and embeds it into the GIN agent model, and fits the classification accuracy labels of the chromosome corresponding network based on the pairwise sorting idea, ultimately achieving high classification accuracy while greatly reducing the calculation time of evolutionary optimization; (3) It designs a tree subnet as the basic unit of the architecture search space, each tree subnet contains multiple branches, each branch consists of multiple nodes, and these nodes are encoded as convolutional layers of the convolutional neural network. The tree network has a strong ability to extract multi-branch features. The scheme of adding attention weights to the output of each branch is conducive to the integration of multi-scale features. (4) Three tree-shaped hybrid coding subnetworks are used to represent the convolutional neural network, and multi-objective selection, crossover, and mutation are used to iteratively update the population. The evolutionary algorithm is used to optimize the convolutional neural network under multi-objective indicators, which solves the problems of high cost and structural redundancy brought about by the manual design of convolutional neural networks in the existing technology. It has the advantages of improving classification accuracy and reducing the complexity of network structure. (5) Crossover, mutation operators and multi-objective environment selection based on tree data structure are designed, so that individuals can obtain neural network models of different depths through crossover and mutation operations, and adaptively adjust the network depth and chromosome genes to obtain suitable multi-scale features. It has the advantages of enhancing the algorithm search capability and improving classification efficiency.
Claims
1. A hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search, It is characterized in that The following steps are involved: S1. Initialize neural architecture information: A tree-shaped multi-branch supernet is used as the basic unit of the search space, and a tree-based data structure encoding strategy is used to mix the proxy model parameters and structures into a tree chromosome. Three tree subnets are set in the initial search space, and the three tree subnets form the high-level network architecture of the search. S2. Generate training and validation sets for each tree chromosome: The principal component analysis method PCA is used to reduce the dimensionality of the input spectrum of the hyperspectral image to be classified and denoise it. The ground object label of the central pixel of each image block in the hyperspectral image after dimensionality reduction and denoising is used as the input data label, and all image blocks are divided into training set and validation set according to the preset ratio. S3. Construct a convolutional neural network based on the tree chromosome generated in step S1: Traverse all nodes of the first branch of the tree encoding, generate a convolution layer for each node, connect the convolution layers to generate a branch network, connect all branch subnetworks in parallel, build the first tree network block, aggregate the outputs of all branch subnetworks as the output of the first tree network block; decode other attributes contained in the network from the root node features, and complete the integration of the tree network block according to these attribute encodings; build all tree network blocks, connect the input and output of all tree network blocks, and finally obtain the convolutional neural network corresponding to the tree chromosome; S4. Agent model assisted multi-objective evolutionary search: The chromosome population P encoded by the random initialization step S1 n , initialize the maximum number of iterations, population size, the accuracy tau of the proxy model on the proxy database R and the elite population P n ′, if the conditional accuracy tau < 0.9 is met, use the convolutional neural network construction method in step S3 to construct the population P n The corresponding convolutional neural network uses the training set and validation set divided in step S2 to train the population P n The corresponding convolutional neural network is actually trained and evaluated, and the classification accuracy is obtained. The data set is added to the proxy database R, and the proxy database R is divided into proxy training sets in proportion. and proxy test set Using a Proxy Training Set Train the GIN proxy model on the proxy test set The upper test accuracy tau, if the condition is not met, the GIN proxy model is used to predict the population P n The fitness of {y 1 ,y 2 ,..,y N }; Calculate the population P n The floating point operation complexity fitness {q 1 ,q 2 ,..,q N }; Combine parent population and elite population; S5, using a multi-objective selection algorithm to select a new elite population for the parent population and the elite population combined in step S4; S6, performing a crossover operation on the new elite population in step S5 according to probability to generate a crossover population; S7, performing mutation operation on the individuals in the crossover population obtained in step S6, and forming a mutation population with all the mutant offspring; S8, using the mutant population obtained in step S7 as the next generation population; S9, iterating the population obtained in step S8, if the current number of iterations is equal to the maximum number of iterations, taking the current iterated population as the optimal population, and performing real training evaluation on the optimal population, and selecting the convolutional neural network corresponding to the individual with the highest classification accuracy as the optimal convolutional neural network; S10, input the hyperspectral image to be classified into the trained optimal convolutional neural network selected in step S9, obtain the final classification result, and calculate the classification accuracy of the convolutional neural network for all samples to be classified in the hyperspectral image, and output the corresponding classification accuracy as the result.
2. A hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1, It is characterized in that The hybrid encoding method in step S1 is specifically: First, the number of branches of each tree subnetwork is initialized. In the initial search space, each tree subnetwork has at most three branches. Then, the nodes of each branch are initialized. Each branch has at most three nodes at the time of initialization. The tree chromosome includes the root node and other nodes. The characteristics of the root node include: the number of subnetwork output channels, the jump connection flag, the downsampling operation and the attention model information. The characteristics of other nodes include: the number of convolutional layer output channels, the type of convolution operation and the size of the convolution kernel.
3. The hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1, It is characterized in that The specific steps for generating the training set and the validation set in step S2 are: S201, using principal component analysis (PCA) to reduce the dimensionality of the input spectrum of the hyperspectral image to be classified and remove noise, so that its spectrum dimension is equal to the input spectrum dimension corresponding to the gene individual; S202, taking each labeled pixel in the hyperspectral image after dimensionality reduction and denoising in step S201 as the center, intercepting a rectangular block of the pixel, the width and height of the rectangular block are equal to the image block size corresponding to the gene individual, and the label of the central pixel is used as the label of the rectangular block, all image blocks are divided into training set and verification set according to a preset ratio, and the accuracy calculation formula of the model classification result on the verification set is: Among them, A c The network model corresponding to the tree chromosome encoding c, |D Test | represents the size of the validation set, X i is the i-th image block data in the verification data set, y i is the object category label of the ith image block, F(·) is the prediction result output by the network model, and the function equal(·) is used to compare the difference between the prediction result and the true label. When the predicted value is the same as the true label, its value is equal to 1.
4. A hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1, 2 or 3, It is characterized in that Step S4 is specifically as follows: S401, randomly initialize the chromosome population P encoded in step S1 n , initialize the maximum number of iterations M, the population size N, the accuracy of the proxy model on the proxy database R tau = 0 and the elite population S402: If the conditional accuracy tau < 0.9 is met, use the convolutional neural network construction method in step S3 to construct the population P n The corresponding convolutional neural network uses the training set and validation set divided in step S202 to train the population P n The corresponding convolutional neural network is actually trained and evaluated, and the classification accuracy is obtained and then the dataset is added to the proxy database R; the tree chromosome encoding is converted into graph data available for GIN, and the tree chromosome encoding is used to obtain the graph node representation according to the node generation sequence number. The adjacency matrix and node features are generated according to the tree branch connection, root node attributes and other node attributes. For the attribute information of all nodes, binary encoding is used to convert it into node features to enrich the amount of information embedded in the graph representation; the proxy database R is divided into proxy training sets in proportion and proxy test set Using a Proxy Training Set Train the GIN proxy model on the proxy test set The test accuracy is tau; the GIN-based proxy model adopts a double-end input and weight sharing structure. In each batch of training data, the input model is combined in pairs to learn the sorting information; in training, SME-TCNN uses a loss function that emphasizes pairwise sorting learning γ(θ)=log(1+e -θ ) Among them, w is a learnable parameter, n is the batch data size, c is the tree chromosome, y is the true classification accuracy corresponding to the chromosome, g(·) is the prediction accuracy of the proxy model output, and γ(·) is the logistic regression function. λ is used as the proportional parameter of the ranking loss and the MSE loss. According to the output of GIN, the prediction accuracy of GIN for the fitness ranking of the current batch data is calculated. The formula is: Among them, the function rank(·) indicates whether the ranking relationship predicted by the proxy model and the actual ranking relationship of a pair of chromosome data match. It is 1 when the relationship matches and 0 when the relationship contradicts. S403. If the conditions are not met, use the GIN proxy model to predict the population P n The fitness of {y 1 ,y 2 ,..,y N }, the input processing of the GIN proxy model is the same as step S402; S404, calculate population P n The floating point operation complexity fitness {q 1 ,q 2 ,..,q N }, combined parent population and elite population; population P n The calculation formula of the floating point operation complexity fitness is: Among them, flops c is the number of floating point operations calculated by the real neural network model corresponding to the tree chromosome c after one forward inference, flops max and flops min They represent the maximum and minimum number of floating-point operations in all chromosomes of the current population, respectively. H and W are the width and height of the input data. K, C in and C out They are the convolution kernel size of the convolution layer, the dimensions of the input and output channels, and I and U represent the dimensions of the input and output of the fully connected layer.
5. The hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1, It is characterized in that In step S6, the crossover operation is performed on the population as follows: S601. Randomly select two chromosome individuals corresponding to the convolutional neural network to be optimized from the parent population of the current iteration; S602, perform a crossover operation on the two selected chromosome individuals according to the crossover probability cp, generate a random number that satisfies a 0-1 uniform distribution for each pair of selected chromosome individuals, if the random number is less than cp, 0≤cp≤1, for the first tree of the parent generation, randomly select and exchange branches from the two parent chromosomes; for all branches in the same tree subnet, the number of output channels of the convolutional layer of the leaf node needs to be re-set according to the attributes of the root node; S603, determine whether all chromosome individuals have been selected in the parent population after the current iteration. If so, form a crossover population with all chromosome individuals obtained through the above crossover operation in the parent population after the current iteration and then execute step S7; otherwise, execute step S601.
6. A hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1 or 5, It is characterized in that In step S7, the mutation operation is performed on the population as follows: S701, performing mutation operation on the chromosome individuals in the crossover population in step S603 according to probability; generating a random number satisfying 0-1 uniform distribution for each selected chromosome individual, and if the random number is less than mp, 0≤mp≤1, performing mutation operation on the chromosome; S702, all the chromosome individuals obtained through the above mutation operation in the crossover population of step S603 are combined into a mutation population.
7. The hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1, It is characterized in that In step S3, all nodes of the first branch of the tree encoding are traversed, and a convolution layer is generated for each node. The convolution operation types include 3D separable convolution and ordinary 3D convolution. The convolution kernel sizes include three sizes of {3×3, 5×5, 7×7}, and the value range of the number of output channels of the convolution layer is {16, 32, 48, 64}.
8. The hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1, It is characterized in that The aggregation method in step S3 includes: summation, weighted summation or spectral dimension splicing.
9. The hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 1, It is characterized in that In the root node feature decoded in step S3, the number of subnet output channels refers to the convolution output of all leaf nodes of the current subtree, which is used to aggregate the results of all branches, and the value range is {16, 32, 48, 64}.
10. The hyperspectral image classification method based on agent-assisted multi-objective evolutionary neural architecture search according to claim 6, It is characterized in that The mutation operation in step S701 includes any one of the following (1)-(5): (1) Deleting randomly selected branches, if this results in a tree without any branches, generates new branches by randomly selecting new nodes from the search space; (2) Generate a new branch containing three nodes, where the nodes are randomly selected from the search space; (3) A new node is added to the branch of the tree, and the convolution kernel size and the number of output channels of the new node are randomly selected from the search space; (4) Delete a node from a branch of the tree; (5) The value of the skip connection flag is inverted and a skip connection is added.
Citation Information
Patent Citations
Image classification method based on neural network architecture search
CN111898689A
Multi-objective optimization evolution calculation method of convolutional neural network agent model based on decomposition thought
CN112633500A
End-to-end chromosome instance segmentation based on edge supervision network
CN116485824A
Cited By
Patella X-ray image recognition method for lightweight network architecture search under constraint conditions
CN119313628A
Patellar X-ray image recognition method based on lightweight network architecture search under constraints
CN119313628B
Convolutional neural network structure search method based on genetic algorithm
CN119398140A
Coevolution multi-component spectral feature selection method based on deep reinforcement learning
CN119537900A
A collaborative evolution multi-component spectral feature selection method based on deep reinforcement learning
CN119537900B
