Cross-Domain Hyperspectral Band Selection Method, Apparatus, Device, and Storage Medium
Through the combination of particle swarm optimization and neural network model, the problems of low computational efficiency and high labeling cost in hyperspectral imaging technology are solved, efficient and accurate band selection is achieved, and band combinations are optimized using prior knowledge of similar regions.
Patent Information
- Application Number
- CN202510473054.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-16
AI Technical Summary
The existing hyperspectral imaging technology has low computational efficiency, high labeling cost and insufficient utilization of prior knowledge when selecting bands, resulting in insufficient accuracy and efficiency of cross-domain applications.
By initializing the particle swarm, the neural network model trained in the source domain calculates the fitness value, and combines spectral similarity and segmentation point adjustments to optimize the combination of hyperspectral bands, and uses transfer learning to reduce the annotation cost.
The efficiency and accuracy of band selection in hyperspectral data are improved, the annotation cost is reduced, the prior knowledge of similar regions is fully utilized, and the band selection process is optimized.
Smart Images

Figure CN119992244B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of remote sensing information processing, and particularly relates to a cross-domain hyperspectral band selection method, device, equipment and storage medium. Background Art
[0002] Hyperspectral imaging technology (HSI) is a technology that combines spectral analysis and traditional imaging. It can simultaneously obtain the spatial information and continuous and fine spectral information of a target. This technology can not only provide two-dimensional image information of an object, but also reveal the chemical composition and physical properties of the object through spectral information. Different from ordinary cameras (which only capture the red, green, and blue channels) or multispectral imaging (a few discrete bands), hyperspectral imaging can cover dozens to hundreds of continuous narrow bands (such as the visible light, near-infrared or mid-infrared ranges), forming a "data cube" (including the spatial dimension and the spectral dimension (wavelength)), thereby revealing the unique spectral characteristics of substances.
[0003] Currently, hyperspectral imaging technology has been widely applied in the field of remote sensing, especially in tasks such as surface analysis and classification. Traditional band selection methods are widely used to select the most representative bands from hyperspectral data, thereby reducing the data dimension and improving the classification accuracy. However, existing band selection methods have several problems when processing hyperspectral data. Firstly, the calculation efficiency is low: existing band selection methods usually rely on fixed metrics, such as information entropy or coefficient of variation. These methods have a high calculation cost when processing high-resolution and high-dimensional unmanned aerial vehicle (UAV) hyperspectral data. Especially when the number of bands and samples increases significantly, it may lead to a serious decline in calculation efficiency. Secondly, the annotation cost of hyperspectral data is high: the annotation process of hyperspectral data usually requires professional knowledge, and the annotation cost is even higher in complex scenarios. As the scale and dimension of UAV hyperspectral data continue to increase, traditional supervised learning methods face the problems of insufficient labeled data and too high annotation cost. Thirdly, the utilization of prior knowledge is insufficient: existing band selection methods usually ignore the prior knowledge from similar regions. Although the data in different regions may have similar ground object categories and spectral characteristics, traditional methods do not fully utilize these similarities for band selection, resulting in the failure to effectively utilize potential optimization opportunities. Summary of the Invention
[0004] The purpose of the present invention is to provide a cross-domain hyperspectral band selection method, device, equipment and storage medium, aiming to solve the problems of low accuracy, low efficiency and high annotation cost in cross-domain hyperspectral band selection due to the existing technology.
[0005] On the one hand, the present invention provides a cross - domain hyperspectral band selection method, and the method includes the following steps:
[0006] Initialize a particle swarm according to the total number of bands in the target domain;
[0007] Group and divide the hyperspectral bands in the target domain according to the total number of bands and a preset number of target groups to obtain target hyperspectral band groups;
[0008] Use a neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at its current position in the solution space, where the solution space is composed of the target hyperspectral band groups;
[0009] When a preset optimization termination condition is reached, determine the particle with the highest fitness value in the particle swarm as the optimal band combination in the target domain according to the fitness value;
[0010] When the optimization termination condition is not reached, update the position information and velocity information of each particle in the particle swarm according to the fitness value, and jump to the step of using the neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at its current position in the solution space.
[0011] Preferably, the step of grouping and dividing the hyperspectral bands in the target domain includes:
[0012] Group and divide the hyperspectral bands in the target domain according to the segmentation points of each group to obtain hyperspectral band groups corresponding to the number of target groups;
[0013] Adjust the hyperspectral bands included in each hyperspectral band group according to the spectral similarity between bands to obtain the target hyperspectral band groups.
[0014] Preferably, the step of grouping and dividing the hyperspectral bands in the target domain according to the segmentation points of each group includes:
[0015] Calculate the segmentation points for grouping according to the total number of bands and the number of target groups using a preset segmentation point calculation formula, where the segmentation point calculation formula is , represents the total number of bands, represents the number of target groups, , represents the th segmentation point of the
[0016] Preferably, the step of adjusting the hyperspectral bands included in each hyperspectral band group according to the spectral similarity between bands includes:
[0017] Calculate the similarity distance of the boundary bands between adjacent groups according to all the hyperspectral band groups;
[0018] According to the similarity distance, adjust the split points between the corresponding adjacent groups by using a preset split point adjustment strategy, and update the hyperspectral bands in the corresponding hyperspectral band groups, then jump to the step of calculating the similarity distance of the boundary bands between adjacent groups according to all the hyperspectral band groups until a preset band adjustment termination condition is reached.
[0019] Preferably, before the step of calculating the fitness value of each particle in the particle swarm at the current position in the solution space by using a neural network model trained based on the source domain, the method further includes:
[0020] Construct a source domain data set for training the neural network model by using a preset data set optimization strategy;
[0021] Iteratively train the neural network model by using the source domain data set until a preset training termination condition is satisfied.
[0022] Preferably, the step of constructing a source domain data set for training the neural network model by using a preset data set optimization strategy includes:
[0023] Construct an initial training data set by using the prior knowledge of historical hyperspectral data;
[0024] Filter the bands of the initial training data set according to a number of randomly generated masks to obtain corresponding band combinations, and calculate the classification accuracy of each band combination;
[0025] Calculate the information entropy of each band in the initial training data set;
[0026] Optimize the initial training data set according to the classification accuracy and the information entropy to obtain the source domain data set.
[0027] On the other hand, the present invention provides a cross-domain hyperspectral band selection device, and the device includes:
[0028] A particle swarm initialization unit, configured to initialize a particle swarm according to the total number of bands in the target domain;
[0029] A band combination division unit, configured to group and divide the hyperspectral bands in the target domain according to the total number of bands and a preset number of target groups to obtain target hyperspectral band groups;
[0030] A fitness value calculation unit, configured to calculate the fitness value of each particle in the particle swarm at the current position in the solution space by using a neural network model trained based on the source domain, where the solution space is composed of the target hyperspectral band group;
[0031] An optimal combination determination unit, configured to, when a preset optimization termination condition is reached, determine, according to the fitness value, the particle with the highest fitness value in the particle swarm as the optimal band combination of the target domain;
[0032] A particle information update unit, configured to, when the optimization termination condition is not reached, update the position information and velocity information of each particle in the particle swarm according to the fitness value, trigger the fitness value calculation unit, and execute calculating the fitness value of each particle in the particle swarm at the current position in the solution space by using a neural network model trained based on the source domain.
[0033] Preferably, the band combination division unit includes:
[0034] A segmentation point division unit, configured to group and divide the hyperspectral bands in the target domain according to the segmentation points of each group to obtain hyperspectral band groups corresponding to the target number of groups;
[0035] A band combination adjustment unit, configured to adjust the hyperspectral bands included in each hyperspectral band group according to the spectral similarity between bands to obtain the target hyperspectral band group.
[0036] On the other hand, the present invention further provides a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the steps of the cross-domain hyperspectral band selection method as described above are implemented.
[0037] On the other hand, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the cross-domain hyperspectral band selection method as described above are implemented.
[0038] According to the total number of bands in the target domain, the present invention initializes a particle swarm. Based on the total number of bands and the number of target groups, the hyperspectral bands in the target domain are grouped and divided to obtain target hyperspectral band groups. Using a neural network model trained based on the source domain, the fitness value of each particle in the particle swarm at the current position in the solution space composed of the target hyperspectral band groups is calculated. It is judged whether the optimization termination condition is reached. If so, the particle with the highest fitness value in the particle swarm is determined as the optimal band combination in the target domain. Otherwise, according to the fitness value, the position information and velocity information of each particle in the particle swarm are updated, and the search and optimization continue in the search space. Thus, while reducing the cost of hyperspectral data annotation, the efficiency and effect of selecting the most representative bands from hyperspectral data are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 FIG. is a flowchart of implementing a cross-domain hyperspectral band selection method provided in Embodiment 1 of the present invention;
[0040] Figure 2 FIG. is a schematic structural diagram of a cross-domain hyperspectral band selection device provided in Embodiment 2 of the present invention;
[0041] Figure 3 FIG. is a schematic structural diagram of a computing device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0043] It should be understood that the terms "first", "second", "third", etc. in the embodiments of the present invention are used to distinguish similar or same-kind objects or entities, and do not necessarily mean to limit a specific order or sequence. Unless otherwise noted, it should be understood that such terms can be interchanged under appropriate circumstances, for example, they can be implemented in an order other than those given in the illustrations or descriptions of the embodiments of the present disclosure.
[0044] Unless otherwise specified, the term "several" in the embodiments of the present invention means two or more, and other quantifiers are similar.
[0045] The following describes the specific implementation of the present invention in detail with reference to specific embodiments:
[0046] Example 1:
[0047] Figure 1The implementation process of the cross - domain hyperspectral band selection method provided in the first embodiment of the present invention is shown. For the sake of convenience of description, only the parts related to the embodiments of the present invention are shown and are described in detail as follows:
[0048] In step S101, according to the total number of bands in the target domain, a particle swarm is initialized.
[0049] The embodiments of the present invention are applicable to computing devices, such as personal computers, servers, etc. In the embodiments of the present invention, the target domain is a hyperspectral image data set to be processed, which contains multiple hyperspectral bands. The total number of hyperspectral bands (abbreviation: bands) in the target domain is denoted as , here, randomly generate individuals encoded with binary vectors and of length . Each individual represents a possible band selection scheme (i.e., band combination). Each bit of the binary vector corresponds to the selection status of a band (1 represents selected, 0 represents not selected), and all individuals constitute a particle swarm.
[0050] In step S102, according to the total number of bands and the preset number of target groups, the hyperspectral bands in the target domain are grouped and divided to obtain target hyperspectral band groups.
[0051] In the embodiments of the present invention, the preset number of target groups is denoted as . Here, all the hyperspectral bands in the target domain are divided into groups, then groups of target hyperspectral band groups are obtained, where the bands within each group have similar spectral characteristics.
[0052] In a feasible embodiment, the grouping and division are implemented through the following steps:
[0053] (S102.1) According to the segmentation points of each group, the hyperspectral bands in the target domain are grouped and divided to obtain hyperspectral band groups corresponding to the number of target groups;
[0054] In the embodiments of the present invention, the segmentation point is a key parameter for determining the boundaries of each group. The hyperspectral bands included in each group are determined by the band range formed by two adjacent segmentation points, that is groups have segmentation points. Here, according to the segmentation points of each group, the hyperspectral bands in the target domain are divided into groups of hyperspectral band groups.
[0055] In a feasible embodiment, when grouping and dividing the hyperspectral bands in the target domain according to the segmentation points of each group, first, according to the total number of bands and the number of target groups , calculate the segmentation points for grouping to evenly divide the wavelength bands, where specifically,
[0056] When is satisfied, set the first splitting point to 1, denoted as ;
[0057] When is satisfied, calculate the splitting point for grouping using a preset splitting point calculation formula, where the splitting point calculation formula is , represents the total number of wavelength bands, represents the number of target groups, represents the th splitting point, represents the remainder of B divided by G, which is used to ensure that the wavelength bands can be evenly divided;
[0058] When is satisfied, i.e., the last splitting point, set , indicating that the grouping has covered all wavelength bands;
[0059] After that, according to the calculated splitting point , divide the hyperspectral wavelength bands in the target domain into continuous and non - overlapping intervals, and each interval is a hyperspectral wavelength band group. Each hyperspectral wavelength band group contains all the wavelength bands within the wavelength range , , this division method ensures that all wavelength bands are completely assigned to groups, realizing a rough division of the hyperspectral wavelength bands in the target domain, thereby reducing the computational complexity and optimizing the subsequent wavelength band selection process, providing a reasonable initial grouping structure for the subsequent steps.
[0060] (S102.2) Adjust the hyperspectral wavelength bands included in each hyperspectral wavelength band group according to the spectral similarity between wavelength bands to obtain the target hyperspectral wavelength band group.
[0061] In the embodiments of the present invention, adjust the hyperspectral wavelength bands included in each hyperspectral wavelength band group according to the spectral similarity between wavelength bands, so that the number of wavelength bands in each group may no longer be uniform, but similar wavelength bands are grouped into the same group, thereby realizing a refined division of the wavelength bands in the target domain and obtaining the final target hyperspectral wavelength band group.
[0062] In a feasible embodiment, the adjustment of the hyperspectral wavelength bands included in each hyperspectral wavelength band group is achieved through the following steps:
[0063] (S102.2.1) Calculate the similarity distance of the boundary bands between adjacent groups according to all hyperspectral band groups;
[0064] In the embodiment of the present invention, for two adjacent hyperspectral band groups before and after , ( ), the corresponding segmentation points are , , . Define as the last band of the previous group , as the first band of the next group , and calculate the following four similarity distances:
[0065] Use the formula to calculate the similarity distance between group and ;
[0066] Use the formula to calculate the similarity distance between group and ;
[0067] Use the formula to calculate the similarity distance between group and ;
[0068] Use the formula to calculate the similarity distance between group and ;
[0069] Among them, represents the Euclidean distance, is the last band of group , is the first band of group , is the th band.
[0070] (S102.2.2) According to the similarity distance, adjust the segmentation points between the corresponding adjacent groups by using a preset segmentation point adjustment strategy, and update the hyperspectral bands in the corresponding hyperspectral band groups, then jump to the step of calculating the similarity distance of the boundary bands between adjacent groups according to all the hyperspectral band groups until the preset band adjustment termination condition is reached.
[0071] In the embodiments of the present invention, according to the similarity distance, a preset segmentation point adjustment strategy is adopted to adjust the segmentation points between corresponding adjacent groups, and the hyperspectral bands in the corresponding hyperspectral band groups are updated. Specifically:
[0072] When and , it indicates that the frequency band and are closer to the previous group, then the segmentation point moves backward, so that is classified into the previous group . At this time, the hyperspectral bands in group are updated;
[0073] When and , it indicates that the frequency band and are closer to the next group, then the segmentation point moves forward, so that is classified into the next group . At this time, the hyperspectral bands in group are updated;
[0074] If the above conditions are not met, it is considered that the current segmentation point is reasonable and no adjustment is made;
[0075] For the updated hyperspectral band groups, steps S102.2.1 to S102.2.2 are repeatedly executed until the segmentation points no longer change or the preset maximum number of iterations is reached, and the optimized final grouping result, that is, the target hyperspectral band group is output.
[0076] Through the above steps S102.2.1 and S102.2.2, the band grouping is further refined based on similarity analysis, thereby reducing the redundancy between different groups, optimizing the grouping effect, and improving the effectiveness of data classification, the accuracy and stability of band selection.
[0077] The above steps S102.1 to S102.2 divide the bands with high similarity into the same group in a uniform and fine grouping manner, and select bands from each group, thereby reducing the selection of redundant bands, reducing the calculation amount, and improving the efficiency and effect of band selection.
[0078] In step S103, using the neural network model trained based on the source domain, the fitness value of each particle in the particle swarm at the current position in the solution space is calculated, and this solution space is composed of the target hyperspectral band groups.
[0079] In the embodiments of the present invention, the particle swarm searches in the solution space composed of the target hyperspectral band group based on the grouping constraint of the target hyperspectral band group (ensuring that at least one band is selected for each group) to seek the optimal solution, and evaluates the fitness of each particle to judge the quality of the current band selection scheme and guide the update of the particles. Here, for the band selection scheme represented by each particle, is used for classification performance evaluation, and the classification accuracy is calculated as the fitness value of the particle at the current position. Specifically, the fitness function is used to calculate the fitness value, where represents the classification accuracy on the band combination selected by the particle, represents the particle 's current position. Thus, by combining the neural network model trained based on the source domain, the particles can obtain an evaluation based on the prior knowledge learned from the source domain during the search process, improving the accuracy and efficiency of cross-domain band selection and making the optimization process more efficient.
[0080] In a feasible embodiment, before calculating the fitness value of each particle in the particle swarm at the current position in the solution space by using the neural network model trained based on the source domain, the training of the neural network model is realized through the following steps:
[0081] (S103.1) Adopt a preset data set optimization strategy to construct a source domain data set for neural network model training;
[0082] In the embodiments of the present invention, a preset data set optimization strategy is adopted to construct a source domain data set for neural network model training to improve data processing efficiency and reduce computational complexity.
[0083] In a feasible embodiment, the construction of the source domain data set is realized through the following steps:
[0084] (S103.1.1) Utilize the prior knowledge of historical hyperspectral data to construct an initial training data set;
[0085] In the embodiments of the present invention, prior knowledge is extracted from historical hyperspectral data and used to construct an initial training data set , where is the number of samples in the initial training data set, that is, the initial training data set consists of samples, and each input sample corresponds to a label .
[0086] (S103.1.2) According to several groups of randomly generated masks, perform mask filtering on the bands of the initial training dataset to obtain corresponding band combinations, and calculate the classification accuracy of each band combination.
[0087] In the embodiments of the present invention, several groups of different masks are randomly generated in a binary coding manner, and the length of each group of masks is equal to the total number of bands of the initial training dataset. And for each group of masks, the elements with a value of 1 indicate that the corresponding bands are selected, and the elements with a value of 0 indicate that the bands are not selected. Apply each group of masks to the initial training dataset respectively, filter out the bands corresponding to the elements 1 in the masks, and form the corresponding band combinations. The band combinations corresponding to each group of masks Among them, is the initial training dataset. After that, for the band combinations generated by each group of masks, use the K-Nearest Neighbors (KNN) classifier to calculate the classification accuracy of the band combinations. The classification accuracy is used to evaluate the quality of different band combinations to screen out the optimal band combination. When using the KNN classifier to calculate the classification accuracy of the band combinations, specifically, use the Euclidean distance or cosine similarity to calculate the similarity between samples in the band combinations, select the k most similar samples based on the preset number of neighbors k, determine the class prediction label through voting, and count the matching ratio between the class prediction label and the true label as the classification accuracy of the current band combination.
[0088] As an example, the initial training dataset is with a total of 10 bands. Randomly generate a group of masks with a length of 10 and apply this mask to and perform mask filtering on the bands of . Then the filtered bands are , , , , , and the obtained band combination is .
[0089] (S103.1.3) Calculate the information entropy of each band in the initial training dataset.
[0090] In the embodiments of the present invention, information entropy is a measurement method for measuring the amount of information of a band, which can reflect the information richness of a specific band in the overall data. Based on this, use the information entropy calculation formula to calculate the information entropy of each band in the initial training dataset to optimize the construction of the training data and make it more representative and effective. Among them, represents the th band The gray level, is the probability of this gray level, for the band of the information entropy.
[0091] (S103.1.4) Optimize the initial training data set according to the classification accuracy and information entropy to obtain the source domain data set.
[0092] In the embodiment of the present invention, retain the band combination whose classification accuracy meets the preset accuracy threshold, and screen out the bands with high information content whose information entropy is higher than the preset entropy threshold. Fuse the retained band combination with the screened bands to generate the final training data set, and use this training data set as the source domain data set, thereby improving the quality of the training data.
[0093] The above steps S103.1.1 to S103.1.4 screen bands by combining the mask and information entropy, so that the samples finally used for the neural network model training not only contain the results of band selection, but also retain the band features with high information content, thereby improving the adaptability of the model under different band selection schemes, enhancing the robustness of the model, and improving the final classification accuracy.
[0094] (S103.2) Iteratively train the neural network model with the source domain data set until the preset training termination condition is met.
[0095] In the embodiment of the present invention, use the source domain data set to iteratively train the pre-constructed and initialized neural network model until the preset training termination condition is met to ensure that the model can learn the effective features in the source domain data and finally be used for the band selection optimization of the target domain. Specifically, first, the source domain data set is input into the neural network model for forward propagation calculation to obtain the predicted output. Then, calculate the error rate between the predicted output and the true label through the loss function of the neural network model. The calculation result of the error rate is used to guide the update of the model parameters. After the error rate calculation is completed, use the backpropagation algorithm to calculate the gradient of the loss function with respect to the model parameters, and adjust the network weights and biases based on the gradient descent strategy. The model parameters are continuously adjusted in each iteration to minimize the loss function value, thereby improving the prediction ability of the model. The training process continues until the preset training termination condition is met. The preset termination conditions include the following two cases: one is that when the error rate of the model decreases less than the decrease threshold after several consecutive iterations, that is, it is equivalent to the error rate no longer decreasing, indicating that the model has reached the convergence state, and further training is difficult to obtain performance improvement; the other is that when the training time reaches the maximum set value, that is, the number of training iterations reaches the upper limit, to avoid waste of computing resources and model overfitting caused by overtraining. After either training termination condition is met, the training process terminates, and the finally trained neural network model is obtained 。
[0096] Through the above steps S103.1 to S103.2, the training of the neural network model is completed, enabling the model to optimize the band selection of the target domain unlabeled data by learning the prior knowledge of the source domain labeled hyperspectral data. This process uses transfer learning technology to reduce the dependence on the target domain labeled data, reduce the annotation cost, and effectively solve the cross-domain hyperspectral band selection problem.
[0097] In step S104, it is judged whether a preset optimization termination condition is reached.
[0098] In the embodiment of the present invention, to judge whether a preset optimization termination condition is reached, specifically, it is judged whether the current iteration number reaches a preset optimization iteration threshold, or whether the improvement amplitude of the fitness value in several consecutive rounds of iterations is less than a preset improvement threshold. If so, the iteration is terminated and step S106 is executed; otherwise, step S105 is executed to continue the iteration.
[0099] In step S105, according to the fitness value, the position information and velocity information of each particle in the particle swarm are updated.
[0100] In the embodiment of the present invention, the result of fitness evaluation is used to guide the update of the particles. Here, when the preset optimization termination condition is not reached, each particle dynamically adjusts its own position according to its current fitness value and jumps to step S103 to seek a better solution. Specifically, the update of the position information and velocity information of each particle is realized through the following steps:
[0101] (S105.1) According to the fitness value, update the individual optimal position corresponding to each particle in the particle swarm and the global optimal position of the particle swarm;
[0102] In the embodiment of the present invention, for the sake of convenient description, the number of this round of iteration is denoted as , the particle The optimal position found so far (i.e., the individual optimal position) before the th round of iteration is denoted as , the optimal position found by the particle swarm so far (i.e., the global optimal position) is denoted as , the particle The current position information and velocity information of the th round of iteration are respectively denoted as and . Here, according to the fitness value, the individual optimal position corresponding to each particle in the particle swarm and the global optimal position of the particle swarm are updated. Specifically, when the fitness value corresponding to the individual optimal position of the particle is not higher than the fitness value of this particle at the current position When the fitness value is reached, the particle 's individual optimal position is updated to the current position , that is , otherwise, the individual optimal position remains unchanged. When there is a particle in the particle swarm with a fitness value higher than the fitness value corresponding to the global optimal position , the global optimal position is updated to the position information corresponding to the particle with the highest fitness value in the particle swarm. When the fitness values of all particles in the particle swarm are not higher than the fitness value corresponding to the global optimal position , the global optimal position remains unchanged.
[0103] (S105.2) According to the updated individual optimal position and global optimal position, update the position information and velocity information of each particle in the particle swarm.
[0104] In the embodiment of the present invention, first, use the velocity update formula to calculate the new velocity information of the particle . After that, according to the updated velocity, use the position update formula to calculate the new position information of the particle , where is the inertia weight, and are acceleration constants, and are random numbers between [0, 1].
[0105] Through the above steps S105.1 to S105.2, the position information and velocity information of each particle in the particle swarm are updated, thus ensuring that the particles can continuously adjust their positions in the search space and gradually approach the optimal solution.
[0106] In step S106, according to the fitness value, the particle with the highest fitness value in the particle swarm is determined as the optimal band combination in the target domain.
[0107] In the embodiment of the present invention, when the preset optimization termination condition is reached, the particle with the highest fitness value in the particle swarm is determined as the optimal band combination in the target domain.
[0108] In an embodiment of the present invention, according to the total number of bands in the target domain, a particle swarm is initialized. According to the total number of bands and the target number of groups, the hyperspectral bands in the target domain are grouped and divided to obtain a target hyperspectral band group. Using a neural network model trained based on the source domain, the fitness value of each particle in the particle swarm at the current position in the solution space composed of the target hyperspectral band group is calculated. It is judged whether the optimization termination condition is reached. If so, the particle with the highest fitness value in the particle swarm is determined as the optimal band combination of the target domain. Otherwise, according to the fitness value, the position information and velocity information of each particle in the particle swarm are updated, and the search and optimization continue in the search space, thereby reducing the cost of hyperspectral data annotation while improving the efficiency and effect of selecting the most representative bands from hyperspectral data.
[0109] Example 2:
[0110] Figure 2 Fig. shows the structure of the cross-domain hyperspectral band selection device provided in the second embodiment of the present invention. For the sake of convenience of description, only the parts related to the embodiment of the present invention are shown, including:
[0111] A particle swarm initialization unit 21, configured to initialize a particle swarm according to the total number of bands in the target domain;
[0112] A band combination division unit 22, configured to group and divide the hyperspectral bands in the target domain according to the total number of bands and a preset target number of groups to obtain a target hyperspectral band group;
[0113] A fitness value calculation unit 23, configured to use a neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at the current position in the solution space, and the solution space is composed of the target hyperspectral band group;
[0114] An optimal combination determination unit 24, configured to, when a preset optimization termination condition is reached, determine the particle with the highest fitness value in the particle swarm as the optimal band combination of the target domain according to the fitness value;
[0115] A particle information update unit 25, configured to, when the optimization termination condition is not reached, update the position information and velocity information of each particle in the particle swarm according to the fitness value, trigger the fitness value calculation unit 23, and execute using a neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at the current position in the solution space.
[0116] Preferably, the band combination division unit 22 includes:
[0117] A segmentation point division unit, configured to group and divide the hyperspectral bands in the target domain according to the segmentation point of each group to obtain a hyperspectral band group corresponding to the target number of groups;
[0118] A band combination adjustment unit, configured to adjust the hyperspectral bands included in each hyperspectral band group according to the spectral similarity between bands, so as to obtain a target hyperspectral band group.
[0119] Preferably, the cross-domain hyperspectral band selection device according to an embodiment of the present invention further includes:
[0120] A dataset construction unit, configured to construct a source domain dataset for neural network model training by using a preset dataset optimization strategy;
[0121] A model training unit, configured to perform iterative training on the neural network model by using the source domain dataset until a preset training termination condition is met.
[0122] Preferably, the dataset construction unit includes:
[0123] An initial data construction unit, configured to construct an initial training dataset by using the prior knowledge of historical hyperspectral data;
[0124] A band mask filtering unit, configured to perform mask filtering on the bands of the initial training dataset according to several groups of randomly generated masks, obtain corresponding band combinations, and calculate the classification accuracy of each band combination;
[0125] An information entropy calculation unit, configured to calculate the information entropy of each band in the initial training dataset;
[0126] A dataset optimization unit, configured to optimize the initial training dataset according to the classification accuracy and information entropy, so as to obtain a source domain dataset.
[0127] In the embodiment of the present invention, each unit of the cross-domain hyperspectral band selection device can be implemented by corresponding hardware or software units. Each unit can be an independent software or hardware unit, or can be integrated into a software or hardware unit, which is not used to limit the present invention herein. Specifically, the implementation manners of each unit can refer to the description of the foregoing Embodiment 1, and will not be elaborated herein.
[0128] Example 3:
[0129] Figure 3 The structure of a computing device provided in Embodiment 3 of the present invention is shown. For the sake of convenience of description, only the parts related to the embodiment of the present invention are shown.
[0130] The computing device 3 according to the embodiment of the present invention includes a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, the steps in the foregoing embodiment of the cross-domain hyperspectral band selection method are implemented, for example Figure 1The steps S101 to S106 shown. Alternatively, when the processor 30 executes the computer program 32, the functions of each unit in the above device embodiments are implemented. For example, Figure 2 the functions of the units shown.
[0131] In the embodiments of the present invention, according to the total number of bands in the target domain, a particle swarm is initialized. According to the total number of bands and the number of target groups, the hyperspectral bands in the target domain are grouped and divided to obtain a target hyperspectral band group. Using a neural network model trained based on the source domain, the fitness value of each particle in the particle swarm at the current position in the solution space composed of the target hyperspectral band group is calculated. It is judged whether the optimization termination condition is reached. If so, the particle with the highest fitness value in the particle swarm is determined as the optimal band combination in the target domain. Otherwise, according to the fitness value, the position information and velocity information of each particle in the particle swarm are updated, and continued search and optimization are carried out in the search space, thereby reducing the cost of hyperspectral data annotation while improving the efficiency and effect of selecting the most representative bands from hyperspectral data.
[0132] The computing device in the embodiments of the present invention may be a personal computer. The steps implemented when the processor 30 in the computing device 3 executes the computer program 32 to implement the cross-domain hyperspectral band selection method may refer to the description of the foregoing method embodiments and will not be elaborated herein.
[0133] Example 4:
[0134] In the embodiments of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps in the above cross-domain hyperspectral band selection method embodiments are implemented. For example, Figure 1 the steps S101 to S106 shown. Alternatively, when the computer program is executed by a processor, the functions of each unit in the above device embodiments are implemented. For example, Figure 2 the functions of the units shown.
[0135] In the embodiments of the present invention, according to the total number of bands in the target domain, a particle swarm is initialized. According to the total number of bands and the number of target groups, the hyperspectral bands in the target domain are grouped and divided to obtain a target hyperspectral band group. Using a neural network model trained based on the source domain, the fitness value of each particle in the particle swarm at the current position in the solution space composed of the target hyperspectral band group is calculated. It is judged whether the optimization termination condition is reached. If so, the particle with the highest fitness value in the particle swarm is determined as the optimal band combination in the target domain. Otherwise, according to the fitness value, the position information and velocity information of each particle in the particle swarm are updated, and continued search and optimization are carried out in the search space, thereby reducing the cost of hyperspectral data annotation while improving the efficiency and effect of selecting the most representative bands from hyperspectral data.
[0136] The computer-readable storage medium according to an embodiment of the present invention may include any entity or device capable of carrying computer program code, a recording medium, for example, memories such as ROM / RAM, magnetic disks, optical disks, flash memories, etc.
[0137] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A cross-domain hyperspectral band selection method, characterized in that The method includes the following steps: Initialize a particle swarm according to the total number of bands in the target domain; Group and divide the hyperspectral bands in the target domain according to the total number of bands and a preset number of target groups to obtain target hyperspectral band groups; Use a neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at its current position in the solution space, where the solution space is composed of the target hyperspectral band groups; When a preset optimization termination condition is reached, determine the particle with the highest fitness value in the particle swarm as the optimal band combination in the target domain according to the fitness value; When the optimization termination condition is not reached, update the position information and velocity information of each particle in the particle swarm according to the fitness value, and jump to the step of using a neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at its current position in the solution space; Among them, the step of grouping and dividing the hyperspectral bands in the target domain includes: Group and divide the hyperspectral bands in the target domain according to the segmentation points of each group to obtain hyperspectral band groups corresponding to the number of target groups; Adjust the hyperspectral bands included in each hyperspectral band group according to the spectral similarity between bands to obtain the target hyperspectral band groups, including: Calculate the similarity distance of the boundary bands between adjacent groups according to all the hyperspectral band groups; According to the similarity distance, adjust the segmentation points between the corresponding adjacent groups by using a preset segmentation point adjustment strategy, and update the hyperspectral bands in the corresponding hyperspectral band groups, and jump to the step of calculating the similarity distance of the boundary bands between adjacent groups according to all the hyperspectral band groups until a preset band adjustment termination condition is reached.
2. The method according to claim 1, characterized in that, The step of grouping and dividing the hyperspectral bands in the target domain according to the segmentation points of each group includes: According to the total number of the bands and the number of the target groups, a splitting point calculation formula preset is used to calculate the splitting points for grouping, where the splitting point calculation formula is , represents the total number of the bands, represents the number of the target groups, , represents the th splitting point, represents the remainder of B divided by G.
3. The method according to claim 1, characterized in that, Before the step of using a neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at its current position in the solution space, the method further includes: Construct a source domain dataset for training the neural network model by using a preset dataset optimization strategy; Iteratively train the neural network model by using the source domain dataset until a preset training termination condition is met.
4. The method according to claim 3, characterized in that, The step of constructing a source domain dataset for training the neural network model by using a preset dataset optimization strategy includes: Construct an initial training dataset by using the prior knowledge of historical hyperspectral data; Filter the bands of the initial training dataset according to a number of randomly generated masks to obtain corresponding band combinations, and calculate the classification accuracy of each band combination; Calculate the information entropy of each band in the initial training dataset; Optimize the initial training dataset according to the classification accuracy and the information entropy to obtain the source domain dataset.
5. A cross - domain hyperspectral band selection device, characterized in that, The device includes: A particle swarm initialization unit for initializing a particle swarm according to the total number of bands in the target domain; A band combination division unit, configured to group and divide the hyperspectral bands in the target domain according to the total number of bands and a preset number of target groups, so as to obtain target hyperspectral band groups; A fitness value calculation unit, configured to use a neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at the current position in the solution space, where the solution space is composed of the target hyperspectral band groups; An optimal combination determination unit, configured to, when a preset optimization termination condition is reached, determine the particle with the highest fitness value in the particle swarm as the optimal band combination of the target domain according to the fitness value; A particle information update unit, configured to, when the optimization termination condition is not reached, update the position information and velocity information of each particle in the particle swarm according to the fitness value, trigger the fitness value calculation unit, and execute using the neural network model trained based on the source domain to calculate the fitness value of each particle in the particle swarm at the current position in the solution space; Wherein, the band combination division unit includes: A segmentation point division unit, configured to group and divide the hyperspectral bands in the target domain according to the segmentation point of each group, so as to obtain hyperspectral band groups corresponding to the number of target groups; A band combination adjustment unit, configured to adjust the hyperspectral bands included in each of the hyperspectral band groups according to the spectral similarity between bands, so as to obtain the target hyperspectral band groups, including: Calculating the similarity distance of the boundary bands between adjacent groups according to all the hyperspectral band groups; According to the similarity distance, adjusting the segmentation points between the corresponding adjacent groups by using a preset segmentation point adjustment strategy, and updating the hyperspectral bands in the corresponding hyperspectral band groups, and jumping to the step of calculating the similarity distance of the boundary bands between adjacent groups according to all the hyperspectral band groups until a preset band adjustment termination condition is reached.
6. A computing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Hyperspectral image wave band selection method based on quantum-behaved particle swarm optimization algorithm
CN103714354A
Hydroelectric generating set fault diagnosis method and system based on transfer learning and PSO algorithm
CN116911378A