CN-116386107-B - Image clustering method, image clustering device and computer storage medium
Abstract
The application discloses an image clustering method, an image clustering device and a computer storage medium, wherein the image clustering method comprises the steps of obtaining the human image similarity of a first snap-shot large image and a second snap-shot large image; and when the human image similarity is greater than or equal to the large image similarity threshold, image clustering the human face snap shots of which the human face similarity is greater than or equal to the first human face clustering threshold and the human body snap shots of which the human body similarity is greater than or equal to the first human body clustering threshold, and when the human image similarity is greater than or equal to the large image similarity threshold, image clustering the human face snap shots of which the human face similarity is greater than or equal to the second human face clustering threshold and the human body snap shots of which the human body similarity is greater than or equal to the second human body clustering threshold. The image clustering method can adjust the similarity of the small images of the human face and the human body through the similarity of the large images of the snap shots, and improves the recall rate of image clustering.
Inventors
- WANG KAIYAO
- CHEN LILI
- ZHOU MINGWEI
Assignees
- 浙江大华技术股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230313
Claims (10)
- 1. An image clustering method, characterized in that the image clustering method comprises: Acquiring a first snapshot large image and a second snapshot large image; Acquiring a plurality of first face snap shots and a plurality of first human body snap shots based on the first snap shots; Acquiring a plurality of second face snap shots and a plurality of second human body snap shots based on the second snap shots; Acquiring the human face similarity of each group of human face snapshot small image pairs and acquiring the human body similarity of each group of human body snapshot small image pairs, wherein each group of human face snapshot small image pairs comprises any one first human face snapshot small image and any one second human face snapshot small image, and each group of human body snapshot small image pairs comprises any one first human body snapshot small image and any one second human body snapshot small image; acquiring the human image similarity of the first snapshot large image and the second snapshot large image based on the human face similarity of all the group of human face snapshot small image pairs and the human body similarity of all the group of human body snapshot small image pairs; When the human image similarity is smaller than a large image similarity threshold, image clustering is carried out on the human face snap shots of the human face snap shot pairs, the human face similarity of which is larger than or equal to a first human face clustering threshold, and the human body snap shots of which the human body similarity is larger than or equal to a first human body clustering threshold; when the human image similarity is larger than or equal to a large image similarity threshold, image clustering is carried out on the human face snap shots of the human face snap shot small image pairs, of which the human face similarity is larger than or equal to a second human face clustering threshold, and the human body snap shots of the human body snap shot small image pairs, of which the human body similarity is larger than or equal to a second human body clustering threshold; The first human face clustering threshold is larger than the second human face clustering threshold, and the first human body clustering threshold is larger than the second human body clustering threshold.
- 2. The method of image clustering according to claim 1, wherein, The human face similarity based on all groups of human face snap shot small image pairs and the human body similarity of all groups of human body snap shot small image pairs, the human image similarity of the first snap shot large image and the second snap shot large image is obtained, and the method comprises the following steps: when the face similarity of the face snap small image pair is larger than or equal to the first face clustering threshold, taking the ratio of the face similarity to the first face clustering threshold as the face similarity of the face snap small image pair and the associated human snap small image pair; when the face similarity of the face snap plot pair is smaller than the first face clustering threshold and larger than or equal to the second face clustering threshold, taking the weighted sum of the ratio of the face similarity to the first face clustering threshold and the ratio of the human similarity of the face snap plot pair and the first human clustering threshold as the human similarity of the face snap plot pair; When the human face similarity of the human face snapshot small image pair is smaller than the second human face clustering threshold value, cancelling human image similarity calculation of the human face snapshot small image and the human body snapshot small image related to the human face snapshot small image; And taking the sum of the human image similarity of all the human face snap shot small image pairs as the human image similarity of the first snap shot large image and the second snap shot large image.
- 3. The method for clustering images according to claim 2, wherein, The image clustering method further comprises the following steps: And setting human body snap shot small image pairs with zero human body similarity to be associated with the human face snap shot small image pairs when the human face snap shot small image pairs are not associated with human body snap shot small image pairs.
- 4. The method for clustering images according to claim 2, wherein, And taking the sum of the human image similarities of all the human face snapshot small image pairs as the human image similarity of the first snapshot large image and the second snapshot large image, wherein the human image similarity comprises the following steps: when the human body snap shot small image pair does not have the associated human face snap shot small image pair and the human body similarity of the human body snap shot small image pair is larger than or equal to the second human body clustering threshold value, taking the weight value of the ratio of the human body similarity to the first human body clustering threshold value as the human image similarity of the human body snap shot small image pair; and taking the sum of the human image similarity of all the human face snapshot small image pairs and the human image similarity of all the human body snapshot small image pairs as the human image similarity of the first snapshot large image and the second snapshot large image.
- 5. The method of image clustering according to claim 1, wherein, The obtaining of the plurality of first face snap shots based on the first snap shots comprises the following steps: acquiring a plurality of candidate face snapshot small images based on the first snapshot large image; acquiring first candidate similarity of every two candidate face snap shots in the candidate face snap shots; And canceling the figure similarity calculation of the two candidate face snap shots with the first candidate similarity larger than or equal to the first face clustering threshold value to obtain the plurality of first face snap shots.
- 6. The method of image clustering according to claim 1, wherein, After the face similarity of each group of face snap shot small image pairs is obtained, the image clustering method further comprises the following steps: based on the face similarity of the face snap small image pairs of all groups, judging whether the face similarity of at least two face snap small images in the face snap small images and another Zhang Zhuapai large image is larger than or equal to the first face clustering threshold; And if the face snapshot is in existence, cancelling the figure similarity calculation of the face snapshot small image.
- 7. The method of image clustering according to claim 1, wherein, After the face similarity of each group of face snapshot small image pairs is obtained and the human body similarity of each group of human body snapshot small image pairs is obtained, the image clustering method further comprises the following steps: judging whether the face snap shot small images accord with the contradiction conditions between the images or not based on the face similarity of the face snap shot small image pairs of all groups and the human similarity of the human snap shot small image pairs of all groups; if the face snapshot is in the preset condition, cancelling the figure similarity calculation of the face snapshot small image; The contradiction condition among the images is that the human face similarity of a first target human face snapshot small image and a second target human face snapshot small image in another Zhang Zhuapai big image is larger than or equal to the second human face clustering threshold, the human body similarity of a first target human body snapshot small image associated with the first target human face snapshot small image and a second target human body snapshot small image associated with the second target human face snapshot small image is smaller than the second human body clustering threshold, and the human body similarity of the first target human body snapshot small image associated with the first target human face snapshot small image and the human body similarity of the other human body snapshot small image is larger than or equal to the second human body clustering threshold.
- 8. The method of image clustering according to claim 1, wherein, After the face similarity of each group of face snapshot small image pairs is obtained and the human body similarity of each group of human body snapshot small image pairs is obtained, the image clustering method further comprises the following steps: judging whether the human body snap shots accord with human body face contradiction conditions or not based on the human face similarity of the human body snap shot small image pairs of all groups and the human body similarity of the human body snap shot small image pairs of all groups; If the human body snap shot small image exists, cancelling the human image similarity calculation of the human body snap shot small image; the human face contradiction condition is that the human body similarity of a first target human body snap shot small image and a second target human body snap shot small image in another Zhang Zhuapai big image is larger than or equal to the second human body clustering threshold, and the human body similarity of a first target human face snap shot small image associated with the first target human body snap shot small image and a second target human face snap shot small image associated with the second target human body snap shot small image is smaller than the second human face clustering threshold.
- 9. An image clustering device, comprising a memory and a processor coupled to the memory; Wherein the memory is for storing program data and the processor is for executing the program data to implement the image clustering method according to any one of claims 1 to 8.
- 10. A computer storage medium for storing program data which, when executed by a computer, is adapted to carry out the image clustering method according to any one of claims 1 to 8.
Description
Image clustering method, image clustering device and computer storage medium Technical Field The present application relates to the field of image clustering technology, and in particular, to an image clustering method, an image clustering device, and a computer storage medium. Background Along with the continuous development of science and technology, portrait candid photograph equipment spreads over the street and the alley, portrait candid photograph pictures of these portrait candid photograph equipment carry out portrait and gather shelves, restore the orbit of every person, present portrait candid photograph is most to carry out feature extraction according to the degree of depth learning technique based on the human small image of face that draws from the picture, form feature vector, and carry out portrait candid photograph according to the similarity between the vector, but because the candid photograph equipment, the candid photograph angle, the difference of candid photograph time, the portrait picture similarity degree of same person can be slightly less than portrait candid photograph shelves threshold value, therefore how effectual promotion portrait is the difficult problem that needs to be solved. Disclosure of Invention The application provides an image clustering method, an image clustering device and a computer storage medium. The application adopts a technical scheme that an image clustering method is provided, and the image clustering method comprises the following steps: Acquiring a first snapshot large image and a second snapshot large image; Acquiring a plurality of first face snap shots and a plurality of first human body snap shots based on the first snap shots; Acquiring a plurality of second face snap shots and a plurality of second human body snap shots based on the second snap shots; Acquiring the human face similarity of each group of human face snapshot small image pairs and acquiring the human body similarity of each group of human body snapshot small image pairs, wherein each group of human face snapshot small image pairs comprises any one first human face snapshot small image and any one second human face snapshot small image, and each group of human body snapshot small image pairs comprises any one first human body snapshot small image and any one second human body snapshot small image; acquiring the human image similarity of the first snapshot large image and the second snapshot large image based on the human face similarity of all the group of human face snapshot small image pairs and the human body similarity of all the group of human body snapshot small image pairs; When the human image similarity is smaller than a large image similarity threshold, image clustering is carried out on the human face snap shots of the human face snap shot pairs, the human face similarity of which is larger than or equal to a first human face clustering threshold, and the human body snap shots of which the human body similarity is larger than or equal to a first human body clustering threshold; when the human image similarity is larger than or equal to a large image similarity threshold, image clustering is carried out on the human face snap shots of the human face snap shot small image pairs, of which the human face similarity is larger than or equal to a second human face clustering threshold, and the human body snap shots of the human body snap shot small image pairs, of which the human body similarity is larger than or equal to a second human body clustering threshold; The first human face clustering threshold is larger than the second human face clustering threshold, and the first human body clustering threshold is larger than the second human body clustering threshold. Wherein the human face similarity based on the human face snap shot small image pairs of all groups and the human body similarity of the human body snap shot small image pairs of all groups, obtaining the human image similarity of the first snapshot large image and the second snapshot large image comprises the following steps: when the face similarity of the face snap small image pair is larger than or equal to the first face clustering threshold, taking the ratio of the face similarity to the first face clustering threshold as the face similarity of the face snap small image pair and the associated human snap small image pair; when the face similarity of the face snap plot pair is smaller than the first face clustering threshold and larger than or equal to the second face clustering threshold, taking the weighted sum of the ratio of the face similarity to the first face clustering threshold and the ratio of the human similarity of the face snap plot pair and the first human clustering threshold as the human similarity of the face snap plot pair; When the human face similarity of the human face snapshot small image pair is smaller than the second human face clustering threshold value, cancelling human image similarity