Multi-agent wave band selection method based on clustering and various experience pools
Through the multi-agent band selection method based on clustering and diverse experience pools, the problem of long band selection running time of hyperspectral data sets is solved, efficient band selection and classification network training is achieved, and processing efficiency and classification accuracy are improved.
Patent Information
- Application Number
- CN202411695710.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119445384A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of remote sensing image processing, and in particular relates to a multi-agent band selection method based on clustering and diverse experience pools. Background Art
[0002] In the field of remote sensing image processing, hyperspectral data provides important support for object recognition and classification due to its rich spectral information. However, due to the high dimensionality of the data and the high redundancy of information, how to select the most representative bands to reduce data complexity and improve processing efficiency has become a key challenge. Effective band selection can not only reduce computing costs, but also improve classification accuracy, laying the foundation for efficient processing and accurate classification of hyperspectral data in practical applications.
[0003] Existing technologies have proposed a variety of band selection methods, aiming to extract a high-information, low-redundancy band set from a large number of bands. In recent years, deep learning has made significant progress in band selection. For example, autoencoders and graph neural networks can automatically learn band feature representations, select more critical bands, and improve the accuracy and efficiency of selection. In classification tasks, advanced methods include graph convolutional neural networks (GCNs) and attention mechanism networks. These models improve classification accuracy through deep feature extraction and cross-band information aggregation. However, deep models have high requirements for computing resources and data volume, and are prone to overfitting when the band selection is improper, affecting the classification effect.
[0004] Northwestern Polytechnical University proposed a hyperspectral image classification method based on deep neural network in its patent application "A hyperspectral image classification method based on deep neural network" (patent application number: 202211095575.7, application publication number: CN 115424138 A). This method proposes a strategy for expanding labeled hyperspectral training data. For the input hyperspectral data set, the collaborative selection strategy and the competitive selection strategy are used to collaboratively analyze the confidence evaluation method to provide more available recognition training data for training, so as to train a better deep neural network to improve the classification performance of the hyperspectral data to be classified. However, the disadvantage of this method is that for the hyperspectral data set, if different bands are selected as input, the deep neural network model needs to be retrained, which greatly increases the running time. Summary of the invention
[0005] The purpose of the present invention is to overcome the problem of long running time of band selection classification of hyperspectral datasets, and propose a multi-agent band selection method based on clustering and diverse experience pools.
[0006] In order to achieve the above object, the present invention adopts the following technical scheme: In the first aspect, a multi-agent band selection method based on clustering and diverse experience pools comprises the following steps: Collecting hyperspectral images to generate a sample set of hyperspectral images, and dividing the sample set of hyperspectral images into a training sample set and a test sample set; The training sample set is grouped by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, and a multi-agent band selection model is constructed using the grouped training sample set. Inputting the training sample set into the multi-agent band selection model to perform model training on the multi-agent band selection model to obtain a trained multi-agent band selection model, wherein the experience pool of the model training is optimized using a reinforcement learning update method based on a diverse experience pool; Use the trained multi-agent band selection model to perform band selection on the test sample set to obtain a new data set, and divide the new data set into a new training sample set and a new test sample set; Use CNN, full connection and Softmax to build a multi-scale feature fusion classification network based on adaptive weights, and send the new training sample set into the multi-scale feature fusion classification network based on adaptive weights for network training to obtain a trained classification network; The new test sample set is input into the trained classification network to classify the hyperspectral image and obtain the classification results and classification map.
[0007] Furthermore, the method of collecting a hyperspectral image to generate a sample set of the hyperspectral image is specifically as follows: the hyperspectral image is expanded to a preset pixel size, a spatial window of a preset pixel size is defined with each pixel in the hyperspectral image as the center, all pixels in each spatial window are formed into a data cube, and all the data cubes are formed into a sample set of the hyperspectral image.
[0008] Furthermore, the training sample set is grouped by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, including the following steps: using a correlation entropy calculation formula to calculate the correlation entropy between bands for all bands in the hyperspectral data set to obtain all element correlation entropies, adding all element correlation entropies to the first set, sorting the first set in descending order according to the absolute value of the correlation entropy to obtain a number of divided groups of bands, and creating a number of groups of agents according to the number of groups of bands to obtain a grouped training sample set; The relevant entropy calculation formula is as follows:
[0009]
[0010] in, It is a band and band The correlation entropy between represents the expected value, is a kernel based on a Gaussian function, is the bandwidth parameter of the kernel function.
[0011] Further, a multi-agent band selection model is constructed using the grouped training sample set, including that the action of the agent in the multi-agent band selection model is to select or deselect each band in the corresponding group; The states of all agents in the multi-agent band selection model are collectively represented by a two-dimensional vector; the two-dimensional vector is as follows:
[0012] in, represents an element in a two-dimensional vector, ; The environment in the multi-agent band selection model is a classification network, which uses a random forest classifier. Each time the agent selects a band, the current band selection combination will be provided as an input feature to the random forest model for classification; The reward in the multi-agent band selection model is the classification accuracy obtained by the classification model under the band combination selected by the agent. The reward in the multi-agent band selection model is shown as follows:
[0013] in, represents the reward, ACC represents the classification accuracy, represents the number of correctly classified samples, Represents the total number of samples.
[0014] Furthermore, the reinforcement learning update method based on the diverse experience pool comprises the following steps: Construct a multi-level experience pool consisting of a teacher experience layer and an agent experience layer. The teacher experience layer is generated by a pre-trained teacher strategy that uses a band selection algorithm. The teacher experience layer selects memory samples with higher reward values. The agent experience layer stores memory samples obtained by the agent exploring the environment during model training. Samples are extracted from the teacher experience layer and the agent experience layer, and the agent strategy is updated by balancing the ratio of teacher experience and agent experience using the dynamic adjustment parameters according to the agent strategy update formula. In the initial stage of the agent strategy update, the dynamic adjustment parameters are preset, and the parameter offset is dynamically adjusted as the model is trained until it is reduced to 0. The agent’s strategy update formula is as follows:
[0015] in, represents the parameters of the policy network, is the learning rate, is at the time step The sampling ratio parameter, and Respectively represent the objective functions based on the teacher experience layer and the agent experience layer, is the objective function with respect to the parameter gradient.
[0016] Furthermore, the network structure of the adaptive weight-based multi-scale feature fusion classification network constructed using CNN, full connection and Softmax includes: The first layer of 3D CNN, the second layer of 3D CNN, the third layer of 3D CNN, the first layer of 2D CNN, the second layer of 2D CNN, the fully connected layer and the Softmax layer; The convolution kernel size of the first layer of 3D CNN is (7, 5, 5), the convolution kernel size of the second layer of 3D CNN is (5, 5,5), the convolution kernel size of the third layer of 3D CNN is (3, 3, 3), the convolution kernel size of the first layer of 2D CNN is (5, 5), and the convolution kernel size of the second layer of 2D CNN is (3, 3); The first layer of 3D CNN captures extensive spatial-spectral information, the second layer of 3D CNN refines features, the third layer of 3D CNN extracts local features, the first layer of 2D CNN extracts spatial features, the second layer of 2D CNN refines classification decision features, the fully connected layer converts the feature vector after the feature map is flattened into a high-dimensional feature space, and the Softmax layer converts the output of the fully connected layer into a probability distribution for multi-category pixel-level classification; The feature maps generated by the first and second layers of 3D CNN are fed into a multi-scale feature fusion module with adaptive weights to generate a new feature map; at the same time, the feature maps generated by the third layer of 3D CNN and the first layer of 2DCNN are fed into a multi-scale feature fusion module with adaptive weights to generate a new feature map; The calculation of the multi-scale feature fusion module with adaptive weights includes the following steps: After the two original feature maps to be fused undergo 1×1 convolution, the dimensions are reduced and two feature maps are obtained. The two feature maps undergo global average pooling to obtain a global feature representation. The global feature representation undergoes a Softmax operation to obtain the contribution of each input feature map. The contribution is multiplied and added to the original feature map to obtain the final feature map. The convolution calculation formula is as follows:
[0017]
[0018] in, and There are two feature maps that need to be fused. and These are two feature maps after 1×1 convolution, where conv represents a 1×1 convolution operation; The Softmax contribution calculation formula is as follows:
[0019] Among them, α, β are the contribution of each input feature map; AvP(F1) is The global feature representation of the feature map, AvP(F2) is The global feature representation of the feature map, softmax represents the Softmax operation; The calculation formula of the final feature map is as follows:
[0020] in, is the final feature map, and are two feature maps that need to be fused, and α and β are the contribution of each input feature map.
[0021] Furthermore, the network training is performed using a cross entropy loss function, which is as follows:
[0022] in, is the cross entropy loss function, is the total number of samples in the training set, is the number of categories, It is a sample In category The real label on The model is a sample In category The predicted probability of The network training uses a gradient descent update formula to minimize the cross entropy loss function to update the parameters. The gradient descent update formula is shown below:
[0023] in, is the learning rate, is the cross entropy loss function About parameters gradient.
[0024] Second, the multi-agent band selection system based on clustering and diverse experience pools includes: A sample set acquisition module is used to acquire a hyperspectral image to generate a sample set of the hyperspectral image, and divide the sample set of the hyperspectral image into a training sample set and a test sample set; Construct a band selection model module, which is used to group the training sample set by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, and use the grouped training sample set to construct a multi-agent band selection model; A model training module is used to input the training sample set into the multi-agent band selection model to perform model training on the multi-agent band selection model to obtain a trained multi-agent band selection model, wherein the experience pool of the model training is optimized using a reinforcement learning update method based on a diverse experience pool; A new data set division module is used to use the trained multi-agent band selection model to perform band selection on the test sample set to obtain a new data set, and divide the new data set into a new training sample set and a new test sample set; Construct a classification network module, which is used to use CNN, full connection and Softmax to construct a multi-scale feature fusion classification network based on adaptive weights, and send the new training sample set into the multi-scale feature fusion classification network based on adaptive weights for network training to obtain a trained classification network; The classification result module is used to input the new test sample set into the trained classification network to classify the hyperspectral image and obtain the classification results and classification map.
[0025] In a third aspect, an electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the multi-agent band selection method based on clustering and diverse experience pools when executing the computer program.
[0026] In a fourth aspect, a computer-readable storage medium stores a computer program, which, when executed by a processor, performs the multi-agent band selection method based on clustering and diverse experience pools.
[0027] Compared with the prior art, the present invention has the following beneficial technical effects: The multi-agent band selection method based on clustering and diverse experience pools proposed in the present invention effectively clusters the bands, reduces the number of agents and reduces the dimension of the action space, thereby improving the efficiency of data processing. In addition, the experience pool for model training is optimized using a reinforcement learning update method based on a diverse experience pool. In the classification network design, a feature pyramid structure with adaptive weights is used to optimize the fusion effect of features at different levels, thereby improving classification performance. The designed hierarchical experience pool and feature pyramid structure not only improve the accuracy of feature selection and classification, but also reduce the complexity of the model, making it suitable for resource-constrained application scenarios.
[0028] Furthermore, the present invention is a band clustering method based on correlation entropy and greedy algorithm. Compared with the method of non-group clustering, the present invention not only reduces the number of intelligent agents but also reduces the dimension of the action space by effectively clustering the bands, thereby improving the efficiency of data processing. Compared with the method of randomly grouping the bands, the present invention takes into account the band group hierarchy and also balances the relationship between the bands and the groups.
[0029] Furthermore, the present invention introduces an external algorithm as a teacher based on the reinforcement learning update method of the diverse experience pool. With the help of its sampling experience on the current task, the action selection strategy of the intelligent agent is made better, thereby selecting a higher quality band set. By introducing the teacher's experience, the problem of the suboptimal experience accumulated in the experience pool caused by the randomness of the intelligent agent in the early stage of exploration is solved, which directly affects the learning efficiency and the performance of the final strategy.
[0030] Furthermore, the present invention constructs a multi-scale feature fusion classification network based on adaptive weights, which solves the problem that the existing classification network often ignores the interaction between features of different scales during feature extraction, resulting in limited classification performance when facing objects with large scale changes. The designed hierarchical feature fusion framework can effectively combine features at different levels to more comprehensively capture the information in the image. In this way, not only can deep high-level semantic information be extracted, but also shallow detail information can be retained. The combination of the two will bring more multi-scale feature representation to the classification model and improve the final classification performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are for explanation purposes only and are not intended to limit the scope of the present invention in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only for illustration purposes to help understand the present invention, and are not intended to specifically limit the shapes and proportional dimensions of the components of the present invention. In the drawings: Figure 1 The present invention is a flowchart of the multi-agent band selection method based on clustering and diverse experience pools.
[0032] Figure 2 This is a structural diagram of the multi-agent band selection system based on clustering and diverse experience pools of the present invention.
[0033] Figure 3 This is an electronic device diagram of the multi-agent band selection method based on clustering and diverse experience pools of the present invention.
[0034] Figure 4 The present invention is a flowchart of a multi-agent band selection method based on clustering and diverse experience pools according to an embodiment of the present invention.
[0035] Figure 5 This is a diagram of the classification results of an embodiment of the present invention on the University of Pavia dataset.
[0036] Figure 6 This is a diagram of the classification results of an embodiment of the present invention on the Indian pine dataset. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0038] Embodiment 1 See also Figure 1 ,The multi-agent band selection method based on clustering and diverse experience pools includes the following steps: Collecting hyperspectral images to generate a sample set of hyperspectral images, and dividing the sample set of hyperspectral images into a training sample set and a test sample set; The training sample set is grouped by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, and a multi-agent band selection model is constructed using the grouped training sample set. Inputting the training sample set into the multi-agent band selection model to perform model training on the multi-agent band selection model to obtain a trained multi-agent band selection model, wherein the experience pool of the model training is optimized using a reinforcement learning update method based on a diverse experience pool; Use the trained multi-agent band selection model to perform band selection on the test sample set to obtain a new data set, and divide the new data set into a new training sample set and a new test sample set; Use CNN, full connection and Softmax to build a multi-scale feature fusion classification network based on adaptive weights, and send the new training sample set into the multi-scale feature fusion classification network based on adaptive weights for network training to obtain a trained classification network; The new test sample set is input into the trained classification network to classify the hyperspectral image and obtain the classification results and classification map.
[0039] In this embodiment, the bands of the hyperspectral image can be effectively grouped by a band clustering method based on correlation entropy and greedy algorithm, which helps to reduce redundant information and improve the efficiency of band selection. The multi-agent band selection model can use these grouped data to intelligently select the most representative bands by reinforcement learning, thereby reducing the data dimension while ensuring the integrity of the information and improving the accuracy of subsequent processing. The introduction of diverse experience pools can enrich the sample diversity in the training process and avoid the model from falling into a local optimal solution, thereby improving the stability and generalization ability of model training. The reinforcement learning update method can continuously optimize the sample distribution in the experience pool, so that the model can better adapt to data changes in different scenarios; the multi-scale feature fusion classification network based on adaptive weights can make full use of feature information of different scales, adjust the importance of different features through adaptive weights, thereby improving classification accuracy, and the combination of CNN, full connection and Softmax enables the network to learn more complex and abstract feature representations, further enhancing the robustness of the classification network; the optimization of the band selection method reduces the amount of data for subsequent processing, thereby reducing computing resources and time costs, and the design of the multi-scale feature fusion classification network enables the model to process hyperspectral image data more efficiently while maintaining high performance.
[0040] The hyperspectral image is collected to generate a sample set of the hyperspectral image, specifically: the hyperspectral image is expanded to a preset pixel size, a spatial window of a preset pixel size is defined with each pixel in the hyperspectral image as the center, all pixels in each spatial window are formed into a data cube, and all the data cubes are formed into a sample set of the hyperspectral image.
[0041] In this embodiment, each data cube contains all pixel information within a spatial window centered on a certain pixel, including not only the spectral information of the pixel itself, but also the spectral information of the pixels around it. The fusion of information makes each data cube a multidimensional data unit containing rich spectral and spatial information. Since each data cube contains the spectral and spatial information of the local area, the model can learn more comprehensive and complex feature representations. During the training process, the model can be exposed to more diverse data, thereby enhancing its generalization ability in different scenarios. The rich spectral and spatial information can provide more clues and basis. For example, in remote sensing image classification, different objects may have subtle differences in spectral characteristics, and the introduction of spatial information can further help the model distinguish these differences, thereby improving the accuracy of classification.
[0042] The training sample set is grouped by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, including the following steps: using a correlation entropy calculation formula to calculate the correlation entropy between bands for all bands in the hyperspectral data set to obtain all element correlation entropies, adding all element correlation entropies to a first set, sorting the first set in descending order according to the absolute value of the correlation entropy to obtain a number of divided groups of bands, and creating a number of groups of agents according to the number of groups of bands to obtain a grouped training sample set; The relevant entropy calculation formula is as follows:
[0043]
[0044] in, It is a band and band The correlation entropy between represents the expected value, is a kernel based on a Gaussian function, is the bandwidth parameter of the kernel function.
[0045] Using the grouped training sample set, a multi-agent band selection model is constructed, including that the action of the agent in the multi-agent band selection model is to select or deselect each band in the corresponding group; The states of all agents in the multi-agent band selection model are collectively represented by a two-dimensional vector; the two-dimensional vector is as follows:
[0046] in, represents an element in a two-dimensional vector, ; The environment in the multi-agent band selection model is a classification network, which uses a random forest classifier. Each time the agent selects a band, the current band selection combination will be provided as an input feature to the random forest model for classification; The reward in the multi-agent band selection model is the classification accuracy obtained by the classification model under the band combination selected by the agent. The reward in the multi-agent band selection model is as follows:
[0047] in, represents the reward, ACC represents the classification accuracy, represents the number of correctly classified samples, Represents the total number of samples.
[0048] In this embodiment, correlation entropy is used as a method to measure the similarity of two random variables, and it shows higher robustness when dealing with non-Gaussian noise, impulse noise and outliers. In a hyperspectral data set, the similarity between bands may be affected by various noises and outliers, and correlation entropy can more accurately measure this similarity, thereby obtaining a more reliable band clustering result. By calculating the correlation entropy between all bands and adding them to a set for sorting, a band sequence arranged in descending order of similarity between bands can be obtained, highly similar bands can be identified, and they can be grouped into the same group. The band clustering method based on the greedy algorithm can further utilize this sorting information, and construct clusters by gradually selecting the most similar bands, thereby optimizing the effect of band clustering. The grouped training sample set contains a more representative band combination, reduces redundant information, and improves the model. The efficiency and performance of training. At the same time, since each group of bands contains similar spectral features, the model learns a more stable and accurate feature representation, thereby improving the accuracy of subsequent classification or recognition. Each group of bands corresponds to an intelligent agent, so that multiple agents can process different band combinations in parallel, thereby improving the overall processing speed and efficiency; at the same time, since each intelligent agent focuses on processing a specific band combination, it can better mine and utilize the spectral features in the combination and improve the performance of the model. Through the band clustering method based on correlation entropy and greedy algorithm, more diverse and representative band combinations can be obtained. These combinations can cover various spectral features in the hyperspectral dataset, so that the model can be exposed to more diverse data during the training process, which helps the model learn a more comprehensive and complex feature representation and enhance its generalization ability on new data.
[0049] The reinforcement learning update method based on the diverse experience pool includes the following steps: Construct a multi-level experience pool consisting of a teacher experience layer and an agent experience layer. The teacher experience layer is generated by a pre-trained teacher strategy that uses a band selection algorithm. The teacher experience layer selects memory samples with higher reward values. The agent experience layer stores memory samples obtained by the agent exploring the environment during model training. Samples are extracted from the teacher experience layer and the agent experience layer, and the agent strategy is updated by balancing the ratio of teacher experience and agent experience using the dynamic adjustment parameters according to the agent strategy update formula. In the initial stage of the agent strategy update, the dynamic adjustment parameters are preset, and the parameter offset is dynamically adjusted as the model is trained until it is reduced to 0. The agent’s strategy update formula is as follows:
[0050] in, represents the parameters of the policy network, is the learning rate, is at the time step The sampling ratio parameter, and Respectively represent the objective functions based on the teacher experience layer and the agent experience layer, is the objective function with respect to the parameter gradient.
[0051] In this embodiment, the teacher experience layer contains memory samples with high reward values generated by the pre-trained teacher strategy. These samples provide high-quality learning experience for the intelligent agent, which helps the intelligent agent learn effective strategies more quickly, thereby shortening the training time and improving learning efficiency. By extracting samples from the teacher experience layer and the intelligent agent experience layer for strategy update, the intelligent agent can combine the teacher's high-quality experience and its own exploration experience in the environment to form a more stable and reliable strategy. This multi-level experience pool design helps to reduce volatility and uncertainty in the strategy update process; the design of the multi-level experience pool enables the intelligent agent to use sample data more effectively. The high-quality samples in the teacher experience layer provide valuable learning resources for the intelligent agent, while the samples in the intelligent agent experience layer reflect the actual experience of the intelligent agent in the environment. By combining these two types of samples, the agent can learn the environment and strategy more comprehensively and improve the utilization rate of samples. In the initial stage of strategy updating, dynamic adjustment parameters are preset, and the parameter offset is gradually adjusted until it is reduced to 0 as the model is trained, so that the agent can rely more on the teacher's experience for learning in the early stage of training. As the training deepens, the agent gradually turns to relying on its own exploration experience for autonomous learning. This gradual transition method helps to promote the agent's autonomous learning ability and spirit of exploration. By combining the teacher's experience and the agent's experience for strategy updating, the agent can learn more comprehensive and effective strategies, improve the model's performance on the test set, and improve the model's accuracy and robustness. At the same time, the design of the multi-level experience pool also reduces the risk of overfitting and improves the generalization ability of the model.
[0052] The network structure of using CNN, full connection and Softmax to build a multi-scale feature fusion classification network based on adaptive weights includes: The first layer of 3D CNN, the second layer of 3D CNN, the third layer of 3D CNN, the first layer of 2D CNN, the second layer of 2D CNN, the fully connected layer and the Softmax layer; The convolution kernel size of the first layer of 3D CNN is (7, 5, 5), the convolution kernel size of the second layer of 3D CNN is (5, 5,5), the convolution kernel size of the third layer of 3D CNN is (3, 3, 3), the convolution kernel size of the first layer of 2D CNN is (5, 5), and the convolution kernel size of the second layer of 2D CNN is (3, 3); The first layer of 3D CNN captures extensive spatial-spectral information, the second layer of 3D CNN refines features, the third layer of 3D CNN extracts local features, the first layer of 2D CNN extracts spatial features, the second layer of 2D CNN refines classification decision features, the fully connected layer converts the feature vector after the feature map is flattened into a high-dimensional feature space, and the Softmax layer converts the output of the fully connected layer into a probability distribution for multi-category pixel-level classification; The feature maps generated by the first and second layers of 3D CNN are fed into a multi-scale feature fusion module with adaptive weights to generate a new feature map; at the same time, the feature maps generated by the third layer of 3D CNN and the first layer of 2DCNN are fed into a multi-scale feature fusion module with adaptive weights to generate a new feature map; The calculation of the multi-scale feature fusion module with adaptive weights includes the following steps: After the two original feature maps to be fused undergo 1×1 convolution, the dimensions are reduced and two feature maps are obtained. The two feature maps undergo global average pooling to obtain a global feature representation. The global feature representation undergoes a Softmax operation to obtain the contribution of each input feature map. The contribution is multiplied and added to the original feature map to obtain the final feature map. The convolution calculation formula is as follows:
[0053]
[0054] in, and There are two feature maps that need to be fused. and These are two feature maps after 1×1 convolution, where conv represents a 1×1 convolution operation; The Softmax contribution calculation formula is as follows:
[0055] Among them, α, β are the contribution of each input feature map; AvP(F1) is The global feature representation of the feature map, AvP(F2) is The global feature representation of the feature map, softmax represents the Softmax operation; The calculation formula for the final feature map is as follows:
[0056] in, is the final feature map, and are two feature maps that need to be fused, and α and β are the contribution of each input feature map.
[0057] The network training adopts the cross entropy loss function for training, and the cross entropy loss function is as follows:
[0058] in, is the cross entropy loss function, is the total number of samples in the training set, is the number of categories, It is a sample In category The real label on The model is a sample In category The predicted probability of Network training uses the gradient descent update formula to minimize the cross entropy loss function to update the parameters. The gradient descent update formula is as follows:
[0059] in, is the learning rate, is the cross entropy loss function About parameters gradient.
[0060] In this embodiment, by combining the features extracted by 3D and 2D CNN, the network can capture spatial-spectral information of different scales, thereby improving the understanding and classification capabilities of complex image data. The multi-scale feature fusion module with adaptive weights can dynamically adjust the fusion weights according to the contribution of the input feature map, further optimizing the feature fusion effect. The 3D CNN layer gradually extracts and refines features through convolution kernels of different sizes to capture subtle differences and local features in the image, while the 2D CNN layer focuses on extracting spatial features to provide more accurate information for classification decisions. The adaptive weight multi-scale feature fusion module in the network can dynamically adjust the fusion strategy according to the characteristics of the input data, thereby enhancing the network's adaptive learning ability. Through multi-scale feature fusion and adaptive weight adjustment, the network can better cope with image data under different scenes and lighting conditions, thereby improving the robustness and generalization ability of the model.
[0061] Embodiment 2 See also Figure 2 , a multi-agent band selection system based on clustering and diverse experience pools, including: A sample set acquisition module is used to acquire a hyperspectral image to generate a sample set of the hyperspectral image, and divide the sample set of the hyperspectral image into a training sample set and a test sample set; Construct a band selection model module, which is used to group the training sample set by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, and use the grouped training sample set to construct a multi-agent band selection model; A model training module is used to input the training sample set into the multi-agent band selection model to perform model training on the multi-agent band selection model to obtain a trained multi-agent band selection model, wherein the experience pool of the model training is optimized using a reinforcement learning update method based on a diverse experience pool; A new data set division module is used to use the trained multi-agent band selection model to perform band selection on the test sample set to obtain a new data set, and divide the new data set into a new training sample set and a new test sample set; Construct a classification network module, which is used to use CNN, full connection and Softmax to construct a multi-scale feature fusion classification network based on adaptive weights, and send the new training sample set into the multi-scale feature fusion classification network based on adaptive weights for network training to obtain a trained classification network; The classification result module is used to input the new test sample set into the trained classification network to classify the hyperspectral image and obtain the classification results and classification map.
[0062] In this embodiment, the system can effectively group the bands of the sample set of hyperspectral images through a band clustering method based on correlation entropy and greedy algorithm, thereby screening out the most representative band combination, which not only reduces data redundancy but also improves the efficiency of subsequent model training; the system adopts a reinforcement learning update method based on a diverse experience pool. By constructing a multi-level experience pool, it realizes the full utilization of teacher experience and agent experience, improves the utilization rate of samples, and enables the model to be exposed to more diverse data during training. The system constructs a multi-agent band selection model, in which each agent focuses on processing a specific band combination, thereby achieving the effect of parallel processing and collaborative optimization, improving the speed of model training, and enabling the model to learn more comprehensive and complex features. It is stated that by dynamically adjusting parameters to balance the ratio of teacher experience and agent experience, the system has achieved effective updates to the agent strategy, allowing the model to continuously adjust and optimize itself during training, thereby improving the accuracy and stability of the model; the system has adopted a multi-scale feature fusion classification network based on adaptive weights, which achieves more accurate classification of hyperspectral images by combining feature information at different scales, allowing the model to better adapt to image data in different scenes and lighting conditions. The system uses the trained classification network to classify hyperspectral images of the new test sample set, and obtains accurate classification results and classification maps. These classification results are not only highly accurate, but also have good visualization effects, which help users to more intuitively understand the classification results and conduct subsequent analysis and processing.
[0063] Embodiment 3 See also Figure 3 , an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the multi-agent band selection method based on clustering and diverse experience pools when executing the computer program.
[0064] Embodiment 4 A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the multi-agent band selection method based on clustering and diverse experience pools.
[0065] Embodiment 5 This embodiment provides a multi-agent band selection method based on clustering and diverse experience pools. The specific process steps are as follows: S1. Input hyperspectral image.
[0066] In this embodiment, a hyperspectral image with a size of 145×145×200 and containing a true label vector is input, and the hyperspectral image contains 200 bands.
[0067] S2. Generate a sample set.
[0068] First, the image is expanded by 15×15, and a 15×15 pixel spatial window is defined with each pixel in the input hyperspectral image as the center. All pixels in each spatial window are combined into a data cube. All data cubes are combined into a sample set of the hyperspectral image.
[0069] S3. Generate training sample set and test sample set.
[0070] In the sample set of hyperspectral images, 5% of the samples are randomly selected from each category to form the training sample set of hyperspectral images, and the remaining 95% of the samples are used to form the test sample set of hyperspectral images.
[0071] S4. Construct a multi-agent band selection model.
[0072] S401, a band clustering method based on correlation entropy and greedy algorithm, aims to cluster the input bands containing individual Hyperspectral datasets of bands Divide into groups, i.e. Specifically, the following method is used: First, calculate the correlation entropy between bands
[0073]
[0074] in, It is a band and The correlation entropy between is a kernel based on a Gaussian function, is the bandwidth parameter of the kernel function, represents the expected value, which can be approximated by averaging the samples.
[0075] right Apply the relevant entropy formula to all bands in Add to Collection For all and according to Sort by absolute value in descending order , initialize a vector to mark whether the bands are grouped.
[0076] The algorithm execution process of the band clustering method based on correlation entropy and greedy algorithm is as follows: for Each of implement:
[0077] if is equal to 0, then Search in order ,if There are greater than or equal to two vacancies, then Will Add to
[0078]
[0079] Finish if is equal to 1 and is equal to 0, then Find Located
[0080] if
[0081] Will Add to ,
[0082] Finish if is equal to 0 and is equal to 1, then Find Located
[0083] if
[0084] Will Add to ,
[0085] Finish Finish For all ,if is equal to 0 and ,
[0086] Random Insert into
[0087] return .
[0088] S402, for Group Band ,create Agent , where each agent decides the choice of the band within its corresponding group; Action: Each agent in the group decides to select or deselect each band in the corresponding group. Group The band in which the agent Action Is to select or not select all K bands ; Accordingly, the action space is .
[0089] State: All agents share a state representation, represented by a two-dimensional vector whose dimension is the same as the number of bands, denoted as . Each element of the vector (in ) has two possible values:
[0090] This state representation provides a concise band selection situation for each agent, allowing the system to effectively identify selected and unselected band combinations, facilitating the execution of subsequent classification tasks.
[0091] Environment: The environment in the system is defined as a classification network with a random forest as the classifier. Random forest is an ensemble learning model consisting of multiple decision trees that can handle high-dimensional data and perform well in feature selection. Each time an agent selects a band, the current band selection combination will be provided as an input feature to the random forest model for classification. With this environment setting, each agent's band selection strategy can directly affect the classification results, thereby feeding back its selection effect through classification accuracy.
[0092] Reward: In order to guide the agent to optimize the band selection strategy in the direction of improving classification performance, the reward function is defined based on the classification accuracy. Suppose the classification accuracy obtained by the classification model under the band combination selected by the agent is , then reward Defined as:
[0093] in, represents the number of correctly classified samples, Represents the total number of samples.
[0094] S5. Training a multi-agent band selection model.
[0095] S501, input the training data in step 3 into the multi-agent model, and all agents make selection actions .
[0096] S502, using the state design method in S402, obtain the state representation .
[0097] S503, the new data after band selection is sent to the classification network of the tour, and the random forest is used as the classifier to obtain the classification accuracy. .
[0098] S504, calculate the reward for this round according to the reward function, and Stored in the experience pool as a memory sample.
[0099] S505, the obtained As a new round of input, it is input into the multi-agent model and S501 to S504 are repeated until the number of samples in the experience pool reaches the requirement.
[0100] S506, reinforcement learning update method based on diverse experience pools. A multi-level experience pool consisting of a teacher experience layer and an agent experience layer is constructed. The teacher experience layer is generated by a pre-trained teacher strategy and specifically selects memory samples with higher reward values. The agent experience layer stores the memory samples obtained by the agent itself in the environment, that is, the memory samples stored in step S504. When the strategy is updated, the system extracts samples from the two layers according to a dynamically adjusted parameter Balance the ratio of teacher experience and agent experience. In the initial stage, set , to ensure that the agent can quickly learn from the high-quality teacher experience. As training progresses, The agent’s strategy update can be expressed by the following formula:
[0101] in, represents the parameters of the policy network, is the learning rate, is at the time step The sampling ratio parameter, and Respectively represent the objective functions based on the teacher experience layer and the agent experience layer; Teachers in the teacher experience layer use existing algorithms with good band selection effects: band selection method based on embedded 3D-CNN genetic algorithm (CNNeGA) and band selection method based on dynamic interactive subgraph Transformer (DISGT).
[0102] S6. Use the trained multi-agent band selection model to select bands for the hyperspectral dataset to obtain a new dataset. This method selects 60 bands, that is, the size of the new dataset is 145×145×60. For the new dataset, 5% of the samples are randomly selected from each category to form the training sample set of the hyperspectral image. The remaining 95% of the samples form the test sample set of the hyperspectral image.
[0103] S7. Construct a multi-scale feature fusion classification network based on adaptive weights. The network structure is as follows: The first layer of 3D CNN (3D Convolutional Neural Network): convolution kernel size (7, 5, 5) is used to capture extensive spatial-spectral information.
[0104] The second layer of 3D CNN: convolution kernel size (5, 5, 5) further refines the features while maintaining sufficient contextual information.
[0105] The third layer of 3D CNN: convolution kernel size (3, 3, 3), focusing on finer local feature extraction.
[0106] The first layer is 2D CNN (2D Convolutional Neural Network): the convolution kernel size is (5, 5), which extracts spatial features from the compressed feature map and maintains sensitivity to mid-range features.
[0107] The second layer of 2D CNN: The convolution kernel size is (3, 3), which is used for the final feature refinement to provide as detailed information as possible for classification decisions.
[0108] Finally, the access module, in order to achieve classification, the processed feature map needs to pass through the following modules: Fully connected layer: Converts the feature vector after flattening the feature map into a higher dimensional feature space.
[0109] Softmax layer: Converts the output of the FC layer (Fully Connected Layer) into a probability distribution for multi-category pixel-level classification.
[0110] The feature maps generated by the first and second layers of 3D CNN are sent to the multi-scale feature fusion module with adaptive weights to generate new feature maps for subsequent classification; at the same time, the feature maps generated by the third layer of 3D CNN and the first layer of 2DCNN are also sent to the multi-scale feature fusion module with adaptive weights.
[0111] The specific calculation process of the multi-scale feature fusion module with adaptive weights is as follows: and There are two feature maps that need to be fused, the size is , after 1×1 convolution, the dimension is reduced, thereby reducing the complexity of subsequent calculations, and obtaining the feature map and Then, it is processed by global average pooling to obtain the global feature representation. After the Softmax operation, the contribution of each input feature map is obtained. Finally, the contribution value is multiplied and added to the original input feature and The final feature map is obtained , the feature map is then sent to the subsequent network for feature extraction. The specific calculation formula is as follows: For the convolution operation:
[0112]
[0113] For Softmax and weight calculation:
[0114] For the calculation of the final feature map:
[0115] S8. Send the training set to the constructed network for training.
[0116] Assume that the training set samples are in represents the input features (the band combination selected by the agent), is the true category label. The output of the model is the predicted probability in is the parameter of the network. The cross entropy loss function is used To train:
[0117] in: is the total number of samples in the training set is the number of categories, It is a sample In category The true label on (if the sample belongs to the category ,but ; otherwise 0), The model is a sample In category The predicted probability of .
[0118] Parameter update, use Adam optimizer to minimize the loss function, and update the parameters Update. The gradient descent update formula is:
[0119] in: is the learning rate, is the loss function About parameters gradient.
[0120] S9. Use the trained network to classify the hyperspectral image and obtain the classification results and classification map.
[0121] The effect of this embodiment is further described below in conjunction with simulation experiments: 1. Simulation experiment conditions: The hardware platform of the simulation experiment of the present invention is: the processor is Intel i7 7820X CPU, main frequency is 3.6GHz, and the memory is 128GB.
[0122] The software platform for the simulation experiment of the present invention is: Windows 11 operating system and Python 3.10 The input image used in the simulation experiment of the present invention is the Indian Pines hyperspectral image. The hyperspectral data was collected from the Indian Remote Sensing Experiment Area in northwest Indiana, USA. The imaging time was June 1992. The image size is pixels. The image contains 200 bands and 16 types of ground objects. The image format is mat. At the same time, the Pavia University hyperspectral image is also used. The hyperspectral data comes from an urban area in Pavia, a northern Italian city. It contains 103 spectral bands and 9 types of ground objects. The image format is mat.
[0123] In order to verify the effectiveness of the proposed reinforcement learning update method based on diverse experience pools and the band clustering method based on correlation entropy and greedy algorithm, classification experiments were conducted on the University of Pavia dataset, and the classification network was unified into a multi-scale feature fusion classification network based on adaptive weights. Ablation experiments were conducted, namely: adopting the random band grouping method (Random Band Grouping Band Selection, RSBS), multi-agent modeling without diverse experience pool update (A Multi Agent Band Selection Method Based on Clustering, C-MABS), and the multi-agent band selection method based on clustering and diverse experience pools is referred to as CD-MABS (A Multi-Agent Band Selection Method Based on Clustering and Diverse Experience Pools). The classification results are shown in the figure below. Figure 5 Shown Three evaluation indicators (classification accuracy of each category, overall accuracy OA, and average accuracy AA) are used to evaluate the classification results of the four methods respectively.
[0124] The following formula is used to calculate the total accuracy OA, average accuracy AA, and classification accuracy of 16 types of objects. All calculation results are tabulated in Table 1.
[0125]
[0126]
[0127]
[0128] Table 1. Classification results of RSBS, C-MABS, and CD-MABS on the University of Pavia dataset
[0129] Category performance differences: For most categories, the CD-MABS algorithm showed better or similar classification accuracy compared to RSBS and C-MABS. In particular, the performance improvement of CD-MABS was very significant in categories 3, 6, and 7. This may indicate that the CD-MABS algorithm can more effectively extract and utilize feature information when dealing with these categories with more complex features or more difficult to distinguish. Overall performance: In terms of OA overall accuracy, CD-MABS leads with 90.6% OA, showing its robustness and efficiency on the entire dataset. In terms of AA average accuracy, CD-MABS also performed best, reaching 88.3%, which shows that CD-MABS has a relatively balanced performance in each category. Kappa coefficient: The Kappa coefficient evaluates the difference between classification accuracy and random classification accuracy. CD-MABS has the highest Kappa coefficient of 87.8%, further proving its effectiveness and reliability in classification tasks.
[0130] Next, we verify the effectiveness of the multi-scale feature fusion module based on adaptive weights. We refer to the multi-scale feature fusion network based on adaptive weights as FFAW-Net. We conduct classification experiments on the Indian pine dataset and select radial basis function support vector machine RBF-SVM, recurrent neural network (RNN), 2D-CNN, and a network without the multi-scale feature fusion module based on adaptive weights, referred to as Mix-Net. The classification results are shown in Table 2 and Figure 6 shown.
[0131] Table 2. Classification results of RBF-SVM, RNN, Mix-Net, 2D-CNN, and FFAW-Net on the Indian pine dataset
[0132] Differences in performance across categories: The performance of different models on each category varies greatly. For example, on category 1, RBF-SVM performs much lower than other models, while on categories 5, 6, and 8, most models show high accuracy, especially FFAW-Net and 2D-CNN. Best and worst performance: FFAW-Net shows high accuracy on most categories, especially on categories 5, 8, 13, and 14, which are close to or exceed 97% accuracy. In contrast, RBF-SVM performs very poorly on some categories, such as categories 1, 7, and 9, with an accuracy close to 0%. Overall performance metrics Overall accuracy (OA): FFAW-Net leads with an OA of 82.6%, indicating that it has the best average performance across all categories. Mix-Net and 2D-CNN also show high OA, 80.8% and 78.4% respectively, while RBF-SVM and RNN have relatively low OA. Average accuracy (AA): Similar to OA, FFAW-Net leads with an AA of 84.7%, indicating that it also has the best average performance across different categories. Mix-Net and 2D-CNN also have higher AA, which shows that the models have strong generalization ability for different categories.
[0133] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0135] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention is described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation of the present invention can still be modified or replaced by equivalents, and any modification or equivalent replacement that does not deviate from the spirit and scope of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A multi-agent band selection method based on clustering and diverse experience pools, characterized in that: The following steps are involved: Collecting hyperspectral images to generate a sample set of hyperspectral images, and dividing the sample set of hyperspectral images into a training sample set and a test sample set; The training sample set is grouped by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, and a multi-agent band selection model is constructed using the grouped training sample set. Inputting the training sample set into the multi-agent band selection model to perform model training on the multi-agent band selection model to obtain a trained multi-agent band selection model, wherein the experience pool of the model training is optimized using a reinforcement learning update method based on a diverse experience pool; Use the trained multi-agent band selection model to perform band selection on the test sample set to obtain a new data set, and divide the new data set into a new training sample set and a new test sample set; Use CNN, full connection and Softmax to build a multi-scale feature fusion classification network based on adaptive weights, and send the new training sample set into the multi-scale feature fusion classification network based on adaptive weights for network training to obtain a trained classification network; The new test sample set is input into the trained classification network to classify the hyperspectral image and obtain the classification results and classification map.
2. The multi-agent band selection method based on clustering and diverse experience pool according to claim 1 is characterized in that: The method of collecting a hyperspectral image to generate a sample set of the hyperspectral image specifically comprises: expanding the hyperspectral image to a preset pixel size, defining a spatial window of a preset pixel size with each pixel in the hyperspectral image as the center, forming all pixels in each spatial window into a data cube, and forming all the data cubes into a sample set of the hyperspectral image.
3. The multi-agent band selection method based on clustering and diverse experience pool according to claim 1, characterized in that: The training sample set is grouped by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, including the following steps: using a correlation entropy calculation formula to calculate the correlation entropy between bands for all bands in the hyperspectral data set to obtain all element correlation entropies, adding all element correlation entropies to a first set, sorting the first set in descending order according to the absolute value of the correlation entropy to obtain a number of divided groups of bands, and creating a number of groups of agents according to the number of groups of bands to obtain a grouped training sample set; The relevant entropy calculation formula is as follows: in, It is a band and band The correlation entropy between represents the expected value, is a Gaussian kernel, is the bandwidth parameter of the kernel function.
4. The multi-agent band selection method based on clustering and diverse experience pool according to claim 3 is characterized in that: Using the grouped training sample set, a multi-agent band selection model is constructed, including that the action of the agent in the multi-agent band selection model is to select or deselect each band in the corresponding group; The states of all agents in the multi-agent band selection model are collectively represented by a two-dimensional vector; the two-dimensional vector is as follows: in, represents an element in a two-dimensional vector, ; The environment in the multi-agent band selection model is a classification network, which uses a random forest classifier. Each time the agent selects a band, the current band selection combination will be provided as an input feature to the random forest model for classification; The reward in the multi-agent band selection model is the classification accuracy obtained by the classification model under the band combination selected by the agent. The reward in the multi-agent band selection model is shown as follows: in, represents the reward, ACC represents the classification accuracy, represents the number of correctly classified samples, Represents the total number of samples.
5. The multi-agent band selection method based on clustering and diverse experience pool according to claim 1, characterized in that: The reinforcement learning updating method based on the diverse experience pool comprises the following steps: Construct a multi-level experience pool consisting of a teacher experience layer and an agent experience layer. The teacher experience layer is generated by a pre-trained teacher strategy that uses a band selection algorithm. The teacher experience layer selects memory samples with higher reward values. The agent experience layer stores memory samples obtained by the agent exploring the environment during model training. Samples are extracted from the teacher experience layer and the agent experience layer, and the agent strategy is updated by balancing the ratio of teacher experience and agent experience using the dynamic adjustment parameters according to the agent strategy update formula. In the initial stage of the agent strategy update, the dynamic adjustment parameters are preset, and the parameter offset is dynamically adjusted as the model is trained until it is reduced to 0. The agent’s strategy update formula is as follows: in, represents the parameters of the policy network, is the learning rate, is at the time step The sampling ratio parameter, and Respectively represent the objective functions based on the teacher experience layer and the agent experience layer, is the objective function with respect to the parameter gradient.
6. The multi-agent band selection method based on clustering and diverse experience pool according to claim 1, characterized in that: The network structure of using CNN, full connection and Softmax to build a multi-scale feature fusion classification network based on adaptive weights includes: The first layer of 3D CNN, the second layer of 3D CNN, the third layer of 3D CNN, the first layer of 2D CNN, the second layer of 2D CNN, the fully connected layer and the Softmax layer; The convolution kernel size of the first layer of 3D CNN is (7, 5, 5), the convolution kernel size of the second layer of 3D CNN is (5, 5, 5), the convolution kernel size of the third layer of 3D CNN is (3, 3, 3), the convolution kernel size of the first layer of 2D CNN is (5, 5), and the convolution kernel size of the second layer of 2D CNN is (3, 3); The first layer of 3D CNN captures extensive spatial-spectral information, the second layer of 3D CNN refines features, the third layer of 3D CNN extracts local features, the first layer of 2D CNN extracts spatial features, the second layer of 2D CNN refines classification decision features, the fully connected layer converts the feature vector after the feature map is flattened into a high-dimensional feature space, and the Softmax layer converts the output of the fully connected layer into a probability distribution for multi-category pixel-level classification; The feature maps generated by the first and second layers of 3D CNN are fed into a multi-scale feature fusion module with adaptive weights to generate a new feature map; at the same time, the feature maps generated by the third layer of 3D CNN and the first layer of 2DCNN are fed into a multi-scale feature fusion module with adaptive weights to generate a new feature map; The calculation of the multi-scale feature fusion module with adaptive weights includes the following steps: After the two original feature maps to be fused undergo 1×1 convolution, the dimensions are reduced and two feature maps are obtained. The two feature maps undergo global average pooling to obtain a global feature representation. The global feature representation undergoes a Softmax operation to obtain the contribution of each input feature map. The contribution is multiplied and added to the original feature map to obtain the final feature map. The convolution calculation formula is as follows: in, and There are two feature maps that need to be fused. and These are two feature maps after 1×1 convolution, where conv represents a 1×1 convolution operation; The Softmax contribution calculation formula is as follows: Among them, α, β are the contribution of each input feature map; AvP(F1) is The global feature representation of the feature map, AvP(F2) is The global feature representation of the feature map, softmax represents the Softmax operation; The calculation formula of the final feature map is as follows: in, is the final feature map, and are two feature maps that need to be fused, and α and β are the contribution of each input feature map.
7. The multi-agent band selection method based on clustering and diverse experience pool according to claim 1, characterized in that: The network training is performed using a cross entropy loss function, which is shown below: in, is the cross entropy loss function, is the total number of samples in the training set, is the number of categories, It is a sample In category The real label on The model is a sample In category The predicted probability of The network training uses a gradient descent update formula to minimize the cross entropy loss function to update the parameters. The gradient descent update formula is shown below: in, is the learning rate, is the cross entropy loss function About parameters gradient.
8. A multi-agent band selection system based on clustering and diverse experience pools, characterized in that: include: A sample set acquisition module is used to acquire a hyperspectral image to generate a sample set of the hyperspectral image, and divide the sample set of the hyperspectral image into a training sample set and a test sample set; Construct a band selection model module, which is used to group the training sample set by a band clustering method based on correlation entropy and greedy algorithm to obtain a grouped training sample set, and use the grouped training sample set to construct a multi-agent band selection model; A model training module is used to input the training sample set into the multi-agent band selection model to perform model training on the multi-agent band selection model to obtain a trained multi-agent band selection model, wherein the experience pool of the model training is optimized using a reinforcement learning update method based on a diverse experience pool; A new data set division module is used to use the trained multi-agent band selection model to perform band selection on the test sample set to obtain a new data set, and divide the new data set into a new training sample set and a new test sample set; Construct a classification network module, which is used to use CNN, full connection and Softmax to construct a multi-scale feature fusion classification network based on adaptive weights, and send the new training sample set into the multi-scale feature fusion classification network based on adaptive weights for network training to obtain a trained classification network; The classification result module is used to input the new test sample set into the trained classification network to classify the hyperspectral image and obtain the classification results and classification map.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the multi-agent band selection method based on clustering and diverse experience pools as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the multi-agent band selection method based on clustering and diverse experience pools as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Hyperspectral image classification method based on deep neural network
CN115424138A
Cited By
Training sample selection method for hyperspectral remote sensing image classification
CN120388253A
Method and device for identifying traditional Chinese medicine decoction pieces based on multispectrum
CN121121229A