A deep clustering method for insect images based on multi-network layer integration

By integrating multiple network layer features in deep neural networks, building a two-part graph structure and performing graph segmentation, the problem of insufficient single-layer features in the existing technology is solved, and the accuracy and stability of insect image clustering is significantly improved.

CN114897048BActive Publication Date: 2024-11-26SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210347321.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2024-11-26
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

The existing deep clustering method uses only a single network layer feature in the deep neural network for clustering, and cannot effectively utilize the feature information of multiple network layers, resulting in insufficient accuracy and stability of insect image clustering.

Method used

Using a multi-network layer integration method, a two-part graph structure is constructed through the multi-layer feature output of a convolution neural network and a trainable linear classifier, and a diverse base clustering set is generated by combining spectral clustering and k-mean algorithm. , and obtain the final clustering result through the graph segmentation algorithm.

Benefits of technology

It significantly improves the accuracy and stability of insect image clustering, and can achieve good results without additional parameter adjustment on different data sets, and is suitable for different depth clustering frameworks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114897048B_ABST
    Figure CN114897048B_ABST
Patent Text Reader

Abstract

The present invention discloses a deep clustering method for insect images based on multi-network layer integration, including three stages: unsupervised deep clustering network training, base cluster generation, and integrated clustering; the method simultaneously utilizes the multi-network layer feature information in the deep neural network to generate a set of differentiated base clusters, and then fuses the base clusters of the multi-network layers of the neural network based on the bipartite graph model to construct a more accurate deep clustering result. The present invention proposes for the first time to simultaneously utilize the multi-network layer features of the deep neural network for unified modeling under the integrated clustering framework to fuse the multi-network layer features to construct a more stable and accurate clustering result; the method does not require additional parameter adjustment when processing different data sets, and can also achieve stable clustering effects, and can be applied to different deep clustering frameworks to fully utilize the multi-network layer information in the deep neural network, significantly improving its clustering accuracy and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of insect image clustering, and in particular to a deep insect image clustering method based on multi-network layer integration. Background Art

[0002] Insects are the most prosperous animal group on earth, with many species and large numbers, playing an important role in natural ecosystems and human social life. More importantly, most of the pests in agriculture and forestry are insects, and insect identification is the basis of insect research and pest control. In recent years, with the development of deep learning technology, many insect image classification methods based on deep neural networks have emerged. For example, the Faster RCNN algorithm is used to identify insect images taken in natural environments, and a high recognition rate is obtained. In addition, the deep learning model constructed by MobileNets for classification and recognition can run smoothly on mobile devices and has a good recognition rate. These methods are usually supervised classification, and there is still a lack of unsupervised classification technology for insect images. Unsupervised classification is also called clustering. In the absence of prior knowledge, few manually labeled categories, or the cost of manual category labeling is too high, how to effectively cluster a large number of insect images taken in farmland, orchards, and the wild is of practical significance for pest and disease analysis in the agricultural field and agricultural management and decision-making.

[0003] Traditional clustering algorithms often extract the features of data samples based on knowledge in a specific field, and then use different models to divide them. However, when faced with some complex high-dimensional data, traditional clustering algorithms, such as k-means clustering and spectral clustering, cannot achieve better clustering results due to their lack of feature learning capabilities.

[0004] Deep learning, with its advantages in feature learning, has brought new solutions to high-dimensional complex data clustering. In recent years, many clustering methods based on deep neural networks have emerged, referred to as deep clustering. For example, deep embedding clustering (DEC) method, improved deep embedded clustering (IDEC), deep clustering for unsupervised learning of visual features (DeepCluster), etc. Although existing deep clustering methods have achieved good results on high-dimensional complex data sets, these methods only use the features of a single network layer (usually the last fully connected layer) in the deep neural network to construct clustering results, and cannot use the features of multiple network layers of the neural network for clustering at the same time. The improved deep embedding clustering method with ensemble learning (IDECEL) uses ensemble learning to solve the hyperparameter sensitivity problem in the deep embedding clustering method, but still only uses the features of a single network layer for clustering. In fact, the features of different layers in the deep neural network encode different levels of information. Taking convolutional neural networks as an example, their high-level features focus more on semantic information, while low-level features contain more detailed information. How to jointly utilize the features of multiple network layers in a neural network in a unified deep clustering framework to achieve more accurate clustering results is still an unresolved problem.

[0005] In recent years, with the development of deep learning technology, many insect image classification methods based on deep neural networks have emerged. For example, the Faster RCNN algorithm is used to identify insect images taken in natural environments, and a high recognition rate is obtained. In addition, a deep learning model is constructed by MobileNets for classification and recognition. The constructed model can run smoothly on mobile devices and has a good recognition rate. However, these supervised learning methods have the disadvantages of lack of sufficient prior knowledge, difficulty in manually labeling categories, or high cost of manual category labeling. Therefore, it is necessary to perform unsupervised clustering analysis on insect images. However, there is still a lack of clustering technology for insect images, and there is also a lack of clustering technology based on deep neural networks.

[0006] In addition, existing deep clustering methods usually use the output of a single layer in the network (such as the last fully connected layer in the neural network) to generate the final clustering results, and cannot use multiple network layers in the neural network for clustering at the same time. For example, in a convolutional neural network, the features of different layers are designed to encode different levels of information. High-level features pay more attention to semantic information but less attention to detail information, and are mainly used to measure semantic similarity, while low-level features contain more detail information but may have some background clutter or semantic ambiguity problems, and are mainly used to measure fine-grained similarity. There is currently no solution to how to combine ensemble clustering to simultaneously use the features of multiple network layers of a deep neural network to improve the stability and accuracy of deep clustering. Summary of the invention

[0007] The purpose of the present invention is to provide a deep clustering method for insect images based on multi-network layer integration, which jointly utilizes multi-layer feature information in a deep neural network and fully combines the complementary and integrated advantages of different network layers, thereby improving the accuracy and stability of insect image clustering.

[0008] In order to achieve the above tasks, the present invention adopts the following technical solutions:

[0009] A deep clustering method for insect images based on multi-network layer integration includes the following steps:

[0010] Obtain unlabeled insect images for insect image classification prediction; construct an insect image data set, perform data enhancement processing on the insect image data set, and obtain an insect image sample set; input the samples in the insect image sample set into a convolutional neural network in sequence to obtain sample features of each sample, and then perform dimensionality reduction on the learned sample features to obtain a low-dimensional feature vector corresponding to the sample; divide the samples in the sample set into K clusters, thereby obtaining a pseudo label corresponding to each sample; use a trainable linear classifier to predict the label of the sample feature, and train the convolutional neural network and the classifier;

[0011] During the processing of the convolutional neural network, for each sample, the feature output of each convolutional layer is expanded into a one-dimensional vector form, and then the feature output of the convolutional layer and the fully connected layer is subjected to dimensionality reduction processing; for any base cluster, the number of clusters is randomly selected within a preset interval, and then the number of clusters and cluster centers are randomly initialized; multiple base clusters are generated for the feature output after the dimensionality reduction processing, and a base cluster set is constructed;

[0012] A cluster set is obtained based on the base clustering set, and each sample in the insect image dataset and each cluster in the cluster set is used as a node. The similarity information between all nodes is constructed into a bipartite graph structure, and the bipartite graph is segmented to obtain the final insect image clustering result, which is the category prediction for each insect image in the insect image dataset.

[0013] Furthermore, the parameters W of the classifier and the parameters θ of the convolutional neural network are jointly learned by optimizing the following problem:

[0014]

[0015] Where L(·) is the cross entropy loss function, θ and W represent the convolutional neural network f θ (·) and classifier g W The parameters in (·) are: N is the size of the sample set X′, x n Represents the nth sample; based on the cross entropy loss function, the network weights are updated using mini-batch stochastic gradient descent and back propagation.

[0016] Furthermore, the first seven layers of AlexNet are used as the convolutional neural network f θ (·), the last layer is changed to a custom fully connected layer to serve as the classifier g W (·); The number of neurons in the custom fully connected layer is equal to the number of categories of the insect image sample set X′ to realize the classification operation of the insect image.

[0017] Furthermore, the bipartite graph is G={X,C,B}, where X∪C is a node set, B is a cross-similarity matrix, i.e., an edge weight matrix of the graph G, used to represent the similarity between the node set X and the node set C; X represents an insect image dataset, and C represents a cluster set;

[0018] The element b in the cross-similarity matrix B ij The construction is as follows:

[0019]

[0020] Among them, x i represents the samples in X, C j represents the jth cluster in the base clustering set.

[0021] Furthermore, consider the bipartite graph G as having N+k c The general graph of nodes, its full similarity matrix can be expressed as:

[0022]

[0023] Where N represents the number of samples in the insect image dataset X, k c is the number of clusters in the base clustering set; spectral clustering solves the eigenvalue problem to solve the eigenvector u of L and then partitions the graph G:

[0024] Lu=γDu (2)

[0025] Where L = DE is the graph Laplacian, D is the degree matrix of E, represents the set of real numbers; γ and u represent the set of eigenvalues ​​and eigenvectors, and the first k eigenvalues ​​and eigenvectors obtained by solving the eigenvalue problem of Formula 2 are recorded as

[0026] Furthermore, the step of segmenting the bipartite graph to obtain the final insect image clustering result includes:

[0027] The solution to the eigenvalue problem of the bipartite graph G is transformed into a graph G constructed using a very small set of nodes C in G. C ={C,E C}Eigenvalue problem:

[0028] L c v=λD C v (3)

[0029] Among them, λ and v represent the eigenvalue set and eigenvector set, is the similarity matrix, the superscript T indicates transposition, D x is a diagonal matrix whose (i,i)th entry is the sum of the i-th row of B, L C =D C -E C is the graph Laplacian, D C YesE C The degree matrix of

[0030] definition G is obtained by solving the eigenvalue formula 3 C The first k eigenvalues ​​and eigenvectors of G C The set of feature vectors and the eigenvalue set The eigenvalue problem of formula 2 can be solved to obtain the first k eigenvalues ​​of G With the help of the transition probability matrix T from the insect image dataset X to the cluster set C, the first k eigenvectors corresponding to the graph structure of the N samples of the insect image dataset X are It can be obtained; then the first k eigenvectors of the bipartite graph G are obtained

[0031] Furthermore, the obtained k feature vectors u1,u2,...,u k Stacked into one (N+k c )×k, each row of the matrix is ​​used as a new eigenvector, and the k-means algorithm is used on the matrix to discretize the N samples of the insect image dataset to form k clusters, so as to obtain the final integrated clustering result, that is, the clustering result for the unlabeled insect dataset X.

[0032] Furthermore, the principal component analysis method is used to reduce the dimension of the learned sample features, and the k-means clustering method is used to divide the samples in the insect image sample set into K clusters according to the Euclidean distance of the low-dimensional feature vectors.

[0033] Furthermore, the preset interval is Where K and N represent the number of categories and the number of samples in the dataset, respectively.

[0034] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the insect image deep clustering method based on multi-network layer integration are implemented.

[0035] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the insect image deep clustering method based on multi-network layer integration.

[0036] Compared with the prior art, the present invention has the following technical features:

[0037] 1. Different from the existing deep clustering methods that only use a single layer of features in the network (usually the last layer) to generate the final clustering results, the present invention proposes for the first time to use the multi-layer features of the deep neural network for unified modeling under the integrated clustering framework to fuse the multi-layer features to construct a more stable and accurate clustering result.

[0038] 2. Different from the existing deep clustering methods which mostly fine-tune hyperparameters for different data sets, the method proposed in the present invention does not require additional parameter adjustment when processing different data sets and can also achieve stable clustering effects.

[0039] 3. The method of the present invention can be applied to different deep clustering frameworks to make full use of the multi-network layer information in the deep neural network and significantly improve its clustering accuracy and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a network structure diagram of the present invention;

[0041] Figure 2 is a flow chart of the method of the present invention;

[0042] Figure 3 The bipartite graph structure constructed in the integrated clustering stage of the present invention. DETAILED DESCRIPTION

[0043] The present invention provides a deep clustering method for insect images based on multi-network layer integration, and simultaneously utilizes the multi-network layer feature information in a deep neural network to generate a set of differentiated base clusters, and then fuses the base clusters of the multi-network layers of the neural network based on a bipartite graph model to construct a more accurate deep clustering result.

[0044] Referring to the accompanying drawings, a method for deep clustering of insect images based on multi-network layer integration of the present invention includes three stages: unsupervised deep clustering network training, base clustering generation, and integrated clustering. The specific steps are as follows:

[0045] The first stage: unsupervised deep clustering network training. The network training process is carried out in an end-to-end manner, mainly including the pseudo-label generation stage and the feature learning stage.

[0046] For N unlabeled insect images to be classified and predicted, an insect image dataset X = {x1, x2, ..., x N The goal is to divide N images into K clusters (i.e., the number of categories), where K is set by the user based on actual conditions.

[0047] Step S1, preprocessing the insect image dataset X by data enhancement to enhance the random diversity of insect samples; sequentially using the data enhancement methods of aspect ratio-maintaining scaling, random aspect ratio cropping, random horizontal flipping, and normalization processing to generate an insect image sample set X′ to be trained, where the number of samples in X′ is still N.

[0048] In one embodiment of the present invention, 256 samples are sampled in batches from the input data X, and the samples are preprocessed by data enhancement to enhance the random diversity of the insect image samples. First, the Resize(224) operation is used to scale the image to a short side of 224 pixels according to the original image aspect ratio, and then the RandomResizedCrop(224) operation is performed to crop the sample to a pixel size of 224×224, and then the RandomHorizontalFlip() operation is performed. Finally, the image is normalized to obtain the insect image sample set X′ to be trained by the combined data enhancement method.

[0049] Step S2: input the samples in the insect image sample set X′ processed by data enhancement into the convolutional neural network f θ (·) to obtain the sample feature f of each sample θ (x n), and then use principal component analysis (PCA) to reduce the dimension of the learned sample features to obtain the low-dimensional feature vector corresponding to the sample.

[0050] Step S3: Use k-means clustering to divide the samples in the sample set X′ into K clusters according to the Euclidean distance of the low-dimensional feature vectors, so as to obtain the pseudo label y corresponding to each sample. n , where y n Represents the nth sample x n It is divided into several clusters.

[0051] Step S4: assign the same pseudo-label to samples with similar feature expressions through step S3, and then train the convolutional neural network f in a similar supervised learning manner. θ (·) and classifier g W (·) for feature learning.

[0052] Use a trainable linear classifier g W (·) to predict sample features f θ (x n ), and then jointly learn the parameters W of the classifier and the parameters θ of the convolutional neural network by optimizing the following problem to train the network:

[0053]

[0054] Where L(·) is the cross entropy loss function, θ and W represent the convolutional neural network f θ (·) and classifier g W The parameters in (·) are: N is the size of the sample set X′, x n Represents the nth sample. Based on the cross entropy loss function, the network weights are updated using the mini-batch stochastic gradient descent method and back propagation. In this embodiment, the learning rate is set to 0.001, the momentum factor is set to 0.9, and the decay coefficient is set to 0.0001.

[0055] In the embodiment of the present invention, AlexNet is used as the feature extraction network. AlexNet consists of eight network layers (the first five layers are convolutional layers, and the last three layers are fully connected layers). In this scheme, only the first seven layers of AlexNet are finally used as the convolutional neural network f θ (·), the last layer is changed to a custom fully connected layer to serve as the classifier g W (·); The number of neurons in the custom fully connected layer is equal to the number of categories in the insect image sample set X′ to achieve the classification operation of insect images. Traditional deep clustering methods, such as the DeepCluste method, only use the backbone network f θThe final clustering is obtained by using the output of the last fully connected layer in (·), while the method proposed in the present invention jointly utilizes multiple layers of the network to obtain the final clustering.

[0056] Step S5, determine whether it is greater than the specified number of training rounds, if so, go to step S6; otherwise, return to step S1.

[0057] After the training of the unsupervised deep clustering network is completed, different layers in the network contain different levels of feature information, while existing deep clustering algorithms only use the output of a single layer (usually the last layer) in the network to generate the final clustering results. For example, in the DeepCluster method, the approach is to use the trained convolutional neural network to extract features from the input data, and use the k-means algorithm to perform clustering based on the feature vector output by the last fully connected layer of the network to obtain the final result. However, this approach does not fully utilize the multi-layer feature information of the neural network. In fact, different layers in the network contain diverse information that is conducive to clustering, and the accuracy and stability of clustering tasks can be further improved through integrated clustering.

[0058] The second stage: base cluster generation, will describe how to use multiple network layers in a deep network to generate a diverse set of base clusters.

[0059] The present invention will use multiple layers in a trained deep neural network to generate a diverse set of base clusters for ensemble clustering, thereby obtaining more accurate clustering results.

[0060] For the convolutional neural network trained in the previous stage using an unsupervised method, the λ layer is selected to generate base clusters, and a total of M = λM′ base clusters can be obtained, where M′ represents the number of base clusters generated from each layer. θ The five convolutional layers and the last custom fully connected layer g in (·) W (·), a total of λ = 6 layers are used to generate the base clustering set Π.

[0061] In step S6, during the processing of each sample by the convolutional neural network, the feature output of each convolutional layer is expanded into a one-dimensional vector by a latten operation; and for the feature output of the fully connected layer, since it is already in the form of a one-dimensional vector, there is no need to expand it.

[0062] Step S7, in order to improve the efficiency of subsequent k-means clustering, principal component analysis (PCA) is performed to reduce the dimension of the feature output in the form of the one-dimensional vector; after the dimension reduction, the dimension of the feature vector corresponding to each sample is 30, and the sample can be regarded as a data point in the 30-dimensional space.

[0063] Step S8, for any base cluster π generated in step S9 i , in a large range A number is randomly selected as its cluster number k i , where K and N represent the number of categories in the data set and the number of samples in the data set respectively; then the number of clusters and cluster centers are randomly initialized; thus, based on the randomized cluster number setting, a diverse set of base clusters can be constructed.

[0064] Step S9, using the k-means clustering method to generate M′ diversified base clusters for the feature output after the dimensionality reduction process in S7; for λ=6 layers, a total of M=6M′ base clusters are obtained.

[0065] The final generated base clustering set Π can be expressed as: Π = {π 1 ,π 2 ,...,π M},in represents the i-th base cluster; Represents the base cluster π i The jth cluster in k i Represents π i The number of clusters.

[0066] The third stage: integrated clustering.

[0067] Based on the diversified base clustering set Π generated in the previous stage, the present invention uses an integrated clustering method to fuse the diversified base clustering information generated by multiple network layers to construct the final clustering result. This process makes full use of the diversity and complementarity of the base clustering information generated by different network layers, thereby improving the accuracy and stability of clustering.

[0068] Step S10, for any base cluster π i , which contains k i Obviously, for the base clustering set Π obtained in step S8, it contains clusters, and the cluster set is obtained by π Among them C i (i=1,2,…,k c ) represents the i-th cluster in the base clustering set.

[0069] In step S11, the present invention uses each sample in the insect image dataset X and each cluster in the cluster set C as a node, and constructs the similarity information between all nodes into a bipartite graph structure.

[0070] The constructed bipartite graph is Figure 3As shown, a bipartite graph G = {X, C, B} is defined, where X∪C is a node set, and B is a cross-similarity matrix, i.e., an edge weight matrix of the graph G, which is used to represent the similarity between the node set X and the node set C. In a bipartite graph G, there is a (non-zero) edge between the two nodes if and only if one node is a sample and the other node is a cluster containing the sample.

[0071] The element b in the cross-similarity matrix B ij The construction is as follows:

[0072]

[0073] Among them, x i represents the samples in X, C j represents the jth cluster in the base clustering set. Two different clusters C in the same base clustering j and C j′ There is no intersection between If C j ∈π i and C j′ ∈π i ,but Obviously, each sample belongs to only one cluster in each base cluster, so each sample belongs to exactly M clusters in the set of M base clusters, so there are M non-zero elements in each row of B. The dimension of the cross-similarity matrix B is N×k c , which can be stored as a sparse matrix corresponding to the N×M nonzero elements in B.

[0074] Consider the bipartite graph G as having N+k c The general graph of nodes, its full similarity matrix can be expressed as:

[0075]

[0076] Spectral clustering divides the cluster structure of graph G by the spectrum of the Laplacian matrix L of graph G. The mathematical form is Equation 2. Spectral clustering divides graph G by solving the following eigenvalue problem to solve the eigenvector u of L:

[0077] Lu=γDu (2)

[0078] Where L = DE is the graph Laplacian operator, is the degree matrix of E, represents the set of real numbers; γ and u represent the set of eigenvalues ​​and eigenvectors, and the first k eigenvalues ​​and eigenvectors obtained by solving the eigenvalue problem of Formula 2 are recorded as

[0079] If G is regarded as a general graph, it is difficult to solve the characteristic equation of Equation 2 due to its high time complexity, which limits its performance on large-scale datasets.

[0080] Step S12, many algorithms can segment the bipartite graph G to obtain the final clustering result. Lanczos algorithm and SVD are commonly used algorithms to segment the graph to mine the clustering information of the graph. The present invention combines the structural characteristics of the bipartite graph to efficiently divide the bipartite graph G into several non-intersecting node subsets, and then regards the sample points in each node subset as a cluster to obtain the final clustering result.

[0081] Based on the node characteristics of the bipartite graph, the present invention uses a graph partitioning algorithm to efficiently partition the bipartite graph to obtain the final clustering result; the detailed process of partitioning the bipartite graph G is described next.

[0082] The graph segmentation method used in the present invention is the transfer cut (Tcut) algorithm, which greatly reduces the amount of calculation in the graph segmentation process. It converts the solution of the eigenvalue problem of dividing a larger graph structure into the solution of the eigenvalue problem of a smaller graph.

[0083] Specifically, it divides the solution of the eigenvalue problem of the bipartite graph G into a graph G constructed using a very small set of nodes C in G. C ={C,E C}Eigenvalue problem:

[0084] L c v=λD C v (3)

[0085] Among them, λ and v represent the eigenvalue set and eigenvector set, is the similarity matrix, the superscript T indicates transposition, is a diagonal matrix whose (i,i)th entry is the sum of the i-th row of B, L C =D C -E C is the graph Laplacian, YesE C The degree matrix of .

[0086] definition G is obtained by solving the eigenvalue formula 3 C The first k eigenvalues ​​and eigenvectors of G C The set of feature vectors and the eigenvalue set The eigenvalue problem of formula 2 can be solved to obtain the first k eigenvalues ​​of G With the help of the transition probability matrix T from the insect image dataset X to the cluster set C, the first k eigenvectors corresponding to the graph structure of the N samples of the insect image dataset X are It can be obtained; then, the first k eigenvectors of the bipartite graph G Can be obtained directly.

[0087] The mathematical form of the above steps is expressed as equations (4), (5), and (6), which can be used to solve the eigenvalue problem of equation 2, that is, the eigenvector of G

[0088] γ i (2-γ i )=λ i (4)

[0089]

[0090]

[0091] in is the transition probability matrix.

[0092] The obtained k eigenvectors u1,u2,...,u k Stacked into one (N+k c )×k, each row of the matrix is ​​used as a new eigenvector, and the k-means algorithm is used on the matrix to discretize the N samples of the insect image dataset to form k clusters, so as to obtain the final integrated clustering result, that is, the clustering result for the unlabeled insect dataset X is obtained. The clustering result is the category prediction for each insect image in the insect image dataset X, thereby obtaining the category to which each insect image belongs.

[0093] 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 of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A deep clustering method for insect images based on multi-network layer integration, characterized in that: The following steps are involved: Obtain unlabeled insect images for insect image classification prediction; construct an insect image data set, perform data enhancement processing on the insect image data set, and obtain an insect image sample set; input the samples in the insect image sample set into a convolutional neural network in sequence to obtain sample features of each sample, and then perform dimensionality reduction on the learned sample features to obtain a low-dimensional feature vector corresponding to the sample; divide the samples in the sample set into K clusters, thereby obtaining a pseudo label corresponding to each sample; use a trainable linear classifier to predict the label of the sample feature, and train the convolutional neural network and the classifier; During the processing of the convolutional neural network, for each sample, the feature output of each convolutional layer is expanded into a one-dimensional vector form, and then the feature output of the convolutional layer and the fully connected layer is subjected to dimensionality reduction processing; for any base cluster, the number of clusters is randomly selected within a preset interval, and then the number of clusters and cluster centers are randomly initialized; multiple base clusters are generated for the feature output after the dimensionality reduction processing, and a base cluster set is constructed; A cluster set is obtained based on the base cluster set, each sample in the insect image dataset and each cluster in the cluster set is used as a node, the similarity information between all nodes is constructed into a bipartite graph structure, the bipartite graph is segmented to obtain the final insect image clustering result, that is, the category prediction of each insect image in the insect image dataset; Consider the bipartite graph G as having N+k c The general graph of nodes, its full similarity matrix can be expressed as: Where N represents the number of samples in the insect image dataset X, k c is the number of clusters in the base clustering set; Spectral clustering solves the following eigenvalue problem to find the eigenvector u of L and then partition the graph G: Lu=γDu(2) Where L = DE is the graph Laplacian, D is the degree matrix of E, represents the set of real numbers; γ and u represent the set of eigenvalues ​​and eigenvectors, respectively. The first k eigenvalues ​​and eigenvectors obtained by solving the eigenvalue problem of formula (2) are recorded as B represents the cross-similarity matrix; The step of segmenting the bipartite graph to obtain the final insect image clustering result includes: The solution to the eigenvalue problem of the bipartite graph G is transformed into a graph G constructed using a very small set of nodes C in G. C ={C,E C }Eigenvalue problem: L c v=λD C v (3) Among them, λ and v represent the eigenvalue set and eigenvector set, is the similarity matrix, the superscript T indicates transposition, D x is a diagonal matrix whose (i,i)th entry is the sum of the i-th row of B, L C =D C -E C is the graph Laplacian, D C YesE C The degree matrix of definition is the G obtained by solving the eigenvalue formula (3) C The first k eigenvalues ​​and eigenvectors of G C The set of feature vectors and the eigenvalue set The eigenvalue problem of formula (2) can be solved to obtain the first k eigenvalues ​​of G With the help of the transition probability matrix T from the insect image dataset X to the cluster set C, the first k eigenvectors corresponding to the graph structure of the N samples of the insect image dataset X can be obtained: Then we can obtain the first k eigenvectors of the bipartite graph G 2. The insect image deep clustering method based on multi-network layer integration according to claim 1, characterized in that: The parameters W of the classifier and the parameters θ of the convolutional neural network are jointly learned by optimizing the following problem: Where L(·) is the cross entropy loss function, θ and W represent the convolutional neural network f θ (·) and classifier g W The parameters in (·) are: N is the size of the sample set X′, x n Represents the nth sample; based on the cross entropy loss function, the network weights are updated using mini-batch stochastic gradient descent and back propagation.

3. The insect image deep clustering method based on multi-network layer integration according to claim 1, characterized in that: Use the first seven layers of AlexNet as the convolutional neural network f θ (·), the last layer is changed to a custom fully connected layer to serve as the classifier g W (·); The number of neurons in the custom fully connected layer is equal to the number of categories of the insect image sample set X′ to achieve the classification operation of the insect image.

4. The insect image deep clustering method based on multi-network layer integration according to claim 1, characterized in that: The bipartite graph is G = {X, C, B}, where X∪C is a node set, B is a cross-similarity matrix, i.e., an edge weight matrix of the graph G, used to represent the similarity between the node set X and the node set C; X represents an insect image dataset, and C represents a cluster set; The element b in the cross-similarity matrix B ij The construction is as follows: Among them, x i represents the samples in X, C j represents the jth cluster in the base clustering set.

5. The insect image deep clustering method based on multi-network layer integration according to claim 1, characterized in that: The obtained k eigenvectors u1,u2,...,u k Stacked into one (N+k c )×k, each row of the matrix is ​​used as a new eigenvector, and the k-means algorithm is used on the matrix to discretize the N samples of the insect image dataset to form k clusters, so as to obtain the final integrated clustering result, that is, the clustering result for the unlabeled insect dataset X.

6. The insect image deep clustering method based on multi-network layer integration according to claim 1, characterized in that: The preset interval is Where K and N represent the number of categories and the number of samples in the dataset, respectively.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the insect image deep clustering method based on multi-network layer integration according to any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the insect image deep clustering method based on multi-network layer integration according to any one of claims 1 to 6 is implemented.