Unsupervised band selection method, device, equipment and storage medium
By converting the band selection of hyperspectral images into a population multiple evolution problem and using cross-domain knowledge migration to adjust the positions of the particles to be migrated, the problem of insufficient accuracy in hyperspectral image band selection is solved and higher band selection accuracy is achieved.
Patent Information
- Application Number
- CN202410071112.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-17
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-01-17
AI Technical Summary
The existing technology has poor band selection accuracy for hyperspectral images, making it difficult to select better bands. Especially when processing hyperspectral images collected by different sensors, cross-domain knowledge transfer contains a large amount of redundant or irrelevant knowledge, resulting in poor selection results.
The band selection problem of hyperspectral images is converted into a multiple evolution problem of population. Particle evolution is carried out in the population through cross-domain knowledge migration. The first and second hyperspectral images are used to adjust the positions of the migrated particles, filter out redundant or irrelevant knowledge, and improve the accuracy of particle evolution.
It effectively improves the accuracy of band selection of hyperspectral images, reduces the negative guidance effect in cross-domain knowledge transfer, and selects better bands.
Smart Images

Figure CN117935048B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to an unsupervised band selection method, apparatus, device, and storage medium. Background Art
[0002] With the development of remote sensing technology, hyperspectral imagery is widely used in geographic resource scenarios such as land cover classification, mineral exploration, and agricultural applications. Original hyperspectral images are collected from multiple bands, many of which are useless or redundant. Therefore, band selection technology is one of the key technologies in hyperspectral image processing.
[0003] In the related art, the band selection of a single hyperspectral image is processed independently, or when processing multiple hyperspectral images collected by different sensors, the band selection task corresponding to each hyperspectral image is optimized from a zero-knowledge state.
[0004] However, the band selection accuracy of the above method is poor, and it is difficult to select a better band. Summary of the Invention
[0005] The embodiments of the present disclosure provide an unsupervised band selection method, apparatus, device and storage medium to solve the problem that the band selection accuracy of hyperspectral images is poor and it is difficult to select a good band from the hyperspectral images.
[0006] In a first aspect, an embodiment of the present disclosure provides an unsupervised band selection method, comprising:
[0007] Obtain a first hyperspectral image, a first population corresponding to the first hyperspectral image, and a second hyperspectral image and a second population corresponding to the second hyperspectral image, wherein the first hyperspectral image is a target domain dataset for knowledge migration, the second hyperspectral image is a source domain dataset for knowledge migration, the first population and the second population each contain a plurality of particles, an element in a position vector of the particle corresponds to a band, and a value of the element corresponds to the importance of the band;
[0008] performing multiple evolutions on the first population based on the first hyperspectral image, the second hyperspectral image, and the second population to obtain a target population, wherein, in an Nth evolution, based on the first hyperspectral image and the second hyperspectral image, positions of particles to be migrated selected from the second population are adjusted, and based on the position-adjusted particles to be migrated, particle evolution based on knowledge migration is performed on one or more particles in the first population of the current generation, where N is greater than or equal to 1;
[0009] According to the position vectors of the particles in the target population, a target band corresponding to the first hyperspectral image is determined in the bands included in the first hyperspectral image.
[0010] In a second aspect, an embodiment of the present disclosure provides a model training device, comprising:
[0011] an acquisition unit, configured to acquire a first hyperspectral image, a first population corresponding to the first hyperspectral image, and a second hyperspectral image and a second population corresponding to the second hyperspectral image, wherein the first hyperspectral image is a target domain dataset for knowledge migration, the second hyperspectral image is a source domain dataset for knowledge migration, the first population and the second population each contain a plurality of particles, an element in a position vector of the particle corresponds to a band, and a value of the element corresponds to an importance of the band;
[0012] an evolution unit, configured to perform multiple evolutions on the first population based on the first hyperspectral image, the second hyperspectral image, and the second population to obtain a target population, wherein, in an Nth evolution, positions of particles to be migrated selected from the second population are adjusted based on the first hyperspectral image and the second hyperspectral image, and based on the position-adjusted particles to be migrated, particle evolution based on knowledge migration is performed on one or more particles in the first population of a current generation, where N is greater than or equal to 1;
[0013] The band determining unit is configured to determine, based on the position vectors of the particles in the target population, a target band corresponding to the first hyperspectral image in the bands included in the first hyperspectral image.
[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the unsupervised band selection method described in the first aspect above.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the unsupervised band selection method described in the first aspect above is implemented.
[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes computer-executable instructions. When a processor executes the computer-executable instructions, the unsupervised band selection method described in the first aspect above is implemented.
[0017] The unsupervised band selection method, apparatus, device, and storage medium provided by the disclosed embodiments transform the band selection problem for a first hyperspectral image into a multiple evolution problem for a first population. During the Nth evolution of the first population, based on the first and second hyperspectral images, particles to be migrated are selected from the second population corresponding to the second hyperspectral image and their positions are adjusted. Based on the adjusted particles, particle evolution using knowledge transfer is performed on one or more particles in the first population. This method utilizes cross-domain knowledge transfer between different hyperspectral images to guide particle evolution within the population, thereby guiding band selection. Furthermore, given that cross-domain knowledge between different hyperspectral images often contains a significant amount of redundant or irrelevant knowledge, particularly when processing datasets collected by different sensors, this method minimizes the redundant or irrelevant knowledge introduced by knowledge transfer based on the particles to be migrated by adjusting their positions based on the first and second hyperspectral images, thereby reducing the negative guiding effect of this redundant or irrelevant knowledge during knowledge transfer. This effectively improves the accuracy of band selection for hyperspectral images and selects optimal bands for them. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 A schematic diagram of an application scenario to which the embodiments of the present disclosure are applicable;
[0020] Figure 2 Schematic diagram of the unsupervised band selection method provided in the embodiment of the present disclosure Figure 1 ;
[0021] Figure 3 A schematic diagram of the process of the Nth evolution of the first population in the unsupervised band selection method provided by an embodiment of the present disclosure;
[0022] Figure 4 A structural block diagram of an unsupervised band selection device provided in an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0025] Hyperspectral images contain images collected in multiple bands, so hyperspectral images can also be called hyperspectral image datasets, hyperspectral datasets, and in the embodiments of the present disclosure, they are collectively referred to as hyperspectral images. There are many useless or redundant bands in the original hyperspectral images. Band selection of hyperspectral images can reduce data redundancy in hyperspectral images. In related technologies, when processing a single hyperspectral image independently, or when processing multiple hyperspectral images, there is a tendency to optimize the band selection task corresponding to each hyperspectral image from a zero-knowledge state, and the cross-domain knowledge transfer of different hyperspectral images is not utilized to guide the band selection; moreover, the cross-domain knowledge transferred between different hyperspectral images (especially between hyperspectral images collected by different sensors) contains a large amount of redundant or irrelevant knowledge, which will produce a negative guidance effect, resulting in the selection of poor bands.
[0026] To solve the above problems, the embodiments of the present disclosure provide an unsupervised band selection method, apparatus, device, and storage medium, which converts the band selection problem of the first hyperspectral image into a multiple evolution problem of the first population. During the multiple evolutions of the first population, cross-domain knowledge migration can be performed based on the particles to be migrated selected from the second population corresponding to the second hyperspectral image, thereby guiding the evolution of particles in the population through cross-domain knowledge migration of different hyperspectral images. In order to reduce redundant or irrelevant knowledge in the cross-domain knowledge, the positions of the particles to be migrated are adjusted based on the first hyperspectral image and the second hyperspectral image, so as to reduce the negative guiding effect of redundant or irrelevant knowledge in the cross-domain knowledge migration on the evolution of particles in the population. Thus, the rationality and accuracy of population evolution are improved, the accuracy of band selection of hyperspectral images is improved, and better bands are selected for hyperspectral images.
[0027] Figure 1 Schematic diagram of application scenarios applicable to the embodiments of the present disclosure. Figure 1As shown, in an application scenario, an unsupervised band selection device 101 can be used to select bands for multiple hyperspectral images. The multiple hyperspectral images can be obtained from a database 102. The hyperspectral images in the database 102 can come from one or more sensing devices 103 and are collected by the sensing devices 103. When performing band selection on the multiple hyperspectral images, the band selection device 101 can perform multiple evolutions on particles in the population corresponding to the hyperspectral images. During the evolution process, cross-domain knowledge transfer between different hyperspectral images can be used to guide the evolution of the particles, thereby improving the particle evolution effect.
[0028] The band selection device 101 may be a terminal or a server. Figure 1 Take the server as an example.
[0029] Figure 2 Schematic diagram of the unsupervised band selection method provided in the embodiment of the present disclosure Figure 1 .like Figure 2 As shown, the unsupervised band selection method includes:
[0030] S201, obtaining a first hyperspectral image, a first population corresponding to the first hyperspectral image, a second hyperspectral image, and a second population corresponding to the second hyperspectral image, wherein the first hyperspectral image is a target domain dataset for knowledge migration, the second hyperspectral image is a source domain dataset for knowledge migration, the first population and the second population respectively contain multiple particles, an element in a position vector of the particle corresponds to a band, and the value of the element corresponds to the importance of the band.
[0031] The disclosed embodiment performs band selection on a first hyperspectral image. Therefore, in cross-domain knowledge transfer, the first hyperspectral image is the target domain dataset, and the band selection task for the first hyperspectral image is the target domain task. The second hyperspectral image is the source domain dataset, and the band selection task for the second hyperspectral image is the source domain task. The second hyperspectral image can be one or more hyperspectral images, so that cross-domain knowledge transfer is performed from one or more hyperspectral images as source domain datasets to the first hyperspectral image as the target domain dataset to guide the evolution of particles in the first population.
[0032] The first hyperspectral image corresponds to a first population, which includes multiple particles (i.e., individuals); the second hyperspectral image corresponds to a second population, which includes multiple particles; the number of particles in the first population and the number of particles in the second population can be the same, and the number of particles can be pre-configured.
[0033] In this embodiment, a first hyperspectral image and a second hyperspectral image can be obtained. Based on the first hyperspectral image, a corresponding population for the first hyperspectral image is initialized to obtain a first population. Based on the second hyperspectral image, a corresponding population for the second hyperspectral image is initialized to obtain a second population. During the initialization of the first population, the position vectors and velocity vectors of the particles in the first population can be initialized, with the length of the particle position vectors being equal to the total number of bands in the first hyperspectral image. During the initialization of the second population, the position vectors and velocity vectors of the particles in the second population can be initialized, with the length of the particle position vectors being equal to the total number of bands in the second hyperspectral image. For each particle, each element in the particle position vector corresponds to a band, and the value of the element reflects the importance of the corresponding band. For example, a higher value indicates a higher importance of the corresponding band. The total number of bands in the first hyperspectral image and the total number of bands in the second hyperspectral image can be the same, so that the length of the position vectors of the particles in the first population is the same as the length of the position vectors of the particles in the second population. The particle velocity vector is used to evolve the particle position vector, determining the direction and degree of evolution of the position vector. Alternatively, populations can be initialized for multiple hyperspectral images in advance, and the multiple hyperspectral images and the populations corresponding to the multiple hyperspectral images can be stored in a database. When performing band selection of the hyperspectral image, the first hyperspectral image, the first population, the second hyperspectral image, and the second population can be obtained from the database.
[0034] S202, based on the first hyperspectral image, the second hyperspectral image, and the second population, multiple evolutions are performed on the first population to obtain a target population, wherein, in an Nth evolution, based on the first hyperspectral image and the second hyperspectral image, positions of particles to be migrated selected from the second population are adjusted, and based on the position-adjusted particles to be migrated, particle evolution based on knowledge migration is performed on one or more particles in the first population of the current generation, where N is greater than or equal to 1.
[0035] Among them, in one of the evolutions of the first population, particle evolution based on knowledge transfer can be performed on one or more particles in the first population; it can also be performed on one or more particles in the first population in a portion of the evolutions of the first population (such as odd times, even times) based on knowledge transfer; it can also be performed on one or more particles in the first population in each evolution of the first population based on knowledge transfer. In particular, in each evolution of the first population, particle evolution based on knowledge transfer is performed on one or more particles in the first population, which can effectively utilize cross-domain knowledge transfer to improve the evolution effect of particles. In the subsequent embodiments, the particle evolution based on knowledge transfer of one or more particles in the first population in each evolution of the first population is described as an example.
[0036] Particle evolution based on knowledge transfer can be understood as particle evolution between tasks (leveraging cross-domain knowledge transfer between tasks) or particle evolution between populations. During the multiple evolutions of the first population, particle evolution within the population (or within a task) can also be performed. Compared to particle evolution between populations, particle evolution within a population does not require knowledge transfer.
[0037] Among them, if N is 1, the first population of the current generation is the initial first population, that is, the unevolved first population; if N is greater than 1, the first population of the current generation is the first population after the N-1th generation evolution.
[0038] In this embodiment, in the Nth evolution, particles to be migrated may be selected from the second population. The particles to be migrated may carry redundant or irrelevant knowledge. For example, a larger value of an element in the position vector of the particle to be migrated indicates that the band corresponding to the element is more important in the second hyperspectral image, but the band corresponding to the element is not necessarily important in the first hyperspectral image. The position vector of the particle to be migrated may deviate from the first hyperspectral image, which may introduce redundant or irrelevant knowledge and negatively influence the particle evolution based on knowledge transfer. Therefore, the position of the particle to be migrated may be adjusted, that is, the position vector may be adjusted. Considering that the combination of the first hyperspectral image and the second hyperspectral image can reflect the relationship between the first hyperspectral image and the second hyperspectral image, the position of the particle to be migrated may be adjusted based on the first hyperspectral image and the second hyperspectral image to improve the accuracy of the position adjustment of the particle to be migrated. Subsequently, based on the position vector of the particle to be migrated after the position adjustment, particle evolution based on knowledge transfer may be performed on one or more particles in the first population of the current generation. The particle evolution includes adjusting the position vector and velocity vector of the one or more particles. Ultimately, the first population of the Nth generation is obtained. After the Nth evolution, it can be determined whether the evolution of the first population meets the evolution end condition. If so, the multiple evolutions of the first population are terminated to obtain the target population (i.e., the Nth generation target population); if not, the N+1th evolution of the first population is continued until the evolution of the first population meets the evolution end condition.
[0039] Among them, each evolution process of the first population can refer to the Nth evolution of the first population.
[0040] Optionally, whether the evolution of the first population satisfies the evolution termination condition includes whether the number of evolutions of the first population is greater than or equal to the number threshold. If the number of evolutions of the first population is greater than or equal to the number threshold, it is determined that the evolution of the first population satisfies the evolution termination condition; otherwise, it is determined that the number of evolutions of the first population does not satisfy the evolution termination condition. Thus, by constraining the number threshold, it is avoided that the band selection efficiency is low due to too many evolutions. It should be noted that in addition to judging whether the evolution has ended based on the number threshold, it is also possible to judge whether the evolution of the first population has converged. For example, the difference between the position vector of the particle in the first population of the N-1th generation and the position vector of the particle in the first population of the Nth generation is compared, and the difference is used to judge whether the evolution of the first population has converged. If it has converged, it is determined that the evolution condition is met; otherwise, it is determined that the evolution condition is not met. The evolution termination conditions are not listed here one by one.
[0041] S203 , determining a target band corresponding to the first hyperspectral image from the bands included in the first hyperspectral image according to the position vectors of the particles in the target population.
[0042] In this embodiment, after obtaining the target population, in the position vector of the particles included in the target population, the elements correspond to the bands, and the values of the elements reflect the importance of the corresponding bands of the elements. Based on the values of the elements in the position vector of the particles and the correspondence between the elements and the bands, one or more target bands can be screened out from the bands included in the first hyperspectral image, thereby selecting more important bands from the first hyperspectral image and improving the accuracy of band selection.
[0043] In the disclosed embodiment, a population corresponding to a hyperspectral image is designed and the population is evolved multiple times to achieve band selection for the hyperspectral image. During one or more evolutions of the population, particles to be migrated that have been selected from other populations and have undergone position adjustment can be used to perform particle evolution based on knowledge migration on one or more particles in the population, thereby guiding the evolution of particles in the population through cross-domain knowledge migration for different hyperspectral images. This also reduces redundant or irrelevant knowledge in the cross-domain knowledge, and reduces the negative guiding effect of redundant or irrelevant knowledge in the cross-domain knowledge migration on the evolution of particles in the population. This effectively utilizes cross-domain knowledge for band selection, improves the accuracy of band selection for hyperspectral images, and selects better bands for hyperspectral images.
[0044] In some embodiments, obtaining a first hyperspectral image, a first population corresponding to the first hyperspectral image, and a second hyperspectral image and a second population corresponding to the second hyperspectral image may include: obtaining multiple hyperspectral images; initializing corresponding populations for the multiple hyperspectral images; and determining that the first hyperspectral image is the hyperspectral image to be subjected to band selection among the multiple hyperspectral images, and the second hyperspectral image is the remaining hyperspectral image among the multiple hyperspectral images except the first hyperspectral image. Thus, for each hyperspectral image in the multiple hyperspectral images, when performing band selection, the remaining hyperspectral images can be used for knowledge transfer in the evolution process. In this way, when performing band selection on the multiple hyperspectral images, cross-domain knowledge between the multiple hyperspectral images can be fully utilized, thereby improving the band selection effect.
[0045] Among them, when determining that the first hyperspectral image is the hyperspectral image to be subjected to band selection among multiple hyperspectral images, a hyperspectral image can be randomly selected from the multiple hyperspectral images as the first hyperspectral image, or the first hyperspectral image can be determined from the multiple hyperspectral images according to the execution order of the band selection tasks of the hyperspectral images. After completing the band selection of the first hyperspectral image, the first hyperspectral image can be used as the second hyperspectral image, and the first hyperspectral image for the next band selection can be continuously selected from the remaining hyperspectral images. In this way, the band selection of multiple hyperspectral images is achieved. For the sake of clarity of description, the embodiment of the present disclosure takes the band selection of a first hyperspectral image as an example to describe. The band selection of each hyperspectral image in the multiple hyperspectral images can refer to the band selection of the first hyperspectral image, and they are not described one by one here.
[0046] Optionally, in the process of initializing corresponding populations for multiple hyperspectral images, for each population corresponding to each hyperspectral image, initialize N for the population. ind A zero vector of length I, where N ind The zero vector of length I includes the position vector and velocity vector of the particles in the population, N ind is a preset value, and I is the total number of bands in the hyperspectral image. Randomly assign values to the position vectors and velocity vectors of the particles in the population based on an assignment range, such as a real number range from 0 to 1. In this way, the position vectors and velocity vectors of each particle in multiple populations can be obtained.
[0047] Figure 3 This is a flow chart of the Nth evolution process of the first population in the unsupervised band selection method provided by the embodiment of the present disclosure, as shown in FIG. Figure 3 As shown, the evolution process of the Nth evolution includes:
[0048] S301 , in a first population of a current generation, determining a first particle and a second particle, wherein the first particle is a particle that undergoes intra-population evolution in the Nth evolution, and the second particle is a particle that undergoes inter-population evolution in the Nth evolution.
[0049] Among them, when N is greater than 1, the first population of the current generation is the first population of the N-1th generation, that is, the first population after the N-1th optimization; when N is equal to 1, the current first population is the initial first population.
[0050] Among them, particles that evolve within a population do not need to rely on knowledge transfer for evolution, while particles that evolve between populations need to rely on knowledge transfer for evolution.
[0051] In this embodiment, within the first population of the current generation, each particle is individually determined to determine whether it is undergoing inter-population evolution, that is, whether it is performing knowledge transfer. If a particle is determined to be undergoing inter-population evolution, it is designated as a second particle; otherwise, it is designated as a first particle. Different evolutionary methods are employed for the first and second particles, enabling both intra-population and inter-population evolution, leveraging both intra-population knowledge and cross-domain knowledge between populations.
[0052] In one possible implementation, S301 may include: determining the knowledge transfer frequency corresponding to the Nth evolution; comparing the knowledge transfer frequency with the random number corresponding to each particle in the first population of the current generation to determine whether each particle in the first population of the current generation has undergone knowledge transfer; determining a first particle as a particle in the first population of the current generation determined to undergo knowledge transfer, and determining a second particle as a particle in the first population of the current generation determined not to undergo knowledge transfer. Thus, by combining the knowledge transfer frequency and the random number corresponding to the particle, the occurrence of knowledge transfer is given a certain degree of randomness, and the occurrence of knowledge transfer can change dynamically, thereby increasing the diversity of population evolution and improving the effectiveness of band selection.
[0053] Different particles may correspond to different or the same random numbers. For example, a random number may be determined for each particle within the range of 0 to 1.
[0054] In this implementation, the knowledge transfer frequency is compared with the random number corresponding to each particle in the first population of the current generation. For each particle, if the knowledge transfer frequency is greater than the random number corresponding to the particle, the particle is determined to have undergone knowledge transfer; otherwise, the particle is determined not to have undergone knowledge transfer. In this way, whether each particle has undergone knowledge transfer is determined. Among the multiple particles included in the first population, the first particle is determined to be the particle determined to have undergone knowledge transfer in the first population of the current generation, and the second particle is determined to be the particle determined not to have undergone knowledge transfer in the first population of the current generation.
[0055] Optionally, the knowledge migration frequency corresponding to the Nth evolution is a configured fixed value.
[0056] Optionally, when N is equal to 1, the knowledge transfer frequency corresponding to the Nth evolution is a configured fixed value; when N is greater than 1, the knowledge transfer frequency corresponding to the Nth evolution is determined based on the particle evolution status of the N-1th evolution. The particle evolution status of the N-1th evolution can reflect the effectiveness of knowledge transfer in the N-1th evolution. Based on the effectiveness of knowledge transfer in the N-1th evolution, the knowledge transfer frequency corresponding to the Nth evolution is adaptively and dynamically adjusted to control the effectiveness of knowledge transfer in the Nth evolution. For example, if the effectiveness of knowledge transfer in the N-1th evolution is high, the knowledge transfer frequency corresponding to the Nth evolution can be increased to increase the number of particles moving between populations in the Nth evolution. If the effectiveness of knowledge transfer in the N-1th evolution is low, the knowledge transfer frequency corresponding to the Nth evolution can be reduced to reduce the number of particles moving between populations in the Nth evolution. In this way, the effectiveness of knowledge transfer in population evolution is improved.
[0057] Furthermore, when N is greater than 1, the number of first particles that successfully evolved within a population and the number of second particles that successfully evolved between populations during the N-1th evolution can be obtained. The knowledge transfer frequency corresponding to the Nth evolution can be determined based on the number of first particles, the number of second particles, and the total number of particles in the first population of the current generation. The number of first particles that successfully evolved within a population, the number of second particles that successfully evolved between populations, and the total number of particles in the first population of the current generation accurately reflect the success of particle evolution in the N-1th evolution. If the particle evolution success rate is higher, the knowledge transfer frequency corresponding to the Nth evolution can be larger; otherwise, the knowledge transfer frequency corresponding to the Nth evolution can be smaller. Thus, the accuracy of the knowledge transfer frequency corresponding to the Nth evolution is improved by using the number of first particles that successfully evolved within a population and the number of second particles that successfully evolved between populations.
[0058] Among them, the number of first particles that have evolved successfully within the population during the N-1th evolution and the number of second particles that have evolved successfully between populations can be statistically obtained after the N-1th evolution.
[0059] In this embodiment, the number of first particles that successfully evolved within a population and the number of second particles that successfully evolved between populations during the N-1th evolution are obtained. Based on the number of first particles, the number of second particles, and the total number of particles in the first population of the current generation, the proportion of particles that successfully evolved during the N-1th evolution is calculated. Based on this proportion, the knowledge transfer frequency corresponding to the Nth evolution is determined. The higher the proportion of particles that successfully evolved during the N-1th evolution, the greater the knowledge transfer frequency corresponding to the Nth evolution. Conversely, the lower the proportion of particles that successfully evolved during the N-1th evolution, the lower the knowledge transfer frequency corresponding to the Nth evolution.
[0060] Furthermore, the calculation formula for the knowledge transfer frequency corresponding to the Nth evolution can be expressed as:
[0061]
[0062] Among them, A rmp Indicates the knowledge migration frequency corresponding to the Nth evolution, N is greater than 1, rmp is a fixed value of the configuration, q s represents the number of first particles, q o represents the number of second particles, q s +q o Indicates the total number of particles in the first population of the current generation. When N=1, the knowledge transfer frequency can be rmp.
[0063] It can be seen that, unlike the use of a fixed random migration probability, the embodiment of the present disclosure can use an adaptive randomly changing knowledge migration probability to control the frequency of knowledge migration during each evolution of the first population, thereby achieving dynamic adjustment of the frequency of knowledge migration and effectively controlling the effectiveness of knowledge migration.
[0064] S302 , evolving the first particle according to the position vector of the global optimal particle in the historical evolution process of the first population of the current generation and the optimal position vector of the first particle in the historical evolution process to obtain a first evolved particle corresponding to the first particle.
[0065] The global optimal particle includes the first particle and the second particle. When N is 1, the position vector of the global optimal particle in the historical evolution of the first population of the current generation refers to the position vector of the global optimal particle in the initial first population, and the optimal position vector of the first particle in the historical evolution refers to the position vector of the first particle in the initial first population. When N is greater than 1, the position vector of the global optimal particle in the historical evolution refers to the position vector of the global optimal particle in the previous N-1 evolutions, and the optimal position vector of the first particle in the historical evolution refers to the optimal position vector of the first particle in the previous N-1 evolutions. Since if a better particle is evolved during the evolution process, the original particle will be updated to the evolved better particle, the global optimal particle in the previous N-1 evolutions is the global optimal particle in the first population of the current generation, and the optimal position vector of the first particle in the previous N-1 evolutions is the position vector of the first particle in the first population of the current generation.
[0066] In this embodiment, the first particle is a particle that undergoes intra-population evolution. The position vector of the global optimal particle in the historical evolution process of the first population of the current generation and the optimal position vector of the first particle in the historical evolution process are used as intra-population knowledge to guide the first particle to evolve toward the position vector of the global optimal particle and the optimal position vector of the first particle, thereby increasing the probability that the first particle will obtain a better particle through intra-population evolution and improving the population evolution effect.
[0067] In one possible implementation, the difference between the position vector of the global optimal particle during the historical evolution and the position vector of the first particle (i.e., the position vector of the first particle in the first population of the current generation) can be determined. The difference between the optimal position vector of the first particle during the historical evolution and the position vector of the first particle can be determined. Based on the two differences, the velocity vector of the first particle (i.e., the velocity vector of the first particle in the first population of the current generation) is updated to obtain an updated velocity vector of the first particle. Based on the updated velocity vector of the first particle, the position vector of the first particle is updated to obtain an updated position vector of the first particle. Based on the updated velocity vector of the first particle and the updated position vector of the first particle, the first evolved particle is obtained. The velocity vector of the first evolved particle is the updated velocity vector of the first particle, and the position vector of the first evolved particle is the updated position vector of the first particle. Thus, the difference between the position vector of the global optimal particle and the position vector of the first particle, and the difference between the optimal position vector of the first particle and the position vector of the first particle, guides the first particle to evolve toward the global optimal particle and the optimal position vector of the first particle.
[0068] In this implementation, the difference between the position vector of the global optimal particle and the position vector of the first particle during the historical evolution process can be obtained by comparing the position vector of the global optimal particle during the historical evolution process with the position vector of the first particle. The difference between the optimal position vector of the first particle during the historical evolution process and the position vector of the first particle can be obtained by comparing the optimal position vector of the first particle during the historical evolution process with the position vector of the first particle. The updated velocity vector of the first particle can be obtained by weighting these two differences and the velocity vector of the first particle. The updated position vector of the first particle can then be calculated using the updated velocity vector of the first particle and the position vector of the first particle. The velocity vector of the first evolving particle is the updated velocity vector of the first particle, and the position vector of the first evolving particle is the updated position vector of the first particle. Thus, the updated velocity vector and updated position vector of the first particle are obtained, i.e., the first evolving particle is obtained.
[0069] Alternatively, the global optimal particle can be selected from all particles in the first population of the current generation based on the evaluation scores of their historical position vectors on at least one evaluation metric. Alternatively, the optimal position vector of the first particle can be selected from the historical position vectors of the first particle based on the evaluation scores of the first particle's historical position vectors (i.e., the position vectors of the first particles during the historical evolution of the first population of the current generation) on at least one evaluation metric. In this way, the accuracy of the global optimal particle and the optimal position vector of the first particle can be improved based on at least one evaluation metric.
[0070] Furthermore, the evaluation score of a particle's position vector on at least one evaluation metric can be obtained based on a particle evaluation function. Specifically, the particle evaluation function can be used to evaluate the historical position vectors corresponding to all particles in the first population of the current generation, obtaining the evaluation scores of each of these historical position vectors on at least one evaluation metric. The particle evaluation function can also be used to evaluate the historical position vector of the first particle in the first population of the current generation, obtaining the evaluation score of the first particle's historical position vector on at least one evaluation metric. In this way, the particle evaluation function improves the accuracy of the optimal position vectors of the global optimal particle and the first particle.
[0071] Optionally, assuming that the first particle is the i-th particle in the first population of the current generation, the update formula for the velocity vector of the i-th particle can be expressed as:
[0072]
[0073] The update formula of the position vector of the i-th particle can be expressed as:
[0074] X i (t+1)=Xi (t)+V i (t+1)
[0075] Among them, V i (t) represents the velocity vector of the i-th particle, V i (t+1) represents the updated velocity vector of the i-th particle, is the optimal position vector of the i-th particle in the historical evolution process, X gbest is the position vector of the global optimal particle in the historical evolution process, ω is the inertia weight that controls the influence of the velocity vector of the i-th particle in the first population of the current generation on the velocity update, c1 and c2 are learning factors, and r1 and r2 are random values, such as random values uniformly distributed in the range [0,1]. i (t) represents the position vector of the i-th particle, X i (t+1) represents the updated position vector of the i-th particle.
[0076] S303: Select particles to be migrated in the Nth evolution from the second population.
[0077] In this embodiment, S303 to S305 are the processes of particle evolution of the second particle based on knowledge migration. Since knowledge migration is required, the particle to be migrated in the Nth evolution can be selected from the multiple particles included in the second population, and the position vector of the particle to be migrated is the knowledge to be migrated.
[0078] In one possible implementation, S303 may include: screening particles in the second population according to evaluation scores of the particles in the second population on multiple evaluation indicators to obtain a non-dominated set; selecting particles to be migrated in the Nth evolution from the non-dominated set; wherein, in the non-dominated set, the third particle and the fourth particle satisfy a non-dominated relationship, and the third particle and the fourth particle satisfying the non-dominated relationship means that the third particle is superior to the fourth particle in at least one evaluation indicator and the fourth particle is superior to the third particle in at least one evaluation indicator, the third particle is any particle in the non-dominated set, and the fourth particle is any particle in the non-dominated set except the third particle.
[0079] The evaluation score of a particle on the evaluation index, that is, the evaluation score of the particle's position vector on the evaluation index, can be obtained through the particle evaluation function.
[0080] Among them, the third particle is any particle in the non-dominated set, and the fourth particle is any particle in the non-dominated set except the third particle. The third particle and the fourth particle satisfy the non-dominated relationship, which means that any two particles in the non-dominated set also satisfy the non-dominated relationship.
[0081] In the definition of a non-dominance relationship, the third particle outperforms the fourth particle on at least one evaluation metric, and the fourth particle outperforms the third particle on at least one evaluation metric. This indicates that the third particle is a high-quality particle on at least one evaluation metric, and the fourth particle is a high-quality particle on at least one evaluation metric. The third particle cannot dominate the fourth particle, and the fourth particle cannot dominate the third particle either. Therefore, both the third and fourth particles can be considered high-quality particles. By screening the particles in the second population based on the non-dominance relationship, the high-quality particles in the second population can be collected as much as possible in the non-dominated set. This ensures that the particles to be migrated are selected from the high-quality particles in the second population. This improves the quality of knowledge transferred through cross-domain knowledge transfer in inter-population evolution and enhances the effectiveness of population evolution based on knowledge transfer.
[0082] In this implementation, particles in the second population are compared pairwise based on their scores on multiple evaluation metrics. Comparison results are then obtained. Particles that satisfy a non-dominated relationship are then screened from the second population based on these comparison results. A non-dominated set is then formed by combining these particles. From this non-dominated set, particles to be migrated in the Nth evolution can be randomly selected. Compared to solutions that select the optimal particle as the particle to be migrated, this implementation improves the randomness and diversity of the selected particles while ensuring their quality, reducing the probability of duplicate knowledge transfer and thus improving the effectiveness of population evolution based on knowledge transfer.
[0083] The number of particles to be migrated in the Nth evolution may be 1.
[0084] S304 , adjusting the positions of the particles to be migrated in the Nth evolution according to the first hyperspectral image and the second hyperspectral image, to obtain particles to be migrated after position adjustment in the Nth evolution.
[0085] In this implementation, the particles to be migrated may carry redundant or irrelevant knowledge. For example, the value of an element in the position vector of the particle to be migrated is large, indicating that the band corresponding to the element is more important in the second hyperspectral image, but the band corresponding to the element is not necessarily important in the first hyperspectral image. To solve this problem, considering that the more important the band is, the more information the image corresponding to the band in the hyperspectral image carries, the mapping relationship of the information entropy between the first hyperspectral image and the second hyperspectral image can be determined. The mapping relationship can reflect the mapping of the information distribution of the first hyperspectral image and the information distribution of the second hyperspectral image. According to the mapping relationship, the position of the particles to be migrated in the Nth evolution is adjusted, which can improve the accuracy of the position adjustment of the particles to be migrated in the Nth evolution, effectively filter out the redundant or irrelevant knowledge carried by the particles to be migrated, and obtain the particles to be migrated after position adjustment in the Nth evolution.
[0086] In one possible implementation, S304 may include: determining an information entropy curve of the first hyperspectral image based on the first hyperspectral image; determining an information entropy curve of the second hyperspectral image based on the second hyperspectral image; determining a linear mapping relationship between the information entropy curve of the first hyperspectral image and the information entropy curve of the second hyperspectral image through function fitting; and adjusting the position of the particles to be migrated in the Nth evolution according to the linear mapping relationship to obtain the particles to be migrated after the position adjustment in the Nth evolution. Thus, through the information entropy curve and function fitting, the accuracy of the information entropy mapping relationship between the first hyperspectral image and the second hyperspectral image is improved, the accuracy of the position adjustment of the particles to be migrated in the Nth evolution is improved, and redundant or irrelevant knowledge carried by the particles to be migrated is effectively filtered out.
[0087] In this implementation, for any band in the first hyperspectral image, the grayscale level within that band can be obtained. The proportion of that grayscale level among all grayscale levels, i.e., the grayscale ratio, can be determined. Based on this grayscale ratio, the information entropy corresponding to that band can be calculated. This yields the information entropy corresponding to each band in the first hyperspectral image. The information entropy curve for the first hyperspectral image is constructed from the information entropy corresponding to each band. Similarly, the information entropy curve for the second hyperspectral image can be obtained using this method. The linear mapping relationship between the information entropy curves of the first and second hyperspectral images can be represented by a polynomial. In this polynomial, the information entropy curve of the first and second hyperspectral images is the dependent variable, and the information entropy curve of the second hyperspectral image is the independent variable. This polynomial is fitted using the least squares method to ultimately yield a linear mapping relationship between the information entropy curves of the first and second hyperspectral images. The position vector of the particle to be migrated can be input into this linear mapping relationship to produce output data, which is the adjusted position vector of the particle to be migrated, i.e., the particle to be migrated after the adjusted position in the Nth evolution.
[0088] Furthermore, the calculation formula of the information entropy of the i-th band can be expressed as:
[0089]
[0090] in, H i Represents the i-th band. Represents the grayscale level in the i-th band, which can contain multiple grayscale levels. Indicates that in all gray levels The ratio of IE(H i ) refers to the information entropy of the i-th band. For hyperspectral images, each band is regarded as an output set of random variables, and the grayscale histogram of the band is a probability distribution.
[0091] Furthermore, the polynomial used to represent the linear mapping relationship can be y=ax+b. The parameters a and b of the polynomial can be determined by fitting using the least squares method. The position vector of the particle p to be migrated can be used as the input x, and the output y can be used as the position vector of the new particle p′, thereby removing redundant or irrelevant knowledge from the particle p to be migrated. For example, in the second hyperspectral image, band a is more important, so the value of the element corresponding to band a in the position vector of the particle p to be migrated is larger, but in the first hyperspectral image, band a is not important. Through this linear mapping relationship, the value of the element corresponding to band a in the position vector of the particle p to be migrated can be reduced to make it more consistent with the importance of band a in the first hyperspectral image, thereby reducing the negative impact of knowledge transfer.
[0092] S305 , evolving the second particle according to the position vector of the global optimal particle, the optimal position vector of the second particle in the historical evolution process, and the particle to be migrated after position adjustment in the Nth evolution, to obtain a second evolved particle corresponding to the second particle.
[0093] The global optimal particle can refer to the description in the above embodiment, and the optimal position vector of the second particle in the historical evolution process can refer to the optimal position vector of the first particle in the historical evolution process.
[0094] In this embodiment, the second particle is a particle that undergoes inter-population evolution. The position vector of the global optimal particle in the historical evolution process of the first population of the current generation and the optimal position vector of the second particle in the historical evolution process are used as knowledge within the population. The position vector of the particle to be migrated after position adjustment in the Nth evolution is used as knowledge for cross-domain migration between populations. The second particle is guided to evolve toward the position vector of the global optimal particle, the optimal position vector of the second particle, and the position vector of the particle to be migrated after position adjustment in the Nth evolution, thereby increasing the probability that the second particle will obtain a better particle through inter-population evolution and improving the effect of population evolution based on cross-domain knowledge transfer.
[0095] In one possible implementation, S305 may include: determining a first difference between the position vector of the global optimal particle and the position vector of the second particle (the position vector of the second particle in the second population of the current generation), a second difference between the optimal position vector of the second particle and the position vector of the second particle, and a third difference between the position vector of the particle to be migrated after position adjustment in the Nth evolution and the position vector of the second particle; updating the velocity vector of the second particle (the velocity vector of the second particle in the second population of the current generation) according to the first difference, the second difference, and the third difference to obtain an updated velocity vector of the second particle, the velocity vector of the second particle being included in the first population of the current generation; updating the position vector of the second particle according to the updated velocity vector of the second particle to obtain an updated position vector of the second particle; and obtaining a second evolved particle according to the updated velocity vector of the second particle and the updated position vector of the second particle. Thus, the position vector of the second particle is guided to evolve toward the position vector of the global optimal particle, the optimal position vector of the second particle, and the position vector of the particle to be migrated after position adjustment in the Nth evolution through the difference between the position vector of the global optimal particle and the position vector of the second particle, the difference between the optimal position vector of the second particle and the position vector of the second particle, and the difference between the position vector of the particle to be migrated after position adjustment in the Nth evolution and the position vector of the second particle.
[0096] In this implementation, a first difference can be obtained by comparing the position vector of the global optimal particle during the historical evolution process with the position vector of the second particle. A second difference can be obtained by comparing the optimal position vector of the second particle during the historical evolution process with the position vector of the second particle. A third difference can be obtained by comparing the position vector of the particle to be migrated after position adjustment in the Nth evolution with the position vector of the second particle. The first difference, the second difference, the third difference, and the velocity vector of the second particle are weighted to obtain an updated velocity vector of the second particle. The updated position vector of the second particle is then calculated using the updated velocity vector of the second particle and the position vector of the second particle. The velocity vector of the second evolved particle is the updated velocity vector of the second particle, and the position vector of the second evolved particle is the updated position vector of the second particle. Thus, the updated velocity vector of the second particle and the updated position vector of the second particle are obtained, i.e., the second evolved particle is obtained.
[0097] Optionally, obtaining an updated velocity vector for the second particle by weighting the first difference, the second difference, the third difference, and the velocity vector of the second particle may include weighting the first difference, the second difference, the third difference, and the velocity vector of the second particle based on a learning factor corresponding to the first difference, a learning factor corresponding to the second difference, a learning factor corresponding to the third difference, and an inertia vector corresponding to the velocity vector of the second particle to obtain the updated velocity vector for the second particle. Thus, the influence of each factor on the evolution of the second particle can be adjusted using the learning factor and the inertia weight, thereby improving the rationality of the influence of each factor on the evolution of the second particle. The learning factor corresponding to the third difference reflects the strength of knowledge transfer; a larger learning factor indicates a greater strength of knowledge transfer.
[0098] Furthermore, the learning factor corresponding to the third difference can be dynamically adjusted based on the evaluation score of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation metric, where the evaluation score of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation metric is the evaluation score of the position vector of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation metric. This enables adaptive dynamic adjustment of the strength of knowledge transfer, improving the accuracy of this adaptive dynamic adjustment based on the evaluation of the particle to be migrated. For example, the higher the evaluation score, the larger the learning factor corresponding to the third difference, thereby increasing the impact of high-quality transferred knowledge on evolution.
[0099] The evaluation score of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation index can be obtained by evaluating the particle evaluation function.
[0100] Furthermore, adjusting the learning factor corresponding to the third difference based on the evaluation score of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation metric may include: obtaining the ranking of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation metric in the first population based on the evaluation score of the particle to be migrated after the position adjustment in the Nth evolution, and adjusting the learning factor corresponding to the third difference based on the ranking of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation metric in the first population. The ranking of the particle to be migrated in the target domain population (i.e., the first population) for knowledge transfer reflects the importance of the transferred knowledge carried by the particle to be migrated in the target domain population for knowledge transfer. Adjusting the learning factor based on the ranking of the particle to be migrated in the target domain population for knowledge transfer effectively improves the accuracy and rationality of the dynamic adjustment of the knowledge transfer intensity.
[0101] Furthermore, at least one evaluation metric may include an information entropy evaluation metric and a band structure similarity metric. The information entropy evaluation metric reflects the amount of information contained in the bands of a particle, and the band structure similarity metric reflects the redundancy between bands in the particle. Adjusting the learning factor corresponding to the third difference based on the evaluation score of the particle to be migrated after the position adjustment in the Nth evolution on at least one evaluation metric may include: determining a first ranking of the particle to be migrated after the position adjustment in the Nth evolution in the first population based on the information entropy evaluation metric based on the evaluation score of the particle to be migrated after the position adjustment in the Nth evolution; and determining a second ranking of the particle to be migrated after the position adjustment in the Nth evolution in the first population based on the band structure similarity metric based on the evaluation score of the particle to be migrated after the position adjustment in the Nth evolution; and adjusting the learning factor corresponding to the third difference based on the first and second rankings. Thus, while taking into account both the amount of information contained in the bands and the redundancy between bands, the knowledge transfer intensity is dynamically adjusted, effectively improving the accuracy and rationality of the dynamic adjustment of the knowledge transfer intensity.
[0102] Furthermore, the adjustment formula of the learning factor corresponding to the third difference can be expressed as:
[0103]
[0104] Here, c0 is a configured fixed value, c3 is the learning factor corresponding to the third difference, rank1 is the first rank, and rank2 is the second rank. A higher rank indicates that the particles to be migrated carry more useful knowledge. In this implementation, the degree to which cross-domain knowledge guides the inter-population evolution of the second particles is dynamically adjusted, better utilizing the cross-domain knowledge between different hyperspectral images.
[0105] Optionally, assuming that the second particle is the i-th particle in the first population of the current generation, the update formula for the i-th particle's velocity vector can be expressed as:
[0106]
[0107] The update formula of the position vector of the i-th particle can be expressed as:
[0108] X i (t+1)=X i (t)+V i (t+1)
[0109] Among them, X tris the position vector of the particle to be migrated after the position adjustment in the Nth evolution, c3 is the learning factor corresponding to the third difference, which is a parameter used to control the impact of knowledge migration on particles, and r3 is a random value, such as a random value uniformly distributed in the range [0,1].
[0110] S306 , obtaining a first population of the Nth generation according to the particle evaluation function, the first particle, the first evolved particle, the second particle, and the second evolved particle.
[0111] In this embodiment, a first particle can be evaluated on at least one evaluation metric using a particle evaluation function to obtain an evaluation score for the first particle on the at least one evaluation metric; a first evolved particle can be evaluated on at least one evaluation metric using a particle evaluation function to obtain an evaluation score for the first evolved particle on the at least one evaluation metric; a second particle can be evaluated on at least one evaluation metric using a particle evaluation function to obtain an evaluation score for the second particle on the at least one evaluation metric; and a second evolved particle can be evaluated on at least one evaluation metric using a particle evaluation function to obtain an evaluation score for the second evolved particle on the at least one evaluation metric. The evaluation score of the first particle on at least one evaluation metric can be compared with the evaluation score of the first evolved particle on at least one evaluation metric, and based on the comparison result, the first particle or the first evolved particle can be retained as a particle in the first population of generation N; the evaluation score of the second particle on at least one evaluation metric can be compared with the evaluation score of the second evolved particle on at least one evaluation metric, and based on the comparison result, the second particle or the second evolved particle can be retained as a particle in the first population of generation N. In this way, a first population of generation N is obtained, so that relatively high-quality particles are retained in the first population of generation N.
[0112] In one possible implementation, at least one evaluation index may include an information entropy evaluation index and a band structure similarity index. The information entropy evaluation index reflects the amount of information contained in the bands in the particle, and the band structure similarity index reflects the redundancy between the bands in the particle. Based on this, S306 may include: calculating the information entropy of the bands in the first particle and the structural similarity of the bands in the first particle through a particle evaluation function, and obtaining the evaluation scores of the first particle on the information entropy evaluation index and the band structure similarity index respectively; calculating the information entropy of the bands in the first evolved particle and the structural similarity of the bands in the first particle through a particle evaluation function, and obtaining the evaluation scores of the first evolved particle on the information entropy evaluation index and the band structure similarity index respectively; calculating the information entropy of the bands in the second particle and the structural similarity of the bands in the second particle through a particle evaluation function, and obtaining the evaluation scores of the second particle on the information entropy evaluation index and the band structure similarity index respectively; calculating the information entropy of the bands in the second evolved particle and the structural similarity of the bands in the second particle through a particle evaluation function, and obtaining the evaluation scores of the second particle on the information entropy evaluation index and the band structure similarity index respectively; calculating the information entropy of the bands in the second evolved particle and the structural similarity of the bands in the second evolved particle through a particle evaluation function. The structural similarity of the mid-band is calculated to obtain the evaluation scores of the second evolved particle on the information entropy evaluation index and the band structure similarity index respectively; according to the evaluation score of the first particle on the information entropy evaluation index, the evaluation score of the first particle on the band structure similarity index, the evaluation scores of the first evolved particle on the information entropy evaluation index and the band structure similarity index, the first particle or the first evolved particle is retained as the particle in the first population of the Nth generation; according to the evaluation score of the second particle on the information entropy evaluation index, the evaluation score of the second particle on the band structure similarity index, the evaluation scores of the second evolved particle on the information entropy evaluation index and the band structure similarity index, the second particle or the second evolved particle is retained as the particle in the first population of the Nth generation.
[0113] In this implementation, the first particle's score on the information entropy evaluation index can be compared with the first evolved particle's score on the information entropy evaluation index, and the first particle's score on the band structure similarity index can be compared with the first evolved particle's score on the band structure similarity index to determine the relationship between the first particle and the first evolved particle. If the relationship between the first particle and the first evolved particle is a dominating relationship, and the first particle dominates the first evolved particle, the first particle can be retained as a particle in the first population of the Nth generation. If the relationship between the first particle and the first evolved particle is a dominating relationship, and the first evolved particle dominates the first particle, the first evolved particle can be retained as a particle in the first population of the Nth generation. If the relationship between the first particle and the first evolved particle is a non-dominating relationship, either the first particle or the first evolved particle can be retained as a particle in the first population of the Nth generation. The second particle's score on the information entropy evaluation index can be compared with the second evolved particle's score on the information entropy evaluation index, and the second particle's score on the band structure similarity index can be compared with the second evolved particle's score on the band structure similarity index to determine the relationship between the second particle and the second evolved particle. If the relationship between the second particle and the second evolved particle is a dominating relationship and the second particle dominates the second evolved particle, the second particle can be retained as a particle in the first population of the Nth generation; if the relationship between the second particle and the second evolved particle is a dominating relationship and the second evolved particle dominates the second particle, the second evolved particle can be retained as a particle in the first population of the Nth generation; if the relationship between the second particle and the second evolved particle is a non-dominating relationship, the second particle or the second evolved particle can be retained as a particle in the first population of the Nth generation.
[0114] The non-dominance relationship can refer to the description of the aforementioned embodiment. If at least one evaluation metric includes an information entropy evaluation metric and a band structure similarity metric, a non-dominance relationship between a first particle and a first evolved particle may include: the first particle is superior to the first evolved particle in the information entropy evaluation metric and the first evolved particle is superior to the first particle in the band structure similarity metric, or the first particle is superior to the first evolved particle in the band structure similarity metric and the first evolved particle is superior to the first particle in the information entropy evaluation metric. If at least one evaluation metric includes an information entropy evaluation metric and a band structure similarity metric, a domination relationship between a first particle and a first evolved particle, where the first particle dominates the first evolved particle, means: the first particle is superior to the first evolved particle in both the information entropy evaluation metric and the band structure similarity metric. If at least one evaluation metric includes an information entropy evaluation metric and a band structure similarity metric, a domination relationship between a first particle and a first evolved particle, where the first evolved particle dominates the first particle, means: the first evolved particle is superior to the first particle in both the information entropy evaluation metric and the band structure similarity metric. The relationship between a second particle and a second evolved particle can refer to the description of the relationship between a first particle and a first evolved particle, and will not be further described.
[0115] In an embodiment of the present disclosure, an Nth evolutionary process of a first population in an unsupervised band selection method is provided. Each evolutionary process of the first population can refer to this Nth evolutionary process. During the Nth evolutionary process, particles in the first population are judged as to whether to undergo inter-population evolution. For particles undergoing inter-population evolution, knowledge transfer is performed using a second hyperspectral image and a second population, and redundant knowledge in the transferred knowledge is filtered. Particle evolution is then performed using the filtered transferred knowledge. For particles evolving within a population, the global and local optimal position vectors from the historical evolutionary process are used to guide particle evolution. In particular, during the evolutionary process, adaptive dynamic adjustment of the frequency and intensity of knowledge transfer is achieved, effectively enhancing the role of knowledge transfer in inter-population evolution. In this way, the population evolution effect and the band selection effect are effectively improved.
[0116] Since the particle evaluation function is used in several places in the above embodiments, an embodiment of the particle evaluation function is provided below based on at least one evaluation index that may include an information entropy evaluation index and a band structure similarity index.
[0117] In some embodiments, the particle evaluation function may include an information entropy evaluation function and a band structure similarity evaluation function. The information entropy evaluation function is used to evaluate the information content of the bands in a particle based on the information entropy evaluation index, while the band structure similarity evaluation function is used to evaluate the redundancy of the bands in a particle based on the band structure similarity index. Thus, the quality of particles is evaluated based on both the information content and the redundancy of the bands, improving the accuracy of particle quality evaluation.
[0118] Optionally, the information entropy evaluation function f1(S) is expressed as:
[0119]
[0120] Among them, H i Indicates the i-th selected band in the particle, I indicates the number of bands selected in the particle, and the bands corresponding to the I elements can be selected from the particle position vector according to the value of the elements from large to small. These bands are the selected bands. i ) refers to the information entropy of the i-th band, IE(H i ) can be calculated by referring to the aforementioned embodiment and will not be described again.
[0121] Optionally, the band structure similarity evaluation function f2(S) is expressed as:
[0122]
[0123]
[0124] Among them, μ i and μ j Respectively represent the i-th selected band H i and the jth selected band H j The mean gray value of . and Respectively represent H i and H j The variance of the i-th selected band H i The corresponding pixel point on the image and the j-th selected band H j The variance is calculated from the corresponding pixel points on the image. Table H i and H j ε1 and ε2 are configuration constants.
[0125] Furthermore, the particle evaluation function can be expressed as:
[0126] minF(S)=min[f1(S),f2(S)]
[0127] It can be seen that in the particle evaluation function, both the amount of information contained in the bands in the particles and the redundancy between the bands in the particles are taken into account, which improves the accuracy of particle evaluation and makes the bands in the particles have high information content and differences.
[0128] Corresponding to the unsupervised band selection method of the above embodiment, Figure 4 This is a structural block diagram of the unsupervised band selection device provided by the embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 4 The unsupervised band selection apparatus 400 includes: an acquisition unit 401, configured to acquire a first hyperspectral image, a first population corresponding to the first hyperspectral image, and a second hyperspectral image and a second population corresponding to the second hyperspectral image, wherein the first hyperspectral image is a target domain dataset for knowledge transfer, the second hyperspectral image is a source domain dataset for knowledge transfer, the first population and the second population respectively contain multiple particles, an element in a position vector of the particle corresponds to a band, and the value of the element corresponds to the importance of the band; an evolution unit 402, configured to perform multiple evolutions on the first population based on the first hyperspectral image, the second hyperspectral image, and the second population to obtain a target population, wherein in an Nth evolution, based on the first hyperspectral image and the second hyperspectral image, positions of particles to be transferred selected from the second population are adjusted, and based on the particles to be transferred after the positions are adjusted, particle evolution based on knowledge transfer is performed on one or more particles in the current generation of the first population, where N is greater than or equal to 1; and a band determination unit 403, configured to determine, based on the position vectors of the particles in the target population, a target band corresponding to the first hyperspectral image in the bands contained in the first hyperspectral image.
[0129] In some embodiments, the evolutionary process of the Nth evolution includes: determining a first particle and a second particle in a first population of a current generation, wherein the first particle is a particle evolving within a population in the Nth evolution, and the second particle is a particle evolving between populations in the Nth evolution; evolving the first particle based on a position vector of a global optimal particle in a historical evolution process of the first population of the current generation and an optimal position vector of the first particle in the historical evolution process, to obtain a first evolved particle corresponding to the first particle; selecting a particle to be migrated in the Nth evolution in the second population; adjusting the position of the particle to be migrated in the Nth evolution based on a first hyperspectral image and a second hyperspectral image, to obtain a particle to be migrated after position adjustment in the Nth evolution; evolving the second particle based on the position vector of the global optimal particle, the optimal position vector of the second particle in the historical evolution process, and the particle to be migrated after position adjustment in the Nth evolution, to obtain a second evolved particle corresponding to the second particle; and obtaining the first population of the Nth generation based on a particle evaluation function, the first particle, the first evolved particle, the second particle, and the second evolved particle.
[0130] In some embodiments, in the first population of the current generation, determining the first particle and the second particle includes: when N is greater than 1, obtaining the number of first particles that have successfully evolved within the population and the number of second particles that have successfully evolved between populations during the N-1th evolution process; determining the knowledge transfer frequency corresponding to the Nth evolution based on the number of first particles, the number of second particles, and the total number of particles in the first population of the current generation; comparing the knowledge transfer frequency with the random number corresponding to each particle in the first population of the current generation to determine whether each particle in the first population of the current generation undergoes knowledge transfer; determining the first particle as the particle determined to undergo knowledge transfer in the first population of the current generation, and determining the second particle as the particle determined not to undergo knowledge transfer in the first population of the current generation.
[0131] In some embodiments, selecting particles to be migrated in the Nth evolution in the second population includes: screening particles in the second population according to evaluation scores of the particles in the second population on multiple evaluation indicators to obtain a non-dominated set; selecting particles to be migrated in the Nth evolution from the non-dominated set; wherein, in the non-dominated set, a third particle and a fourth particle satisfy a non-dominated relationship, where the third particle and the fourth particle satisfy the non-dominated relationship means that the third particle is superior to the fourth particle in at least one evaluation indicator and the fourth particle is superior to the third particle in at least one evaluation indicator, the third particle is any particle in the non-dominated set, and the fourth particle is any particle in the non-dominated set except the third particle.
[0132] In some embodiments, according to the first hyperspectral image and the second hyperspectral image, the position of the particles to be migrated in the Nth evolution is adjusted to obtain the particles to be migrated after the position adjustment in the Nth evolution, including: determining the information entropy curve of the first hyperspectral image according to the first hyperspectral image; determining the information entropy curve of the second hyperspectral image according to the second hyperspectral image; determining the linear mapping relationship between the information entropy curve of the first hyperspectral image and the information entropy curve of the second hyperspectral image through function fitting; according to the linear mapping relationship, the position of the particles to be migrated in the Nth evolution is adjusted to obtain the particles to be migrated after the position adjustment in the Nth evolution.
[0133] In some embodiments, the second particle is evolved based on the position vector of the global optimal particle, the optimal position vector of the second particle in the historical evolution process, and the particle to be migrated after the position is adjusted in the Nth evolution to obtain a second evolved particle corresponding to the second particle, including: determining a first difference between the position vector of the global optimal particle and the position vector of the second particle, a second difference between the optimal position vector of the second particle and the position vector of the second particle, and a third difference between the position vector of the particle to be migrated after the position is adjusted in the Nth evolution and the position vector of the second particle; updating the velocity vector of the second particle based on the first difference, the second difference, and the third difference to obtain an updated velocity vector of the second particle, wherein the velocity vector of the second particle is included in the first population of the current generation; updating the position vector of the second particle based on the updated velocity vector of the second particle to obtain an updated position vector of the second particle; and obtaining the second evolved particle based on the updated velocity vector of the second particle and the updated position vector of the second particle.
[0134] In some embodiments, a first population of the Nth generation is obtained according to a particle evaluation function, a first particle, a first evolved particle, a second particle, and a second evolved particle, including: calculating the information entropy of the band in the first particle and the structural similarity of the band in the first particle by means of a particle evaluation function, and obtaining evaluation scores of the first particle on the information entropy evaluation index and the band structural similarity index respectively; calculating the information entropy of the band in the first evolved particle and the structural similarity of the band in the first particle by means of a particle evaluation function, and obtaining evaluation scores of the first evolved particle on the information entropy evaluation index and the band structural similarity index respectively; calculating the information entropy of the band in the second particle and the structural similarity of the band in the second particle by means of a particle evaluation function, and obtaining evaluation scores of the second particle on the information entropy evaluation index and the band structural similarity index respectively; calculating the information entropy of the band in the second particle and the structural similarity of the band in the second particle by means of a particle evaluation function , calculate the information entropy of the bands in the second evolved particle and the structural similarity of the bands in the second evolved particle, and obtain the evaluation scores of the second evolved particle on the information entropy evaluation index and the band structure similarity index respectively; according to the evaluation score of the first particle on the information entropy evaluation index, the evaluation score of the first particle on the band structure similarity index, and the evaluation scores of the first evolved particle on the information entropy evaluation index and the band structure similarity index, retain the first particle or the first evolved particle as a particle in the first population of the Nth generation; according to the evaluation score of the second particle on the information entropy evaluation index, the evaluation score of the second particle on the band structure similarity index, and the evaluation score of the second evolved particle on the information entropy evaluation index and the band structure similarity index, retain the second particle or the second evolved particle as a particle in the first population of the Nth generation.
[0135] The unsupervised band selection device provided in this embodiment can be used to implement the technical solution of the embodiment of the unsupervised band selection method described above. Its implementation principle and technical effects are similar and will not be described in detail here.
[0136] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. For example, the electronic device can be provided as a server or a computer. Figure 5 , electronic device 500 includes a processing component 501, which further includes one or more processors, and a memory resource represented by memory 502 for storing instructions executable by processing component 501, such as applications. The applications stored in memory 502 may include one or more modules, each corresponding to a set of instructions. In addition, processing component 501 is configured to execute instructions to perform any of the above-described method embodiments.
[0137] The electronic device 500 may further include a power supply component 503 configured to perform power management of the electronic device 500, a wired or wireless network interface 504 configured to connect the electronic device 500 to a network, and an input / output (I / O) interface 505. The electronic device 500 may operate based on an operating system stored in the memory 502, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0138] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above-mentioned unsupervised band selection method is implemented.
[0139] The present application also provides a computer program product, including a computer program, which implements the above unsupervised band selection method when executed by a processor.
[0140] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The computer-readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0141] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also be present in the test equipment management device as discrete components.
[0142] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An unsupervised band selection method, characterized in that: include: Obtain a first hyperspectral image, a first population corresponding to the first hyperspectral image, and a second hyperspectral image and a second population corresponding to the second hyperspectral image, wherein the first hyperspectral image is a target domain dataset for knowledge migration, the second hyperspectral image is a source domain dataset for knowledge migration, the first population and the second population each contain a plurality of particles, an element in a position vector of the particle corresponds to a band, and a value of the element corresponds to the importance of the band; performing multiple evolutions on the first population based on the first hyperspectral image, the second hyperspectral image, and the second population to obtain a target population, wherein, in an Nth evolution, based on the first hyperspectral image and the second hyperspectral image, positions of particles to be migrated selected from the second population are adjusted, and based on the position-adjusted particles to be migrated, particle evolution based on knowledge migration is performed on one or more particles in the first population of the current generation, where N is greater than or equal to 1; According to the position vectors of the particles in the target population, a target band corresponding to the first hyperspectral image is determined in the bands included in the first hyperspectral image.
2. The unsupervised band selection method according to claim 1, wherein The evolutionary process of the Nth evolution includes: In a first population of a current generation, a first particle and a second particle are determined, wherein the first particle is a particle that undergoes intra-population evolution in the Nth evolution, and the second particle is a particle that undergoes inter-population evolution in the Nth evolution; Evolving the first particle according to the position vector of the global optimal particle in the historical evolution process of the first population of the current generation and the optimal position vector of the first particle in the historical evolution process to obtain a first evolved particle corresponding to the first particle; In the second population, particles to be migrated in the Nth evolution are selected; Adjusting the position of the particles to be migrated in the Nth evolution according to the first hyperspectral image and the second hyperspectral image to obtain particles to be migrated after the position adjustment in the Nth evolution; Evolving the second particle according to the position vector of the global optimal particle, the optimal position vector of the second particle in the historical evolution process, and the particle to be migrated after position adjustment in the Nth evolution, to obtain a second evolved particle corresponding to the second particle; A first population of the Nth generation is obtained according to a particle evaluation function, the first particle, the first evolved particle, the second particle, and the second evolved particle.
3. The unsupervised band selection method according to claim 2, characterized in that The step of determining the first particle and the second particle in the first population of the current generation includes: When N is greater than 1, obtain the number of first particles that have successfully evolved within the population and the number of second particles that have successfully evolved between populations during the N-1th evolution process; Determining a knowledge migration frequency corresponding to the Nth evolution according to the first number of particles, the second number of particles, and the total number of particles in the first population of the current generation; Comparing the knowledge migration frequency with the random number corresponding to each particle in the first population of the current generation, and determining whether each particle in the first population of the current generation performs knowledge migration; The first particle is determined to be a particle in the first population of the current generation that is determined not to perform knowledge migration, and the second particle is determined to be a particle in the first population of the current generation that is determined to perform knowledge migration.
4. The unsupervised band selection method according to claim 2, wherein: The step of selecting particles to be migrated in the Nth evolution from the second population includes: screening the particles in the second population according to evaluation scores of the particles in the second population on a plurality of evaluation indicators to obtain a non-dominated set; Selecting particles to be migrated in the Nth evolution from the non-dominated set; In the non-dominated set, the third particle and the fourth particle satisfy a non-dominated relationship. The third particle and the fourth particle satisfying the non-dominated relationship means that the third particle is superior to the fourth particle in at least one evaluation indicator and the fourth particle is superior to the third particle in at least one evaluation indicator. The third particle is any particle in the non-dominated set, and the fourth particle is any particle in the non-dominated set except the third particle.
5. The unsupervised band selection method according to claim 2, wherein: The step of adjusting the positions of the particles to be migrated in the N-th evolution according to the first hyperspectral image and the second hyperspectral image to obtain the particles to be migrated after the positions are adjusted in the N-th evolution includes: determining an information entropy curve of the first hyperspectral image according to the first hyperspectral image; determining an information entropy curve of the second hyperspectral image according to the second hyperspectral image; Determining a linear mapping relationship between the information entropy curve of the first hyperspectral image and the information entropy curve of the second hyperspectral image through function fitting; According to the linear mapping relationship, the position of the particles to be migrated in the Nth evolution is adjusted to obtain the particles to be migrated after the position adjustment in the Nth evolution.
6. The unsupervised band selection method according to claim 2, characterized in that The step of evolving the second particle according to the position vector of the global optimal particle, the optimal position vector of the second particle in the historical evolution process, and the particle to be migrated after position adjustment in the Nth evolution to obtain a second evolved particle corresponding to the second particle includes: Determine a first difference between the position vector of the global optimal particle and the position vector of the second particle, a second difference between the optimal position vector of the second particle and the position vector of the second particle, and a third difference between the position vector of the particle to be migrated after position adjustment in the Nth evolution and the position vector of the second particle; updating the velocity vector of the second particle according to the first difference, the second difference, and the third difference to obtain an updated velocity vector of the second particle, wherein the velocity vector of the second particle is included in the first population of the current generation; updating the position vector of the second particle according to the updated velocity vector of the second particle to obtain an updated position vector of the second particle; The second evolved particle is obtained according to the updated velocity vector of the second particle and the updated position vector of the second particle.
7. The unsupervised band selection method according to claim 2, wherein: The step of obtaining a first population of the Nth generation according to the particle evaluation function, the first particle, the first evolved particle, the second particle, and the second evolved particle includes: Calculating the information entropy of the bands in the first particle and the structural similarity of the bands in the first particle using the particle evaluation function to obtain evaluation scores of the first particle on the information entropy evaluation index and the band structural similarity index respectively; Calculating the information entropy of the bands in the first evolved particle and the structural similarity of the bands in the first particle using the particle evaluation function to obtain evaluation scores of the first evolved particle on the information entropy evaluation index and the band structural similarity index respectively; Calculating the information entropy of the band in the second particle and the structural similarity of the band in the second particle using the particle evaluation function to obtain evaluation scores of the second particle on the information entropy evaluation index and the band structural similarity index respectively; Calculating the information entropy of the bands in the second evolved particle and the structural similarity of the bands in the second evolved particle using the particle evaluation function to obtain evaluation scores of the second evolved particle on the information entropy evaluation index and the band structural similarity index respectively; retaining the first particle or the first evolved particle as a particle in the first population of the Nth generation according to the evaluation score of the first particle on the information entropy evaluation index, the evaluation score of the first particle on the band structure similarity index, and the evaluation scores of the first evolved particle on the information entropy evaluation index and the band structure similarity index; According to the evaluation score of the second particle on the information entropy evaluation index, the evaluation score of the second particle on the band structure similarity index, and the evaluation scores of the second evolved particle on the information entropy evaluation index and the second evolved particle on the band structure similarity index, the second particle or the second evolved particle is retained as a particle in the first population of the Nth generation.
8. An unsupervised band selection device, characterized in that: include: an acquisition unit, configured to acquire a first hyperspectral image, a first population corresponding to the first hyperspectral image, and a second hyperspectral image and a second population corresponding to the second hyperspectral image, wherein the first hyperspectral image is a target domain dataset for knowledge migration, the second hyperspectral image is a source domain dataset for knowledge migration, the first population and the second population each contain a plurality of particles, an element in a position vector of the particle corresponds to a band, and a value of the element corresponds to an importance of the band; an evolution unit, configured to perform multiple evolutions on the first population based on the first hyperspectral image, the second hyperspectral image, and the second population to obtain a target population, wherein, in an Nth evolution, positions of particles to be migrated selected from the second population are adjusted based on the first hyperspectral image and the second hyperspectral image, and based on the position-adjusted particles to be migrated, particle evolution based on knowledge migration is performed on one or more particles in the first population of a current generation, where N is greater than or equal to 1; The band determining unit is configured to determine, based on the position vectors of the particles in the target population, a target band corresponding to the first hyperspectral image in the bands included in the first hyperspectral image.
9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the unsupervised band selection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the unsupervised band selection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for selecting high-spectrum remote-sensing image wave band
CN104751176A
Hyperspectral image waveband selection method based on quantum evolution particle swarm optimization algorithm
CN110309822A