An image deduplication method, device and electronic equipment

By analyzing the similarity and quality score between the target image and the preset image, duplicate image data in the server is replaced, solving the problem of duplicate data storage in intelligent monitoring equipment and improving the accuracy of data and recognition.

CN115272720BActive Publication Date: 2026-01-02ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210891286.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2026-01-02
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

Even when the target object is obscured, intelligent monitoring equipment still captures multiple images and stores them on the server, resulting in a large amount of duplicate data stored on the server, which reduces the accuracy of target object identification.

Method used

By analyzing the similarity and quality score between the target image and the preset image, the target parameters that meet the preset conditions are determined, and the corresponding image replacement data replaces the same type of image data in the server, thereby achieving image deduplication.

Benefits of technology

It effectively removes duplicate data of the same target object from the server, improving the accuracy of stored data and the accuracy of identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272720B_ABST
    Figure CN115272720B_ABST
Patent Text Reader

Abstract

An image deduplication method, device and electronic equipment, the method comprising: obtaining a target image of a same target object, and a target data set corresponding to the target image, determining at least one target parameter satisfying a preset condition in the target data set, determining image replacement data corresponding to the at least one target parameter respectively, and replacing image data of a same type as the image replacement data in a preset data set with the image replacement data. Through the above method, the image replacement data corresponding to the target image is confirmed through at least the target parameter satisfying the preset condition, the image replacement data is replaced with the image data of the same type in the preset data set, the image data in the preset data set is more accurate, the accuracy of identifying the target object based on the image data in the preset data set is improved, and the storage of a large amount of duplicate data of the target object in the preset data set is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent monitoring, and in particular to an image deduplication method and device and electronic equipment. BACKGROUND

[0002] With the development of intelligent monitoring technology, intelligent monitoring devices are increasingly widely used. Intelligent monitoring devices are mainly used to collect face images and body images. In the process of collecting face images and body images, the face images and body images are often blocked, resulting in multiple collections of face images and body images. Therefore, the server will store multiple face images and / or body images of the same target object.

[0003] Currently, in order to avoid storing multiple face images and / or body images of the same target object in the server, the intelligent monitoring device will capture the target object when collecting the face image and / or body image. The specific capturing process is as follows:

[0004] Target recognition is performed on each frame of image in the video, and the distance parameter and position information of at least one target object in each frame of image are determined. The distance parameter is used to indicate the distance between the target object and the intelligent monitoring device that collects the video. Based on the position information of the at least one target object, the blocked parameter of the target object is determined. The blocked parameter is used to indicate the proportion of the target object blocked by other targets. When the target object meets the capturing condition based on the distance parameter and the blocked parameter of the target object, the target object is captured.

[0005] Based on the above description, although the target object is captured based on the distance parameter and the blocked parameter of the target object, when the target object meets the capturing condition, an image of the target object will be collected and uploaded to the server. However, when the target object is blocked by other targets, the intelligent monitoring device will still collect multiple images of the target object. The intelligent monitoring device will report the collected multiple images to the server. The server will store the multiple images corresponding to the target object, the image features of each image of the target object, and the identification of the target object. Since the data stored in the server is used to determine the target object, when there are multiple images of the same target object in the server, a large amount of repeated data will be stored in the server, which reduces the accuracy of determining the target object based on the data stored in the server. SUMMARY

[0006] The present application provides an image deduplication method, device and electronic equipment to solve the problem of storing a large amount of repeated data in the server and improve the accuracy of the data stored in the server.

[0007] In a first aspect, the present application provides an image deduplication method, which comprises:

[0008] obtain a target image of a same target object, and a target data set corresponding to the target image, wherein the target image comprises a target face image and / or a target body image of the target object;

[0009] determine at least one target parameter in the target data set satisfying a preset condition, wherein the preset condition is that the target parameter is greater than a corresponding preset parameter;

[0010] determine image replacement data corresponding to the at least one target parameter respectively, and replace image data of a same type as the image replacement data in the preset data set with the image replacement data.

[0011] By the above method, at least one target parameter of the target image is determined, and image data of a same type as the image replacement data in the preset data set is replaced based on the image replacement data corresponding to the target parameter, thereby avoiding storing a large amount of data in the server, and improving the accuracy of the data stored in the server by replacement.

[0012] In a possible design, the determining of the at least one target parameter in the target data set satisfying the preset condition comprises:

[0013] determine a maximum similarity and a quality score in the target data set, wherein the maximum similarity is a maximum similarity selected from similarities between the target image and each preset image in the preset data set;

[0014] determine that the maximum similarity is greater than a preset similarity threshold; and / or

[0015] determine that the quality score is greater than a preset quality score threshold.

[0016] In a possible design, the determining of the at least one target parameter in the target data set satisfying the preset condition comprises:

[0017] determine a maximum similarity and a target similarity in the target data set;

[0018] determine that the maximum similarity and the target similarity are greater than a preset similarity threshold.

[0019] In a possible design, the determining of the target similarity in the target data set comprises:

[0020] obtain a target face image and a target body image corresponding to the target image, and a maximum face similarity of the target face image and a maximum body similarity of the target body image;

[0021] a first difference between the maximum face similarity and a preset face similarity threshold in the preset dataset is calculated, and a second difference between the maximum body similarity and a preset body similarity threshold in the preset dataset is calculated;

[0022] A maximum difference is determined from the first difference and the second difference, and a maximum similarity corresponding to the maximum difference is taken as a target similarity.

[0023] In a possible design, determining image replacement data corresponding to the at least one target parameter respectively, and replacing image data of a same type as the image replacement data in the preset dataset with the image replacement data, includes:

[0024] obtaining a preset similarity threshold and a preset quality score threshold in the preset dataset;

[0025] determining that the maximum similarity is greater than the preset similarity threshold, taking the target image as image replacement data, and replacing a preset image corresponding to the target image in the preset dataset with the target image; and / or

[0026] determining that the quality score is greater than the preset quality score threshold, taking a target image feature of the target image as image replacement data, and replacing a preset image feature corresponding to the target image feature in the preset dataset with the target image feature.

[0027] In a possible design, determining image replacement data corresponding to the at least one target parameter respectively, and replacing image data of a same type as the image replacement data in the preset dataset with the image replacement data, includes:

[0028] obtaining a maximum similarity, a quality score, and a target similarity in the target dataset;

[0029] determining that the maximum similarity and the target similarity are greater than the preset similarity threshold respectively, taking the target image as image replacement data, and replacing a preset image corresponding to the target image in the preset dataset with the target image.

[0030] In a possible design, determining image replacement data corresponding to the at least one target parameter respectively, and replacing image data of a same type as the image replacement data in the preset dataset with the image replacement data, includes:

[0031] when the target similarity corresponds to a preset face image or a preset body image in the preset dataset, obtaining a maximum similarity and a target similarity corresponding to the target image, and an image identifier corresponding to the target image;

[0032] determining that the target similarity and the maximum similarity are greater than the preset similarity threshold respectively, and replacing the image identifier with a preset identifier of a preset image corresponding to the target image in the preset data set.

[0033] In a second aspect, the present application provides an image deduplication device, the device comprising:

[0034] an obtaining module, configured to obtain a target image of a target object and a target data set corresponding to the target image;

[0035] a determining module, configured to determine at least one target parameter in the target data set that meets a preset condition;

[0036] a replacing module, configured to determine image replacement data corresponding to the at least one target parameter respectively, and replace image data of the same type as the image replacement data in the preset data set with the image replacement data.

[0037] In a possible design, the determining module is specifically configured to determine a maximum similarity and a quality score in the target data set, determine that the maximum similarity is greater than a preset similarity threshold, and / or determine that the quality score is greater than a preset quality score threshold.

[0038] In a possible design, the determining module is further configured to determine a maximum similarity and a target similarity in the target data set, and determine that the maximum similarity and the target similarity are greater than a preset similarity threshold.

[0039] In a possible design, the determining module is further configured to obtain a target face image and a target body image corresponding to the target image, a maximum face similarity of the target face image, and a maximum body similarity of the target body image, calculate a first difference between the maximum face similarity and a preset face similarity threshold in the preset data set, and calculate a second difference between the maximum body similarity and a preset body similarity threshold in the preset data set, determine a maximum difference from the first difference and the second difference, and take a maximum similarity corresponding to the maximum difference as the target similarity.

[0040] In a possible design, the replacing module is specifically configured to: obtain a preset similarity threshold and a preset quality score threshold in the preset data set; determine that the maximum similarity is greater than the preset similarity threshold; take the target image as image replacement data; replace the target image with a preset image corresponding to the target image in the preset data set; and / or determine that the quality score is greater than the preset quality score threshold; take a target image feature of the target image as image replacement data; and replace the target image feature with a preset image feature corresponding to the target image feature in the preset data set.

[0041] In a possible design, the replacing module is further configured to: obtain a maximum similarity, a quality score, and a target similarity in the target data set; determine that the maximum similarity and the target similarity are greater than the preset similarity threshold, respectively; take the target image as image replacement data; and replace the target image with a preset image corresponding to the target image in the preset data set.

[0042] In a possible design, the replacing module is further configured to: when the target similarity corresponds to a preset face image or a preset body image in the preset data set, obtain a maximum similarity corresponding to the target image and a target similarity corresponding to the target image, and an image identifier corresponding to the target image; determine that the target similarity and the maximum similarity are greater than the preset similarity threshold, respectively; and replace the image identifier with a preset identifier of a preset image corresponding to the image identifier in the preset data set.

[0043] In a third aspect, the present application provides an electronic device, comprising:

[0044] a memory configured to store a computer program;

[0045] a processor configured to execute the computer program stored in the memory, so as to implement the image deduplication method steps.

[0046] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the image deduplication method steps.

[0047] The technical effects of each of the above-mentioned first to fourth aspects and each possible design can be achieved, and the technical effects of each possible design of the first aspect are described above, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 A flowchart of the image deduplication method steps provided by the present application is shown in FIG. 1;

[0049] Figure 2 A schematic diagram of data stored in a server provided for the present application;

[0050] Figure 3 A schematic diagram of a replacement process for a target face image or a target body image provided for the present application;

[0051] Figure 4 A schematic diagram of a process of identifying a preset image consistent in image identification in a target image replacement server provided for the present application;

[0052] Figure 5 A schematic diagram of a process of identifying a preset image inconsistent in image identification in a target image replacement server provided for the present application;

[0053] Figure 6 A schematic diagram of replacing a preset face feature in a server based on a quality score provided for the present application;

[0054] Figure 7 A schematic diagram of modifying the identification of a target image based on conditions provided for the present application;

[0055] Figure 8 A schematic diagram of the structure of an image deduplication device provided for the present application;

[0056] Figure 9 A schematic diagram of the structure of an electronic device provided for the present application. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. The specific operation method in the method embodiment can also be applied to the device embodiment or the system embodiment. It should be noted that in the description of the present application, “multiple” is understood as “at least two”. “And / or” describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. A is connected to B, which means that A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, “first”, “second”, etc. are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.

[0058] In the past technology, when the intelligent monitoring collects the target object, it is based on the distance parameter and the blocked parameter of the target object to capture the target object. When the target object meets the capture condition, an image of the target object is collected and uploaded to the server.

[0059] However, when the target object is blocked by other targets, the intelligent monitoring device will still collect multiple images of the target object, and the intelligent monitoring device will report the collected multiple images to the server. The server will store the multiple images corresponding to the target object, the image features of each image of the target object, and the image identifier of the target object. Since the data stored in the server is used to determine the target object, when there are multiple images of the same target object in the server, a large amount of repeated data will be stored in the server, thereby reducing the accuracy of determining the target object based on the data stored in the server.

[0060] To solve the above-described problems, the embodiments of the present application provide an image deduplication method for removing repeated data of the same target object stored in the server, thereby ensuring the accuracy of the data stored in the server. The method and device of the embodiments of the present application are based on the same technical concept. Since the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can be mutually referred to, and the repeated parts will not be described again.

[0061] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0062] Reference Figure 1 The present application provides an image deduplication method, which can remove repeated data of the same target object in the server in real time, and can make the data stored in the server more accurate. The implementation process of the method is as follows:

[0063] Step S1: Obtain a target image of a same target object and a target data set corresponding to the target image.

[0064] The embodiments of the present application are to remove repeated data of the same target object stored in the server. The data stored in the server is shown in Figure 2 As shown in Figure 2 , the server includes preset face images, preset body images, preset image features, quality scores of preset images, and identifiers of preset images. The preset images are preset face images and / or preset body images. The server stores two types of images: some of the preset face images are associated with some of the preset body images, and some of the preset face images are not associated with some of the preset body images. In addition, each preset face image and each preset body image has an identifier, and each preset face image and each preset body image is associated with its corresponding image feature and quality score.

[0065] In order to achieve the purpose of removing the repeated images of the same target object in the server, first, the target image of the same target object is obtained, and the target image is a target face image and / or a target body image. In the embodiment of the present application, the target image can be subjected to noise reduction processing to make the target image clearer. The noise reduction processing method that can be used is a spatial filtering method. Since the spatial filtering method is a technology known to those skilled in the art, it will not be described in detail here.

[0066] After obtaining the target image, the target data set of the target image needs to be determined, which includes the quality score of the target image, the image identifier of the target image, the image feature of the target image, the maximum similarity of the target image, and the target similarity.

[0067] Step S2: At least one target parameter satisfying a preset condition is determined in the target data set.

[0068] After the above description, after obtaining the target image and the target data set corresponding to the target image, in order to determine at least one type of data that needs to be replaced in the target data set, the maximum similarity, the target similarity, and the quality score in the target data set need to be obtained. The maximum similarity is obtained based on the target image and the preset image in the preset data set. The specific obtaining process is as follows:

[0069] After determining each preset image in the preset data set, the similarity between the target image and each preset image is calculated. After obtaining the similarity between the target image and each preset image, the maximum similarity is selected from all similarities. Based on the maximum similarity, the preset image corresponding to the target image can be determined from the preset data set, and the quality score, image identifier, and preset image feature corresponding to the preset image are determined.

[0070] Specifically, since the target image is a target body image and / or a target face image, when the target image is of different types, the preset condition is different. The preset condition is that the target parameter is greater than the corresponding preset parameter. Since different types of images correspond to different preset conditions, the preset parameters corresponding to different preset conditions are also different. The preset parameters include a preset similarity threshold and a preset quality score threshold. The preset condition corresponding to each type of image and the target parameter corresponding to the preset condition are as follows.

[0071] When the target image is a target face image or a target body image, the preset condition is that the maximum similarity is greater than the preset similarity threshold, and the quality score is greater than the preset quality score threshold.

[0072] When the maximum similarity is greater than the preset similarity threshold value and the quality score is greater than the preset quality score threshold value, and the target image is a target human face image and a target human body image, and the image identifier of the preset human face image corresponding to the target human face image in the preset data set is consistent with the image identifier of the preset human body image corresponding to the target human body image in the preset data set, the preset condition is that the maximum similarity is greater than the preset similarity threshold value and the quality score is greater than the preset quality score threshold value.

[0073] When the target image is a target human face image and a target human body image, and the image identifier of the preset human face image corresponding to the target human face image in the preset data set is inconsistent with the image identifier of the preset human body image corresponding to the target human body image in the preset data set, the preset condition is that the maximum similarity and the target similarity are both greater than the preset similarity threshold value, and the quality score is greater than the preset quality score threshold value, the target similarity is obtained based on the maximum human face similarity and the maximum human body similarity, and the specific obtaining process of the target similarity is as follows:

[0074] A first difference value between the maximum human face similarity of the target human face image and the preset human face similarity threshold value is calculated, and a second difference value between the maximum human body similarity of the target human body image and the preset human body similarity threshold value is calculated, the maximum difference value is determined in the first difference value and the second difference value, the maximum human face similarity or the maximum human body similarity corresponding to the maximum difference value is obtained, when the maximum difference value is the first difference value, the maximum human face similarity is taken as the target similarity, and when the maximum difference value is the second difference value, the maximum human body similarity is taken as the target similarity.

[0075] For example, the maximum human face similarity of the target human face image is 90%, the maximum human body similarity of the target human body image is 92%, the preset human face similarity threshold value of the target human face image is 85%, the preset human body similarity threshold value of the target human body image is 82%, the first difference value is 90%-85%=5%, the second difference value is 92%-82%=10%, 5%<10%, and 10% is the second difference value between the maximum human body similarity and the preset human body similarity threshold value, therefore, the maximum human body similarity 92% is taken as the target similarity.

[0076] Any one of the maximum similarity, the maximum human face similarity, the maximum human body similarity and the quality score satisfying the above preset condition can be taken as the target parameter.

[0077] Through the above method, at least one target parameter in the target data set corresponding to the target image is confirmed, the target data in the target data set is filtered, so that the filtered target parameter satisfies the preset condition, and the accuracy of the target image or the target image feature or the image identifier of the target image corresponding to the target parameter is ensured.

[0078] Step S3: determining image replacement data corresponding to the at least one target parameter respectively, and replacing image data of the same type as the image replacement data in the preset data set with the image replacement data.

[0079] The above describes the process of determining at least one target parameter in the target data set. When the target parameter satisfying the preset condition is the maximum similarity, the target image corresponding to the maximum similarity is the image replacement data. When the target parameter satisfying the preset condition is the quality score, the target image feature of the target image corresponding to the quality score is the image replacement data.

[0080] Since a large amount of repeated data is stored in the server, in order to make the data stored in the server more accurate, image replacement data needs to be determined based on the type of the target image and the target parameter. The specific determination process is as follows:

[0081] When the target image is a target face image, if the maximum face similarity of the target face image is greater than a preset face similarity threshold, the target face image is taken as the image replacement data. If the quality score of the target face image is greater than a preset quality score threshold, the target face feature corresponding to the target face image is taken as the image replacement data.

[0082] When the target image is a target body image, if the maximum body similarity of the target body image is greater than a preset body similarity threshold, the target body image is taken as the image replacement data. If the quality score of the target body image is greater than a preset quality score threshold, the target body feature of the target body image is taken as the image replacement data.

[0083] When the image identifier of the preset image matched by the target image in the preset data set is consistent, when the maximum face similarity of the target face image in the target image is greater than a preset face similarity threshold, and the maximum body similarity of the target body image is greater than a preset body similarity threshold, the target face image and the target body image are taken as the image replacement data.

[0084] When the image identifier of the preset image matched by the target image in the preset data set is inconsistent, when the target image is a target face image and a target body image, if the maximum face similarity of the target face image and the target similarity are both greater than a preset similarity threshold, the target face image is taken as the image replacement data. If the maximum body similarity of the target body image and the target similarity are both greater than a preset similarity threshold, the target body feature of the target body image is taken as the image replacement data.

[0085] Furthermore, if the target similarity only corresponds to the target face image or the target human body image, and the maximum face similarity of the target face image is greater than the preset face similarity threshold, the image identifier of the target image is obtained, and the preset image corresponding to the maximum face similarity in the preset dataset is obtained, and the preset identifier of the preset image is obtained. The image identifier of the target image is used as the image replacement data.

[0086] It should be noted that when the quality score of the target image is greater than the preset quality score threshold, the target image features are used as image replacement data.

[0087] After obtaining the image replacement data of the target image, if the image replacement data is the target image, then the target image is used to replace the preset image corresponding to the target image in the preset dataset; if the image replacement data is the target image feature, then the target image feature is used to replace the preset image feature corresponding to the target image feature in the preset dataset; if the image replacement data is the image identifier of the target image, then the image identifier of the target image is used to replace the preset identifier of the preset image corresponding to the target image in the preset dataset.

[0088] For example, when the target image is a target face image or a target body image, and the replacement data is also a target face image or a target body image, the following diagram illustrates the replacement process: Figure 3 As shown, Figure 3 In the algorithm, 90% represents the maximum similarity of the target face image, 92% represents the maximum similarity of the target human body image, 85% represents the preset face similarity threshold, and 95% represents the preset human body similarity threshold. When 90% > 85%, the input target face image will replace the preset face image matched by the target face image in the server. When 92% > 95%, the input target human body image will replace the preset human body image matched by the target human body in the server.

[0089] When the target image is a target face image or a target human body image, the process of replacing a preset image with the same image identifier in the server with the target image is illustrated in the diagram below. Figure 4 As shown, in Figure 4 In the process, the image identifiers of the preset face image and preset body image matched with the target face image and the target body image are consistent. 90% is the maximum similarity of the target face image, 92% is the maximum similarity of the target body image, 85% is the preset face similarity threshold, and 95% is the preset body similarity threshold. When 90%>85% and 92%>95%, the preset face image is replaced with the target face image and the preset body image is replaced with the target body image, respectively.

[0090] When the target image is a target face image or a target human body image, the process of replacing the preset image with an inconsistent image identifier in the server is illustrated in the diagram below. Figure 5 As shown, in Figure 5 In this model, the target similarity is 92%, 90% is the maximum similarity of the target face image, 92% is the maximum similarity of the target body image, 85% is the preset face similarity threshold, and 86% is the preset body similarity threshold. When 90% and 92% are both greater than 85%, and 92% > 86%, the preset face image is replaced with the target face image, and the preset body image is replaced with the target body image, respectively.

[0091] Furthermore, a schematic diagram of replacing preset facial features in the server based on quality score is shown below. Figure 6 As shown, in Figure 6 In the process, the quality score of the target face image is higher than that of the preset face image. Therefore, the target face features are replaced with the preset face features. The process of replacing the target face features of the target face image is described here. The process of replacing the image features of other images is the same as the above process, and will not be elaborated on here.

[0092] Additionally, a schematic diagram illustrating the conditional modification of the image identifier of the target image is shown below. Figure 7 As shown, in Figure 7 In this process, both the target face image and the target human body image are associated with the identifier 'a'. The server only matches the preset face image corresponding to the target face image. The server will modify the image identifier 'a' of the target human body image to identifier '1' and send the target human body image to the user terminal. This only describes the modification of the image identifier of the target human body image. The modification of the image identifier of other images can be referred to the above process.

[0093] Based on the above description, the system determines the deduplication status of images collected by intelligent monitoring devices based on target images. It then replaces the real-time target image replacement data with data of the same type as the image replacement data in a preset dataset. This avoids storing a large amount of duplicate data on the server, improves the accuracy of the data stored on the server, and allows modification of the target image's image identifier based on conditions, ensuring the accuracy of the images reported to the user.

[0094] Based on the same inventive concept, this application also provides an image deduplication device, which implements the function of an image deduplication method, as described above. Figure 8 The device includes:

[0095] The acquisition module 801 is used to acquire a target image of the same target object and a target dataset corresponding to the target image;

[0096] The determining module 802 is configured to determine at least one target parameter in the target data set that meets a preset condition.

[0097] The replacing module 803 is configured to determine image replacement data corresponding to the at least one target parameter respectively, and replace image data of a same type as the image replacement data in the preset data set with the image replacement data.

[0098] In a possible design, the determining module 802 is specifically configured to determine a maximum similarity and a quality score in the target data set, determine that the maximum similarity is greater than a preset similarity threshold, and / or determine that the quality score is greater than a preset quality score threshold.

[0099] In a possible design, the determining module 802 is further configured to determine a maximum similarity and a target similarity in the target data set, and determine that the maximum similarity and the target similarity are greater than a preset similarity threshold.

[0100] In a possible design, the determining module 802 is further configured to obtain a target face image and a target body image corresponding to the target image, a maximum face similarity of the target face image, and a maximum body similarity of the target body image, calculate a first difference between the maximum face similarity and a preset face similarity threshold in the preset data set, and calculate a second difference between the maximum body similarity and a preset body similarity threshold in the preset data set, determine a maximum difference from the first difference and the second difference, and take a maximum similarity corresponding to the maximum difference as the target similarity.

[0101] In a possible design, the replacing module 803 is specifically configured to obtain a preset similarity threshold and a preset quality score threshold in the preset data set, determine that the maximum similarity is greater than the preset similarity threshold, take the target image as image replacement data, and replace a preset image corresponding to the target image in the preset data set with the target image, and / or determine that the quality score is greater than the preset quality score threshold, take a target image feature of the target image as image replacement data, and replace a preset image feature corresponding to the target image feature in the preset data set with the target image feature.

[0102] In a possible design, the replacing module 803 is further configured to obtain a maximum similarity, a quality score, and a target similarity in the target data set, determine that the maximum similarity and the target similarity are greater than the preset similarity threshold respectively, take the target image as image replacement data, and replace a preset image corresponding to the target image in the preset data set with the target image. In a possible design, the replacing module 803 is further configured to obtain a maximum similarity, a quality score, and a target similarity in the target data set, determine that the maximum similarity and the target similarity are greater than the preset similarity threshold respectively, take the target image as image replacement data, and replace a preset image corresponding to the target image in the preset data set with the target image.

[0103] In a possible design, the replacement module 803 is further configured to: when the target similarity corresponds to a preset human face image or a preset human body image in the preset data set, obtain a maximum similarity corresponding to the target image and the target similarity corresponding to the target image, and an image identifier corresponding to the target image; and determine that the target similarity and the maximum similarity are greater than the preset similarity threshold, respectively, and replace the image identifier with a preset identifier of a preset image corresponding in the preset data set.

[0104] Based on the same inventive concept, the embodiments of the present application further provide an electronic device, which can realize the functions of the foregoing image deduplication apparatus, and refer to Figure 9 , the electronic device comprises:

[0105] at least one processor 901 and a memory 902 connected with the at least one processor 901, and the embodiments of the present application do not limit the specific connection medium between the processor 901 and the memory 902, Figure 9 In the foregoing embodiment, the processor 901 and the memory 902 are connected through the bus 900. The bus 900 is represented by a thick line in the foregoing embodiment, and the connection modes between other components are only schematically illustrated, and are not limited. The bus 900 can be divided into an address bus, a data bus, a control bus and the like, and for the convenience of representation, Figure 9 In the foregoing embodiment, only one thick line is used to represent the bus 900, but it does not mean that there is only one bus or only one type of bus. Alternatively, the processor 901 can also be referred to as a controller, and the name is not limited. Figure 9

[0106] In the embodiments of the present application, the memory 902 stores instructions executable by the at least one processor 901, and the at least one processor 901 can execute the foregoing image deduplication method by executing the instructions stored in the memory 902. The processor 901 can realize the functions of various modules in the apparatus shown in Figure 8 .

[0107] The processor 901 is the control center of the apparatus, can connect all parts of the control device through various interfaces and lines, and can realize the functions and process data of the apparatus by running or executing the instructions stored in the memory 902 and calling the data stored in the memory 902, thereby monitoring the apparatus as a whole.

[0108] ​In one possible design, the processor 901 can include one or more processing units, which can integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communication. It can be understood that the modem processor can also not be integrated into the processor 901. In some embodiments, the processor 901 and the memory 902 can be implemented on the same chip, and in some embodiments, they can also be implemented on separate chips respectively.

[0109] The processor 901 can be a general processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor. The steps of the image deduplication method disclosed in the embodiments of the present application can be directly embodied by the hardware processor for execution, or executed by a combination of hardware and software modules in the processor.

[0110] The memory 902 as a non-volatile computer readable storage medium can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The memory 902 can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, and the like. The memory 902 is any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 902 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing program instructions and / or data.

[0111] By designing and programming the processor 901, the code corresponding to the image deduplication method introduced in the foregoing embodiments can be fixed into the chip, so that the chip can execute the code when running Figure 1An image deduplication step of the illustrated embodiment. How to program processor 901 is well known to those skilled in the art and will not be discussed here.

[0112] Based on the same inventive concept, the embodiments of the present application also provide a storage medium, which stores computer instructions, when the computer instructions run on a computer, make the computer execute the image deduplication method discussed above.

[0113] In some possible implementation manners, various aspects of the image deduplication method provided by the present application can also be implemented in the form of a program product, which includes program codes for making the control device execute the steps of the image deduplication method according to various exemplary embodiments of the present application described above in the specification when the program product runs on the device.

[0114] Those skilled in the art should understand that the embodiments of the present application can be provided in the form of a method, a system, or a computer program product. Therefore, the present application can be in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0115] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device implemented in accordance with the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks. Figure 1 The device that implements the function specified in one or more flows and / or blocks.

[0116] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks. Figure 1 The device that implements the function specified in one or more flows and / or blocks.

[0117] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide processes for implementing the functions specified in the flowchart Figure 1 one or more flows and / or blocks Figure 1 one or more blocks or steps of the functions specified in the flowchart

[0118] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

Claims

1. An image deduplication method, characterized by, The method comprises the following steps: obtaining a target image of a target object and a target data set corresponding to the target image, wherein the target image comprises a target face image and / or a target body image of the target object; determining at least one target parameter in the target data set that meets a preset condition, wherein the preset condition is that the target parameter is greater than a corresponding preset parameter; determining image replacement data corresponding to the at least one target parameter respectively, and replacing image data of the same type as the image replacement data in a preset data set with the image replacement data; determining at least one target parameter in the target data set that meets a preset condition comprises: determining a maximum similarity and a target similarity in the target data set; determining that the maximum similarity and the target similarity are greater than a preset similarity threshold; determining the target similarity in the target data set comprises: obtaining a target face image and a target body image corresponding to the target image, and a maximum face similarity of the target face image and a maximum body similarity of the target body image; calculating a first difference between the maximum face similarity and a preset face similarity threshold in the preset data set, and a second difference between the maximum body similarity and a preset body similarity threshold in the preset data set; determining a maximum difference from the first difference and the second difference, and taking the maximum similarity corresponding to the maximum difference as the target similarity; determining that the maximum similarity and the target similarity are greater than a preset similarity threshold comprises: determining that the maximum face similarity and the target similarity are greater than the preset face similarity threshold; determining that the maximum body similarity and the target similarity are greater than the preset body similarity threshold.

2. The method of claim 1, wherein, determining at least one target parameter in the target data set that meets a preset condition comprises: determining a maximum similarity and a quality score in the target data set, wherein the maximum similarity is a maximum similarity selected from similarities between the target image and each preset image in the preset data set; determining that the maximum similarity is greater than a preset similarity threshold; and / or determining that the quality score is greater than a preset quality score threshold.

3. The method of claim 1, wherein, determining image replacement data corresponding to the at least one target parameter respectively, and replacing image data of the same type as the image replacement data in the preset data set with the image replacement data comprises: obtaining a preset similarity threshold and a preset quality score threshold in the preset data set; determining that the maximum similarity is greater than the preset similarity threshold, taking the target image as image replacement data, and replacing a preset image corresponding to the target image in the preset data set with the target image; and / or determining that the quality score is greater than the preset quality score threshold, taking a target image feature of the target image as image replacement data, and replacing a preset image feature corresponding to the target image feature in the preset data set with the target image feature.

4. The method of claim 1, wherein, The image replacement data corresponding to the at least one target parameter is determined, and image data of the same type as the image replacement data in the preset data set is replaced by the image replacement data, including: The maximum similarity, the quality score and the target similarity in the target data set are obtained; The maximum similarity and the target similarity are determined to be greater than the preset similarity threshold, the target image is taken as the image replacement data, and the preset image corresponding to the target image in the preset data set is replaced by the target image.

5. The method of claim 1, wherein, The image replacement data corresponding to the at least one target parameter is determined, and image data of the same type as the image replacement data in the preset data set is replaced by the image replacement data, including: When the target similarity corresponds to the preset face image or the preset body image in the preset data set, the maximum similarity and the target similarity corresponding to the target image are obtained, and the image identifier corresponding to the target image is obtained; The target similarity and the maximum similarity are determined to be greater than the preset similarity threshold, and the image identifier is replaced by the preset identifier of the preset image corresponding in the preset data set.

6. An image deduplication apparatus, comprising: Including: An obtaining module is configured to obtain a target image of a same target object and a target data set corresponding to the target image; A determining module is configured to determine at least one target parameter meeting a preset condition in the target data set; A replacing module is configured to determine image replacement data corresponding to the at least one target parameter, and replace image data of the same type as the image replacement data in a preset data set by the image replacement data; The determining module is further configured to determine a maximum similarity and a target similarity in the target data set, and determine that the maximum similarity and the target similarity are greater than a preset similarity threshold; The determining module is further configured to obtain a target face image and a target body image corresponding to the target image, a maximum face similarity of the target face image and a maximum body similarity of the target body image, calculate a first difference value between the maximum face similarity and a preset face similarity threshold in a preset data set, calculate a second difference value between the maximum body similarity and a preset body similarity threshold in the preset data set, determine a maximum difference value from the first difference value and the second difference value, and take the maximum similarity corresponding to the maximum difference value as a target similarity; The determining module is further configured to determine that the maximum face similarity and the target similarity are greater than the preset face similarity threshold; The determining module is further configured to determine that the maximum body similarity and the target similarity are greater than the preset body similarity threshold.

7. An electronic device, comprising: Including: A memory is configured to store a computer program; A processor is configured to execute the computer program stored in the memory, and implement the method steps in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and the computer program is executed by the processor to implement the method steps in any one of claims 1-5.

Citation Information

Patent Citations

  • Target re-identification method, target re-identification device and computer readable storage medium

    CN114783037A

  • Method and apparatus for face image deduplication and storage medium

    US20190266441A1