Cloud disk picture deduplication method

Through face recognition and similarity detection, the problem of low efficiency of deduplication and high error deletion rate of cloud disk images is solved, and efficient and accurate image deduplication is achieved, saving cloud disk space.

CN119201868AActive Publication Date: 2024-12-27CHINA MOBILE INTERNET CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411146112.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-12-27
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

The existing cloud disk image deduplication method is inefficient and has a high probability of error deletion, so it is impossible to effectively identify and delete highly similar pictures.

Method used

Determine the user's identity through face recognition, divide the face pictures of the same user's identity into groups, and perform similarity detection on the pictures in the group, and delete pictures with similarity greater than or equal to the preset value.

Benefits of technology

It improves the efficiency and accuracy of cloud disk image deduplication, reduces the probability of mistakenly deleting non-repetitive images, and saves cloud disk space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201868A_ABST
    Figure CN119201868A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud disk picture deduplication method, and belongs to the technical field of image processing. The method comprises the following steps: performing face recognition on a plurality of face pictures in a pre-acquired cloud disk, and determining user identities corresponding to the face pictures; classifying the plurality of face pictures according to the user identity, and dividing the face pictures of the same user identity into a face picture group; and performing similarity detection on a first picture and a second picture in the face picture group, and deleting the first picture or the second picture under the condition that the similarity is greater than or equal to a preset value. The working efficiency can be improved, and the probability of mistakenly deleting non-repeated pictures can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to a method for deduplicating cloud disk images. Background Art

[0002] As various applications of cloud disks, such as album management, become more and more widely used, a large number of highly similar pictures may exist in the cloud disk, occupying more cloud disk storage space.

[0003] Among the current methods for deduplicating cloud disk images, one method is to manually delete duplicate cloud disk images, but this method is inefficient and has a high probability of mistakenly deleting non-duplicate images; another method is to hash-code each cloud disk image and then calculate the Hamming distance between the two encoded cloud disk images. If the Hamming distance is less than the distance threshold, the two cloud disk images are highly similar. This method may judge non-duplicate images as duplicate images, resulting in mistaken deletion; another method is to identify highly similar cloud disk images by comparing the grayscale histograms of each cloud disk image and then perform deduplication, but different types of images may have similar grayscale histograms, and the probability of mistaken deletion is high. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method for deduplicating cloud disk images, which can solve at least one of the problems of low efficiency and high probability of accidental deletion.

[0005] In a first aspect, an embodiment of the present application provides a method for deduplicating cloud disk images, the method comprising: determining the user identity corresponding to the face image by performing face recognition on multiple face images in a pre-acquired cloud disk; classifying the multiple face images according to the user identity, and dividing the face images of the same user identity into a face image group; performing similarity detection on a first image and a second image in the face image group, and deleting the first image or the second image when the similarity is greater than or equal to a preset value.

[0006] In the second aspect, an embodiment of the present application provides a cloud disk image deduplication device, which includes: a determination module, used to determine the user identity corresponding to the face image by performing face recognition on multiple face images in a pre-acquired cloud disk; a classification module, used to classify the multiple face images according to the user identity, and divide the face images of the same user identity into a face image group; a deletion module, used to perform similarity detection on the first image and the second image in the face image group, and delete the first image or the second image when the similarity is greater than or equal to a preset value.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0011] In the embodiment of the present application, face recognition can be performed on multiple face pictures in the pre-acquired cloud disk to determine the user identity corresponding to the face picture; then the face pictures of the same user identity are divided into a face picture group; finally, the first picture and the second picture in the same face picture group are tested for similarity, and the first picture or the second picture is deleted when the similarity is greater than or equal to a preset value. Not only can the efficiency of deduplication of cloud disk pictures be improved, but also the accuracy of determining duplicate pictures can be improved by performing targeted similarity tests on face pictures of the same user identity, reducing the probability of mistakenly deleting non-duplicate pictures and saving cloud disk space. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram showing a flow chart of a method for deduplicating cloud disk images provided in an embodiment of the present application is shown;

[0013] Figure 2 A schematic diagram showing the structure of a cloud disk image deduplication device provided in an embodiment of the present application is shown;

[0014] Figure 3 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown;

[0015] Figure 4 A structural block diagram of another electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

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

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

[0018] The following, in conjunction with the accompanying drawings, describes in detail the cloud disk image deduplication method provided by the embodiment of the present application through specific embodiments and their application scenarios.

[0019] Figure 1 A cloud disk image deduplication method provided by an exemplary embodiment of the present application is shown. The method 100 can be executed by an electronic device. In other words, the method can be executed by software or hardware installed in an electronic device. The electronic device can be a terminal device such as a mobile phone. Figure 1 As shown, the method mainly includes the following steps:

[0020] S101: Determine the user identity corresponding to the face picture by performing face recognition on multiple face pictures in the pre-acquired cloud disk. In an embodiment of the present application, the user identity corresponding to the face picture can be determined by performing face recognition on multiple face pictures in the pre-acquired cloud disk. In practical applications, traditional face recognition algorithms such as principal component analysis (PCA) can be used to confirm the user identity in the face picture, or an unsupervised neural network algorithm or a supervised neural network algorithm can be used. PCA has high computational efficiency, and unsupervised neural network algorithms or supervised neural network algorithms have high face recognition accuracy, and face recognition can be performed according to actual conditions.

[0021] In an optional implementation, before performing face recognition on a plurality of face images in the pre-acquired cloud disk to determine the identity of the user corresponding to the face image, the method further includes:

[0022] Perform face recognition on multiple images in the cloud disk to obtain multiple face images.

[0023] In the embodiment of the present application, face recognition can be performed on multiple pictures in the cloud disk to obtain pictures including people. In practical applications, PCA can be used to determine whether there is a face in the picture, or other face recognition methods can be used for determination. In the embodiment of the present application, optionally, each face picture in the multiple face pictures can be a picture including a face. .

[0024] S102: Classify the multiple face pictures according to the user identities, and divide the face pictures with the same user identity into a face picture group.

[0025] In the embodiment of the present application, face images can be classified according to user identity, and face images of the same user identity can be divided into a face image group. For example, the first, third, and fifth face images detect the face of user A, and these three images can be divided into a set of user A; the second, fourth, and sixth face images detect the face of user B, and these three images can be divided into a set of user B.

[0026] S103: Perform similarity detection on the first picture and the second picture in the face picture group, and delete the first picture or the second picture when the similarity is greater than or equal to a preset value. In an embodiment of the present application, a similarity detection may be performed on the first picture and the second picture in the face picture group, and delete one of the pictures when the similarity between the first picture and the second picture is not less than a preset value. The first picture is any picture in the face picture group, and the second picture is any picture in the face picture group except the first picture.

[0027] In an optional implementation, the performing similarity detection on the first picture and the second picture in the face picture group may include:

[0028] Step 1, extracting key points from the first picture and the second picture to obtain key points of human bodies in the first picture and the second picture;

[0029] Step 2, determining a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture according to the weights corresponding to the human body key points in the first picture and the second picture and the human body parts to which the human body key points belong;

[0030] Step 3: Obtain the cosine similarity between the first picture and the second picture based on the first human posture vector and the second human posture vector.

[0031] In the above optional implementation, in actual applications, step 1 is performed to extract key points from the first image and the second image. The scale-invariant feature transform (SIFT) algorithm or the speeded-up robust features (SURF) algorithm can be used to extract key points. SURF has higher computational efficiency than SIFT, and the SURF algorithm can extract features in multi-scale space and has a higher efficiency in extracting the position and direction of key points.

[0032] In an optional implementation, taking the SURF algorithm as an example, extracting key points from the first image and the second image to obtain key points in the first image and the second image may include the following steps:

[0033] (1) performing Gaussian filtering on the first image and the second image to obtain a first Gaussian filtered image and a second Gaussian filtered image;

[0034] (2) performing a Laplace operation on the first Gaussian filtered image and the second Gaussian filtered image to obtain a first Hessian matrix and a second Hessian matrix;

[0035] (3) calculating the determinant of the first Hessian matrix and the determinant of the second Hessian matrix;

[0036] (4) extracting key point positions of the first image according to the determinant of the first Hessian matrix, and extracting key point positions of the second image according to the determinant of the second Hessian matrix;

[0037] (5) Extracting the key point directions of the first picture according to the key point positions of the first picture and extracting the key point directions of the second picture according to the key point positions of the second picture.

[0038] In a specific implementation, (1) Gaussian filtering is performed on the face images (the first image and the second image):

[0039] L(x,y,σ)=G(x,y,σ)*I(x,y)

[0040] Among them, G is the Gaussian filter operator, x is the horizontal coordinate, y is the vertical coordinate, σ is the standard deviation, I(x, y) is the face picture (the first picture and the second picture), and L(x, y, σ) is the picture after Gaussian filtering (Gaussian filtering the first picture can generate the first Gaussian filtered picture, and Gaussian filtering the second picture can generate the second Gaussian filtered picture).

[0041] (2) Perform Laplacian operation on the first Gaussian filter image and the second Gaussian filter image:

[0042]

[0043] Among them, L xx (x, y, σ) represents the second-order derivative of the Gaussian filter image in the x direction, L xy (x, y, σ) represents the first-order derivative of the Gaussian filter image in the x and y directions, L yy (x, y, σ) represents the second-order derivative of the Gaussian filtered image in the y direction, and H represents the Hessian matrix (the first Gaussian filtered image is subjected to Laplace operation to obtain the first Hessian matrix, and the second Gaussian filtered image is subjected to Laplace operation to obtain the second Hessian matrix).

[0044] (3) Calculate the determinant of the Hessian matrix:

[0045] Det(H)=L xx *L yy -(0.9*L yy ) 2

[0046] In the embodiment of the present application, the determinant of the first Hessian matrix and the determinant of the second Hessian matrix can be calculated according to the above formula.

[0047] (4) Extract the key point positions of the face image based on the determinant of the Hessian matrix;

[0048] In an embodiment of the present application, the key point positions of the first image can be extracted according to the determinant of the first Hessian matrix, and the key point positions of the second image can be extracted according to the determinant of the second Hessian matrix.

[0049] (5) Extract key point directions based on key point positions:

[0050] In an optional implementation manner, extracting the key point direction of the first picture according to the key point position of the first picture includes:

[0051] Taking the key point position of the first image as the center, counting the wavelet features in the x-direction and the y-direction in a 60-degree fan-shaped area, wherein the wavelet features are accumulated by a Gaussian weighting coefficient;

[0052] The 60-degree sector area is rotated at intervals of 15 degrees to traverse the entire circle, and the sector direction corresponding to the 60-degree sector area with the largest value of the wavelet feature is taken as the key point direction of the first image.

[0053] In practical applications, all wavelet features in the x and y directions within a 60-degree sector area can be counted with the key point as the center. These features are accumulated through Gaussian weighting coefficients, that is, the weighting coefficients corresponding to the wavelet features far from the center are small. Then, the 60-degree sector area is rotated at intervals of 15 degrees to traverse the entire circle. The sector direction with the maximum value is the main direction of the key point.

[0054] (6) Obtain the key points of the human body in the first image and the second image:

[0055] In an optional implementation, when performing step 2, determining a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture according to key points in the first picture and the second picture and weights corresponding to human body parts to which the key points belong may include:

[0056] Dividing the key points into different human body parts according to human body regions;

[0057] According to the weights corresponding to the human body parts to which the key points of one or more of the human body parts belong and the key points in the first picture and the second picture, a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture are determined.

[0058] In the embodiment of the present application, all the extracted key points can be divided into facial key points and human body key points according to the position and direction of the key points obtained. The facial key points include the left eye, right eye, left ear, right ear and nose, etc. The human body key points include 18, including the neck, shoulders, arms, wrists, hips, knees and ankles, etc. Optionally, in practical applications, when the key points are divided into different human body parts according to the human body area, they can be simply divided according to the facial key points and the human body key points, or the human body key points can be divided into 4 parts, or each human body key point can be regarded as a part and divided into 18 parts, which is not specifically limited in the embodiment of the present application. When the human body key points are divided into 4 parts according to the human body area, the left shoulder, left arm and left wrist can be used as the first part, the right shoulder, right arm and right wrist can be used as the second part, the left hip, left knee and left ankle can be used as the third part, and the right hip, right knee and right ankle can be used as the fourth part. Taking four parts as an example, all the human body key points of each part are converted into one-dimensional vectors. There are four one-dimensional vectors in total. The calculation formula of the human body posture vector is:

[0059] s=a1*r1+a2*r2+a3*r3+a4*r4

[0060] Wherein, r1 is the vector of the first human body part, a1 is the weight corresponding to r1, r2 is the vector of the second human body part, a2 is the weight corresponding to r2, r3 is the vector of the third human body part, a3 is the weight corresponding to r3, r4 is the vector of the fourth human body part, a4 is the weight corresponding to r4, and s is the human body posture vector of the face image. According to the weights corresponding to the human body parts to which the key points of one or more human body parts belong and the key points in the first picture and the second picture, the first human body posture vector corresponding to the first picture and the second human body posture vector corresponding to the second picture are determined. Finally, the first human body posture vector corresponding to the first picture and the second human body posture vector corresponding to the second picture can be obtained.

[0061] In the above optional implementation, determining a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture according to the weights corresponding to the human body parts to which the key points of one or more of the human body parts belong and the key points in the first picture and the second picture includes:

[0062] Convert key points of the first picture of the same human body part into a one-dimensional vector, and determine a first human body posture vector corresponding to the first picture according to a weight corresponding to the human body part to which the key points belong;

[0063] The key points of the second image of the same human body part are converted into a one-dimensional vector, and a second human body posture vector corresponding to the second image is determined according to the weight corresponding to the human body part to which the key points belong.

[0064] In practical applications, the first human posture vector corresponding to the first image and the second human posture vector corresponding to the second image are calculated separately, and the key points of the first image of the same human body part are converted into a one-dimensional vector. According to the weight corresponding to the human body part to which the key points belong, the first human posture vector corresponding to the first image is determined. Taking four parts as an example, the key points of the left shoulder, left arm and left wrist of the first part can be converted into a one-dimensional vector corresponding to the first part, the key points of the right shoulder, right arm and right wrist of the second part can be converted into a one-dimensional vector corresponding to the second part, the key points of the left hip, left knee and left ankle of the third part can be converted into a one-dimensional vector corresponding to the third part, and the key points of the right hip, right knee and right ankle of the fourth part can be converted into a one-dimensional vector corresponding to the fourth part.

[0065] s1=a1*r1+a2*r2+a3*r3+a4*r4

[0066] Among them, r1 is the vector of the first human body part, a1 is the vector of r iThe corresponding weight, r2 is the vector of the second human body part, a2 is the weight corresponding to r2, r3 is the vector of the third human body part, a3 is the weight corresponding to r3, r4 is the vector of the fourth human body part, a4 is the weight corresponding to r4, and s1 is the first human body posture vector corresponding to the first picture. The calculation process of the second human body posture vector corresponding to the second picture is similar to the calculation process of the first human body posture vector corresponding to the first picture. In the above optional implementation method, in actual application, when performing step 3 to obtain the cosine similarity between the first picture and the second picture, the cosine similarity method can be used to calculate the cosine similarity of the first human body posture vector and the second human body posture vector, and the range of cosine similarity is 0-1. The closer the cosine similarity is to 1, the higher the similarity of the human body postures of the two face pictures is; the closer the cosine similarity is to 0, the lower the similarity of the human body postures of the two face pictures is.

[0067] In an optional implementation, when the similarity is greater than or equal to a preset value, deleting the first picture or the second picture includes:

[0068] When the cosine similarity is greater than or equal to the preset value, calculating a degree of deviation of the first picture from a center of the first picture and a degree of deviation of the second picture from a center of the second picture;

[0069] When the difference between the degree of deviation of the first picture from the center of the first picture and the degree of deviation of the second picture from the center of the second picture is less than a first threshold, the first picture or the second picture is deleted.

[0070] In an embodiment of the present application, when the cosine similarity between the first image and the second image is greater than or equal to a preset value, it indicates that the similarity between the first image and the second image is high. In order to improve the accuracy of deduplication, the image similarity between the first image and the second image may be further calculated to determine whether to perform a deletion operation. The degree of deviation of the first image from the center of the first image and the degree of deviation of the second image from the center of the second image may be calculated first. When the difference between the degree of deviation of the first image from the center of the first image and the degree of deviation of the second image from the center of the second image is less than a first threshold, it indicates that the two face images are highly similar, and the first image or the second image is deleted. In an embodiment of the present application, when performing a deletion operation, the first image or the second image may be deleted randomly, or the first image may be deleted each time or the second image may be deleted each time. This embodiment of the present application does not make specific limitations.

[0071] In an optional implementation, when a difference between a deviation degree of the first picture from a center of the first picture and a deviation degree of the second picture from a center of the second picture is less than a first threshold, deleting the first picture or the second picture includes:

[0072] When the difference between the deviation degree of the first picture from the center of the first picture in the x direction and the deviation degree of the second picture from the center of the second picture in the x direction is less than a first distance threshold and the difference between the deviation degree of the first picture from the center of the first picture in the y direction and the deviation degree of the second picture from the center of the second picture in the y direction is less than a second distance threshold, delete the first picture or the second picture.

[0073] In an embodiment of the present application, the first threshold may include a first distance threshold and a second distance threshold. In practical applications, for example, the size of two face images is 600×600, and the center point is 300×300. The midpoint of the line connecting the two eyes is used as the reference point of the first image, and the distance between the point and the center point in the x direction and the y direction is calculated to obtain x1 and y1. Similarly, the reference point of the second face image is defined as the midpoint of the line connecting the two eyes, and the distance between the point and the center point in the x direction and the y direction is calculated to obtain x2 and y2. Calculate Δx=x1-x2, calculate Δy=y1-y2, if Δx is less than the first distance threshold, it means that the deviation degree of the first image from the center and the deviation degree of the second image from the center in the x direction are approximately the same, and Δy is less than the second distance threshold, it means that the deviation degree of the first image from the center and the deviation degree of the second image from the center in the y direction are approximately the same, it can be judged that the two face images are highly similar, and one of the face images is deleted. If Δx is not less than the first distance threshold, or Δy is not less than the second distance threshold, it means that the similarity between the first image and the second image is limited, and the two images can be retained for the next round of similarity comparison.

[0074] In an optional implementation, when the cosine similarity is less than the preset value, the first picture and the second picture are retained.

[0075] In the embodiment of the present application, if the cosine similarity between the first picture and the second picture is less than a preset value, it means that the similarity between the first picture and the second picture is not very high, and the two pictures need to be retained for comparison with other pictures in the face picture group. For example, in the collection of user A, the cosine similarity between picture 1 and picture 2 is less than a preset value, and the similarity detection between picture 1 and picture 3 (picture 3 has not been compared with picture 1) can be performed.

[0076] In the embodiment of the present application, the order of similarity detection for images in the same face image group is not specifically limited, and can be performed randomly or in a preset order, to ensure that the final face image group includes only one face image or the cosine similarity of any two face images is less than a preset value, or the cosine similarity of any two face images is greater than or equal to the preset value and the difference in the degree of deviation between the two images is greater than or equal to the first threshold.

[0077] In the embodiment of the present application, by dividing the face pictures of the same user identity into a face picture group according to the user identity corresponding to the determined face pictures, and then performing similarity detection on the first picture and the second picture in the same face picture group, if the similarity is greater than or equal to a preset value, the first picture or the second picture is deleted. This can improve the accuracy of determining duplicate pictures, reduce the probability of mistakenly deleting non-duplicate pictures, and improve the efficiency of deduplication of cloud disk pictures, reduce the space occupied by duplicate pictures on the cloud disk, and save resources.

[0078] The cloud disk image deduplication method provided in the embodiment of the present application can be executed by a cloud disk image deduplication device. In the embodiment of the present application, the cloud disk image deduplication device executing the cloud disk image deduplication method is taken as an example to illustrate the cloud disk image deduplication device provided in the embodiment of the present application.

[0079] Figure 2 The schematic diagram of the structure of a cloud disk image deduplication device provided by an exemplary embodiment of the present application is shown. The cloud disk image deduplication device can be implemented as follows: Figure 1 All or part of the content in the illustrated embodiment, the cloud disk image deduplication device includes: a determination module 201, a classification module 202 and a deletion module 203.

[0080] In an embodiment of the present application, a determination module 201 is used to determine the user identity corresponding to a facial image by performing facial recognition on multiple facial images in a pre-acquired cloud disk; a classification module 202 is used to classify the multiple facial images according to the user identity, and divide the facial images of the same user identity into a facial image group; a deletion module 203 is used to perform a similarity detection on a first image and a second image in the facial image group, and delete the first image or the second image when the similarity is greater than or equal to a preset value.

[0081] In an optional implementation, when the deleting module 203 is used to perform similarity detection on the first picture and the second picture in the face picture group, it is specifically used to:

[0082] Extract key points from the first picture and the second picture to obtain key points from the first picture and the second picture;

[0083] Determine a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture according to key points in the first picture and the second picture and weights corresponding to human body parts to which the key points belong;

[0084] The cosine similarity between the first picture and the second picture is obtained based on the first human posture vector and the second human posture vector.

[0085] In an optional implementation, when the deleting module 203 is used to extract key points from the first picture and the second picture to obtain key points in the first picture and the second picture, it is specifically used to:

[0086] Perform Gaussian filtering on the first image and the second image to obtain a first Gaussian filtered image and a second Gaussian filtered image;

[0087] Performing a Laplace operation on the first Gaussian filtered image and the second Gaussian filtered image to obtain a first Hessian matrix and a second Hessian matrix;

[0088] Calculating the determinant of the first Hessian matrix and the determinant of the second Hessian matrix;

[0089] Extracting key point positions of the first image according to the determinant of the first Hessian matrix, and extracting key point positions of the second image according to the determinant of the second Hessian matrix;

[0090] The key point directions of the first picture are extracted according to the key point positions of the first picture, and the key point directions of the second picture are extracted according to the key point positions of the second picture.

[0091] In an optional implementation, when the deleting module 203 is used to extract the key point directions of the first picture according to the key point positions of the first picture, it is specifically used to:

[0092] Taking the key point position of the first image as the center, counting the wavelet features in the x-direction and the y-direction in a 60-degree fan-shaped area, wherein the wavelet features are accumulated by a Gaussian weighting coefficient;

[0093] The 60-degree sector area is rotated at intervals of 15 degrees to traverse the entire circle, and the sector direction corresponding to the 60-degree sector area with the largest value of the wavelet feature is taken as the key point direction of the first image.

[0094] In an optional implementation, the deleting module 203, when used to determine the first human body posture vector corresponding to the first picture and the second human body posture vector corresponding to the second picture according to the key points in the first picture and the second picture and the weights corresponding to the human body parts to which the key points belong, is specifically used to:

[0095] Dividing the key points into different human body parts according to human body regions;

[0096] According to the weights corresponding to the human body parts to which the key points of one or more of the human body parts belong and the key points in the first picture and the second picture, a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture are determined.

[0097] In an optional implementation, the deleting module 203, when used to determine the first human body posture vector corresponding to the first picture and the second human body posture vector corresponding to the second picture according to the weights corresponding to the human body parts to which the key points of one or more of the human body parts belong and the key points in the first picture and the second picture, is specifically used to:

[0098] Convert key points of the first picture of the same human body part into a one-dimensional vector, and determine a first human body posture vector corresponding to the first picture according to a weight corresponding to the human body part to which the key points belong;

[0099] The key points of the second image of the same human body part are converted into a one-dimensional vector, and a second human body posture vector corresponding to the second image is determined according to the weight corresponding to the human body part to which the key points belong.

[0100] In an optional implementation, when the deleting module 203 is used to delete the first picture or the second picture when the similarity is greater than or equal to a preset value, it is specifically used to:

[0101] When the cosine similarity is greater than or equal to the preset value, calculating a degree of deviation of the first picture from a center of the first picture and a degree of deviation of the second picture from a center of the second picture;

[0102] When the difference between the degree of deviation of the first picture from the center of the first picture and the degree of deviation of the second picture from the center of the second picture is less than a first threshold, the first picture or the second picture is deleted.

[0103] In an optional implementation, the deleting module 203 is further configured to retain the first picture and the second picture when the cosine similarity is less than the preset value.

[0104] In an optional implementation, the deleting module 203 is used to delete the first picture or the second picture when the difference between the deviation degree of the first picture from the center of the first picture and the deviation degree of the second picture from the center of the second picture is less than a first threshold, specifically for:

[0105] If the difference between the deviation degree of the first picture from the center of the first picture in the x direction and the deviation degree of the second picture from the center of the second picture in the x direction is less than a first distance threshold, and the difference between the deviation degree of the first picture from the center of the first picture in the y direction and the deviation degree of the second picture from the center of the second picture in the y direction is less than a second distance threshold, delete the first picture or the second picture.

[0106] In an optional implementation, the determination module 201 is further configured to perform face recognition on multiple images in the cloud disk to obtain multiple face images.

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

[0108] The cloud disk image deduplication device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0109] The cloud disk image deduplication device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the illustrated method embodiment will not be described again here.

[0110] Alternatively, if Figure 3As shown, an embodiment of the present application also provides an electronic device 300, including a processor 301 and a memory 302, and the memory 302 stores a program or instruction that can be executed on the processor 301. When the program or instruction is executed by the processor 301, the various steps of the above-mentioned cloud disk image deduplication method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0112] Figure 4 FIG. 4 is a block diagram of another electronic device 400 according to an exemplary embodiment of the present application. The electronic device 400 may be implemented as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart watch, a TV, etc. The electronic device 400 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.

[0113] Typically, the electronic device 400 includes a processor 401 and a memory 402 .

[0114] The processor 401 may include one or more processing cores, such as a 4-core processor, a 10-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0115] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement all or part of the steps in the cloud disk image deduplication method shown in the method embodiment of the present application.

[0116] In some embodiments, the electronic device 400 may further optionally include: a peripheral device interface 403 and at least one peripheral device. The processor 401, the memory 402 and the peripheral device interface 403 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 403 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 404, a display screen 405, a camera assembly 406, an audio circuit 407 and a power supply 408.

[0117] In some embodiments, the electronic device 400 further includes one or more sensors 409 , including but not limited to: an acceleration sensor 410 , a gyroscope sensor 411 , a pressure sensor 412 , an optical sensor 413 , and a proximity sensor 414 .

[0118] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the electronic device 400, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

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

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

[0121] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned cloud disk image deduplication method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0122] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0123] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned cloud disk image deduplication method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

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

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

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

Claims

1. A method for deduplicating cloud disk images, characterized in that: include: By performing face recognition on a plurality of face images in the pre-acquired cloud disk, the user identity corresponding to the face image is determined; Classifying the plurality of face images according to the user identity, and dividing the face images of people with the same user identity into a face image group; A similarity detection is performed on a first picture and a second picture in the face picture group, and when the similarity is greater than or equal to a preset value, the first picture or the second picture is deleted.

2. The method according to claim 1, characterized in that: The performing similarity detection on the first picture and the second picture in the face picture group includes: Extract key points from the first picture and the second picture to obtain key points from the first picture and the second picture; Determine a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture according to key points in the first picture and the second picture and weights corresponding to human body parts to which the key points belong; The cosine similarity between the first picture and the second picture is obtained based on the first human posture vector and the second human posture vector.

3. The method according to claim 2, characterized in that The extracting key points from the first picture and the second picture to obtain key points in the first picture and the second picture includes: Perform Gaussian filtering on the first image and the second image to obtain a first Gaussian filtered image and a second Gaussian filtered image; Performing a Laplace operation on the first Gaussian filtered image and the second Gaussian filtered image to obtain a first Hessian matrix and a second Hessian matrix; Calculating the determinant of the first Hessian matrix and the determinant of the second Hessian matrix; Extracting key point positions of the first image according to the determinant of the first Hessian matrix, and extracting key point positions of the second image according to the determinant of the second Hessian matrix; The key point directions of the first picture are extracted according to the key point positions of the first picture, and the key point directions of the second picture are extracted according to the key point positions of the second picture.

4. The method according to claim 3, characterized in that The extracting the key point direction of the first picture according to the key point position of the first picture includes: Taking the key point position of the first image as the center, counting the wavelet features in the x-direction and the y-direction in a 60-degree fan-shaped area, wherein the wavelet features are accumulated by a Gaussian weighting coefficient; The 60-degree sector area is rotated at intervals of 15 degrees to traverse the entire circle, and the sector direction corresponding to the 60-degree sector area with the largest value of the wavelet feature is taken as the key point direction of the first image.

5. The method according to claim 2, characterized in that: The determining, according to the key points in the first picture and the second picture and the weights corresponding to the human body parts to which the key points belong, a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture, comprises: Dividing the key points into different human body parts according to human body regions; According to the weights corresponding to the human body parts to which the key points of one or more of the human body parts belong and the key points in the first picture and the second picture, a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture are determined.

6. The method according to claim 5, characterized in that The determining, according to the weights corresponding to the human body parts to which the key points of the one or more human body parts belong and the key points in the first picture and the second picture, a first human body posture vector corresponding to the first picture and a second human body posture vector corresponding to the second picture, comprises: Convert key points of the first picture of the same human body part into a one-dimensional vector, and determine a first human body posture vector corresponding to the first picture according to a weight corresponding to the human body part to which the key points belong; The key points of the second image of the same human body part are converted into a one-dimensional vector, and a second human body posture vector corresponding to the second image is determined according to the weight corresponding to the human body part to which the key points belong.

7. The method according to claim 2, characterized in that When the similarity is greater than or equal to a preset value, deleting the first picture or the second picture includes: When the cosine similarity is greater than or equal to the preset value, calculating a degree of deviation of the first picture from a center of the first picture and a degree of deviation of the second picture from a center of the second picture; When the difference between the degree of deviation of the first picture from the center of the first picture and the degree of deviation of the second picture from the center of the second picture is less than a first threshold, the first picture or the second picture is deleted.

8. The method according to claim 1, characterized in that The method further comprises: When the cosine similarity is less than the preset value, the first picture and the second picture are retained.

9. The method according to claim 6, characterized in that The deleting the first picture or the second picture when the difference between the deviation degree of the first picture from the center of the first picture and the deviation degree of the second picture from the center of the second picture is less than a first threshold value includes: If the difference between the deviation degree of the first picture from the center of the first picture in the x direction and the deviation degree of the second picture from the center of the second picture in the x direction is less than a first distance threshold, and the difference between the deviation degree of the first picture from the center of the first picture in the y direction and the deviation degree of the second picture from the center of the second picture in the y direction is less than a second distance threshold, delete the first picture or the second picture.

10. The method according to any one of claims 1 to 9, characterized in that: Before performing face recognition on a plurality of face images in the pre-acquired cloud disk to determine the user identities corresponding to the face images, the method further includes: Perform face recognition on multiple images in the cloud disk to obtain multiple face images.

Citation Information

Patent Citations

  • Mobile terminal, picture sorting management method and picture sorting management device of mobile terminal

    CN103034714A

  • Picture archiving method and device, terminal equipment and computer readable storage medium

    CN114373203A

  • Artificial intelligence-based portrait filing method and device, and storage medium

    CN114639143A

  • Data deduplication method and device, equipment and medium

    CN115357571A

  • Human body posture description method, terminal and storage medium

    CN115631390A