Training method and device for image clustering model

By constructing denoising reconstruction error and contrast loss functions, as well as instance-prototype level contrast loss functions, the efficiency and robustness of the image clustering model are improved, and the efficiency and robustness deficiencies of traditional methods on complex data sets are solved. question.

CN115908984BActive Publication Date: 2024-09-03GRG BANKING IT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211627126.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2024-09-03
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

Traditional deep clustering algorithms have poor clustering efficiency and low robustness when processing complex data sets, making it difficult to effectively handle the data processing of biometric images.

Method used

A training method for image clustering models is proposed. The denoising reconstruction error loss function and contrast loss function are constructed through the original image, noisy image and clean image, the model parameters are updated, and the instance-prototype contrast loss is constructed in the clustering training stage. function to improve the efficiency and robustness of the model.

Benefits of technology

An image clustering model with high efficiency, robustness and anti-interference is implemented, which can effectively handle complex biometric image data sets and improve clustering performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908984B
    Figure CN115908984B
Patent Text Reader

Abstract

The present application discloses a training method and device for an image clustering model, which belongs to the field of machine learning. The method includes: in the pre-training stage of the image clustering model, the noise image and the clean image corresponding to the original image are respectively input into the first encoder and the second encoder, the restored image output by the first decoder is obtained, the denoising reconstruction error loss function and the contrast loss function are constructed, and the model parameters of the image clustering model are updated; in the clustering stage of the clustering training stage of the image clustering model, the first sample image and the second sample image obtained by data enhancement of the image data set are respectively input into the image clustering model after the training in the pre-training stage, and the high-confidence sample set is determined; in the fine-tuning stage of the clustering training stage, the third sample image and the fourth sample image obtained by data enhancement of the high-confidence sample set are respectively input into the image clustering model, the instance-prototype level contrast loss function is constructed, and the trained image clustering model is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning, and in particular to a method and device for training an image clustering model. Background Art

[0002] With the development of the times and the increasing demand for information security in production and life, recognition technology based on common biometrics such as face, finger vein, palm vein, iris, etc. has gradually become a research hotspot. The recognition of these common biometrics requires an efficient clustering model to process their data.

[0003] When dealing with image clustering tasks, traditional deep clustering algorithms first use unsupervised neural networks to learn the nonlinear mapping from the original data space to the low-dimensional space, and then directly or indirectly use classical clustering algorithms to divide the extracted features into clusters. This approach has poor clustering efficiency and low robustness when facing some more complex data sets. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a training method and device for an image clustering model, which improves the image clustering efficiency and robustness of the model.

[0005] In a first aspect, the present application provides a method for training an image clustering model, the method comprising: in a pre-training stage of the image clustering model, inputting a noisy image and a clean image corresponding to an original image into the first encoder and the second encoder respectively, and obtaining a restored image output by the first decoder;

[0006] Based on the noisy image, the clean image and the restored image, construct a denoising and reconstruction error loss function and a contrast loss function, and update the model parameters of the image clustering model;

[0007] In the clustering stage of the clustering training stage of the image clustering model, the first sample image and the second sample image obtained by performing data enhancement on the image data set are respectively inputted into the image clustering model after the training in the pre-training stage, the first image features and the second image features output by the image clustering model are obtained, and a high confidence sample set is determined based on the first image features and the second image features;

[0008] In the fine-tuning stage of the clustering training stage, the third sample image and the fourth sample image obtained by performing data enhancement on the high confidence sample set are respectively input into the image clustering model to obtain the third image feature and the fourth image feature output by the image clustering model;

[0009] Based on the third image feature and the fourth image feature, an instance-prototype level contrast loss function is constructed, and the model parameters of the image clustering model are updated to obtain the trained image clustering model.

[0010] According to the training method of the image clustering model of the present application, a denoising and reconstruction error loss function and a contrast loss function are constructed through the original image, the noisy image and the clean image, the model parameters of the image clustering model are updated, and the instance-prototype level contrast loss function is further constructed. The model parameters of the image clustering model are updated to obtain an image clustering model with high efficiency, high robustness and high anti-interference.

[0011] According to an embodiment of the present application, the step of inputting the noisy image and the clean image corresponding to the original image to the first encoder and the second encoder respectively to obtain the restored image output by the first decoder includes:

[0012] Inputting the noise image into the first encoder to obtain a first embedding feature output by the first encoder;

[0013] Input the clean image into the second encoder to obtain a second embedding feature output by the second encoder;

[0014] Inputting the first embedded feature into the first decoder to obtain the restored image output by the first decoder;

[0015] The constructing of a denoising and reconstruction error loss function and a contrast loss function based on the noisy image, the clean image and the restored image includes:

[0016] Determining the denoising reconstruction error loss function based on the clean image and the restored image;

[0017] The contrast loss function is determined based on the first embedding feature and the second embedding feature.

[0018] According to one embodiment of the present application, the formula

[0019]

[0020] Determining the denoising and reconstruction error loss function;

[0021] in, is the i-th clean image, is the restored image of the i-th noise image output by the first encoder and the first decoder, L rec is the denoising reconstruction error loss function, N is the total number of clean images in the pre-training stage, is the square of the L2 norm;

[0022] Apply the formula

[0023]

[0024] Determining the contrast loss function;

[0025] Among them, superscript a and superscript b are data enhancements with different combination orders. is the contrast loss function corresponding to the i-th clean image, is the contrast loss function corresponding to the i-th noise image;

[0026]

[0027]

[0028] Among them, τ I is the temperature parameter, s(·) is the cosine similarity, is the first embedding feature obtained by the first encoder, is the second embedding feature obtained by the second encoder.

[0029] According to one embodiment of the present application, the first encoder includes sequentially connected convolution modules, three depth-separable convolution modules with residual structures, two convolution modules that do not perform downsampling operations, and a residual convolution module, and the second encoder has the same structure as the first encoder;

[0030] The first decoder includes a linear layer, five transposed convolution submodules and a convolution layer connected in sequence.

[0031] According to an embodiment of the present application, determining a high confidence sample set based on the first image feature and the second image feature includes:

[0032] Performing clustering processing on the first image feature to determine a first cluster center of the image data set, a first sample pseudo label, and a first distance between each sample and the first cluster center;

[0033] Performing clustering processing on the second image features to determine a second cluster center of the image data set, a second sample pseudo label, and a second distance between each sample and the second cluster center;

[0034] Determining a credible sample threshold of the image data set;

[0035] The high confidence sample set is determined from the image data set based on the first distance, the second distance, and the confident sample threshold.

[0036] According to one embodiment of the present application, the formula

[0037]

[0038] Determining the credible sample threshold;

[0039] Wherein, λ is the credible sample threshold, t is the current iteration round of the training method of the image clustering model, T is the total number of iterations of the training method of the image clustering model, and D t is the distance from the sample to the cluster center in the current iteration round of the training method of the image clustering model, μ(·) is the average function, and σ(·) is the variance function.

[0040] According to an embodiment of the present application, constructing an instance-prototype level contrast loss function based on the third image feature and the fourth image feature includes:

[0041] The third image feature and the fourth image feature are clustered respectively, the sample pseudo-label and the cluster center corresponding to the third sample image in the fourth sample image are determined, and the instance-prototype level contrast loss function is constructed.

[0042] According to one embodiment of the present application, the formula

[0043]

[0044] Determining the instance-prototype level contrast loss function;

[0045] in, is the instance-cluster level contrast loss function of the third image feature after data enhancement a and clustering, is the instance-cluster level contrast loss function of the fourth image feature after data enhancement b and clustering.

[0046] According to one embodiment of the present application, constructing an instance-prototype level contrast loss function and updating the model parameters of the image clustering model include:

[0047] The instance-prototype level contrast loss function is minimized according to a back propagation algorithm and a stochastic gradient descent optimization algorithm, and the model parameters of the image clustering model are updated.

[0048] In a second aspect, the present application provides a training device for an image clustering model.

[0049] The image clustering model includes a first encoder, a second encoder and a first decoder, wherein the first encoder is connected to the first decoder, and the device includes:

[0050] A first processing module, configured to input a noisy image and a clean image corresponding to an original image into the first encoder and the second encoder respectively during a pre-training phase of the image clustering model, and obtain a restored image output by the first decoder;

[0051] A second processing module is used to construct a denoising and reconstruction error loss function and a contrast loss function based on the noisy image, the clean image and the restored image, and update the model parameters of the image clustering model;

[0052] a third processing module, configured to input, during a clustering stage in a clustering training stage of the image clustering model, first sample images and second sample images obtained by performing data enhancement on the image data set into the image clustering model after the training in the pre-training stage, respectively, to obtain first image features and second image features output by the image clustering model, and determine a high confidence sample set based on the first image features and the second image features;

[0053] a fourth processing module, configured to input the third sample image and the fourth sample image obtained by performing data enhancement on the high confidence sample set into the image clustering model in a fine-tuning stage of the clustering training stage, respectively, to obtain the third image feature and the fourth image feature output by the image clustering model;

[0054] The fifth processing module is used to construct an instance-prototype level contrast loss function based on the third image feature and the fourth image feature, update the model parameters of the image clustering model, and obtain the trained image clustering model.

[0055] According to the training device of the image clustering model of the present application, a denoising and reconstruction error loss function and a contrast loss function are constructed through the original image, the noisy image and the clean image, the model parameters of the image clustering model are updated, and the instance-prototype level contrast loss function is further constructed. The model parameters of the image clustering model are updated to obtain an image clustering model with high efficiency, high robustness and high anti-interference.

[0056] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the training method of the image clustering model as described in the first aspect above is implemented.

[0057] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the training method of the image clustering model as described in the first aspect above is implemented.

[0058] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the training method of the image clustering model as described in the first aspect above.

[0059] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0061] Figure 1 This is one of the flowcharts of the training method of the image clustering model provided in the embodiment of the present application;

[0062] Figure 2 This is the second flow chart of the training method of the image clustering model provided in the embodiment of the present application;

[0063] Figure 3 This is the third flow chart of the training method of the image clustering model provided in the embodiment of the present application;

[0064] Figure 4 This is a fourth flow chart of the training method of the image clustering model provided in the embodiment of the present application;

[0065] Figure 5 It is a structural schematic diagram of a training device for an image clustering model provided in an embodiment of the present application;

[0066] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0068] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0069] In the following, in combination with the accompanying drawings, the image clustering model training method, image clustering model training device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0070] like Figure 1 As shown, the training method of the image clustering model provided in the embodiment of the present application.

[0071] The training method of the image clustering model in the embodiment of the present application is to train the image clustering model, such as Figure 2 As shown,

[0072] The image clustering model includes a first encoder, a second encoder and a first decoder, and the first encoder is connected to the first decoder.

[0073] The image clustering model training method provided in the embodiment of the present application includes steps 110 to 150.

[0074] Step 110: In the pre-training stage of the image clustering model, the noisy image and the clean image corresponding to the original image are input into the first encoder and the second encoder respectively to obtain the restored image output by the first decoder.

[0075] In this step, the original image is the biometric image collected from the Internet, the clean image is the ROI image obtained after the original image is preprocessed, and the noisy image is an image mixed with Gaussian noise in the clean image, such as Figure 2 As shown, the restored image is a reconstructed image obtained after the noise image is processed by the first encoder and the first decoder.

[0076] For example, Figure 2 As shown, the noise image ( Figure 2 The noise sample is shown) is input to the first encoder, and the first encoder is connected to the first decoder. Through the encoding and decoding operation, the restored image ( Figure 2 Restored sample shown).

[0077] The preprocessing of the original image includes extracting the ROI area in the original image, removing the background information irrelevant to the identity and category features, and using histogram equalization on the extracted ROI area to enhance the contrast of the image.

[0078] Step 120: Based on the noisy image, the clean image and the restored image, a denoising and reconstruction error loss function and a contrast loss function are constructed to update the model parameters of the image clustering model.

[0079] In this step, the denoising and reconstruction error function is obtained based on the comparison between the noisy image and the restored image, and the contrast loss function is obtained based on the clean image and the noisy image. The denoising and reconstruction error function describes the error between the noisy image input model and the original noisy image after passing through the first encoder and the first decoder during the pre-training process. The denoising and reconstruction error function is used to measure the ability of the network output to remove the noise carried by the input.

[0080] For original images, especially biometric images, due to various uncertain factors in actual collection, such as image offset, rotation, brightness interference, etc., some image data may be contaminated by noise and other disturbing information, which will bring about a large deviation in feature mapping, thus affecting the separability of feature representation and clustering performance.

[0081] For each contaminated noisy image, the pre-training module guides the image training model to reconstruct the noisy data to obtain clean image data by constructing the mean square error loss function between the corresponding noisy image and the clean image, thereby learning a more robust feature expression.

[0082] The contrast loss function describes the contrast loss between the clean image and the noisy image after passing through the first encoder.

[0083] Based on the denoising reconstruction error function and the contrast loss function, the parameters of the image clustering model are updated, so that the supervision information can be mined from the data itself to fine-tune the learning direction of the pre-training process without destroying the learned discrimination ability.

[0084] Step 130, in the clustering stage of the clustering training stage of the image clustering model, the first sample image and the second sample image obtained by data enhancement of the image data set are respectively input into the image clustering model after the training in the pre-training stage, and the first image features and the second image features output by the image clustering model are obtained, and based on the first image features and the second image features, a high confidence sample set is determined.

[0085] In this step, the first image feature is the pseudo label, cluster center and distance from the first sample image to the cluster center obtained by inputting the first sample image into the model; the second image feature is the pseudo label, cluster center and distance from the second sample image to the cluster center obtained by inputting the second sample image into the model; the high confidence sample set is an image sample set with better image effect selected according to the threshold λ.

[0086] Wherein, based on the first image feature and the second image feature, a threshold is adaptively screened out, and the image sample set is compared with the threshold, so as to screen out a high-confidence sample set.

[0087] In this step, the image data set includes multiple original images, and data enhancement is to perform image transformation on the image data set, such as brightness transformation, contrast transformation, saturation transformation, affine transformation, translation transformation, rotation transformation, and local magnification.

[0088] Among them, in this application, the above-mentioned various transformations are sequentially combined to retain the biometric information in the image as much as possible while generating various images with slight transformations, making full use of data enhancement to improve the diversity of samples.

[0089] There are many ways of sequential combination. For example, the image data set may be first subjected to brightness transformation, then to contrast transformation, and finally to rotation transformation to obtain the image data set after data enhancement.

[0090] Alternatively, the image dataset may be first subjected to a translation transformation, then an affine transformation, then a saturation transformation, and finally a local method to obtain a data-enhanced image dataset.

[0091] Data augmentation can expand training data and make the expanded training data as close as possible to the real distribution data, thereby improving detection accuracy and improving the robustness and generalization ability of the model.

[0092] Among them, the method of data enhancement should also be determined according to the actual situation of the image sample set. Taking the image sample set as finger vein data, since the number of images of each finger generally does not exceed 10, the number and diversity of images are insufficient; in addition, a certain amount of activity space needs to be reserved for the fingers during actual collection, including translation and rotation within a certain range, as well as some image quality differences caused by different collection environments and equipment, such as a certain degree of distortion, differences in contrast and brightness, and different image quality.

[0093] In this case, a sequential combination of data enhancement is required, including contrast transformation, brightness transformation, translation transformation, and rotation transformation. Therefore, data enhancement can be used to solve problems that arise in the acquisition stage, so that the image dataset after data enhancement can better meet the training requirements of the image clustering model.

[0094] In addition, each time the image is transformed, the transformation parameters corresponding to each transformation are randomly resampled from a pre-set range to ensure that the transformations in the two views are not exactly the same. The parameter selection range for each transformation is pre-set as a hyperparameter.

[0095] Step 140: In the fine-tuning stage of the clustering training stage, the third sample image and the fourth sample image obtained by data enhancement of the high confidence sample set are respectively input into the image clustering model to obtain the third image feature and the fourth image feature output by the image clustering model.

[0096] In this step, the third image feature is the pseudo label, cluster center and distance from the third sample image to the cluster center obtained by inputting the third sample image into the image clustering model, and the fourth image feature is the pseudo label, cluster center and distance from the fourth sample image to the cluster center obtained by inputting the fourth sample image into the model.

[0097] Step 150: construct an instance-prototype level contrast loss function based on the third image feature and the fourth image feature, update the model parameters of the image clustering model, and obtain a trained image clustering model.

[0098] In this step, based on the third image feature and the fourth image feature, the contrast loss between each image feature and its cluster center is cross-calculated, that is, the instance-prototype level contrast loss across views, thereby constructing an instance-prototype level contrast loss function.

[0099] In related technologies, classic unsupervised clustering algorithms such as K-Means, hierarchical clustering, density clustering, spectral clustering, etc. often fail to achieve ideal results when directly processing high-dimensional data such as image data. In dealing with clustering tasks, traditional deep clustering algorithms have decent clustering performance on relatively simple image datasets (such as MNIST), and can approach the accuracy of supervised learning algorithms, but their clustering performance is poor when facing some more complex datasets.

[0100] In an embodiment of the present application, a supervised algorithm and an unsupervised algorithm are combined, wherein a supervised algorithm sets a sample set screening threshold, and based on the pre-training output of the image clustering model, supervised information is mined from the data itself to fine-tune the learning direction of the pre-training process, and then based on the high-confidence sample set screened out by the threshold, the third image feature and the fourth image feature are obtained, an instance-prototype level contrast loss function is constructed, and the model parameters of the image clustering model are updated to obtain a trained image clustering model.

[0101] According to the training method of the image clustering model provided in the embodiment of the present application, a denoising and reconstruction error loss function and a contrast loss function are constructed through the original image, the noisy image and the clean image, the model parameters of the image clustering model are updated, and the instance-prototype level contrast loss function is further constructed. The model parameters of the image clustering model are updated to obtain an image clustering model with high efficiency, high robustness and high anti-interference.

[0102] In some embodiments, the noisy image and the clean image corresponding to the original image are input to the first encoder and the second encoder respectively to obtain the restored image output by the first decoder, including:

[0103] The noise image is input into the first encoder to obtain the first embedding feature output by the first encoder.

[0104] The clean image is input into the second encoder to obtain the second embedding feature output by the second encoder.

[0105] The first embedded feature and the second embedded feature are used to be input into the embedding space, so as to obtain the first image feature and the second image feature outputted in the image clustering model.

[0106] The first embedded feature is input into the first decoder to obtain a restored image output by the first decoder.

[0107] Based on the noisy image, clean image and restored image, the denoising reconstruction error loss function and contrast loss function are constructed, including:

[0108] Based on the clean image and the restored image, the denoising and reconstruction error loss function is determined.

[0109] Based on the first embedded feature and the second embedded feature, a contrastive loss function is determined.

[0110] In this embodiment, if Figure 2 As shown, the input of the encoder network includes the preprocessed original ROI image and the image mixed with Gaussian noise, that is, the clean image and the noisy image.

[0111] The clean image and the noisy image are fed into the second encoder respectively. and the first encoder Perform feature extraction, obtain the features of the sample and then send them to the decoder g θ Get the output image, which is the original image.

[0112] For example, Figure 2 As shown, the clean image ( Figure 2 Clean samples are shown) input to the second encoder Based on the first encoder The output of the first embedding feature and the second encoder The second embedding feature of the output is used to construct the contrast loss function ( Figure 2 Contrastive Loss as shown).

[0113] Based on the restored image and the clean image output by the first decoder, the denoising reconstruction error function is obtained by comparison ( Figure 2 Reconstruct Loss).

[0114] Among them, the reconstruction loss is constructed between the output image obtained by the noise sample and the clean image based on the L2 norm, so that the model is expected to learn the ability to restore the original image from the contaminated image and further learn the discriminative feature representation.

[0115] In some embodiments, the formula

[0116]

[0117] Determine the denoising reconstruction error loss function;

[0118] in, is the i-th clean image, is the restored image of the i-th noise image after the first encoder and the first decoder output, L rec is the denoising reconstruction error loss function, N is the total number of clean images in the pre-training stage, is the square of the L2 norm;

[0119] In this embodiment, the denoising and reconstruction error loss function task objective is not actually directly consistent with the objective of the image clustering task.

[0120] In order to learn embedding features that are more helpful for the image clustering model, based on the principle that the mapping learned by the network can make the gap between the distance distribution between similar sample pairs and the distance distribution between non-similar sample pairs larger, the loss function in the pre-training process also includes a contrast loss function.

[0121] The clean image and its noisy image are regarded as positive sample pairs, and other samples are regarded as negative sample pairs. Based on the individual discriminant contrast learning paradigm, it supplements the learning objectives of the pre-training stage. Without destroying the embedding space learned by the denoising-based generative model, it preserves the geometric structure of the original data and enhances the expressibility of the embedded features.

[0122] The original image and the noisy image of the same sample are regarded as positive sample pairs, and other sample pairs are regarded as negative sample pairs, so as to obtain the contrast loss function.

[0123] Apply the formula

[0124]

[0125] Determine the contrast loss function;

[0126] Among them, superscript a and superscript b are data enhancements with different combination orders. is the contrast loss function corresponding to the i-th clean image, is the contrast loss function corresponding to the i-th noise image;

[0127]

[0128]

[0129] Among them, τ I is the temperature parameter, s(·) is the cosine similarity, is the first embedding feature obtained by the first encoder, is the second embedding feature obtained by the second encoder.

[0130] By comparing the loss functions, when the denoising and reconstruction loss gradually tends to converge, the feature extraction capability of the encoder can be further adjusted without destroying the learned representation ability, thereby improving the discriminability of the features extracted by the model with the help of individual discrimination tasks based on noise enhancement.

[0131] In summary, the application formula

[0132] L=L rec +L ins

[0133] Determine the objective function of the image clustering model during the pre-training phase.

[0134] Through this objective function, we can comprehensively consider the reconstruction error when restoring the noisy image and the contrast error caused by the image samples after data enhancement. Based on the objective function, the image clustering model can learn the ability to restore the original image from the contaminated image and further learn the discriminative feature representation.

[0135] At the same time, without destroying the representation ability that has been learned, the feature extraction ability of the encoder can be further adjusted with the help of individual discrimination tasks based on noise enhancement, thereby improving the discriminability of the features extracted by the model.

[0136] In some embodiments, the first encoder includes sequentially connected convolution modules, three depth-separable convolution modules with residual structures, two convolution modules that do not perform downsampling operations, and a residual convolution module, and the second encoder has the same structure as the first encoder.

[0137] like Figure 4 As shown, the first encoder can be The second encoder may be The first decoder may be g θ ,in, and The internal structures of the two encoders are exactly the same, and the first encoder and the second encoder share a shared parameter ω, so that the second embedded feature obtained by the clean image after the second encoder has a similar structure to the first embedded feature obtained by the noisy image after the first encoder, thereby constructing a contrast loss function based on the first embedded feature and the second embedded feature.

[0138] like Figure 2 As shown in the figure, the encoder network is mainly composed of depth-wise separable convolution modules, and each 3*3 depth-wise separable convolution layer is connected to a batch normalization layer and a ReLU activation function.

[0139] In this embodiment, the batch normalization layer is used to unify the statistical distribution of sample inputs, thereby making subsequent data processing more convenient and avoiding some unnecessary numerical problems.

[0140] Among them, the depth-separable convolutional layer can effectively reduce the size and computational complexity of the model compared to the ordinary convolutional layer. At the same time, the residual connection structure is introduced into the network, so that the problem of gradient disappearance will not occur in the process of deepening the depth of the convolutional neural network, which will affect the efficiency of the image clustering model.

[0141] Depthwise separable convolution divides the conventional convolution operation into two steps: channel-by-channel convolution and point-by-point convolution.

[0142] Among them, channel-by-channel convolution performs independent convolution operations on each channel of the input image features, and temporarily does not integrate image features of different channels at the same position;

[0143] Point-by-point convolution uses a 1*1 convolution kernel to integrate the feature information of different feature channels while reducing some of the computational complexity.

[0144] By dividing the conventional convolution operation into two steps, the depthwise separable convolution has good expressive power and has excellent effects in tasks such as autoencoder networks and defect detection.

[0145] Except for the last feature mapping layer, the encoder network uses depth-wise separable convolutional layers with a stride of 2 to replace the pooling layer to achieve the purpose of downsampling, thereby avoiding the loss of image detail information that may be caused by the pooling operation.

[0146] By replacing the pooling layer with a depthwise separable convolutional layer with a stride of 2, the texture feature information in the image feature data can be effectively retained, so that when the sample image is a biometric image, the detail information on the biometric image can be retained to the greatest extent.

[0147] The first decoder consists of a linear layer, five transposed convolutional submodules, and a convolutional layer connected in sequence.

[0148] Among them, the linear layer is used to transform the embedded feature vector output by the first encoder into a reduced feature map, and then stack five transposed convolution sub-modules and convolution layers to perform deconvolution operations to upsample the feature map and reconstruct an image with the same size and number of channels as the original input.

[0149] In some embodiments, determining a high confidence sample set based on the first image feature and the second image feature includes:

[0150] Performing clustering processing on the first image feature to determine a first cluster center of the image data set, a first sample pseudo label, and a first distance between each sample and the first cluster center;

[0151] The second image features are clustered to determine a second cluster center of the image data set, a second sample pseudo label, and a second distance between each sample and the second cluster center.

[0152] In this embodiment, after the pre-training of the encoder network is completed, the feature expression of the encoder network already has a certain degree of discriminability.

[0153] The feature clustering initialization is based on the encoder network learned through pre-training to obtain the embedded features of each sample in the data set. The KMeans clustering algorithm is applied in this feature space to cluster the image features and obtain the pseudo label, cluster center and the distance from each sample to its corresponding cluster center.

[0154] Fix the network weights of the first encoder and the second encoder, and process the sample images in the dataset through two sets of data augmentation t a and t b , and get two different enhanced views and The first and second encoders are inputted respectively to obtain the first embedding features and the second embedding features.

[0155] Based on the first embedded feature and the second embedded feature, the KMeans clustering algorithm is applied in the feature space to obtain the first cluster center of the data set, the first sample pseudo label, and the first distance between each sample and the first cluster center, as well as the second cluster center, the second sample pseudo label, and the second distance between each sample and the second cluster center.

[0156] Determine the threshold of trusted samples for an image dataset.

[0157] The credible sample threshold is a critical value used to distinguish untrustworthy samples from high-confidence samples, thereby screening out a high-confidence sample set.

[0158] Based on the distance distribution from each sample to its cluster center in the current view, the trusted sample threshold of the image dataset is dynamically determined with the number of training iterations.

[0159] Based on the first distance, the second distance and the credible sample threshold, a high-confidence sample set is determined from the image dataset.

[0160] Wherein, based on the credible sample threshold, sample images whose first distance and second distance are smaller than the credible sample threshold are selected and added to the high-confidence sample set, thereby determining the high-confidence sample set.

[0161] In some embodiments, the formula

[0162]

[0163] Determine the credible sample threshold.

[0164] Where λ is the credible sample threshold, t is the current iteration of the training method of the image clustering model, T is the total number of iterations of the training method of the image clustering model, and D t is the distance from the sample to the cluster center in the current iteration of the training method of the image clustering model, μ(·) is the average function, and σ(·) is the variance function.

[0165] In this embodiment, due to the inevitable errors and misclassifications in the clustering results, for the dataset embedding features in each view and the corresponding clustering results, for those samples at the edge of the clusters, that is, samples with a large distance from the cluster center, we need a threshold to filter out these samples. This threshold is also the trusted sample threshold.

[0166] Based on the above formula, Figure 4As shown, the image training model can dynamically adjust the trusted sample threshold as the training progresses, so that the high-confidence sample set in each current view can be adaptively screened out, and the high-confidence sample set can be added to the current iteration to participate in the training.

[0167] The sample selection is based on the following:

[0168]

[0169] Among them, v i =1 is the current sample image x i is considered as a high confidence sample, v i = 0 means the current sample image is unreliable, L i is the distance from the current sample image to its cluster center.

[0170] In this embodiment, a bidirectional individual-prototype contrast loss function is constructed based on a high confidence sample set in each image dataset as well as cluster centers and pseudo labels.

[0171] Among them, the individual-prototype contrast loss function constructs sample pairs based on individuals and cluster centers, regards the first sample image and the first cluster center as positive sample pairs, and the first sample image and the second cluster center as negative sample pairs, and constructs a contrast loss function.

[0172] In some embodiments, based on the third image feature and the fourth image feature, constructing an instance-prototype level contrast loss function includes:

[0173] The third image features and the fourth image features are clustered respectively to determine the sample pseudo-label and cluster center corresponding to the third sample image in the fourth sample image, and to construct an instance-prototype level contrast loss function.

[0174] Among them, since the data enhancement operations of the third sample image and the fourth sample image are completely independent, the enhancement methods of the high-confidence sample sets under corresponding views are not completely consistent, in order to enhance the robustness and anti-transformation ability of the image clustering model.

[0175] The embodiment of the present application adopts a two-way contrast learning strategy, that is, the high confidence samples in the third sample image The corresponding embedding features According to its sample index i, find the corresponding sample pseudo label in the fourth sample image And the cluster center of the fourth sample image (Assume that the cluster center is divided into the kth cluster).

[0176] Then calculate the embedding features The distances to other cluster centers in the fourth sample image are used to determine the sample pseudo labels and cluster centers corresponding to the third sample image in the fourth sample image.

[0177] The loss function is determined based on the cluster center corresponding to the third sample image in the fourth sample image, the sample pseudo label, and the distance between the embedded feature and other cluster centers in the fourth sample image.

[0178] In some embodiments, the formula

[0179]

[0180] Determine the instance-prototype level contrast loss function;

[0181] in, is the instance-cluster level contrast loss function of the third image feature after data enhancement a and clustering, is the instance-cluster level contrast loss function of the fourth image feature after data enhancement b and clustering.

[0182]

[0183]

[0184] Where s(·) is the cosine similarity, T is the temperature hyperparameter, is the i-th first embedding feature obtained after data enhancement a, is the i-th second embedding feature obtained after data enhancement b, is the second embedded feature corresponding to the kth cluster in the feature space corresponding to the data enhancement b, is the second embedded feature corresponding to the jth cluster in the feature space corresponding to the data enhancement b, is the first embedded feature corresponding to the jth cluster in the feature space corresponding to data enhancement a, is the first embedded feature corresponding to the kth cluster in the feature space corresponding to the data enhancement a.

[0185] The contrast loss function is used to measure the distance between positive and negative sample pairs and embedded features, such as Figure 3 As shown in the figure, while “pushing closer” the similarity of the embedded features of the positive sample pair, the distance of the negative sample pair in the embedding space is “pushed farther”, so that the cluster center obtained by the image clustering model is more accurate relative to the sample image.

[0186] In some embodiments, constructing an instance-prototype level contrast loss function and updating model parameters of the image clustering model include:

[0187] The model parameters of the image clustering model are updated by minimizing the instance-prototype level contrast loss function according to the back-propagation algorithm and the stochastic gradient descent optimization algorithm.

[0188] Among them, the backpropagation algorithm is used to adjust the weights between each node in the encoder network so that the sample labels output by the encoder network are consistent with the actual labels.

[0189] The stochastic gradient descent optimization algorithm is used to improve the efficiency of encoder network iteration, thereby making the training of the image model more efficient and enabling the encoder network to reach the convergence condition or the maximum number of iterations faster during iterative optimization.

[0190] In this embodiment, the instance-prototype level contrast loss function is minimized by the back-propagation algorithm and the stochastic gradient descent optimization algorithm, so as to fine-tune the image clustering model of the present application, so that the model obtained after training can be the final model applied to the production environment.

[0191] Assume that the model parameters of the image clustering model are θ, and use the stochastic gradient descent optimization algorithm to optimize the network parameters until the preset maximum number of iterations or convergence conditions are reached.

[0192] Apply the formula

[0193]

[0194] Determine model parameters for the image clustering model.

[0195] Among them, α is the learning rate, L c is the instance-prototype level contrast loss function.

[0196] When the model parameters of the image clustering model reach a convergence condition or the number of optimization iterations reaches a preset maximum number of iterations, the optimized image clustering model can be obtained.

[0197] In actual implementation, we only need to input the sample image data to be clustered into the encoder network of the image clustering model to obtain the embedded features corresponding to the sample image data, and then apply the KMeans algorithm on the feature space of the embedded features to obtain the final clustering result of the image data set.

[0198] Among them, the training method of the image clustering model can be applied to the terminal, and can be specifically executed by hardware or software in the terminal.

[0199] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0200] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0201] The training method of the image clustering model provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the training method of the image clustering model. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The training method of the image clustering model provided in the embodiment of the present application is described below using an electronic device as an example of the execution subject.

[0202] The training method of the image clustering model provided in the embodiment of the present application can be executed by a training device for the image clustering model. In the embodiment of the present application, the training method of the image clustering model performed by the training device for the image clustering model is taken as an example to illustrate the training device for the image clustering model provided in the embodiment of the present application.

[0203] The embodiment of the present application also provides a training device for an image clustering model.

[0204] The image clustering model includes a first encoder, a second encoder and a first decoder, and the first encoder is connected to the first decoder.

[0205] like Figure 5 As shown, the training device of the image clustering model includes: a first processing module 510, a second processing module 520, a third processing module 530, a fourth processing module 540 and a fifth processing module 550. The first processing module 510 is used to input the noise image and the clean image corresponding to the original image into the first encoder and the second encoder respectively, and obtain the restored image output by the first decoder;

[0206] A second processing module 520 is used to construct a denoising and reconstruction error loss function and a contrast loss function based on the noisy image, the clean image and the restored image, and update the model parameters of the image clustering model;

[0207] The third processing module 530 is used to input the first sample image and the second sample image obtained by performing data enhancement on the image data set into the image clustering model after the training in the pre-training stage, obtain the first image features and the second image features output by the image clustering model, and determine the high confidence sample set based on the first image features and the second image features;

[0208] The fourth processing module 540 is used to input the third sample image and the fourth sample image obtained by performing data enhancement on the high confidence sample set into the image clustering model respectively, to obtain the third image feature and the fourth image feature output by the image clustering model;

[0209] The fifth processing module 550 is used to construct an instance-prototype level contrast loss function based on the third image feature and the fourth image feature, update the model parameters of the image clustering model, and obtain a trained image clustering model.

[0210] According to the training device of the image clustering model of the present application, a denoising and reconstruction error loss function and a contrast loss function are constructed through the original image, the noisy image and the clean image, the model parameters of the image clustering model are updated, and the instance-prototype level contrast loss function is further constructed. The model parameters of the image clustering model are updated to obtain an image clustering model with high efficiency, high robustness and high anti-interference.

[0211] In some embodiments, the first processing module 510 is used to obtain a first embedded feature, a second embedded feature and a restored image, wherein the noise image corresponds to the first embedded feature and the restored image, and the clean image corresponds to the second embedded feature.

[0212] The second processing module 520 is used to construct a reconstruction error loss function and a contrast loss function.

[0213] In some embodiments, the formula

[0214]

[0215] Determine the denoising reconstruction error loss function;

[0216] in, is the i-th clean image, is the restored image of the i-th noise image after the first encoder and the first decoder output, L rec is the denoising reconstruction error loss function, N is the total number of clean images in the pre-training stage, is the square of the L2 norm;

[0217] Apply the formula

[0218]

[0219] Determine the contrast loss function;

[0220] Among them, superscript a and superscript b are data enhancements with different combination orders. is the contrast loss function corresponding to the i-th clean image, is the contrast loss function corresponding to the i-th noise image;

[0221]

[0222]

[0223] Among them, τ I is the temperature parameter, s(·) is the cosine similarity, is the first embedding feature obtained by the first encoder, is the second embedding feature obtained by the second encoder.

[0224] In some embodiments, the first encoder in the second processing module 520 includes sequentially connected convolution modules, three depth-separable convolution modules with residual structures, two convolution modules that do not perform downsampling operations, and a residual convolution module, and the second encoder has the same structure as the first encoder;

[0225] The first decoder consists of a linear layer, five transposed convolutional submodules, and a convolutional layer connected in sequence.

[0226] In some embodiments, the third processing module 530 is used to determine a high confidence sample set based on the first image feature and the second image feature, including:

[0227] Used to perform clustering processing on the first image feature, determine the first sample pseudo label and the first distance between each sample and the first cluster center in the first cluster of the image data set;

[0228] Used to perform clustering processing on the second image features, determine the second cluster of the image data set, the second sample pseudo label and the second distance between each sample and the second cluster center;

[0229] Determine the threshold of trusted samples for an image dataset.

[0230] The third processing module 530 is further configured to determine a high confidence sample from the image data set based on the first distance, the second distance, and the confidence sample threshold.

[0231] In some embodiments, the formula

[0232]

[0233] Determine the threshold of credible samples;

[0234] Where λ is the credible sample threshold, t is the current iteration of the training method of the image clustering model, T is the total number of iterations of the training method of the image clustering model, and D t is the distance from the sample to the cluster center in the current iteration of the training method of the image clustering model, μ(·) is the average function, and σ(·) is the variance function.

[0235] In some embodiments, the fourth processing module 540 is used to obtain the third image features and the fourth image features, and the fifth processing module 550 is used to perform clustering processing based on the third image features and the fourth image features, respectively, to determine the sample pseudo-labels and cluster centers corresponding to the third sample image in the fourth sample image, and to construct an instance-prototype level contrast loss function.

[0236] In some embodiments, the formula

[0237]

[0238] Determine the instance-prototype level contrast loss function;

[0239] in, is the instance-cluster level contrast loss function of the third image feature after data enhancement a and clustering, is the instance-cluster level contrast loss function of the fourth image feature after data enhancement b and clustering.

[0240] Apply the formula

[0241]

[0242]

[0243] Where s(·) is the cosine similarity, T is the temperature hyperparameter, is the i-th first embedding feature obtained after data enhancement a, is the i-th second embedding feature obtained after data enhancement b, is the second embedded feature corresponding to the kth cluster in the feature space corresponding to the data enhancement b, is the second embedded feature corresponding to the jth cluster in the feature space corresponding to the data enhancement b, is the first embedded feature corresponding to the jth cluster in the feature space corresponding to data enhancement a, is the first embedded feature corresponding to the kth cluster in the feature space corresponding to the data enhancement a.

[0244] In some embodiments, the fifth processing module 550 is used to construct an instance-prototype level contrast loss function and update the model parameters of the image clustering model, including: minimizing the instance-prototype level contrast loss function according to the backpropagation algorithm and the stochastic gradient descent optimization algorithm, and updating the model parameters of the image clustering model.

[0245] The training device of the image clustering model in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0246] The training device of the image clustering model in the embodiment of the present application can be a device with an operating system. The operating system can be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0247] The training device of the image clustering model provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0248] In some embodiments, Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, each process of the training method embodiment of the above-mentioned image clustering model is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0249] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0250] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned image clustering model training method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0251] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0252] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned image clustering model training method when executed by a processor.

[0253] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0254] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0255] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0256] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0257] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0258] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A training method for an image clustering model, characterized in that: The image clustering model includes a first encoder, a second encoder and a first decoder, wherein the first encoder is connected to the first decoder, and the method includes: In the pre-training stage of the image clustering model, a noisy image and a clean image corresponding to the original image are input into the first encoder and the second encoder respectively to obtain a restored image output by the first decoder; Based on the noisy image, the clean image and the restored image, construct a denoising and reconstruction error loss function and a contrast loss function, and update the model parameters of the image clustering model; In the clustering stage of the clustering training stage of the image clustering model, the first sample image and the second sample image obtained by performing data enhancement on the image data set are respectively inputted into the image clustering model after the training in the pre-training stage, the first image features and the second image features output by the image clustering model are obtained, and a high confidence sample set is determined based on the first image features and the second image features; In the fine-tuning stage of the clustering training stage, the third sample image and the fourth sample image obtained by performing data enhancement on the high confidence sample set are respectively input into the image clustering model to obtain the third image feature and the fourth image feature output by the image clustering model; Based on the third image feature and the fourth image feature, an instance-prototype level contrast loss function is constructed, and the model parameters of the image clustering model are updated to obtain the trained image clustering model.

2. The method for training an image clustering model according to claim 1, characterized in that: The step of inputting the noisy image and the clean image corresponding to the original image to the first encoder and the second encoder respectively to obtain the restored image output by the first decoder includes: Inputting the noise image into the first encoder to obtain a first embedding feature output by the first encoder; Input the clean image into the second encoder to obtain a second embedding feature output by the second encoder; Inputting the first embedded feature into the first decoder to obtain the restored image output by the first decoder; The constructing of a denoising and reconstruction error loss function and a contrast loss function based on the noisy image, the clean image and the restored image includes: Determining the denoising reconstruction error loss function based on the clean image and the restored image; The contrast loss function is determined based on the first embedding feature and the second embedding feature.

3. The method for training an image clustering model according to claim 2, characterized in that: Apply the formula Determining the denoising and reconstruction error loss function; in, is the i-th clean image, is the restored image of the i-th noise image output by the first encoder and the first decoder, L rec is the denoising reconstruction error loss function, N is the total number of clean images in the pre-training stage, is the square of the L2 norm; Apply the formula Determining the contrast loss function; in, is the contrast loss function corresponding to the i-th clean image, is the contrast loss function corresponding to the i-th noise image; Among them, τ I is the temperature parameter, s(·) is the cosine similarity, is the first embedding feature obtained by the first encoder, is the second embedding feature obtained by the second encoder.

4. The method for training an image clustering model according to claim 1, characterized in that: The first encoder includes sequentially connected convolution modules, three depth-separable convolution modules with residual structures, two convolution modules that do not perform downsampling operations, and a residual convolution module, and the second encoder has the same structure as the first encoder; The first decoder includes a linear layer, five transposed convolution submodules and a convolution layer connected in sequence.

5. The method for training an image clustering model according to any one of claims 1 to 4, characterized in that: The step of determining a high confidence sample set based on the first image feature and the second image feature comprises: Performing clustering processing on the first image feature to determine a first cluster center of the image data set, a first sample pseudo label, and a first distance between each sample and the first cluster center; Performing clustering processing on the second image features to determine a second cluster center of the image data set, a second sample pseudo label, and a second distance between each sample and the second cluster center; Determining a credible sample threshold of the image data set; The high confidence sample set is determined from the image data set based on the first distance, the second distance, and the confident sample threshold.

6. The method for training an image clustering model according to claim 5, characterized in that: Apply the formula Determining the credible sample threshold; Wherein, λ is the credible sample threshold, t is the current iteration round of the training method of the image clustering model, T is the total number of iterations of the training method of the image clustering model, and D t is the distance from the sample to the cluster center in the current iteration round of the training method of the image clustering model, μ(·) is the average function, and σ(·) is the variance function.

7. The method for training an image clustering model according to any one of claims 1 to 4, characterized in that: The constructing an instance-prototype level contrast loss function based on the third image feature and the fourth image feature includes: The third image feature and the fourth image feature are clustered respectively, the sample pseudo-label and the cluster center corresponding to the third sample image in the fourth sample image are determined, and the instance-prototype level contrast loss function is constructed.

8. The method for training an image clustering model according to claim 7, characterized in that: Apply the formula Determining the instance-prototype level contrast loss function; in, is the instance-cluster level contrast loss function of the third image feature after clustering, is the instance-cluster level contrast loss function of the fourth image feature after clustering; Apply the formula Where s(·) is the cosine similarity, T is the temperature hyperparameter, is the i-th first embedding feature obtained after data enhancement a, is the i-th second embedding feature obtained after data enhancement b, is the second embedded feature corresponding to the kth cluster in the feature space corresponding to the data enhancement b, is the second embedded feature corresponding to the jth cluster in the feature space corresponding to the data enhancement b, is the first embedded feature corresponding to the jth cluster in the feature space corresponding to data enhancement a, is the first embedded feature corresponding to the kth cluster in the feature space corresponding to the data enhancement a.

9. The method for training an image clustering model according to any one of claims 1 to 4, characterized in that: The constructing the instance-prototype level contrast loss function and updating the model parameters of the image clustering model include: The instance-prototype level contrast loss function is minimized according to a back propagation algorithm and a stochastic gradient descent optimization algorithm, and the model parameters of the image clustering model are updated.

10. A training device for an image clustering model, characterized in that: The image clustering model includes a first encoder, a second encoder and a first decoder, wherein the first encoder is connected to the first decoder, and the device includes: A first processing module, configured to input a noisy image and a clean image corresponding to an original image into the first encoder and the second encoder respectively during a pre-training phase of the image clustering model, and obtain a restored image output by the first decoder; A second processing module is used to construct a denoising and reconstruction error loss function and a contrast loss function based on the noisy image, the clean image and the restored image, and update the model parameters of the image clustering model; a third processing module, configured to input, during a clustering stage in a clustering training stage of the image clustering model, first sample images and second sample images obtained by performing data enhancement on the image data set into the image clustering model after the training in the pre-training stage, respectively, to obtain first image features and second image features output by the image clustering model, and determine a high confidence sample set based on the first image features and the second image features; a fourth processing module, configured to input the third sample image and the fourth sample image obtained by performing data enhancement on the high confidence sample set into the image clustering model in a fine-tuning stage of the clustering training stage, respectively, to obtain the third image feature and the fourth image feature output by the image clustering model; The fifth processing module is used to construct an instance-prototype level contrast loss function based on the third image feature and the fourth image feature, update the model parameters of the image clustering model, and obtain the trained image clustering model.