Image clustering method and apparatus, computer device, and storage medium

HK40070818BActive Publication Date: 2026-07-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
HK · HK
Patent Type
Patents
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-09-13
Publication Date
2026-07-10

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an image clustering method and device, computer equipment and a storage medium, and belong to the technical field of computers. The method comprises: determining a first clustering parameter based on M image groups; for any target image group in the M image groups, dividing the target image group into two image groups to obtain M+1 reference image groups, determining a reference clustering parameter determined based on the M+1 reference image groups as a second clustering parameter of the target image group, and the second clustering parameter representing a clustering degree of images in the M+1 reference image groups; and in the case that a maximum second clustering parameter in the second clustering parameters of the M image groups is not less than the first clustering parameter, dividing the target image group corresponding to the maximum second clustering parameter into two image groups to obtain M+1 image groups. The present application realizes continuous subdivision of the M image groups, which is conducive to further distinguishing images that are easy to confuse, thereby improving the clustering degree of image clustering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an image clustering method, apparatus, computer device, and storage medium. Background Technology

[0002] With the continuous development of computer technology, the demand for image processing is increasing. Image clustering is a commonly used image processing method, which refers to dividing multiple images into several different categories. Related technologies predetermine a target number of categories, and then use a clustering algorithm to assign multiple images to those target number of categories. However, current clustering algorithms do not achieve a high enough degree of clustering for image processing. Summary of the Invention

[0003] This application provides an image clustering method, apparatus, computer device, and storage medium, which can improve the clustering degree of images. The technical solution is as follows:

[0004] On the one hand, an image clustering method is provided, the method comprising:

[0005] Based on M image groups, a first clustering parameter is determined, where the first clustering parameter represents the degree of clustering of the images in the M image groups, and M is an integer greater than 1;

[0006] For any target image group among the M image groups, the target image group is divided into two image groups to obtain M+1 reference image groups. The reference clustering parameters determined based on the M+1 reference image groups are determined as the second clustering parameters of the target image group. The second clustering parameters represent the degree of clustering of the images in the M+1 reference image groups.

[0007] If the largest second clustering parameter among the M image groups is not less than the first clustering parameter, the target image group corresponding to the largest second clustering parameter is divided into two image groups, resulting in M+1 image groups.

[0008] On the other hand, an image clustering apparatus is provided, the apparatus comprising:

[0009] The first parameter determination module is used to determine a first clustering parameter based on M image groups, wherein the first clustering parameter represents the degree of clustering of images in the M image groups, and M is an integer greater than 1;

[0010] The second parameter determination module is used to divide any target image group in the M image groups into two image groups to obtain M+1 reference image groups, and to determine the reference clustering parameters determined based on the M+1 reference image groups as the second clustering parameters of the target image groups. The second clustering parameters represent the degree of clustering of the images in the M+1 reference image groups.

[0011] The image group segmentation module is used to divide the target image group corresponding to the largest second clustering parameter into two image groups, resulting in M+1 image groups, provided that the largest second clustering parameter among the M image groups is not less than the first clustering parameter.

[0012] Optionally, the second parameter determining module is further configured to, for any target image group in the M+1 image groups, further divide the target image group into two image groups to obtain M+2 reference image groups, and determine the reference clustering parameter determined based on the M+2 reference image groups as the third clustering parameter of the target image group, wherein the third clustering parameter represents the clustering degree of the M+2 reference image groups;

[0013] The image group division module is further configured to divide the target image group corresponding to the largest third clustering parameter into two image groups, obtaining M+2 image groups, when the largest third clustering parameter among the M+1 second image groups is not less than the largest second clustering parameter, until the largest clustering parameter among the multiple clustering parameters obtained after this round of division is less than the clustering parameter before division.

[0014] Optionally, the device further includes:

[0015] The image acquisition module is used to acquire multiple images of the target object.

[0016] The classification processing module is used to call the image classification model to classify the multiple images respectively and obtain the category label of each image;

[0017] The image segmentation module is used to group images of the same category into the same image group based on the category label of each image, thereby obtaining the M image groups.

[0018] Optionally, the image classification model includes a first feature extraction network and an image classification network, and the classification processing module includes:

[0019] The first feature extraction unit is used to call the first feature extraction network for each of the plurality of images to extract features from the image and obtain the first image features;

[0020] The classification processing unit is used to call the image classification network to classify the first image features and obtain the category label of the image.

[0021] Optionally, the first parameter determining module includes:

[0022] The first parameter determination unit is used to determine, for each image in the M image groups, a cohesion parameter and a separation parameter corresponding to the image based on the first image feature of the image, the first image feature of other images in the image group to which the image belongs, and the first image feature of images in other image groups. The cohesion parameter represents the degree of dissimilarity between the image and other images in the image group to which the image belongs, and the separation parameter represents the degree of dissimilarity between the image and images in other image groups.

[0023] The second parameter determination unit is used to determine the clustering sub-parameters corresponding to the image based on the agglomeration parameter and the separation parameter, wherein the clustering sub-parameters are negatively correlated with the agglomeration parameter and positively correlated with the separation parameter.

[0024] The third parameter determination unit is used to determine the first clustering parameter based on the clustering sub-parameters corresponding to each image.

[0025] Optionally, the image is a pathological slide image, the first feature extraction network includes K feature extraction layers and a feature transformation layer, and the first feature extraction unit is used for:

[0026] The K feature extraction layers are invoked to sequentially extract features from the image, resulting in the image features output by each feature extraction layer.

[0027] The feature transformation layer is invoked to perform feature transformation on the image features output by the last L feature extraction layers to obtain the first image feature, where L is an integer greater than 1 and not greater than K.

[0028] Optionally, the device further includes:

[0029] The sample image acquisition module is used to acquire sample images;

[0030] The perturbation processing module is used to perturb the sample images in different ways to obtain multiple perturbation images;

[0031] The classification processing module is also used to call the image classification model to classify each perturbed image and obtain the category label of each perturbed image.

[0032] The model training module is used to train the image classification model based on the category label of each perturbed image.

[0033] Optionally, the number of sample images is multiple, the category label of the perturbation image includes the probability that the perturbation image belongs to each category, and the model training module includes:

[0034] The first difference parameter determination unit is used to acquire multiple perturbation images obtained by perturbation processing of the same sample image, and to determine the first difference parameter between the probabilities of the multiple perturbation images belonging to the same category.

[0035] The second difference parameter determination unit is used to acquire multiple perturbation images obtained by perturbating different sample images, and to determine the second difference parameter between the probabilities of the multiple perturbation images belonging to the same category.

[0036] The first model training unit is used to train the image classification model based on the first difference parameter and the second difference parameter, so that the first difference parameter obtained by calling the trained image classification model decreases and the second difference parameter increases.

[0037] Optionally, the image classification model includes a first feature extraction network and an image classification network, and the classification processing module includes:

[0038] The first feature extraction unit is used to call the first feature extraction network for each perturbed image to extract features from the perturbed image and obtain second image features;

[0039] The classification processing unit is used to call the image classification network to classify the second image features and obtain the category label of the perturbed image.

[0040] Optionally, the image classification model further includes a second feature extraction network, and the classification processing module further includes:

[0041] The second feature extraction unit is used to call the second feature extraction network to extract features from the second image features to obtain the third image features;

[0042] The model training module includes:

[0043] The second model training unit is used to train the image classification model based on the category label and the third image feature for each perturbed image.

[0044] Optionally, the number of sample images is multiple, and the second model training unit is used for:

[0045] Multiple perturbation images obtained by perturbing the same sample image are acquired, and a third difference parameter is determined among the third image features of the multiple perturbation images.

[0046] Multiple perturbation images obtained by perturbing different sample images are acquired, and a fourth difference parameter is determined among the third image features of the multiple perturbation images.

[0047] The image classification model is trained based on the third difference parameter and the fourth difference parameter, so that the third difference parameter obtained by calling the trained image classification model decreases and the fourth difference parameter increases.

[0048] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to perform the operations performed in the image clustering method as described above.

[0049] On the other hand, a computer-readable storage medium is provided that stores at least one computer program, which is loaded and executed by a processor to perform the operations performed in the image clustering method described above.

[0050] On the other hand, a computer program product or computer program is provided, the computer program product or computer program including computer program code stored in a computer-readable storage medium, a processor of a computer device reading the computer program code from the computer-readable storage medium, the processor executing the computer program code, causing the computer device to perform the operations performed in the image clustering method described above.

[0051] The methods, apparatus, computer devices, and storage media provided in this application embodiment determine the second clustering parameter after dividing each of the M image groups into two new image groups. If the largest second clustering parameter is not less than the first clustering parameter before division, it indicates that dividing the image group corresponding to the second clustering parameter into two new image groups can improve the clustering degree of the images in the image group. Therefore, dividing the image group into two new image groups results in M+1 image groups, which realizes further subdivision of the M image groups, which is beneficial to further distinguish easily confused images, thereby improving the clustering degree of image clustering. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application.

[0054] Figure 2 This is a flowchart of an image clustering method provided in an embodiment of this application.

[0055] Figure 3 This is a schematic diagram of an image classification model provided in an embodiment of this application.

[0056] Figure 4 This is a schematic diagram of another image classification model provided in an embodiment of this application.

[0057] Figure 5 This is a flowchart of an image clustering method provided in an embodiment of this application.

[0058] Figure 6 This is a schematic diagram of a first feature extraction network provided in an embodiment of this application.

[0059] Figure 7 This is a flowchart of determining clustering parameters provided in an embodiment of this application.

[0060] Figure 8 This is a flowchart of a model training method provided in an embodiment of this application.

[0061] Figure 9 This is a schematic diagram of a training image classification model provided in an embodiment of this application.

[0062] Figure 10 This is a flowchart of another image clustering method provided in the embodiments of this application.

[0063] Figure 11 This is a schematic diagram of the structure of an image clustering device provided in an embodiment of this application.

[0064] Figure 12 This is a schematic diagram of another image clustering device provided in an embodiment of this application.

[0065] Figure 13 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application.

[0066] Figure 14 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0068] It is understood that the terms "first," "second," etc., used in this application may be used to describe various concepts herein, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, a first clustering parameter may be referred to as a second clustering parameter, and similarly, a second clustering parameter may be referred to as a first clustering parameter.

[0069] "At least one" refers to one or more images. For example, at least one image can be one image, two images, three images, or any integer number of images greater than or equal to one. "Multiple" refers to two or more images. For example, multiple images can be two images, three images, or any integer number of images greater than or equal to two. "Each" refers to each of the at least one images. For example, each image refers to each of the multiple images. If the multiple images consist of three images, then each image refers to each of the three images.

[0070] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0071] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.

[0072] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learn-by-doing.

[0073] Computer vision (CV) is the science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes in recognizing and measuring targets, and then performs image processing to create images more suitable for human observation or transmission to instruments. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), autonomous driving, intelligent transportation, and common biometric recognition technologies such as facial recognition and fingerprint recognition.

[0074] The image clustering method provided in this application embodiment will be described below based on artificial intelligence technology and computer vision technology.

[0075] The image clustering method provided in this application can be used in computer devices. Optionally, the computer device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these.

[0076] In one possible implementation, the computer program involved in the embodiments of this application may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network can form a blockchain system.

[0077] In one possible implementation, the computer device in this application embodiment is a node in a blockchain system. The node can store multiple image groups obtained by clustering in the blockchain, and then the node or other nodes in the blockchain can retrieve the multiple image groups from the blockchain.

[0078] Figure 1This is a schematic diagram of an implementation environment provided in an embodiment of this application. The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network.

[0079] In one possible implementation, terminal 101 sends multiple images to server 102. Server 102 uses the method provided in the embodiments of this application to perform image clustering on the multiple images, and finally obtains multiple image groups. Then, server 102 returns the multiple image groups to terminal 101.

[0080] In another possible implementation, a target application provided by server 102 is installed on terminal 101. Terminal 101 can perform functions such as image processing or image transmission through the target application. For example, the target application is an image processing application that can perform image clustering on multiple images. Server 102 trains an image classification model and stores the trained model in the target application. Based on the target application, terminal 101 calls the image classification model to classify the multiple images, obtaining multiple image groups. Then, using the method provided in this embodiment, it continues to cluster these multiple image groups to obtain multiple image groups with higher clustering levels.

[0081] Figure 2 This is a flowchart illustrating an image clustering method provided in an embodiment of this application. The execution entity of this embodiment is a computer device; optionally, the computer device is the one described above. Figure 1 The terminal or server in the embodiments. See also Figure 2 The method includes:

[0082] 201. The computer device determines the first clustering parameter based on M image groups.

[0083] A computer device acquires M image groups, where M is an integer greater than 1, and each image group includes at least one image. Images belonging to the same image group have high similarity, while images belonging to different image groups have low similarity. Each image group can be considered as a cluster.

[0084] The computer device determines a first clustering parameter based on the M image groups. This first clustering parameter represents the degree of clustering of the images in the M image groups. In this embodiment, a larger first clustering parameter indicates a higher degree of clustering between the images, and a smaller first clustering parameter indicates a lower degree of clustering between the images. The degree of clustering reflects the degree of cohesion between images within the same image group and the degree of separation between images in different image groups. Specifically, the higher the degree of cohesion between images within the same image group and the higher the degree of separation between images in different image groups, the higher the degree of clustering among the images in the M image groups.

[0085] 202. For any target image group among M image groups, the computer device divides the target image group into two image groups to obtain M+1 reference image groups, and determines the reference clustering parameters based on the M+1 reference image groups as the second clustering parameters of the target image group.

[0086] Each of the M image groups can be used as a target image group. For any target image group among the M image groups, the computer device divides the target image group into two image groups. These two image groups, along with the M-1 image groups other than the target image group, are used as reference image groups, resulting in M+1 reference image groups. Based on these M+1 reference image groups, the computer device determines reference clustering parameters, which are then used as the second clustering parameters for the target image groups. These second clustering parameters represent the degree of clustering of the images in the M+1 reference image groups.

[0087] In this process, if the computer device performs the operation in step 202 on each of the M image groups, it can obtain the second clustering parameters of each of the M image groups, that is, obtain M second clustering parameters.

[0088] 203. If the second clustering parameter of the M image groups is not less than the first clustering parameter, the computer device divides the target image group corresponding to the largest second clustering parameter into two image groups, resulting in M+1 image groups.

[0089] Since the second clustering parameter represents the degree of clustering of images in the M+1 reference image groups, the larger the second clustering parameter, the higher the degree of clustering of images in the M+1 reference image groups. The computer device determines the largest second clustering parameter among the obtained M image groups. After dividing the target image group corresponding to the largest second clustering parameter into two image groups, the resulting M+1 reference image groups have the highest degree of clustering. In other words, if it is necessary to divide one of the M+1 image groups into two image groups, dividing the target image group corresponding to the largest second clustering parameter into two image groups will maximize the degree of clustering; this division method is the best.

[0090] The computer device compares the largest second clustering parameter with the first clustering parameter. If the largest second clustering parameter is not less than the first clustering parameter, the target image group corresponding to the largest second clustering parameter is divided into two image groups. The resulting clustering degree of these images is not less than that of the original M image groups. Therefore, the computer device divides the target image group corresponding to the largest second clustering parameter into two image groups, resulting in M+1 image groups. In another embodiment, if the largest second clustering parameter is less than the first clustering parameter, and the resulting clustering degree of these images is less than that of the original M image groups, the computer device does not further divide the image groups within the M image groups.

[0091] The method provided in this application determines the second clustering parameter after dividing each of the M image groups into two new image groups. If the largest second clustering parameter is not less than the first clustering parameter before division, it means that dividing the image group corresponding to the second clustering parameter into two new image groups can improve the clustering degree of the images in the image group. Therefore, dividing the image group into two new image groups results in M+1 image groups, which further subdivides the M image groups and helps to further distinguish easily confused images, thereby improving the clustering degree of image clustering.

[0092] In some embodiments, the M image groups are divided based on the classification results of multiple images by an image classification model. The image classification model is used to classify the images and obtain the image category labels. Figure 3 This is a schematic diagram of an image classification model provided in an embodiment of this application, such as... Figure 3 As shown, the image classification model 30 includes a first feature extraction network 301 and an image classification network 302. The first feature extraction network 301 is connected to the image classification network 302. The first feature extraction network 301 is used to extract features from the image, and the image classification network 302 is used to classify the image features.

[0093] In one possible implementation, such as Figure 4 As shown, the image classification model 30 also includes a second feature extraction network 303, which is connected to the first feature extraction network 301. The second feature extraction network 303 is used to further extract features from the image.

[0094] Figure 5 This is a flowchart illustrating an image clustering method provided in an embodiment of this application. The execution entity of this embodiment is a computer device; optionally, the computer device is the one described above. Figure 1 The terminal or server in the embodiments. See also Figure 5 The method includes:

[0095] 501. Computer equipment acquires multiple images of a target object by taking pictures.

[0096] Computer equipment acquires multiple images, which are images obtained by photographing the same target object. For example, the target object is the human body, and the multiple images are obtained by photographing different organs of the same human body; or, the target object is an organ, and the multiple images are obtained by photographing different parts of the same organ; or, the target object is a scene, and the multiple images are obtained by photographing the same scene at different points in time. Optionally, in the medical field, these multiple images are whole-slide images (WSIs), which are images obtained by scanning pathological microscopic slides with a digital pathology scanner, which consists of an optical system, a linear scanning camera, etc.

[0097] 502. The computer device calls the image classification model to classify multiple images and obtain the category label for each image.

[0098] The computer device stores an image classification model, which is used to classify images. Optionally, this image classification model is a convolutional neural network (CNN) model, the network structure of which is detailed above. Figure 3 In an embodiment, the training process of this image classification model is detailed below. Figure 8 The specific implementation will not be described here. After acquiring multiple images, the computer device calls the image classification model to classify each image and obtain a category label for each image. The category label represents the category to which the image belongs. However, this category label is a pseudo-label predicted by the image classification model, not the true category label of the image.

[0099] In one possible implementation, such as Figure 3 As shown, the image classification model includes a first feature extraction network and an image classification network, which are connected. For each of multiple images, the computer device calls the first feature extraction network to extract features from the image, obtaining first image features, and then calls the image classification network to classify the first image features to obtain the image's category label.

[0100] The first feature extraction network takes an image as input, and the image classification network takes the output of the first feature extraction network as input. Optionally, the image classification network is a neural network consisting of two fully connected layers. The first image feature output by the first feature extraction network is used to represent the features of the image; for example, the first image feature is a multi-dimensional feature vector matrix, or the first image feature is an image used to represent features, etc.

[0101] In another possible implementation, the image is a pathological slide image. The first feature extraction network includes K feature extraction layers and feature transformation layers. The feature extraction layers are used to extract image features, and the feature transformation layers are used to transform the image features. The computer device calls the K feature extraction layers to extract features from the image sequentially, obtaining the image features output by each feature extraction layer. Then, it calls the feature transformation layer to transform the image features output by the last L feature extraction layers, obtaining the first image features, where L is an integer greater than 1 and not greater than K. In this first feature extraction network, the K feature extraction layers are connected sequentially, and the feature transformation layers are connected to the last L feature extraction layers respectively.

[0102] In this process, K feature extraction layers sequentially extract image features from shallow to deep layers, arranged from front to back. Considering that the classification of pathological slide images relies more on the morphological information of cell nuclei and the texture information of their distribution, which needs to be obtained from the image features extracted by the shallow network, feature transformation is not performed only on the image features output by the last feature extraction layer, but on the image features output by the last L feature extraction layers. This ensures that the final first image feature includes not only the deep image features output by the last feature extraction layer, but also the relatively shallow image features output by the feature extraction layers before the last feature extraction layer, thereby improving the feature extraction capability of the first feature extraction network for pathological slide images.

[0103] Optionally, the feature extraction layer in the first feature extraction network is a convolutional layer, the feature transformation layer is a fully connected layer, and pooling layers are connected between the last L feature extraction layers and the feature transformation layers. These pooling layers are used to perform pooling processing on the image features extracted by the feature extraction layers. Figure 6As shown, the first feature extraction network includes convolutional layers 601-604 and a fully connected layer 605. Pooling layers are connected between the last three convolutional layers 602-604 and the fully connected layer 605. The computer device inputs a pathological slide image into the convolutional layer 601 of the first feature extraction network. The image features output by convolutional layer 601 are input into convolutional layer 602. The image features output by convolutional layer 602 are input into convolutional layer 603 and pooling layer 612, respectively. The image features output by convolutional layer 603 are input into convolutional layer 604 and pooling layer 613, respectively. The image features output by convolutional layer 604 are input into pooling layer 614. The image features output by pooling layers 612, 613, and 614 are input into the fully connected layer 605. The fully connected layer 605 performs feature transformation on the image features output by the three pooling layers to obtain the first image features.

[0104] Optionally, the convolutional layers in the first feature extraction network are composed of network structures such as residual neural networks, GoogleNet (a type of neural network), or VGGnet (Visual Geometry Group Network).

[0105] 503. Based on the category label of each image, the computer device groups images of the same category into the same image group, resulting in M ​​image groups.

[0106] After obtaining the category label for each image, the computer device can determine the category to which each image belongs based on the category label. The computer device groups images of the same category into the same image group, resulting in M ​​image groups, where M is an integer greater than 1. Each image group includes at least one image. Images belonging to the same image group belong to the same category and have high similarity; images belonging to different image groups belong to different categories and have low similarity. Steps 501-503 above are equivalent to performing image clustering on the acquired images, resulting in multiple image groups, each image group being a cluster.

[0107] Optionally, the category label of an image includes the probability that the image belongs to each category. For each image, the category corresponding to the highest probability in the category label of the image is determined as the category to which the image belongs.

[0108] It should be noted that in steps 501-503 above, the computer device first determines the category of each image using an image classification model, and then divides the multiple images into M image groups based on the category of each image. However, since the number of categories that the image classification model can determine is fixed—for example, if the probability that the category label output by the image classification model includes K categories—M must not be greater than K. This effectively limits the number of image groups obtained by clustering multiple images. Therefore, there may be cases where the clustering degree between images within the same image group is not high enough, resulting in insufficient clustering of images in the M image groups. Therefore, the computer device continues to execute steps 504-508 below to further divide the M image groups.

[0109] 504. The computer device determines the first clustering parameter based on M image groups.

[0110] The computer device determines a first clustering parameter based on the M image groups. This first clustering parameter represents the degree of clustering of the images in the M image groups. In this embodiment, a larger first clustering parameter indicates a higher degree of clustering between the images, and a smaller first clustering parameter indicates a lower degree of clustering between the images. The degree of clustering reflects the degree of cohesion between images within the same image group and the degree of separation between images in different image groups. Specifically, the higher the degree of cohesion between images within the same image group and the higher the degree of separation between images in different image groups, the higher the degree of clustering among the images in the M image groups.

[0111] In one possible implementation, the computer device determines a first clustering parameter based on the first image features of the images in each of the M image groups, such as... Figure 7 As shown, it includes the following steps:

[0112] 701. For each image in M ​​image groups, the computer device determines the cohesion parameter and separation parameter corresponding to the image based on the first image feature of the image, the first image features of other images in the image group to which the image belongs, and the first image features of images in other image groups. The cohesion parameter represents the degree of dissimilarity between the image and other images in the image group to which the image belongs, and the separation parameter represents the degree of dissimilarity between the image and images in other image groups.

[0113] The computer device determines the cohesion parameters corresponding to the image based on the first image features of the image and the first image features of other images in the image group to which the image belongs. The computer device determines the separation parameters corresponding to the image based on the first image features of the image and the first image features of images in other image groups besides the image group to which the image belongs.

[0114] Optionally, for each other image group, the computer device determines candidate separation parameters between the image and the other image group based on the first image features of the image and the first image features of the images in the other images, thereby determining the candidate separation parameters between the image and each other image group, and determining the smallest candidate separation parameter as the separation parameter corresponding to the image.

[0115] Optionally, the computer device determines the distance between the image and each other image in the image group based on the first image features of the image and the first image features of the other images in the same image group. Then, the average of the distances between the image and the other images is determined as the clustering parameter corresponding to the image. The smaller the distance between the image and other images, the higher the similarity between the image and other images in the same image group, and the smaller the clustering parameter corresponding to the image. Therefore, the smaller the clustering parameter corresponding to the image, the lower the dissimilarity between the image and other images in the image group, and the higher the degree of clustering of the image.

[0116] Optionally, the computer device determines the distance between the image and each image in the other image group based on the first image feature of the image and the first image features of each image in the other image group. Then, the average of the distances between the image and multiple images in the other image group is determined as the separation parameter corresponding to the image. The greater the distance between the image and images in the other image group, the lower the similarity between the image and images in the other image group, and the larger the separation parameter corresponding to the image. Therefore, the larger the separation parameter corresponding to the image, the higher the dissimilarity between the image and images in the other image group, and the higher the degree of image clustering. The distance between images can be cosine distance or Euclidean distance, etc., and this embodiment does not limit this.

[0117] 702. The computer equipment determines the clustering sub-parameters corresponding to the image based on the aggregation and separation parameters. The clustering sub-parameters are negatively correlated with the aggregation parameters and positively correlated with the separation parameters.

[0118] A larger agglomeration parameter results in a smaller clustering sub-parameter for the image, and vice versa. Similarly, a larger separation parameter results in a larger clustering sub-parameter for the image, and vice versa. Generally, a larger clustering sub-parameter for an image indicates a higher degree of clustering.

[0119] Optionally, the computer device uses the following formula to determine the clustering sub-parameters corresponding to the image:

[0120]

[0121] in, Represents an image. This represents the clustering sub-parameters corresponding to the image. This represents the coagulation parameter corresponding to the image. This represents the separation parameters corresponding to the image.

[0122] 703. The computer device determines the first clustering parameter based on the clustering sub-parameters corresponding to each image.

[0123] The computer device determines clustering sub-parameters corresponding to each image, and determines a first clustering parameter based on the clustering sub-parameters corresponding to each image. Optionally, the computer device determines the first clustering parameter as the mean of the clustering sub-parameters corresponding to multiple images.

[0124] Optionally, the closer the first clustering parameter is to 1, the smaller the spacing between multiple images in the same image group, and the larger the spacing between multiple images in different image groups, thus the higher the clustering degree of the images in the M image groups. Conversely, the closer the first clustering parameter is to -1, the larger the spacing between multiple images in the same image group, and the smaller the spacing between multiple images in different image groups, thus the lower the clustering degree of the images in the M image groups.

[0125] 505. For any target image group among M image groups, the computer device divides the target image group into two image groups to obtain M+1 reference image groups, and determines the reference clustering parameters based on the M+1 reference image groups as the second clustering parameters of the target image group.

[0126] Each of the M image groups can be used as a target image group. For any target image group among the M image groups, the computer device divides the target image group into two image groups. The reference clustering parameters determined based on the M+1 reference image groups are used as the second clustering parameters of the target image group. These second clustering parameters represent the degree of clustering of the images in the M+1 reference image groups. Specifically, the computer device performs the operation in step 202 on each of the M image groups, thus obtaining the second clustering parameters for each of the M image groups, i.e., obtaining M second clustering parameters.

[0127] For example, M is 3, and the M image groups are image group 1, image group 2, and image group 3. The computer device divides image group 1 into image group 11 and image group 12, and determines the second clustering parameter 'a' based on image group 11, image group 12, image group 2, and image group 3. The computer device divides image group 2 into image group 21 and image group 22, and determines the second clustering parameter 'b' based on image group 1, image group 21, image group 22, and image group 3. The computer device divides image group 3 into image group 31 and image group 32, and determines the second clustering parameter 'c' based on image group 1, image group 2, image group 31, and image group 32, thus obtaining three second clustering parameters: the second clustering parameter 'a' for image group 1, the second clustering parameter 'b' for image group 2, and the second clustering parameter 'c' for image group 3.

[0128] Optionally, the computer device may use any clustering algorithm, such as spectral clustering, k-means (an unsupervised clustering algorithm), or expectation-maximum clustering based on GMM (Gaussian Mixed Model), to divide the target image group into two new image groups.

[0129] 506. If the second clustering parameter of the M image groups is not less than the first clustering parameter, the computer device divides the target image group corresponding to the largest second clustering parameter into two image groups, resulting in M+1 image groups.

[0130] Since the second clustering parameter represents the degree of clustering of images in the M+1 reference image groups, the larger the second clustering parameter, the higher the degree of clustering of images in the M+1 reference image groups. The computer device determines the largest second clustering parameter among the obtained M image groups. After dividing the target image group corresponding to the largest second clustering parameter into two image groups, the resulting M+1 reference image groups have the highest degree of clustering. The computer device compares the largest second clustering parameter with the first clustering parameter. If the largest second clustering parameter is not less than the first clustering parameter, dividing the target image group corresponding to the largest second clustering parameter into two image groups results in a degree of clustering of images that is not less than the degree of clustering of the original M image groups. Therefore, the computer device divides the target image group corresponding to the largest second clustering parameter into two image groups, obtaining M+1 image groups.

[0131] In another embodiment, if the largest second clustering parameter is less than the first clustering parameter, after dividing the target image group corresponding to the largest second clustering parameter into two image groups, the clustering degree of the images is lower than the clustering degree of the original M image groups. In this case, the computer device will no longer divide the image groups in the M image groups, and there is no need to perform the following steps 507-508.

[0132] 507. For any target image group in the M+1 image groups, the computer device further divides the target image group into two image groups to obtain M+2 reference image groups, and determines the reference clustering parameters based on the M+2 reference image groups as the third clustering parameters of the target image group.

[0133] After obtaining M+1 image groups, the computer device further divides any target image group within these M+1 image groups into two image groups to obtain M+2 reference image groups. The reference clustering parameters determined based on the M+2 reference image groups are then used as the third clustering parameters for the target image groups. These third clustering parameters represent the clustering degree of the M+2 reference image groups. Specifically, the computer device performs the operation in step 507 on each of the M+1 image groups, thus obtaining the third clustering parameters for each of the M+1 image groups, which is equivalent to obtaining M+1 third clustering parameters.

[0134] The process of determining the third clustering parameter in step 507 is the same as the process of determining the second clustering parameter in step 505 above, and will not be described in detail here.

[0135] 508. If the largest third clustering parameter among the M+1 second image groups is not less than the largest second clustering parameter, the computer device divides the target image group corresponding to the largest third clustering parameter into two image groups, resulting in M+2 image groups, until the largest clustering parameter among the multiple clustering parameters obtained after this round of division is less than the clustering parameter before division.

[0136] The process by which the computer device obtains M+2 image groups in step 508 is the same as the process by which it obtains M+1 image groups in step 506, and will not be described in detail here.

[0137] After obtaining M+2 image groups, the computer device further divides any target image group within these M+2 groups, redetermines the clustering parameters, and then determines whether to further divide the M+2 image groups into M+3 image groups based on the magnitude of the clustering parameters. That is, the computer device performs multiple iterations; steps 505-506 and 507-508 above constitute one iteration. During this iteration, if the largest clustering parameter obtained after this division is smaller than the initial clustering parameter, it indicates that the clustering parameters obtained after dividing any current image group are all smaller than the initial clustering parameters. In other words, the clustering degree after dividing any current image group is lower than the initial clustering degree. Therefore, the computer device stops the iteration process and completes the further division of the M image groups.

[0138] For example, the initial M image groups are In each iteration, the multiple image groups before partitioning are defined as... The multiple image groups after division are defined as The number of image groups after division is defined as K. The corresponding clustering parameters are defined as follows: ,Will The corresponding clustering parameters are defined as follows: Initialize the parameters as follows: , The following iterative process is executed until the iteration termination condition is met, at which point the iteration stops:

[0139] (1) For the current M image groups, determine the result after dividing each image group into two image groups. , In M Determine the maximum value in the middle, and denote the maximum value as . Group the images Divide the images into two groups, and denote the resulting M+1 groups as the new groups. .

[0140] (2) If This indicates that the image group Dividing the images into two groups can improve the clustering accuracy. The computer device will then group the images... Divide into two image groups and update , Then proceed to the next iteration. If Then exit the iteration process and obtain the final result. As a result of image clustering.

[0141] The embodiments of this application include two processes. One is image clustering based on an image classification model. For multiple images without category labels, an end-to-end image classification model is used to process them and obtain the category label of each image, thereby performing preliminary image clustering. The other is image clustering based on clustering parameters. Based on the clustering parameters, the current multiple image groups are further divided to distinguish more compactly distributed image groups until the clustering parameters after division are less than the clustering parameters before division. Then, the division of the image groups is terminated, and the final clustering result is obtained.

[0142] The method provided in this application determines the second clustering parameter after dividing each of the M image groups into two new image groups. If the largest second clustering parameter is not less than the first clustering parameter before division, it means that dividing the image group corresponding to the second clustering parameter into two new image groups can improve the clustering degree of the images in the image group. Therefore, dividing the image group into two new image groups results in M+1 image groups, which further subdivides the M image groups and helps to further distinguish easily confused images, thereby improving the clustering degree of image clustering.

[0143] Furthermore, the image classification model is first invoked to determine the category labels of multiple images. Based on the category labels, the multiple images are divided into M image groups to achieve preliminary image clustering. Then, based on the clustering parameters, the M image groups are further subdivided to achieve more accurate image clustering. The combination of these two methods can improve both the efficiency and the degree of image clustering.

[0144] Furthermore, feature transformation is performed on the image features output by the last L feature extraction layers, so that the final first image features include not only the deep image features output by the last feature extraction layer, but also the relatively shallow image features output by the feature extraction layers before the last feature extraction layer, thereby improving the feature extraction capability of the first feature extraction network for pathological slide images.

[0145] Figure 8 This is a flowchart illustrating a model training method provided in an embodiment of this application. The image classification model trained in this embodiment can be applied to the above-mentioned... Figure 5 In the illustrated embodiment, the method is executed by a computer device; optionally, the computer device is the one described above. Figure 1 The terminal or server in the embodiments. See also Figure 8 The method includes the following steps:

[0146] 801. Computer equipment acquires sample images.

[0147] The sample images can be of any type and can be obtained in any way. For example, a computer device can acquire multiple pathological slide images of different organs from different human bodies, divide each pathological slide image into multiple image blocks of the same size, and use the resulting multiple image blocks as sample images.

[0148] In this embodiment, the sample images are images without real category labels, and the training method in this embodiment is an unsupervised learning training method based on unlabeled sample images.

[0149] 802. The computer equipment performs perturbation processing on the sample images in different ways to obtain multiple perturbation images.

[0150] The computer equipment uses perturbation processing to enhance the randomness of the sample images. The computer equipment applies different perturbation methods to the sample images, resulting in multiple different perturbed images.

[0151] The different perturbation processing methods include different perturbation types, such as color jitter, Gaussian blur, rotation, and cropping a portion of the image and then enlarging it to its original size. Each perturbation processing step can include only one perturbation type or multiple perturbation types. Optionally, when perturbing the sample image each time, multiple perturbation types are traversed. For the currently traversed perturbation type, the computer device determines whether to select that perturbation type based on its probability of occurrence. If selected, perturbation processing is performed according to that type, and the process continues to traverse the next perturbation type. If not selected, perturbation processing is not performed according to that type, and the process directly traverses the next perturbation type until the last perturbation type is traversed. This process combines multiple perturbation types to perform one perturbation processing step on the sample image, resulting in a perturbed image. The computer device then follows the same steps to perform another perturbation processing step on the sample image, resulting in another perturbed image. Optionally, the probability of occurrence for each perturbation type can be set to 0.5 to enhance the randomness of the perturbed image.

[0152] Taking the example of performing two perturbations on two sample images respectively, the computer selects multiple perturbation types according to the probability of each perturbation method, and then perturbs the two sample images according to the selected perturbation types, resulting in two perturbation images. Then, the computer selects multiple perturbation types again according to the probability of each perturbation method, and perturbs the two sample images again according to the selected perturbation types, resulting in two more perturbation images. Therefore, the computer ultimately obtains four perturbation images.

[0153] 803. The computer device calls the image classification model to classify each perturbed image and obtain the category label for each perturbed image.

[0154] In one possible implementation, the image classification model includes a first feature extraction network and an image classification network. For each perturbed image, the computer device invokes the first feature extraction network to extract features from the perturbed image, obtaining second image features. Then, it invokes the image classification network to classify the second image features, obtaining a category label for the perturbed image. This category label is a pseudo-label predicted by the image classification model, rather than the true category label of the perturbed image.

[0155] In another possible implementation, such as Figure 4 As shown, the image classification model also includes a second feature extraction network. After obtaining the second image features, the computer device will call the second feature extraction network to extract features from the second image features, thereby obtaining the third image features.

[0156] In this embodiment, the second feature extraction network is connected to the first feature extraction network. Both networks are used to extract image features, but the difference lies in that the first network extracts image features, while the second network extracts features of image features. Compared to the first image features extracted by the first network, the second image features extracted by the second network are deeper-level features. In this embodiment, the third image feature is used to train the image classification model. The process of training the image classification model using the third image feature is detailed in step 804 below and will not be described further here.

[0157] The process of obtaining the second image features and the category label of the perturbed image in step 803 is the same as the process of obtaining the first image features and the category label of the image in step 502 above, and will not be described in detail here.

[0158] 804. The computer equipment trains an image classification model based on the category label of each perturbed image.

[0159] After obtaining the category label for each perturbed image, the computer device trains an image classification model based on these labels to improve its classification ability. Once trained, the image classification model can classify any given image to obtain its category label. Optionally, the category label includes the probability that the image belongs to each category; the category corresponding to the highest probability in the category label is the category to which the image belongs.

[0160] In one possible implementation, there are multiple sample images, and the category label of the perturbation image includes the probability that the perturbation image belongs to each category. A computer device acquires multiple perturbation images obtained by perturbing the same sample image, determines a first difference parameter between the probabilities that the acquired multiple perturbation images belong to the same category, acquires multiple perturbation images obtained by perturbing different sample images, determines a second difference parameter between the probabilities that the acquired multiple perturbation images belong to the same category, and trains an image classification model based on the first and second difference parameters, such that the first difference parameter decreases and the second difference parameter increases when the trained image classification model is called.

[0161] For multiple perturbated images obtained by perturbing the same sample image, these multiple perturbated images originate from the same sample image, and the category to which the multiple perturbated images belong is the same as the category to which the sample image belongs. Therefore, the multiple images belong to the same category. The category label of the perturbated images is predicted by the image classification model. If the accuracy of the image classification model is high enough, then for each category, the probabilities of the multiple perturbated images belonging to that category should be sufficiently close. Therefore, the computer device determines a first difference parameter between the probabilities of the multiple perturbated images belonging to the same category. The smaller the first difference parameter, the closer the probabilities of the multiple perturbated images belonging to the same category, and the more accurate the image classification model. Therefore, the computer device trains the image classification model based on the first difference parameter to reduce the first difference parameter, thereby improving the classification ability of the image classification model.

[0162] For multiple perturbated images obtained by perturbing different sample images, these multiple perturbated images originate from different sample images, and while the categories of the multiple perturbated images are the same as those of the different sample images, they belong to different categories. The category labels of the perturbated images are predicted by the image classification model. If the accuracy of the image classification model is high enough, then for each category, the difference in the probability of the multiple perturbated images belonging to that category should be sufficiently large. Therefore, the computer device determines a second difference parameter between the probabilities of the multiple perturbated images belonging to the same category. The larger the second difference parameter, the greater the difference in the probabilities of the multiple perturbated images belonging to the same category, and the more accurate the image classification model. Therefore, the computer device trains the image classification model based on the second difference parameter to increase the second difference parameter, thereby improving the classification ability of the image classification model.

[0163] In another possible implementation, the image classification model further includes a second feature extraction network. In step 803 above, after the computer device acquires the second image features, it also invokes the second feature extraction network to extract features from the second image features, obtaining third image features. Then, the computer device trains the image classification model based on the category label of each perturbed image and the third image features.

[0164] Optionally, if there are multiple sample images, the process of training an image classification model based on the third image feature of each perturbed image includes: acquiring multiple perturbed images obtained by perturbing the same sample image using a computer device; determining a third difference parameter among the third image features of the acquired multiple perturbed images; acquiring multiple perturbed images obtained by perturbing different sample images; determining a fourth difference parameter among the third image features of the acquired multiple perturbed images; and training an image classification model based on the third difference parameter and the fourth difference parameter, so that the third difference parameter obtained by calling the trained image classification model decreases and the fourth difference parameter increases.

[0165] For multiple perturbated images obtained by perturbing the same sample image, these multiple perturbated images originate from the same sample image, and their image features are similar to those of the sample image. Therefore, the image features of these multiple images are also similar. If the accuracy of the image classification model is high enough, the image features extracted by the image classification model for each perturbated image should be sufficiently similar. Therefore, the computer device determines a third difference parameter among the third image features of these multiple perturbated images. The smaller this third difference parameter, the closer the third image features of the multiple perturbated images are, and the more accurate the image classification model is. Therefore, the computer device trains the image classification model based on this third difference parameter to reduce the third difference parameter, thereby improving the classification ability of the image classification model.

[0166] For multiple perturbated images obtained by perturbing different sample images, these multiple perturbated images originate from different sample images. While the image features of these multiple perturbated images are similar to the image features of the different sample images, their image features are dissimilar. If the accuracy of the image classification model is high enough, the difference in image features extracted by the model for each perturbated image should be sufficiently large. Therefore, the computer device determines a fourth difference parameter among the third image features of these multiple perturbated images. The larger this fourth difference parameter is, the greater the difference between the third image features of the multiple perturbated images, and the more accurate the image classification model will be. Therefore, the computer device trains the image classification model based on this fourth difference parameter to increase it, thereby improving the classification ability of the image classification model.

[0167] Optionally, the computer device determines a first loss value based on a first difference parameter and a second difference parameter, determines a second loss value based on a third difference parameter and a fourth difference parameter, and performs a weighted sum of the first loss value and the second loss value to obtain a target loss value. Based on the target loss value, the computer device trains an image classification model to reduce the target loss value obtained by calling the trained image classification model.

[0168] Specifically, the first loss value is positively correlated with the first difference parameter and negatively correlated with the second difference parameter. That is, the larger the first difference parameter, the larger the first loss value; the smaller the first difference parameter, the smaller the first loss value; and vice versa. Similarly, the second loss value is positively correlated with the third difference parameter and negatively correlated with the fourth difference parameter. Optionally, the weighting coefficients for both the first and second loss values ​​are 0.5.

[0169] In this embodiment, the feature extraction capability and the ability to distinguish between different categories of images are improved by comparing and learning perturbed images from the same sample image and perturbed images from different sample images. This comparative learning approach enables unsupervised training of the image classification model, eliminating the need for manual annotation of sample images, thus saving manpower and time, and avoiding incorrect labels caused by manual annotation. Therefore, it improves the training efficiency and accuracy of the image classification model.

[0170] In one possible implementation, since the image classification model training process in this embodiment is unsupervised training, there are no real sample category labels during training. The image classification model can only determine the probability that an image belongs to each category, but cannot determine the true meaning of each category. Optionally, the computer device does not need to determine the true meaning of each category; it only needs to use the image classification model to classify multiple images into different categories. Optionally, after the computer device uses the image classification model to classify multiple images into different categories, the true meaning of each category is determined manually based on the classification results. For example, in the medical field, the image classification model can classify pathological slide images into 7 categories, each category representing a physiological tissue type. Doctors determine which physiological tissue type each category represents based on the classification results.

[0171] It should be noted that steps 801-804 above are only illustrated using a single iteration process as an example. Multiple iterations are required during the training of the image processing model. In one possible implementation, the computer device stops training the image classification model in response to the iteration reaching a first threshold; or, in response to the loss value obtained in the current iteration not being greater than a second threshold, it stops training the image classification model. Here, the first and second thresholds are arbitrary values, for example, the first threshold is 10 or 15, and the second threshold is 0.01 or 0.02, etc.

[0172] In this embodiment of the application, training the image classification model includes the following:

[0173] (1) Required data: unlabeled sample image set, total number of iterations E for model training, number of sample images N processed in each iteration, randomness enhancement strategy, and weight coefficients of the loss value. and The number of categories M and the image classification model, which includes a first feature extraction network. Second feature extraction network Image classification networks ,in These are the network parameters. The total number of iterations E and the number of sample images N are both integers, for example, E is greater than 100 and N is greater than 128.

[0174] (2) Network structure: First feature extraction network It is a neural network with an input of 224. 224 3D sample image, output is 512 1-dimensional image features. Second feature extraction network. Image classification networks The image features are then further projected into different spaces for comparative learning optimization of features and comparative learning optimization of categories, respectively. The second feature extraction network... The input is 512 1D image features, output is 128 1D image features, image classification network The input is 512 1D image features, output as M One-dimensional category labels. Second feature extraction network. It is a neural network consisting of two fully connected layers, with an input of 512. 1D, with 512 intermediate layers 1D, output is 128 1D. Image classification network It is a neural network consisting of two fully connected layers, with an input of 512. 1D, with 512 intermediate layers 1-dimensional, output is M 1-dimensional.

[0175] (3) Training process: Figure 9 This is a schematic diagram of a training image classification model provided in an embodiment of this application, such as... Figure 9As shown, during one iteration of training, sample image a and sample image b are obtained from the sample image set. Different methods are used to perturb sample image a and sample image b, resulting in perturbed images a', b', a'', and b'''. The first feature extraction network 901 is invoked to extract features from each perturbed image, obtaining 512-dimensional image features for each perturbed image. The second feature extraction network 902 is then invoked to extract features from the 512-dimensional image features, obtaining 128-dimensional image features. Finally, the image classification network 903 is invoked to classify the 512-dimensional image features, obtaining M-dimensional category labels. The computer device performs comparative learning optimization of the feature dimensions based on the image features output by the second feature extraction network 902, and comparative learning optimization of the category dimensions based on the category labels output by the image classification network 903.

[0176] The method provided in this application improves the feature extraction capability and the ability to distinguish between different categories of images by comparing and learning perturbed images from the same sample image and perturbed images from different sample images. The comparative learning approach enables unsupervised training of the image classification model, eliminating the need for manual annotation of sample images, thus saving manpower and time, and avoiding incorrect labels caused by manual annotation. Therefore, it improves the training efficiency and accuracy of the image classification model.

[0177] The above embodiments can be applied to any scenario requiring image clustering to perform image clustering on images of any type. For example, in the medical field, multiple pathological slide images of a patient can be clustered according to the type of physiological tissue. Figure 10 This is a flowchart of an image clustering method provided in an embodiment of this application. See also... Figure 10 The method includes:

[0178] 1001. The patient's pathological microscopic sections are scanned into digital images using a digital pathology scanner to obtain pathological section images.

[0179] 1002. Divide the pathological slide images into multiple pathological slide image blocks to construct an unlabeled dataset.

[0180] 1003. Call the image classification model to classify each pathological slide image block, obtain the image features and category label of each image block, and divide multiple pathological slide image blocks into M images based on the category label.

[0181] 1004. After obtaining M image groups, based on the clustering parameters, the M image groups are further subdivided into N image groups.

[0182] This application's embodiments can perform image clustering on unlabeled pathological slide image blocks, dividing multiple pathological slide image blocks into multiple image groups, each image group representing a physiological tissue, thereby providing support for subsequent pathological analysis tasks. For example, pathological analysis tasks include: predicting anomalies or handling prognoses based on the proportion of physiological tissues; determining whether a tissue is abnormal by comparing a certain tissue image group with a normal tissue image group, etc., with each image group corresponding to a physiological tissue.

[0183] Besides clustering pathological slide images according to the type of physiological tissue, other criteria can also be used. For example, images can be clustered according to quality categories, such as uneven staining, section thickness, vibratory scalpel damage, or section wrinkling. Alternatively, images can be clustered according to cell types, such as suspicious cells and normal cells.

[0184] Figure 11 This is a schematic diagram of the structure of an image clustering device provided in an embodiment of this application. See also... Figure 11 The device includes:

[0185] The first parameter determination module 1101 is used to determine the first clustering parameter based on M image groups. The first clustering parameter represents the degree of clustering of images in the M image groups, where M is an integer greater than 1.

[0186] The second parameter determination module 1102 is used to divide any target image group in the M image groups into two image groups to obtain M+1 reference image groups, and to determine the reference clustering parameters determined based on the M+1 reference image groups as the second clustering parameters of the target image groups. The second clustering parameters represent the degree of clustering of the images in the M+1 reference image groups.

[0187] The image group segmentation module 1103 is used to divide the target image group corresponding to the largest second clustering parameter into two image groups, so as to obtain M+1 image groups, provided that the largest second clustering parameter among the M image groups is not less than the first clustering parameter.

[0188] The image clustering apparatus provided in this application determines the second clustering parameter after dividing each of the M image groups into two new image groups. If the largest second clustering parameter is not less than the first clustering parameter before division, it means that dividing the image group corresponding to the second clustering parameter into two new image groups can improve the clustering degree of the images in the image group. Therefore, dividing the image group into two new image groups results in M+1 image groups, which realizes the further subdivision of the M image groups, which is beneficial to further distinguish easily confused images, thereby improving the clustering degree of image clustering.

[0189] Optionally, see Figure 12 The second parameter determination module 1102 is further configured to, for any target image group in the M+1 image groups, further divide the target image group into two image groups to obtain M+2 reference image groups, and determine the reference clustering parameter determined based on the M+2 reference image groups as the third clustering parameter of the target image group, wherein the third clustering parameter represents the clustering degree of the M+2 reference image groups.

[0190] The image group segmentation module 1103 is further used to divide the target image group corresponding to the largest third clustering parameter into two image groups, obtaining M+2 image groups, when the largest third clustering parameter among the M+1 second image groups is not less than the largest second clustering parameter, until the largest clustering parameter among the multiple clustering parameters obtained after this round of segmentation is less than the clustering parameter before segmentation.

[0191] Optionally, see Figure 12 The device also includes:

[0192] Image acquisition module 1104 is used to acquire multiple images obtained by taking pictures of the target object;

[0193] The classification processing module 1105 is used to call the image classification model to classify multiple images and obtain the category label for each image.

[0194] The image segmentation module 1106 is used to group images of the same category into the same image group based on the category label of each image, resulting in M ​​image groups.

[0195] Optionally, see Figure 12 The image classification model includes a first feature extraction network and an image classification network. The classification processing module 1105 includes:

[0196] The first feature extraction unit 1115 is used to call the first feature extraction network for each of the multiple images to extract features from the image and obtain the first image features;

[0197] The classification processing unit 1125 is used to call the image classification network to classify the first image features and obtain the image category label.

[0198] Optionally, see Figure 12 The first parameter determination module 1101 includes:

[0199] The first parameter determination unit 1111 is used to determine the cohesion parameter and separation parameter corresponding to each image in the M image groups based on the first image features of the image, the first image features of other images in the image group to which the image belongs, and the first image features of images in other image groups. The cohesion parameter represents the degree of dissimilarity between the image and other images in the image group to which the image belongs, and the separation parameter represents the degree of dissimilarity between the image and images in other image groups.

[0200] The second parameter determination unit 1121 is used to determine the clustering sub-parameters corresponding to the image based on the agglomeration parameter and the separation parameter. The clustering sub-parameters are negatively correlated with the agglomeration parameter and positively correlated with the separation parameter.

[0201] The third parameter determination unit 1131 is used to determine the first clustering parameter based on the clustering sub-parameters corresponding to each image.

[0202] Optionally, see Figure 12 The image is a pathological slide image. The first feature extraction network includes K feature extraction layers and feature transformation layers. The first feature extraction unit 1115 is used for:

[0203] K feature extraction layers are invoked to extract features from the image sequentially, and the image features output by each feature extraction layer are obtained.

[0204] The feature transformation layer is invoked to transform the image features output by the last L feature extraction layers to obtain the first image feature, where L is an integer greater than 1 and not greater than K.

[0205] Optionally, see Figure 12 The device also includes:

[0206] Sample image acquisition module 1107 is used to acquire sample images;

[0207] The perturbation processing module 1108 is used to perturb the sample images in different ways to obtain multiple perturbation images;

[0208] The classification processing module 1105 is also used to call the image classification model to classify each perturbed image and obtain the category label of each perturbed image.

[0209] Model training module 1109 is used to train an image classification model based on the category label of each perturbation image.

[0210] Optionally, see Figure 12 The number of sample images is multiple, and the category label of the perturbation image includes the probability that the perturbation image belongs to each category. The model training module 1109 includes:

[0211] The first difference parameter determination unit 1119 is used to acquire multiple perturbation images obtained by perturbation processing of the same sample image, and to determine the first difference parameter between the probabilities of the multiple perturbation images belonging to the same category.

[0212] The second difference parameter determination unit 1129 is used to acquire multiple perturbation images obtained by perturbation processing of different sample images, and to determine the second difference parameter between the probabilities of the multiple perturbation images belonging to the same category.

[0213] The first model training unit 1139 is used to train an image classification model based on a first difference parameter and a second difference parameter, so that the first difference parameter obtained by calling the trained image classification model decreases and the second difference parameter increases.

[0214] Optionally, see Figure 12 The image classification model includes a first feature extraction network and an image classification network. The classification processing module 1105 includes:

[0215] The first feature extraction unit 1115 is used to call the first feature extraction network for each perturbed image to extract features from the perturbed image and obtain the second image features;

[0216] The classification processing unit 1125 is used to call the image classification network to classify the second image features and obtain the category label of the perturbed image.

[0217] Optionally, see Figure 12 The image classification model also includes a second feature extraction network and a classification processing module 1105, which further includes:

[0218] The second feature extraction unit 1135 is used to call the second feature extraction network to extract features from the second image features and obtain the third image features.

[0219] Model training module 1109 includes:

[0220] The second model training unit 1149 is used to train an image classification model based on the category label of each perturbed image and the third image features.

[0221] Optionally, see Figure 12 The number of sample images is multiple, and the second model training unit is 1149, used for:

[0222] Multiple perturbation images obtained by perturbing the same sample image are acquired, and a third difference parameter is determined among the third image features of the multiple perturbation images.

[0223] Multiple perturbation images obtained by perturbing different sample images are acquired, and a fourth difference parameter is determined among the third image features of the multiple perturbation images.

[0224] Based on the third and fourth difference parameters, an image classification model is trained so that the third difference parameter decreases and the fourth difference parameter increases when the trained image classification model is called.

[0225] It should be noted that the image clustering device provided in the above embodiments is only illustrated by the division of the above functional modules when performing image clustering. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the image clustering device and the image clustering method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0226] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one computer program, which is loaded and executed by the processor to perform the operations performed in the image clustering method of the above embodiments.

[0227] Optionally, the computer device is provided as a terminal. Figure 13 A schematic diagram of the structure of a terminal 1300 provided in an exemplary embodiment of this application is shown.

[0228] Terminal 1300 includes a processor 1301 and a memory 1302.

[0229] Processor 1301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1301 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1301 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1301 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0230] Memory 1302 may include one or more computer-readable storage media, which may be non-transitory. Memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 1302 are used to store at least one computer program, which is used by processor 1301 to implement the image clustering method provided in the method embodiments of this application.

[0231] In some embodiments, the terminal 1300 may also optionally include: a peripheral device interface 1303 and at least one peripheral device. The processor 1301, memory 1302, and peripheral device interface 1303 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1303 via a bus, signal line, or circuit board. Optionally, the peripheral device includes at least one of: a radio frequency circuit 1304, a display screen 1305, a camera assembly 1306, an audio circuit 1307, and a power supply 1309.

[0232] Peripheral interface 1303 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1301 and memory 1302. In some embodiments, processor 1301, memory 1302 and peripheral interface 1303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1301, memory 1302 and peripheral interface 1303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0233] The radio frequency (RF) circuit 1304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1304 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1304 can communicate with other devices through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1304 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0234] Display screen 1305 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1305 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1301 for processing. In this case, display screen 1305 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, display screen 1305 may be a single screen, disposed on the front panel of terminal 1300; in other embodiments, display screen 1305 may be at least two screens, disposed on different surfaces of terminal 1300 or in a folded design; in still other embodiments, display screen 1305 may be a flexible display screen, disposed on a curved or folded surface of terminal 1300. Furthermore, display screen 1305 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1305 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0235] The camera assembly 1306 is used to acquire images or videos. Optionally, the camera assembly 1306 includes a front-facing camera and a rear-facing camera. The front-facing camera is disposed on the front panel of the terminal 1300, and the rear-facing camera is disposed on the back of the terminal 1300. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1306 may also include a flash. The flash may be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.

[0236] The audio circuit 1307 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1301 for processing, or input to the radio frequency circuit 1304 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the terminal 1300. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1301 or the radio frequency circuit 1304 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1307 may also include a headphone jack.

[0237] Power supply 1309 is used to power the various components in terminal 1300. Power supply 1309 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1309 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0238] In some embodiments, the terminal 1300 further includes one or more sensors 1310. The one or more sensors 1310 include, but are not limited to: an acceleration sensor 1311, a gyroscope sensor 1312, a pressure sensor 1313, an optical sensor 1315, and a proximity sensor 1316.

[0239] Accelerometer 1311 can detect the magnitude of acceleration along the three axes of a coordinate system established by terminal 1300. For example, accelerometer 1311 can be used to detect the components of gravitational acceleration along the three axes. Processor 1301 can control display screen 1305 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1311. Accelerometer 1311 can also be used for games or for acquiring user motion data.

[0240] The gyroscope sensor 1312 can detect the orientation and rotation angle of the terminal 1300. The gyroscope sensor 1312, in conjunction with the accelerometer sensor 1311, can collect 3D motion data from the user on the terminal 1300. Based on the data collected by the gyroscope sensor 1312, the processor 1301 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0241] The pressure sensor 1313 can be disposed on the side bezel of the terminal 1300 and / or on the lower layer of the display screen 1305. When the pressure sensor 1313 is disposed on the side bezel of the terminal 1300, it can detect the user's grip signal on the terminal 1300, and the processor 1301 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1313. When the pressure sensor 1313 is disposed on the lower layer of the display screen 1305, the processor 1301 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 1305. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0242] An optical sensor 1315 is used to collect ambient light intensity. In one embodiment, the processor 1301 can control the display brightness of the display screen 1305 based on the ambient light intensity collected by the optical sensor 1315. Optionally, when the ambient light intensity is high, the display brightness of the display screen 1305 is increased; when the ambient light intensity is low, the display brightness of the display screen 1305 is decreased. In another embodiment, the processor 1301 can also dynamically adjust the shooting parameters of the camera assembly 1306 based on the ambient light intensity collected by the optical sensor 1315.

[0243] The proximity sensor 1316, also known as a distance sensor, is installed on the front panel of the terminal 1300. The proximity sensor 1316 is used to detect the distance between the user and the front of the terminal 1300. In one embodiment, when the proximity sensor 1316 detects that the distance between the user and the front of the terminal 1300 is gradually decreasing, the processor 1301 controls the display screen 1305 to switch from a screen-on state to a screen-off state; when the proximity sensor 1316 detects that the distance between the user and the front of the terminal 1300 is gradually increasing, the processor 1301 controls the display screen 1305 to switch from a screen-off state to a screen-on state.

[0244] Those skilled in the art will understand that Figure 13 The structure shown does not constitute a limitation on terminal 1300 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0245] Optionally, the computer device is provided as a server. Figure 14This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1400 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 1401 and one or more memories 1402. The memories 1402 store at least one computer program, which is loaded and executed by the processor 1401 to implement the methods provided in the various method embodiments described above. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated upon here.

[0246] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the operations performed in the image clustering method of the above embodiments.

[0247] This application also provides a computer program product or computer program, which includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the operations performed in the image clustering method of the above embodiments. In some embodiments, the computer program involved in this application can be deployed and executed on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed across multiple locations and interconnected via a communication network. These multiple computer devices distributed across multiple locations and interconnected via a communication network can constitute a blockchain system.

[0248] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0249] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the protection scope of the present application.

Claims

1. An image clustering method, characterized in that, The method includes: Acquire multiple images of the target object; call an image classification model to classify the multiple images respectively to obtain the category label of each image; based on the category label of each image, group the images of the same category into the same image group to obtain M image groups; Based on the M image groups, a first clustering parameter is determined, where the first clustering parameter represents the degree of clustering of the images in the M image groups, and M is an integer greater than 1; For any target image group among the M image groups, the target image group is divided into two image groups to obtain M+1 reference image groups. The reference clustering parameters determined based on the M+1 reference image groups are determined as the second clustering parameters of the target image group. The second clustering parameters represent the degree of clustering of the images in the M+1 reference image groups. If the largest second clustering parameter among the M image groups is not less than the first clustering parameter, the target image group corresponding to the largest second clustering parameter is divided into two image groups, resulting in M+1 image groups.

2. The method according to claim 1, characterized in that, After dividing the target image group corresponding to the largest second clustering parameter into two image groups to obtain M+1 image groups, the method further includes: For any target image group in the M+1 image groups, the target image group is further divided into two image groups to obtain M+2 reference image groups. The reference clustering parameters determined based on the M+2 reference image groups are determined as the third clustering parameters of the target image groups. The third clustering parameters represent the clustering degree of the M+2 reference image groups. If the largest third clustering parameter among the M+1 second image groups is not less than the largest second clustering parameter, the target image group corresponding to the largest third clustering parameter is divided into two image groups, resulting in M+2 image groups, until the largest clustering parameter among the multiple clustering parameters obtained after this round of division is less than the clustering parameter before division.

3. The method according to claim 1, characterized in that, The image classification model includes a first feature extraction network and an image classification network. The image classification model is invoked to classify the multiple images to obtain a category label for each image, including: For each of the plurality of images, the first feature extraction network is invoked to extract features from the image to obtain the first image features; The image classification network is invoked to classify the first image features and obtain the category label of the image.

4. The method according to claim 3, characterized in that, The determination of the first clustering parameter based on the M image groups includes: For each image in the M image groups, based on the first image features of the image, the first image features of other images in the image group to which the image belongs, and the first image features of images in other image groups, a cohesion parameter and a separation parameter corresponding to the image are determined. The cohesion parameter represents the degree of dissimilarity between the image and other images in the image group to which the image belongs, and the separation parameter represents the degree of dissimilarity between the image and images in other image groups. Based on the agglomeration parameter and the separation parameter, the clustering sub-parameters corresponding to the image are determined. The clustering sub-parameters are negatively correlated with the agglomeration parameter and positively correlated with the separation parameter. The first clustering parameter is determined based on the clustering sub-parameters corresponding to each image.

5. The method according to claim 3, characterized in that, The image is a pathological slide image. The first feature extraction network includes K feature extraction layers and a feature transformation layer. Calling the first feature extraction network to extract features from the image to obtain first image features includes: The K feature extraction layers are invoked to sequentially extract features from the image, resulting in the image features output by each feature extraction layer. The feature transformation layer is invoked to perform feature transformation on the image features output by the last L feature extraction layers to obtain the first image feature, where L is an integer greater than 1 and not greater than K.

6. The method according to claim 1, characterized in that, The training process of the image classification model includes: Acquire sample images; The sample images were perturbed in different ways to obtain multiple perturbed images; The image classification model is invoked to classify each perturbation image and obtain the category label for each perturbation image. The image classification model is trained based on the category label of each perturbed image.

7. The method according to claim 6, characterized in that, The number of sample images is multiple, and the category label of each perturbed image includes the probability that the perturbed image belongs to each category. Training the image classification model based on the category label of each perturbed image includes: Multiple perturbation images obtained by perturbing the same sample image are acquired, and a first difference parameter is determined between the probabilities that the multiple perturbation images belong to the same category. Multiple perturbation images obtained by perturbing different sample images are acquired, and a second difference parameter is determined between the probabilities that the multiple perturbation images belong to the same category. Based on the first difference parameter and the second difference parameter, the image classification model is trained so that the first difference parameter obtained by calling the trained image classification model decreases and the second difference parameter increases.

8. The method according to claim 6, characterized in that, The image classification model includes a first feature extraction network and an image classification network. The image classification model is invoked to classify each perturbed image, obtaining a category label for each perturbed image, including: For each perturbed image, the first feature extraction network is invoked to extract features from the perturbed image to obtain the second image features; The image classification network is invoked to classify the second image features, thereby obtaining the category label of the perturbed image.

9. The method according to claim 8, characterized in that, The image classification model further includes a second feature extraction network, and the method further includes: The second feature extraction network is invoked to extract features from the second image features, thereby obtaining the third image features; The process of training the image classification model based on the category label of each perturbed image includes: The image classification model is trained based on the category label and the third image feature for each perturbed image.

10. The method according to claim 9, characterized in that, The number of sample images is multiple. The process of training the image classification model based on the third image features of each perturbed image includes: Multiple perturbation images obtained by perturbing the same sample image are acquired, and a third difference parameter is determined among the third image features of the multiple perturbation images. Multiple perturbation images obtained by perturbing different sample images are acquired, and a fourth difference parameter is determined among the third image features of the multiple perturbation images. The image classification model is trained based on the third difference parameter and the fourth difference parameter, so that the third difference parameter obtained by calling the trained image classification model decreases and the fourth difference parameter increases.

11. An image clustering device, characterized in that, The device includes: The image acquisition module is used to acquire multiple images of the target object. The classification processing module is used to call the image classification model to classify the multiple images respectively and obtain the category label of each image; The image segmentation module is used to group images of the same category into the same image group based on the category label of each image, resulting in M ​​image groups; The first parameter determination module is used to determine a first clustering parameter based on the M image groups, wherein the first clustering parameter represents the degree of clustering of the images in the M image groups, and M is an integer greater than 1; The second parameter determination module is used to divide any target image group in the M image groups into two image groups to obtain M+1 reference image groups, and to determine the reference clustering parameters determined based on the M+1 reference image groups as the second clustering parameters of the target image groups. The second clustering parameters represent the degree of clustering of the images in the M+1 reference image groups. The image group segmentation module is used to divide the target image group corresponding to the largest second clustering parameter into two image groups, resulting in M+1 image groups, provided that the largest second clustering parameter among the M image groups is not less than the first clustering parameter.

12. The apparatus according to claim 11, characterized in that, The second parameter determination module is further configured to, for any target image group in the M+1 image groups, further divide the target image group into two image groups to obtain M+2 reference image groups, and determine the reference clustering parameter determined based on the M+2 reference image groups as the third clustering parameter of the target image group, wherein the third clustering parameter represents the clustering degree of the M+2 reference image groups; The image group division module is further configured to divide the target image group corresponding to the largest third clustering parameter into two image groups, obtaining M+2 image groups, when the largest third clustering parameter among the M+1 second image groups is not less than the largest second clustering parameter, until the largest clustering parameter among the multiple clustering parameters obtained after this round of division is less than the clustering parameter before division.

13. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to perform the operations performed in the image clustering method as described in any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to perform the operations performed in the image clustering method as described in any one of claims 1 to 10.

15. A computer program product, characterized in that, The computer program product includes computer program code stored in a computer-readable storage medium, a processor of a computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code to cause the computer device to perform the operations performed in the image clustering method as described in any one of claims 1 to 10.