Hyperspectral image clustering method and device, electronic equipment and storage medium
The feature extraction network model constructed by convolutional autoencoder and asymmetric autoencoder, combined with density and improved K-means clustering algorithm, solves the problem of spatial noise interference in hyperspectral image clustering and improves clustering accuracy and stability.
Patent Information
- Application Number
- CN202111653821.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In existing hyperspectral image clustering methods, the spatial noise introduced by spatial spectrum features has a significant impact on the clustering effect. How to effectively suppress the interference of spatial noise is a technical problem that needs to be solved urgently.
Convolutional autoencoder and asymmetric autoencoder are used to construct a feature extraction network model. The feature vectors of hyperspectral images are extracted through training. Density-based clustering algorithm and improved K-means clustering algorithm are used to remove spatial noise and improve clustering accuracy.
It effectively reduces the spatial noise in the feature vector, improves the accuracy and stability of the clustering results, and solves the problem that the edge features of the objects cannot be clustered correctly.
Smart Images

Figure CN114359633B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of image processing, and particularly relate to a hyperspectral image clustering method and device, electronic equipment and storage medium. BACKGROUND
[0002] A hyperspectral image, which can also be referred to as a hyperspectral remote sensing image, contains rich ground information in the image, which makes it possible to provide fine ground information analysis, and has been widely used in many industry fields.
[0003] In the image processing process of a hyperspectral image, feature extraction and clustering analysis of the image are relatively important steps. At present, the existing method usually performs clustering by extracting the spatial-spectral features of the hyperspectral image. However, the spatial-spectral features correspond to the need to introduce spatial information. After introducing the spatial information, due to the edge effect, spatial noise is also introduced at the edge of the ground object. The spatial noise contained in the spatial-spectral features has a great influence on the subsequent clustering effect.
[0004] Therefore, how to effectively solve the interference of spatial noise on clustering is a technical problem to be solved at present. SUMMARY
[0005] Embodiments of the present application provide a hyperspectral image clustering method and device, electronic equipment and storage medium to effectively suppress spatial noise in a feature vector and improve the accuracy of clustering.
[0006] In a first aspect, embodiments of the present application provide a hyperspectral image clustering method, comprising:
[0007] extracting a first feature vector from a pixel set corresponding to a pixel in a hyperspectral image by using a trained feature extraction network model, wherein the feature extraction network model comprises a convolutional auto-encoder (CAE) and an asymmetric auto-encoder;
[0008] clustering the hyperspectral image according to the first feature vector to obtain a clustering result of the hyperspectral image.
[0009] In a second aspect, embodiments of the present application also provide a hyperspectral image clustering device, comprising:
[0010] a feature extraction network model, wherein the feature extraction network model comprises a CAE and an asymmetric auto-encoder;
[0011] a clustering module configured to cluster the hyperspectral image according to the first feature vector to obtain a clustering result of the hyperspectral image.
[0012] In a third aspect, an electronic device is provided, and the electronic device comprises:
[0013] one or more processors;
[0014] a storage device configured to store one or more programs;
[0015] The one or more programs are executed by the one or more processors, so that the one or more processors implement the hyperspectral image clustering method provided by the embodiments of the present application.
[0016] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the hyperspectral image clustering method provided by the embodiments of the present application.
[0017] The embodiments of the present application provide a hyperspectral image clustering method, device, electronic device and storage medium. First, a first feature vector is extracted from a pixel set corresponding to a pixel in a hyperspectral image by using a trained feature extraction network model, wherein the feature extraction network model comprises a CAE and an asymmetric autoencoder; and the hyperspectral image is clustered according to the first feature vector, to obtain a clustering result of the hyperspectral image. The method extracts the first feature vector by using the feature extraction network model constructed based on the CAE and the asymmetric autoencoder, which can weaken the spatial noise in the first feature vector, effectively improving the accuracy of feature vector extraction; and on this basis, the hyperspectral image is clustered by using the first feature vector obtained after optimization, which can further remove part of the spatial noise in the first feature vector, thereby improving the accuracy of the clustering result. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 A flowchart of a hyperspectral image clustering method provided by the first embodiment of the present application is shown in the figure;
[0019] Figure 2 A flowchart of a hyperspectral image clustering method provided by the second embodiment of the present application is shown in the figure;
[0020] Figure 3 A schematic diagram of a feature extraction network model provided by the second embodiment of the present application is shown in the figure;
[0021] Figure 4 An implementation schematic diagram of clustering a hyperspectral image provided by the second embodiment of the present application is shown in the figure;
[0022] Figure 5 A schematic diagram of various types of hyperspectral images provided by the second embodiment of the present application is shown in the figure;
[0023] Figure 6A schematic diagram of an input image and a reconstructed image based on CAE provided in the second embodiment of the present invention;
[0024] Figure 7 A schematic diagram of the PSNR and SSIM calculation results of an input image and a reconstructed image based on CAE provided in the second embodiment of the present invention;
[0025] Figure 8 A schematic diagram of an input image and a reconstructed image based on an asymmetric autoencoder provided in the second embodiment of the present invention;
[0026] Figure 9 A schematic diagram of the PSNR and SSIM calculation results of an input image and a reconstructed image based on an asymmetric autoencoder provided in Example 2 of the present invention;
[0027] Figure 10 A schematic diagram of a noise point label graph based on DBSCAN clustering using CAE and a feature extraction network model provided in the second embodiment of the present invention;
[0028] Figure 11 A schematic diagram of a feature extraction network model and clustered label images of other models provided in the second embodiment of the present invention;
[0029] Figure 12 A schematic structural diagram of a hyperspectral image clustering device provided in the third embodiment of the present invention;
[0030] Figure 13 This is a structural diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0032] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. When its operation is completed, the process can be terminated, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the features in the embodiments of the present invention and the embodiments can be combined with each other without conflict.
[0033] The term "including" and its variations used in the present invention are open inclusions, that is, "including but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment."
[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish the corresponding contents, and are not used to limit the order or mutual dependence.
[0035] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0036] Hyperspectral images, also known as hyperspectral remote sensing images, are images acquired through hyperspectral remote sensing technology. They can also be understood as image cubes containing information from dozens to hundreds of continuous spectral bands obtained through imaging spectrometers. Hyperspectral remote sensing images contain rich ground object information, which makes it possible to conduct refined analysis of ground object information. They are now widely used in many industries. However, in actual remote sensing applications, the high cost and difficulty of obtaining training samples have greatly restricted the industry application capabilities of hyperspectral remote sensing. As a typical unsupervised information analysis technology, hyperspectral clustering can achieve natural division of pixels by mining the essential characteristics of the data without relying on any training samples. It effectively solves the problem of refined analysis of hyperspectral ground object information without prior information and greatly enhances the application potential of hyperspectral remote sensing.
[0037] In the field of image processing, feature extraction is a very important step. The quality of the extracted features has a direct impact on subsequent applications, so whether the data features can be extracted efficiently is very important.
[0038] In cluster analysis of hyperspectral image data, traditional clustering is performed directly on the original spectral data. A more advanced method now is to extract the spatial-spectral features of the hyperspectral image (spatial-spectral features can be understood as including spatial information and spectral information) for clustering. However, after introducing spatial information, due to the edge effect, spatial noise is also introduced at the edge of the object, which will have a relatively large impact on the subsequent clustering effect. In order to solve the problem of spatial noise interference during clustering, an embodiment of the present invention proposes a hyperspectral image clustering method based on convolutional autoencoders and asymmetric autoencoders. Utilizing this method, the accuracy of feature vector extraction and clustering can be improved.
[0039] Example 1
[0040] Figure 1This is a flow chart of a hyperspectral image clustering method provided in Example 1 of the present invention. The method is applicable to the case of feature extraction and clustering of hyperspectral images. The method can be performed by a hyperspectral image clustering device, wherein the device can be implemented by software and / or hardware and is generally integrated into an electronic device with data processing capabilities. In this embodiment, the electronic device includes but is not limited to: desktop computers, laptops, servers and other devices.
[0041] like Figure 1 As shown, a hyperspectral image clustering method provided by the first embodiment of the present invention includes the following steps:
[0042] S110. Extracting a first feature vector according to a pixel set corresponding to a pixel in the hyperspectral image through a trained feature extraction network model, wherein the feature extraction network model includes a CAE and an asymmetric autoencoder.
[0043] In this embodiment, the feature extraction network model can be understood as a network model for extracting spatial-spectral features from a hyperspectral image. Spatial-spectral features can refer to spatial feature information (i.e., spatial information) and spectral feature information (i.e., spectral information). The first feature vector can refer to a feature vector of a hyperspectral image extracted by a trained feature extraction network model.
[0044] Pixels, also known as pixels or pixel points, are the basic units that make up a hyperspectral image. In other words, a hyperspectral image can be composed of multiple pixels; a pixel can be a data element that contains both spatial and spectral information. A pixel set can be understood as the set of all pixels within a set space, centered around a certain pixel. The pixel that serves as the center point can be called the central pixel, and all pixels in the pixel set except the central pixel can be considered as pixels within the neighborhood of the central pixel.
[0045] An autoencoder can refer to an artificial neural network that uses input information as a learning target and learns to represent the input information. An autoencoder consists of two parts: an encoder and a decoder. The encoder can be used to compress the input information into a latent space representation, and the decoder can be used to reconstruct the input information represented in the latent space in the encoder. CAE is called a convolutional autoencoder, which can be understood as an autoencoder based on a convolutional network. Specifically, convolutional layers are used to replace some fully connected layers in the autoencoder. CAE can include corresponding encoders and decoders. An asymmetric autoencoder can refer to an autoencoder with an asymmetric number of network layers. For example, in the multiple network layers of an asymmetric autoencoder, the number of layers between the input layer and the middle layer is different from the number of layers between the middle layer and the output layer. Therefore, with the middle layer as the center, the number of layers between the input layer and the middle layer and the number of layers between the middle layer and the output layer are asymmetric. An asymmetric autoencoder can include corresponding encoders and decoders.
[0046] The feature extraction network model includes CAE and asymmetric autoencoder. Through the trained feature extraction network model, the first feature vector is extracted according to the pixel set corresponding to the pixel in the hyperspectral image.
[0047] For example, a feature extraction network model is constructed by stacking an asymmetric autoencoder on CAE. First, each pixel in the hyperspectral image is taken as the center point to obtain the corresponding pixel set. The pixel at the center point is the pixel for feature extraction at that time, that is, the central pixel. The pixel set is input as input information into the encoder in CAE to obtain the corresponding encoding information, and the encoding information is input into the decoder of CAE to obtain the corresponding decoding information. The decoding information can be considered as the output information of CAE.
[0048] Then, the CAE encoding information that makes the CAE's decoding information and the CAE's input information (i.e., a set of pixels) infinitely close is used as the feature vector obtained by the target pixel through CAE. For example, the probability of the possible event that the absolute value of the difference between the CAE's decoding information and the CAE's input information is less than a set value (the set value can be a smaller value set according to actual conditions) can be set as 1 as a mapping condition, and the CAE encoding information that meets the mapping condition is used as the feature vector obtained through CAE.
[0049] Afterwards, the feature vector obtained by CAE is input as input information into the encoder of the asymmetric autoencoder to obtain the corresponding encoding information, and the encoding information is input into the decoder of the asymmetric autoencoder to obtain the corresponding decoding information, which can be considered as the output information of the asymmetric autoencoder.
[0050] Finally, the encoding information of the asymmetric autoencoder that makes the decoding information of the asymmetric autoencoder infinitely close to the center pixel is used as the feature vector obtained by the asymmetric autoencoder for the target pixel. For example, the probability of a possible event that the absolute value of the difference between the decoding information of the asymmetric autoencoder and the center pixel is less than a set value (the set value can be a smaller value set according to the actual situation) is 1 and set as a mapping condition. The encoding information of the asymmetric autoencoder that meets the mapping condition is used as the feature vector obtained by the asymmetric autoencoder. It can be understood that the feature vector obtained by the asymmetric autoencoder can be the first feature vector obtained by the feature extraction network model.
[0051] S120: Cluster the hyperspectral image according to the first eigenvector to obtain a clustering result of the hyperspectral image.
[0052] In this embodiment, clustering may refer to a process of dividing a collection of physical or abstract objects into a plurality of clusters consisting of similar objects.
[0053] After extracting a first eigenvector from a set of pixels corresponding to pixels in a hyperspectral image using a trained feature extraction network model, the hyperspectral image can be clustered based on the first eigenvector to obtain a clustering result for the hyperspectral image. This embodiment optimizes the eigenvectors extracted by the convolutional autoencoder by superimposing an asymmetric autoencoder on a convolutional autoencoder to reduce spatial noise in the eigenvectors. However, even after this reduction, some spatial noise still remains in the eigenvectors. Based on this, an improved clustering algorithm can be used to further remove spatial noise from the first eigenvectors extracted by the feature extraction network model.
[0054] Exemplarily, a clustering algorithm can be set (for example, the clustering algorithm can be set to a density-based clustering algorithm), and the hyperspectral image can be preliminarily clustered according to the first eigenvector to determine whether the hyperspectral image still contains a noise class (the noise class can be understood as a class containing spatial noise in the clustering result obtained by setting the clustering algorithm); if so, the hyperspectral image can be clustered by an improved clustering algorithm (for example, the improved clustering algorithm can be a clustering algorithm obtained by adding a set number of clusters to the K-means clustering algorithm) to remove excess spatial noise; if not, the K-means clustering algorithm can be directly used to cluster the hyperspectral image.
[0055] A hyperspectral image clustering method provided in a first embodiment of the present invention extracts a first eigenvector from a set of pixels corresponding to pixels in a hyperspectral image using a trained feature extraction network model, wherein the feature extraction network model includes CAE and an asymmetric autoencoder. The hyperspectral image is clustered based on the first eigenvector to obtain a clustering result for the hyperspectral image. This method extracts the first eigenvector using a feature extraction network model constructed based on CAE and an asymmetric autoencoder, thereby reducing spatial noise in the first eigenvector and effectively improving the accuracy of feature vector extraction. Furthermore, the method further uses the optimized first eigenvector to cluster the hyperspectral image, further removing some of the spatial noise in the first eigenvector, thereby improving the accuracy of the clustering result.
[0056] Example 2
[0057] Figure 2 This is a schematic flow chart of a hyperspectral image clustering method provided in Example 2 of the present invention. This Example 2 refines the above-mentioned examples. This Example specifically describes the process of extracting first eigenvectors and clustering hyperspectral images based on these first eigenvectors. It should be noted that any technical details not fully described in this Example can be referred to in any of the above-mentioned Examples.
[0058] like Figure 2 As shown, a hyperspectral image clustering method provided by the second embodiment of the present invention includes the following steps:
[0059] S210 , performing feature extraction on a pixel set corresponding to a pixel in the hyperspectral image through CAE to obtain a second feature vector.
[0060] In this embodiment, the CAE may include a corresponding encoder and decoder. A pixel set corresponding to a pixel in the hyperspectral image is input into the CAE for feature extraction. The resulting encoded information in the CAE (i.e., the encoded information output by the encoder in the CAE) is the second feature vector.
[0061] Optionally, the CAE includes a first encoder and a first decoder; the CAE performs feature extraction on a pixel set corresponding to a pixel in the hyperspectral image to obtain a second feature vector, including: taking each pixel in the hyperspectral image as a central pixel, and determining a pixel set corresponding to the central pixel; inputting the pixel set into the first encoder, and outputting corresponding first encoding information; inputting the first encoding information into the first decoder, and outputting corresponding first decoding information; determining the first encoding information that satisfies the first mapping relationship as the second feature vector corresponding to the central pixel; wherein the first mapping relationship is a mapping relationship between the first decoding information and the pixel set.
[0062] In one embodiment, in order to introduce spatial information, this embodiment constructs a CAE, and the input information data of the CAE is changed from one dimension to two dimensions. Generally, the central pixel and its neighborhood (the neighborhood can be considered as a set of pixels) contain relevant information. The main purpose of introducing spatial information is to use the correlation between the central pixel and its neighborhood to support the spatial spectrum characteristics of the central pixel itself. For CAE, f1(x) can be used to represent the encoding mapping function of the first encoder, and g1(x) can be used to represent the decoding mapping function of the first decoder. u can represent the central pixel, that is, the original spectral information of the central pixel; x u It can represent a set of pixels, which is the input information of CAE. u ∈R n×n×c , R n×n×c It can represent a sub-cube of size n×n×c constructed with the central pixel u as the center. n can represent the dimension of the sub-cube. To ensure that the sub-cube has a center point, n can be an odd number, such as 5. c can represent the number of channels of the hyperspectral image. There is no restriction on the values of n and c here and they can be set according to actual conditions.
[0063] For CAE, firstly, x u Input to the first encoder, the output corresponding first coded information v can be expressed as v=f1(x u). Then the v is input to the first decoder, and the output corresponding first decoding information can be expressed as g1(v). Finally, assuming that there is a mapping relationship (i.e. the first mapping relationship) between the first decoding information g1(v) and the pixel set x u , which can be expressed as P(|g1(v)-x u |<ε1)=1. The first mapping relationship can be understood as the probability of the absolute value of the difference between g1(v) and x u being less than a set value ε1 being 1, and ε1 can be a small value set according to actual conditions, which is not limited here. On this basis, the v satisfying the first mapping relationship is determined as the second feature vector corresponding to the center pixel. It should be noted that according to the working principle of CAE, because v can well reconstruct x u , it can be considered that the first encoding information v (i.e. the second feature vector) satisfying the first mapping condition can represent the empty spectral feature information contained in x u .
[0064] S220, input the second feature vector into the asymmetric autoencoder to obtain the first feature vector.
[0065] In this embodiment, because the center pixel at the edge of the ground object, the empty spectral feature information contained in part of the pixels in the neighborhood of the center pixel is completely different from that of the center pixel, at this time the introduced spatial information will have a counter effect (such as introducing spatial noise), which will affect the subsequent clustering effect. Therefore, in order to weaken part of the spatial noise in the second feature vector, an asymmetric autoencoder is superimposed on the basis of the CAE in this embodiment, wherein the asymmetric autoencoder can include a corresponding encoder and a decoder. Specifically, the second feature vector extracted by the CAE is input as input information into the asymmetric autoencoder for feature extraction, and the encoding information in the asymmetric autoencoder (i.e. the encoding information output by the encoder in the asymmetric autoencoder) obtained is the first feature vector.
[0066] Optionally, the asymmetric autoencoder includes a second encoder and a second decoder; inputting the second feature vector into the asymmetric autoencoder to obtain the first feature vector, comprising: inputting the second feature vector into the second encoder to output the corresponding second encoding information; inputting the second encoding information into the second decoder to output the corresponding second decoding information; determining the second encoding information satisfying the second mapping relationship as the first feature vector; wherein the second mapping relationship is the mapping relationship between the second decoding information and the center pixel.
[0067] In an embodiment, for the asymmetric autoencoder, the asymmetric autoencoder can comprise a second encoder and a second decoder. The encoding mapping function of the second encoder can be denoted as f2(x), and the decoding mapping function of the second decoder can be denoted as g2(x). In the process of extracting the feature vector by the asymmetric autoencoder, the input information is the feature vector (i.e., the second feature vector) extracted by the CAE, and the reconstruction object is the central pixel u; the specific process is as follows: first, the second feature vector (which can also be denoted as v) is input into the second encoder, and the corresponding second encoding information obtained by the output can be denoted as t = f2(v). Then, the second encoding information t is input into the second decoder, and the corresponding second decoding information obtained by the output can be denoted as g2(t). Finally, it is assumed that there is a mapping relationship (i.e., a second mapping relationship) between the second decoding information g2(t) and the central pixel u, which can be denoted as P(|g2(t)-u|<ε2) = 1
[0068] The first mapping relationship can be understood as the probability of the absolute value of the difference between g2(t) and u being less than a set value ε2 being 1; similarly, ε2 can be a small value set according to actual conditions, which is not limited here. On this basis, the second encoding information t that satisfies the second mapping relationship is determined as the first feature vector.
[0069] It should be noted that maximizing the correlation between u and x u can be considered as equivalent to maximizing the correlation between u and u' (u' can represent the output of the asymmetric autoencoder, which can be considered as equivalent to g2(t)). In the process of making the second encoding information satisfy the second mapping relationship, it can be considered as a process of maximizing the correlation between u and g2(t) (i.e., u') (i.e., retaining the spatial information in the second feature vector that is strongly correlated with the central pixel u, and discarding the spatial information that is weakly correlated). Exemplarily, the correlation between u and u' can be measured and characterized by the reciprocal of the Euclidean distance d(u', u) between u and u', which can be denoted as When the second encoding information satisfies the second mapping relationship, d(u', u) tends to 0 infinitely, and at this time, the correlation between u and u' can be maximized.
[0070] In this embodiment, the spatial information that is weakly correlated with the central pixel u in the second feature vector is discarded by the asymmetric autoencoder, i.e., the spatial information that has no supporting effect on the central pixel is suppressed (i.e., the spatial noise is suppressed), and at the same time, the spectral information of the central pixel contained in the second feature vector is effectively enhanced; in addition, the Dropout layer can also be set in the second decoder to protect the spatial information from being discarded indiscriminately.
[0071] Figure 3This is a schematic diagram of a feature extraction network model provided by the second embodiment of the present invention. Figure 3 As shown, for CAE, the pixel set x u Input to the first encoder of CAE, the output first coded information v=f1(x u ) is then input into the first decoder of CAE to obtain the first decoding information g1(v)(g1(v)=x u ′), where x u ’ can represent the output of CAE. For the asymmetric autoencoder, the second feature vector extracted by CAE (i.e., v obtained under the first mapping condition) is input into the second encoder of the asymmetric autoencoder, and the output second encoded information t=f2(v) is then input into the second decoder of the asymmetric autoencoder to obtain the second decoded information g2(t) (g2(t)=u′), where u′ can represent the output of the asymmetric autoencoder. On this basis, the first feature vector extracted by the feature extraction network model based on CAE and asymmetric autoencoder is t (i.e., t obtained under the second mapping condition).
[0072] S230 , clustering the hyperspectral image according to the first eigenvector using a density-based clustering algorithm to obtain a preliminary clustering result.
[0073] In this embodiment, the K-means clustering algorithm is a clustering method based on cluster centers. Cluster center-based methods are very sensitive to outlier noise points, and outlier sparse noise points will destroy the stability of the clustering, greatly affecting the clustering accuracy. Density-based clustering algorithms, such as the DBSCAN clustering algorithm, are insensitive to such noise points. To select a corresponding K-means clustering algorithm to cluster the hyperspectral image, it is possible to first determine whether the hyperspectral image contains spatial noise. Specifically, the DBSCAN clustering algorithm can be used to cluster the hyperspectral image based on the first eigenvector to obtain preliminary clustering results, wherein the preliminary clustering results may include clustering results containing noise classes or clustering results excluding noise classes. The noise class can be understood as a class that clusters spatial noise into a cluster. The sparse distribution of the noise vector in the feature space can be used to distinguish whether the preliminary clustering results contain noise classes.
[0074] S240 , based on the preliminary clustering result, adopt the corresponding K-means clustering algorithm and perform secondary clustering on the hyperspectral image according to the first eigenvector to obtain a clustering result for the hyperspectral image.
[0075] In this embodiment, if the preliminary clustering result includes the noise class, the improved K-means clustering algorithm is used to perform secondary clustering on the hyperspectral image according to the first eigenvector; if the preliminary clustering result does not include the noise class, the standard K-means clustering algorithm (which can be considered as the unimproved general K-means clustering algorithm) is used to perform secondary clustering on the hyperspectral image according to the first eigenvector to obtain the clustering result of the hyperspectral image.
[0076] Optionally, based on the preliminary clustering results, a corresponding K-means clustering algorithm is used to perform secondary clustering on the hyperspectral image according to the first eigenvector, including: judging whether the hyperspectral image contains a noise class according to the preliminary clustering results; if so, using an improved K-means clustering algorithm to perform secondary clustering on the hyperspectral image according to the first eigenvector; if not, using a standard K-means clustering algorithm to perform secondary clustering on the hyperspectral image according to the first eigenvector; wherein the number of clustering categories of the improved K-means clustering algorithm is greater than the number of clustering categories of the standard K-means clustering algorithm.
[0077] In this embodiment, the number of cluster categories of the improved K-means clustering algorithm is greater than the number of cluster categories of the standard K-means clustering algorithm. This can be understood as adding a set number of clusters to the number of clusters of the standard K-means clustering algorithm to obtain the improved K-means clustering algorithm. The set number can be flexibly set according to actual conditions and is not limited here.
[0078] In one embodiment, the cost function E of the improved K-means clustering algorithm can be expressed as:
[0079]
[0080] Among them, the number of cluster categories in the improved K-means clustering algorithm (i.e., n in the above formula) can be considered as the sum of the number of clusters in the standard K-means clustering algorithm (i.e., k in the above formula) and the added set number of clusters (i.e., nk); wherein, the number of clusters in the standard K-means clustering algorithm can be understood as the class used to cluster the objects in the hyperspectral image, for example, it can be set to be the same as the number of objects in the hyperspectral image; the added set number of clusters can be used to cluster the class of spatial noise. It should be noted that the number of elements in each cluster in the clustering result of the improved K-means clustering algorithm can be used to determine whether the cluster is a noise class. For example, a cluster with a small number of elements can be classified as a noise class.
[0081] It can correspond to the cost function part of clustering objects in hyperspectral images. It can correspond to the cost function part of clustering spatial noise in hyperspectral images. On this basis, the noise points (i.e. spatial noise) can be divided into background clusters, and the cost function E can be equivalent to E', where μ0 represents the mean vector of the background cluster. According to the prior knowledge, the values of the elements in the background cluster are all 0, i.e. μ0 = 0, and the intra-cluster distance of the noise cluster (i.e. the cluster clustered by spatial noise) is generally greater than the intra-cluster distance of the non-noise cluster, so we can get
[0082] It is understandable that It can be seen that by dividing the spatial noise into background clusters, the cost function is further optimized while removing the spatial noise, making the clustering performance better.
[0083] Based on the above embodiments, Figure 4 The following is a schematic diagram of clustering hyperspectral images provided in the second embodiment of the present invention. Figure 4 As shown in the figure, the hyperspectral image is first clustered according to the first eigenvector using the DBSCAN clustering algorithm to determine whether the hyperspectral image contains noise. If not, the K value in the standard K-means clustering algorithm is directly set to k, and K-means clustering is performed directly on the hyperspectral image, and the corresponding clustering result is output. If so, the K value is set to n (for example, initially, n can be set to any value between 2k and 3k), resulting in an improved K-means clustering algorithm. Then, the hyperspectral image is clustered using the improved K-means clustering algorithm. During the clustering process, the top k clusters with the largest number of elements remain unchanged, and the elements in other clusters (i.e., clusters of spatial noise clustering, noise class) are assigned to the background cluster. The modified cluster division is output as the clustering result. Finally, the clustering result is compared with the true classification map to determine whether the noise class is effectively removed. If so, the corresponding clustering result is output. If not, the n value can be adjusted within the range of 2k to 3k until the noise class is effectively removed.
[0084] A second embodiment of the present invention provides a hyperspectral image clustering method that specifically implements the process of extracting a first eigenvector using CAE and an asymmetric autoencoder, and clustering the hyperspectral image based on the first eigenvector. This method extracts the spatial-spectral features of pixels in the hyperspectral image using CAE. Leveraging the uniqueness of these spatial-spectral features, the feature extraction process is further optimized using an asymmetric autoencoder, making it robust to spatial noise. This ensures feature extraction accuracy and addresses the issue of correctly clustering edge features. Furthermore, an improved K-means clustering algorithm is employed to enhance clustering performance and accuracy.
[0085] Based on the above embodiment, optionally, before extracting the first feature vector according to the pixel set corresponding to the pixel in the hyperspectral image through the trained feature extraction network model, it also includes: constructing the feature extraction network model in the following manner: constructing a CAE based on the first network parameters, and training and testing the CAE based on the training set and the test set respectively; constructing an asymmetric autoencoder based on the second network parameters, and training and testing the asymmetric autoencoder based on the training set and the test set respectively; stacking the asymmetric autoencoder on the CAE to construct the feature extraction network model.
[0086] In this embodiment, Table 1 shows an experimental environment for constructing a feature extraction network model. As shown in Table 1, the experimental environment for constructing the feature extraction network model is set, such as the operating system, central processing unit (CPU), graphics processing unit (GPU), random access memory (RAM), and software development environment.
[0087] Table 1 Experimental environment for building feature extraction network model
[0088]
[0089] In the process of constructing the feature extraction network model, a hyperspectral image dataset (i.e., Salinas dataset) can be used as experimental data. The image size in the Salinas dataset is 512×217, and it contains a total of 16 types of ground objects, from which 10 types of ground objects can be selected for research, including 11 types of background classes (for example, the 16 types of ground objects can be combined accordingly, specifically, the data labels of 5 types, namely, the 10th and 13th to 16th types, can be set to zero, and the 3rd and 5th types can be combined into one type, while the 1st, 2nd, 4th, 6th, 7th, 8th, 9th, 11th, and 12th types remain unchanged).
[0090] Figure 5 A schematic diagram of various hyperspectral images provided in the second embodiment of the present invention is shown in FIG. Figure 5 As shown, the leftmost image may represent a false color image of the hyperspectral image in the Salinas dataset, the middle image may represent the original real object image of the hyperspectral image in the Salinas dataset, and the rightmost image may represent the real object image of the hyperspectral image in the Salinas dataset after the object types are combined.
[0091] Before building the feature extraction network model, the experimental data, namely the Salinas dataset, can be normalized, for example, using linear function normalization (i.e., Min-max normalization). To prevent the various bands in the image from interfering with each other, each band can be normalized separately during Min-max normalization.
[0092] The feature extraction network model can include a CAE and an asymmetric autoencoder. Table 2 shows a first network parameter setting for constructing a CAE. As shown in Table 2, the first network parameters for constructing a CAE include 1 input layer, 2 convolutional layers, 5 fully connected layers, 1 reshape layer, 2 transpose layers, and 1 output layer, as well as the convolution kernel, output dimension, and number of channels corresponding to each layer.
[0093] Table 2: First network parameter settings for building CAE
[0094]
[0095] Table 3 shows a second network parameter setting for constructing an asymmetric autoencoder. As shown in Table 3, the second network parameters for constructing an asymmetric autoencoder include 1 input layer, 6 fully connected layers, 1 dropout layer, and 1 output layer, as well as the convolution kernel, output dimension, and number of channels corresponding to each layer.
[0096] Table 3 Second network parameter settings for constructing asymmetric autoencoders
[0097]
[0098] CAE is constructed based on the first network parameter setting in Table 2, and an asymmetric autoencoder is constructed based on the second network parameter setting in Table 3. In order to more accurately evaluate the effectiveness of the feature extraction network model, a self-sampling sampling method, namely the Bootstrap Sample sampling method, can be used to extract a training set from the Salinas dataset, and the remaining elements in the Salinas dataset that do not appear in the training set are used as the test set. The training set and test set used by CAE and asymmetric autoencoder can be the same or different. In this embodiment, taking the same training set and test set as an example, CAE is trained and tested based on the training set and test set respectively; and the asymmetric autoencoder is trained and tested based on the training set and test set respectively. It should be noted that during the training process of CAE and asymmetric autoencoder, the Epoch of CAE can be set to 300 and the Batch size can be set to 256. The Epoch of the asymmetric deep autoencoder can be set to 1000 and the Batch size can be set to 1000. The gradient optimization function can select the adaptive moment estimation (Adam) function, the loss function can use the mean square error (MSE) loss function, and the activation function can use the linear rectification (Rectified Linear Unit, ReLU) function.
[0099] After training CAE and asymmetric autoencoders, the corresponding calculation results show that the loss function value of CAE reaches 6.2832×10 -5 , reaching 9.8768×10 on the validation set -5 The loss function value of the asymmetric autoencoder on the training set reached 1.6303×10 -4 , reaching 1.0803×10 on the validation set -4 It can be seen that the constructed CAE and asymmetric autoencoder have good generalization performance.
[0100] In this embodiment, Peak Signal to Noise Ratio (PSNR) and Structural Similarity Index (SSIM) may be used as evaluation criteria for the similarity between the input image and the reconstructed image. Figure 6 A schematic diagram of an input image and a reconstructed image based on CAE is provided in the second embodiment of the present invention. For CAE, 10 images are randomly selected from the test set as input images for reconstruction. The input images and their corresponding reconstructed images are shown in FIG. Figure 6 shown.
[0101] Figure 7The following is a schematic diagram of the PSNR and SSIM calculation results of the input image and the reconstructed image based on CAE provided in the second embodiment of the present invention. Figure 7 As shown in the figure, the number of image groups on the horizontal axis represents 10 image groups consisting of the 10 extracted input images and the corresponding reconstructed images. The calculated PSNR values for the 10 groups range from a minimum of 31 dB to a maximum of 46 dB. The calculated SSIM values for the 10 groups range from a minimum of 0.967 to a maximum of 0.994. This shows that CAE can effectively learn the information in the input images and compress it into a feature vector with a smaller dimension.
[0102] The asymmetric autoencoder is trained using the feature vector (i.e., the second feature vector) generated by CAE. Since the output of the asymmetric autoencoder is the value of each pixel (i.e., pixel) in each band, the similarity between the input image and its reconstructed image can be directly analyzed. Figure 8 A schematic diagram of an input image and a reconstructed image based on an asymmetric autoencoder provided in the second embodiment of the present invention. For the asymmetric autoencoder, 10 images are randomly selected from the test set as input images for reconstruction. The input images and their corresponding reconstructed images are shown in FIG. Figure 8 As shown, the input images under bands 25, 48 and 162 are reconstructed respectively.
[0103] Figure 9 The following is a schematic diagram of the PSNR and SSIM calculation results of the input image and the reconstructed image based on the asymmetric autoencoder provided in the second embodiment of the present invention. Figure 9 As shown in the figure, after calculating the PSNR and SSIM for each band, the overall PSNR between the input image and its reconstructed image of the asymmetric autoencoder is approximately 41.67dB, and the SSIM is approximately 0.983. This shows that the PSNR and SSIM remain generally high, and the second eigenvector can still reconstruct the input image well after further dimensionality reduction by the asymmetric autoencoder.
[0104] Table 4 shows a comparison of the feature extraction effectiveness of a feature extraction network model and other models. As shown in Table 4, the PSNR and SSIM of the autoencoder (AE) reached 22.786322 and 0.9605432, respectively; the PSNR and SSIM of the CAE reached 40.830353 and 0.9831473, respectively; and the PSNR and SSIM of the feature extraction network model proposed in this application reached 41.673317 and 0.9751903, respectively. This shows that the feature extraction network model has relatively better feature extraction effectiveness.
[0105] Table 4 Comparison of feature extraction effectiveness between the feature extraction network model and other models
[0106]
[0107] On the basis of the above-mentioned embodiments, the clustering performance of the feature extraction network model completed training and testing is evaluated. In order to scientifically evaluate the clustering effect of the clustering method proposed in the present application, Fowlkes-Mallows Index (FMI), Rand Index (RI), Adjust mutual information (AMI), DB index and effective cluster number can be used as evaluation indexes of clustering performance. Among them, FMI, RI and AMI belong to external indexes, which need Groundtruth as a reference standard, and the higher the score represents the better clustering performance. DB belongs to internal index, which can represent the average similarity between each cluster. The ratio of the average distance within the cluster and the distance between the clusters is used as the evaluation standard of similarity; 0 is the lowest value, and the lower the value represents the better clustering performance.
[0108] Figure 10 A schematic diagram of a noise point label map of DBSCAN clustering based on CAE and a feature extraction network model is provided for the second embodiment of the present application. Its domain parameters can be set as (ε, MinPts) = (3, 200), as shown in Figure 10 the left image, i.e. the number of noise points (which can be considered as spatial noise) in the clustering result of CAE is 9997; the right image, i.e. the number of noise points in the clustering result of the feature extraction network model is 6996. By comparison, it can be seen that the feature extraction network model proposed in the present application has better clustering performance, but there are still some spatial noise, so the improved K-means clustering algorithm can be used to further remove the influence of noise points on clustering accuracy.
[0109] Since the K-means clustering algorithm has great randomness, 10 clustering can be performed for each clustering performance evaluation experiment, and the clustering result with the highest evaluation index is taken as the final output. Figure 11 A schematic diagram of a label image of clustering of a feature extraction network model and other models is provided for the second embodiment of the present application, as shown in Figure 11 which includes the label images of clustering of principal component analysis (PCA) model and K-means, AE and K-means, CAE and K-means, CAE and improved K-means, feature extraction network model and K-means, and feature extraction network model and improved K-means. It can be seen that the label image of clustering of the feature extraction network model and improved K-means proposed in the present application has better clustering performance than other models.
[0110] Table 5 shows a comparative relationship between the clustering performance evaluation scores of a feature extraction network model and other models. The experiment performed 10 clustering runs. As shown in Table 5, from the evaluation index scores and average evaluation scores of the clustering performance after combining various models and clustering algorithms, it can be seen that the FMI, RI, AMI, DB, and effective cluster number of the feature extraction network model are higher than those of other models. It can be seen that the clustering performance of the feature extraction network model proposed in this application combined with the improved K-means clustering algorithm is significantly better than that of other models. (Wherein, the number of cluster centers of the improved K-means clustering algorithm is set to 33; the number of true classes, that is, the K value, is 11.)
[0111] Table 5 Comparison of clustering performance evaluation scores between the feature extraction network model and other models
[0112]
[0113] Example 3
[0114] Figure 12 This is a schematic diagram of the structure of a hyperspectral image clustering device provided by the third embodiment of the present invention. The device can be implemented by software and / or hardware. Figure 3 As shown, the apparatus includes: an extraction module 310 and a clustering module 320;
[0115] The extraction module 310 is configured to extract a first feature vector from a pixel set corresponding to a pixel in the hyperspectral image using a trained feature extraction network model, wherein the feature extraction network model includes a CAE and an asymmetric autoencoder;
[0116] The clustering module 320 is configured to cluster the hyperspectral image according to the first eigenvector to obtain a clustering result of the hyperspectral image.
[0117] In this embodiment, the device uses an extraction module 310 to extract a first feature vector from a set of pixels corresponding to pixels in a hyperspectral image using a trained feature extraction network model, wherein the feature extraction network model includes CAE and an asymmetric autoencoder. Furthermore, a clustering module 320 is used to cluster the hyperspectral image based on the first feature vector to obtain a clustering result for the hyperspectral image. The device extracts the first feature vector using a feature extraction network model constructed based on CAE and an asymmetric autoencoder, thereby reducing spatial noise in the first feature vector and effectively improving the accuracy of feature vector extraction. Furthermore, clustering the hyperspectral image further removes some of the spatial noise in the first feature vector, thereby improving the accuracy of the clustering result.
[0118] Optionally, before performing the operation of "extracting a first feature vector from a pixel set corresponding to a pixel in a hyperspectral image through a trained feature extraction network model", the apparatus further comprises:
[0119] The feature extraction network model is constructed in the following manner:
[0120] A first construction module is configured to construct the CAE based on first network parameters, and train and test the CAE based on a training set and a test set, respectively;
[0121] A second construction module is configured to construct the asymmetric autoencoder based on second network parameters, and train and test the asymmetric autoencoder based on the training set and the test set, respectively;
[0122] A third construction module is configured to stack the asymmetric autoencoder on the CAE to construct the feature extraction network model.
[0123] Optionally, the extraction module 310 specifically comprises:
[0124] A first extraction unit is configured to perform feature extraction on a pixel set corresponding to a pixel in the hyperspectral image through the CAE to obtain a second feature vector;
[0125] An input unit is configured to input the second feature vector into the asymmetric autoencoder to obtain the first feature vector.
[0126] Optionally, the CAE comprises a first encoder and a first decoder.
[0127] Based on the above embodiment, the first extraction unit specifically comprises:
[0128] A pixel set determination subunit is configured to take each pixel in the hyperspectral image as a center pixel, and determine a pixel set corresponding to the center pixel, respectively;
[0129] A first encoding information determination subunit is configured to input the pixel set into the first encoder to output corresponding first encoding information;
[0130] A first decoding information determination subunit is configured to input the first encoding information into the first decoder to output corresponding first decoding information;
[0131] A second feature vector determination subunit is configured to determine the first encoding information satisfying a first mapping relationship as the second feature vector corresponding to the center pixel;
[0132] The first mapping relationship is a mapping relationship between the first decoding information and the pixel set.
[0133] Optionally, the asymmetric autoencoder includes a second encoder and a second decoder;
[0134] Based on the above embodiment, the input unit specifically includes:
[0135] a second encoding information determining subunit, configured to input the second feature vector into the second encoder and output corresponding second encoding information;
[0136] a second decoding information determining subunit, configured to input the second encoding information into the second decoder and output corresponding second decoding information;
[0137] A first feature vector determining subunit, configured to determine the second encoding information satisfying the second mapping relationship as a first feature vector;
[0138] The second mapping relationship is a mapping relationship between the second decoding information and the central pixel.
[0139] Optionally, the clustering module 320 specifically includes:
[0140] a preliminary clustering unit, configured to cluster the hyperspectral image according to the first eigenvector using a density-based clustering algorithm to obtain a preliminary clustering result;
[0141] The secondary clustering unit is configured to perform secondary clustering on the hyperspectral image based on the preliminary clustering result and the first eigenvector using a corresponding K-means clustering algorithm to obtain a clustering result of the hyperspectral image.
[0142] Optional secondary clustering unit, specifically including:
[0143] a judging subunit, configured to judge whether the hyperspectral image contains noise according to the preliminary clustering result;
[0144] a first clustering subunit, configured to, if yes, perform secondary clustering on the hyperspectral image according to the first eigenvector using an improved K-means clustering algorithm;
[0145] a second clustering subunit, configured to, if not, perform secondary clustering on the hyperspectral image according to the first eigenvector using a standard K-means clustering algorithm;
[0146] The number of clustering categories of the improved K-means clustering algorithm is greater than the number of clustering categories of the standard K-means clustering algorithm.
[0147] The hyperspectral image clustering device can execute the hyperspectral image clustering method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0148] Example 4
[0149] Figure 13 This is a schematic diagram of the structure of an electronic device provided by the fourth embodiment of the present invention. Figure 13 As shown, the electronic device provided by the fourth embodiment of the present invention includes: one or more processors 41 and a storage device 42; the processor 41 in the electronic device can be one or more, Figure 13 A processor 41 is taken as an example; the storage device 42 is used to store one or more programs; the one or more programs are executed by the one or more processors 41, so that the one or more processors 41 implement the hyperspectral image clustering method as described in any one of the embodiments of the present invention.
[0150] The electronic device may further include: a communication device 43 , an input device 44 and an output device 45 .
[0151] The processor 41, storage device 42, communication device 43, input device 44 and output device 45 in the electronic device can be connected through a bus or other means. Figure 13 The bus connection is taken as an example.
[0152] The storage device 42 in the electronic device is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the hyperspectral image clustering method provided in the first or second embodiment of the present invention (for example, the attached Figure 12 The modules in the hyperspectral image clustering device shown include: an extraction module 310 and a clustering module 320. The processor 41 executes the software programs, instructions, and modules stored in the storage device 42 to perform various functional applications and data processing of the electronic device, thereby implementing the hyperspectral image clustering method in the above method embodiment.
[0153] The storage device 42 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the electronic device, etc. Furthermore, the storage device 42 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the storage device 42 may further include a memory remotely located relative to the processor 41, and such remote memory may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0154] The communication device 43 may include a receiver and a transmitter. The communication device 43 is configured to perform information transmission and reception communication according to the control of the processor 41.
[0155] The input device 44 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 45 may include a display device such as a display screen.
[0156] Furthermore, when one or more programs included in the above-mentioned electronic device are executed by the one or more processors 41, the program performs the following operations: extracting a first feature vector according to a pixel set corresponding to a pixel in the hyperspectral image through a trained feature extraction network model, wherein the feature extraction network model includes CAE and an asymmetric autoencoder; clustering the hyperspectral image according to the first feature vector to obtain a clustering result of the hyperspectral image.
[0157] Example 5
[0158] A fifth embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program is used to perform a hyperspectral image clustering method, the method comprising: extracting a first feature vector according to a pixel set corresponding to a pixel in a hyperspectral image through a trained feature extraction network model, wherein the feature extraction network model includes a CAE and an asymmetric autoencoder; clustering the hyperspectral image according to the first feature vector to obtain a clustering result for the hyperspectral image.
[0159] Optionally, when the program is executed by a processor, it can also be used to execute the hyperspectral image clustering method provided by any embodiment of the present invention.
[0160] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination thereof. The computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.
[0161] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0162] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, or radio frequency (RF), etc., or any suitable combination thereof.
[0163] The computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0164] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A hyperspectral image clustering method, characterized in that: Extracting a first feature vector according to a pixel set corresponding to a pixel in the hyperspectral image through a trained feature extraction network model, wherein the feature extraction network model includes a convolutional autoencoder CAE and an asymmetric autoencoder; Clustering the hyperspectral image according to the first eigenvector to obtain a clustering result of the hyperspectral image; Before extracting the first feature vector according to the pixel set corresponding to the pixel in the hyperspectral image through the trained feature extraction network model, the method further includes: The feature extraction network model is constructed as follows: The CAE is constructed based on first network parameters, and the CAE is trained and tested based on a training set and a test set, respectively; the first network parameters include one input layer, two convolutional layers, five fully connected layers, one reshape layer, two transpose layers, and one output layer, as well as the convolution kernel, output dimension, and number of channels corresponding to each layer; Constructing the asymmetric autoencoder based on second network parameters, and training and testing the asymmetric autoencoder based on the training set and the test set, respectively; the second network parameters include one input layer, six fully connected layers, one dropout layer, and one output layer, as well as the convolution kernel, output dimension, and number of channels corresponding to each layer; The asymmetric autoencoder is stacked on the CAE to construct the feature extraction network model.
2. The method according to claim 1, characterized in that The method of extracting a first feature vector according to a pixel set corresponding to a pixel in a hyperspectral image by using a trained feature extraction network model includes: Performing feature extraction on a pixel set corresponding to a pixel in the hyperspectral image by the CAE to obtain a second feature vector; The second feature vector is input into the asymmetric autoencoder to obtain the first feature vector.
3. The method according to claim 2, characterized in that The CAE includes a first encoder and a first decoder; The step of extracting features from a pixel set corresponding to a pixel in the hyperspectral image by the CAE to obtain a second feature vector includes: Each pixel in the hyperspectral image is taken as a central pixel, and a pixel set corresponding to the central pixel is determined; Inputting the pixel set into the first encoder, and outputting corresponding first encoding information; Inputting the first encoded information into the first decoder, and outputting corresponding first decoded information; Determining the first coding information that satisfies the first mapping relationship as the second eigenvector corresponding to the central pixel; The first mapping relationship is a mapping relationship between the first decoding information and the pixel set.
4. The method according to claim 3, characterized in that The asymmetric autoencoder includes a second encoder and a second decoder; Inputting the second feature vector into the asymmetric autoencoder to obtain the first feature vector includes: Inputting the second feature vector into the second encoder, and outputting corresponding second encoded information; Inputting the second encoded information into the second decoder, and outputting corresponding second decoded information; Determining the second encoding information satisfying the second mapping relationship as the first feature vector; The second mapping relationship is a mapping relationship between the second decoding information and the central pixel.
5. The method according to claim 1, wherein Clustering the hyperspectral image according to the first eigenvector to obtain a clustering result of the hyperspectral image includes: Clustering the hyperspectral image according to the first eigenvector using a density-based clustering algorithm to obtain a preliminary clustering result; According to the preliminary clustering result, a corresponding K-means clustering algorithm is used to perform secondary clustering on the hyperspectral image according to the first eigenvector to obtain a clustering result for the hyperspectral image.
6. The method according to claim 5, characterized in that The method further comprises: performing secondary clustering on the hyperspectral image based on the first eigenvector using a corresponding K-means clustering algorithm according to the preliminary clustering result, including: Determining whether the hyperspectral image contains noise according to the preliminary clustering result; If so, performing secondary clustering on the hyperspectral image according to the first eigenvector using an improved K-means clustering algorithm; If not, performing secondary clustering on the hyperspectral image according to the first eigenvector using a standard K-means clustering algorithm; The number of clustering categories of the improved K-means clustering algorithm is greater than the number of clustering categories of the standard K-means clustering algorithm.
7. A hyperspectral image clustering device, characterized in that: include: An extraction module is configured to extract a first feature vector from a pixel set corresponding to a pixel in the hyperspectral image using a trained feature extraction network model, wherein the feature extraction network model includes a convolutional autoencoder (CAE) and an asymmetric autoencoder; a clustering module, configured to cluster the hyperspectral image according to the first eigenvector to obtain a clustering result of the hyperspectral image; Before performing the operation of "extracting a first feature vector according to a pixel set corresponding to a pixel in the hyperspectral image through a trained feature extraction network model", the apparatus further includes: The feature extraction network model is constructed as follows: A first construction module is configured to construct the CAE based on first network parameters, and to train and test the CAE based on a training set and a test set, respectively; the first network parameters include one input layer, two convolutional layers, five fully connected layers, one reshape layer, two transpose layers, and one output layer, as well as the convolution kernel, output dimension, and number of channels corresponding to each layer; A second construction module is configured to construct the asymmetric autoencoder based on second network parameters, and to train and test the asymmetric autoencoder based on the training set and the test set, respectively; the second network parameters include one input layer, six fully connected layers, one dropout layer, and one output layer, as well as the convolution kernel, output dimension, and number of channels corresponding to each layer; The third construction module is used to stack the asymmetric autoencoder on the CAE to construct the feature extraction network model.
8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the hyperspectral image clustering method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the hyperspectral image clustering method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Training method and detection method of flow detection model of asymmetric convolutional network
CN111092873A
Hyperspectral image classification method based on deep transfer learning
CN113705580A