Image cleaning method and device

By determining the target cleaning mode on the server side, combining the input and picture attributes of the client, and using similarity calculation and pre-cleaning methods, the problem of image cleaning errors in the prior art is solved, and the reliability and flexibility of cleaning results are improved.

CN112115285BActive Publication Date: 2024-12-27HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910542678.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-21
Publication Date
2024-12-27
Estimated Expiration
2039-06-21

Smart Images

  • Figure CN112115285B_ABST
    Figure CN112115285B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for cleaning an image. The method is applied to a server and includes: obtaining an image to be cleaned from a database; determining a target cleaning mode corresponding to the image to be cleaned, and cleaning the image to be cleaned according to the target cleaning mode to obtain a target image. An appropriate cleaning mode can be selected to clean the image to improve the reliability of the cleaning result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data mining technology, and in particular to an image cleaning method and device. Background Art

[0002] Data cleaning refers to filtering out valuable data from a large amount of data according to certain rules to filter out useless interference data. Data cleaning technology can be used on images, that is, filtering out valuable images from a large amount of images according to certain rules to filter out useless interference images and complete image cleaning.

[0003] In the related image cleaning methods, non-targeted cleaning is performed according to a unified cleaning mode, which is prone to cleaning errors. For example, useful images may be filtered out or useless images may be retained, and the reliability of the cleaning results is not high. Summary of the invention

[0004] In view of this, the present application provides an image cleaning method and device to improve the reliability of cleaning results.

[0005] The first aspect of the present application provides an image cleaning method, which is applied to a server and includes:

[0006] Get the image to be cleaned from the database;

[0007] A target cleaning mode corresponding to the image to be cleaned is determined, and the image to be cleaned is cleaned according to the target cleaning mode to obtain a target image.

[0008] According to an embodiment of the present application, after cleaning the image to be cleaned according to the target cleaning mode to obtain the target image, the method further includes:

[0009] Send the target image to the client, so that the client continues to clean the target image according to the externally input cleaning instruction;

[0010] Get the target image after cleaning by the client.

[0011] According to an embodiment of the present application, determining a target cleaning mode corresponding to a picture to be cleaned includes:

[0012] Determine the target cleaning mode corresponding to the image to be cleaned according to the cleaning instruction input externally;

[0013] or,

[0014] Determine the target cleaning mode corresponding to the image to be cleaned according to the image attributes of each image to be cleaned;

[0015] or,

[0016] The target cleaning mode corresponding to the image to be cleaned is determined according to the collection scene of each image to be cleaned.

[0017] According to an embodiment of the present application, the database stores pictures collected in multiple different scenes;

[0018] Determine the target cleaning mode corresponding to the image to be cleaned, including:

[0019] When there is a picture in the first scene among all the acquired pictures to be cleaned, determining that a first cleaning mode corresponding to the first scene is the target cleaning mode; the first scene is a target recognition scene;

[0020] When there is no picture in the first scene among all the acquired pictures to be cleaned, the second cleaning mode is determined to be the target cleaning mode; the second cleaning mode is a preset cleaning mode corresponding to a scene other than the first scene.

[0021] According to one embodiment of the present application, the target cleaning mode is the first cleaning mode;

[0022] The step of cleaning the image to be cleaned according to the target cleaning mode to obtain the target image includes:

[0023] Determine a reference picture and a non-reference picture from all acquired pictures to be cleaned, wherein the reference picture is a picture in the first scene, and the non-reference picture is a picture other than the reference picture among all pictures to be cleaned;

[0024] For each reference picture, the similarity between the reference picture and each non-reference picture is calculated, a non-reference picture having a similarity greater than a first set value is selected from each non-reference picture, and the reference picture and the selected non-reference picture are determined as target pictures.

[0025] According to an embodiment of the present application, calculating the similarity between the reference picture and each non-reference picture includes:

[0026] Modeling the reference image to obtain a data model corresponding to the reference image;

[0027] Performing modeling processing on each non-reference picture to obtain a data model corresponding to the non-reference picture;

[0028] The similarity between the reference picture and each non-reference picture is calculated according to the data model corresponding to the reference picture and the data model corresponding to each non-reference picture.

[0029] According to one embodiment of the present application, the target cleaning mode is the second cleaning mode;

[0030] The step of cleaning the image to be cleaned according to the target cleaning mode to obtain the target image includes:

[0031] Classifying all the acquired images to be cleaned to obtain at least one target class; in each target class, the similarity between any two images to be cleaned is greater than a second set value;

[0032] The image to be cleaned in each target class is determined as the target image.

[0033] According to an embodiment of the present application, before cleaning the image to be cleaned according to the target cleaning mode to obtain the target image, the method further includes:

[0034] The acquired image to be cleaned is pre-cleaned in a pre-cleaning manner, wherein the pre-cleaning manner includes: pre-cleaning based on the resolution of the image and / or the pixel value of each pixel;

[0035] Cleaning the image to be cleaned according to the target cleaning mode to obtain a target image, including:

[0036] The image to be cleaned after pre-cleaning is cleaned according to the target cleaning mode to obtain a target image.

[0037] The second aspect of the present application provides an image cleaning device, which is applied to a server and includes:

[0038] The image acquisition module is used to obtain the image to be cleaned from the database;

[0039] The first image cleaning module is used to determine a target cleaning mode corresponding to the image to be cleaned, and clean the image to be cleaned according to the target cleaning mode to obtain a target image.

[0040] According to an embodiment of the present application, after the first image cleaning module, the device further includes:

[0041] The second image cleaning module is used to send the target image to the client, so that the client continues to clean the target image according to the externally input cleaning instruction;

[0042] The cleaning result acquisition module is used to obtain the target image after cleaning by the client.

[0043] According to an embodiment of the present application, when the first image cleaning module determines the target cleaning mode corresponding to the image to be cleaned, it is specifically used to:

[0044] Determine the target cleaning mode corresponding to the image to be cleaned according to the cleaning instruction input externally;

[0045] or,

[0046] Determine the target cleaning mode corresponding to the image to be cleaned according to the image attributes of each image to be cleaned;

[0047] or,

[0048] The target cleaning mode corresponding to the image to be cleaned is determined according to the collection scene of each image to be cleaned.

[0049] According to an embodiment of the present application, the database stores pictures collected in multiple different scenes;

[0050] When the first image cleaning module determines the target cleaning mode corresponding to the image to be cleaned, it is specifically used to:

[0051] When there is a picture in the first scene among all the acquired pictures to be cleaned, determining that a first cleaning mode corresponding to the first scene is the target cleaning mode; the first scene is a target recognition scene;

[0052] When there is no picture in the first scene among all the acquired pictures to be cleaned, the second cleaning mode is determined to be the target cleaning mode; the second cleaning mode is a preset cleaning mode corresponding to a scene other than the first scene.

[0053] According to one embodiment of the present application, the target cleaning mode is the first cleaning mode;

[0054] When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to:

[0055] Determine a reference picture and a non-reference picture from all acquired pictures to be cleaned, wherein the reference picture is a picture in the first scene, and the non-reference picture is a picture other than the reference picture among all pictures to be cleaned;

[0056] For each reference picture, the similarity between the reference picture and each non-reference picture is calculated, a non-reference picture having a similarity greater than a first set value is selected from each non-reference picture, and the reference picture and the selected non-reference picture are determined as target pictures.

[0057] According to an embodiment of the present application, when the first image cleaning module calculates the similarity between the reference image and each non-reference image, it is specifically used to:

[0058] Modeling the reference image to obtain a data model corresponding to the reference image;

[0059] Performing modeling processing on each non-reference picture to obtain a data model corresponding to the non-reference picture;

[0060] The similarity between the reference picture and each non-reference picture is calculated according to the data model corresponding to the reference picture and the data model corresponding to each non-reference picture.

[0061] According to one embodiment of the present application, the target cleaning mode is the second cleaning mode;

[0062] When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to:

[0063] Classifying all the acquired images to be cleaned to obtain at least one target class; in each target class, the similarity between any two images to be cleaned is greater than a second set value;

[0064] The image to be cleaned in each target class is determined as the target image.

[0065] According to an embodiment of the present application, before the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is further used to:

[0066] The acquired image to be cleaned is pre-cleaned in a pre-cleaning manner, wherein the pre-cleaning manner includes: pre-cleaning based on the resolution of the image and / or the pixel value of each pixel;

[0067] When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to:

[0068] The image to be cleaned after pre-cleaning is cleaned according to the target cleaning mode to obtain a target image.

[0069] A third aspect of the present application provides an electronic device, including a processor and a memory; the memory stores a program that can be called by the processor; wherein when the processor executes the program, the image cleaning method described in the above embodiment is implemented.

[0070] A fourth aspect of the present application provides a machine-readable storage medium having a program stored thereon, which, when executed by a processor, implements the image cleaning method as described in the aforementioned embodiment.

[0071] The embodiments of the present application have the following beneficial effects:

[0072] In the embodiment of the present invention, after obtaining the image to be cleaned this time from the database, a suitable cleaning mode can be selected as the target cleaning mode corresponding to the image to be cleaned according to the characteristics of the image to be cleaned this time. Therefore, for all the images to be cleaned in the database, they are no longer limited to one cleaning mode, making the cleaning method more flexible and appropriate, avoiding the problem of image cleaning errors caused by incorrect cleaning mode, avoiding filtering out useful images or retaining useless images as much as possible, and improving the reliability of the cleaning results. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 is a schematic diagram of a process of a picture cleaning method according to an embodiment of the present application;

[0074] Figure 2 is a structural block diagram of a picture cleaning device according to an embodiment of the present application;

[0075] Figure 3 is a flow chart of a method for cleaning an image according to another embodiment of the present application;

[0076] Figure 4 is a schematic diagram of interaction between a server and a client in an embodiment of the present application;

[0077] Figure 5 is a structural block diagram of a picture cleaning device according to another embodiment of the present application;

[0078] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0079] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0080] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0081] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various devices, this information should not be limited to these terms. These terms are only used to distinguish devices of the same type from each other. For example, without departing from the scope of the present application, a first device may also be referred to as a second device, and similarly, a second device may also be referred to as a first device. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0082] In order to make the description of this application clearer and more concise, some technical terms in this application are explained below:

[0083] Clustering: The process of dividing a collection of physical or abstract objects into multiple classes consisting of similar objects is called clustering. The clusters generated by clustering are a collection of data objects. The data objects in the same cluster are similar to each other, and the data objects in different clusters are different.

[0084] Multithreading: refers to the technology of implementing concurrent execution of multiple threads from software or hardware, which can realize the simultaneous processing of multiple tasks.

[0085] Asynchronous task distribution: The task sender distributes tasks to different task receivers. After distribution, it does not care about the feedback from the task receivers and continues to process other matters. If the task receiver completes the task, it will actively report it to the task sender.

[0086] The image cleaning method of the embodiment of the present application is described in more detail below, but should not be limited to this.

[0087] In one embodiment, see Figure 1 , a picture cleaning method, the method is applied to a server, comprising the following steps:

[0088] S100: Obtain the image to be cleaned from the database;

[0089] S200: Determine a target cleaning mode corresponding to the image to be cleaned, and clean the image to be cleaned according to the target cleaning mode to obtain a target image.

[0090] The image cleaning method of the embodiment of the present application can be applied to a server, which can be an electronic device or two or more electronic devices. The specific type of the electronic device is not limited, such as a computer device. The server can integrate storage functions, task scheduling functions, task execution functions, etc., and of course, each function can be implemented by a server separately.

[0091] In step S100, the image to be cleaned is obtained from the database.

[0092] The pictures stored in the database can be pictures collected by camera devices arranged in multiple different scenes. The camera devices can upload the collected pictures to the server (through the upload tool), and the server stores the received pictures in the database. Since the camera devices in each scene are constantly collecting pictures, new pictures are constantly stored in the database, and the database will store a large number of pictures. Of course, the pictures stored in the database can also be collected by the camera devices in a scene, without limitation.

[0093] The server can receive pictures captured by various camera devices in a multi-threaded manner, maximize the performance of the server, and increase the speed of picture upload. When the server stores the received pictures in the database, it can assign a picture identification ID to each picture. In the subsequent cleaning process, the picture ID is used to identify the corresponding picture.

[0094] When obtaining the images to be cleaned from the database, a batch of images to be cleaned can be obtained at one time, for example, dozens or hundreds of images can be obtained at one time. Of course, the specific number can be determined according to the actual situation. The images to be cleaned can be obtained from the database according to certain conditions, for example, all images stored in the database within a certain period of time are obtained from the database as the images to be cleaned. The specific acquisition conditions are not limited as long as these images are images that need to be cleaned.

[0095] The image to be cleaned may contain objects, including vehicles, faces, fingerprints, or irises, etc. The identity information of all objects in the image to be cleaned may be unknown, or some may be unknown and some may be known, or all may be known.

[0096] In step S200, a target cleaning mode corresponding to the image to be cleaned is determined, and the image to be cleaned is cleaned according to the target cleaning mode to obtain a target image.

[0097] A batch of images to be cleaned obtained at different times may have different characteristics, and the differences may be reflected in: the attributes of the images, the sources of the images, the information carried by the images, the content of the images, etc. More than two cleaning modes may be pre-set in the server. For each acquired image to be cleaned, a suitable cleaning mode may be selected as the target cleaning mode according to its characteristics.

[0098] After determining the target cleaning mode corresponding to the image to be cleaned, the image to be cleaned can be cleaned according to the target cleaning mode to obtain the target image, thereby achieving the cleaning of the image to be cleaned obtained this time, and avoiding image cleaning errors caused by inappropriate cleaning modes.

[0099] Optionally, the embodiment of the present application can be applied in a server cluster composed of multiple nodes, different tasks can be executed by different execution nodes, and the task scheduling node is responsible for task distribution. After determining the target cleaning mode, the task scheduling node can send the task to each execution node through the socket protocol according to the task information of the target cleaning mode, and each execution node coordinates and cooperates to complete the cleaning of the image to be cleaned.

[0100] Different cleaning modes have different task information, which divides the cleaning process into different tasks. For example, in one cleaning mode, the cleaning process is divided into modeling tasks, comparison tasks, etc., and in another cleaning mode, the cleaning process is divided into modeling tasks, clustering tasks, etc. For example, when the target cleaning mode is the first cleaning mode, the task scheduling node sends the modeling task to the execution node specifically responsible for the modeling task, so that it can model each image to be cleaned, and sends the comparison task to the node specifically responsible for the comparison task, so that it can compare the images to be cleaned with each other according to the data model corresponding to each image to be cleaned, so as to select valuable images and complete the cleaning. The task scheduling node can send tasks to the execution node in an asynchronous task distribution manner, which can improve the processing efficiency of the server cluster.

[0101] Of course, the above method is only an example and is not limited to this. As long as the image to be cleaned can be cleaned according to the target cleaning mode to obtain the target image, it is not limited whether the cleaning is completed by one node or by multiple nodes coordinating and cooperating to complete the cleaning.

[0102] In the embodiment of the present invention, after obtaining the image to be cleaned this time from the database, a suitable cleaning mode can be selected as the target cleaning mode corresponding to the image to be cleaned according to the characteristics of the image to be cleaned this time. Therefore, for all the images to be cleaned in the database, they are no longer limited to one cleaning mode, making the cleaning method more flexible and appropriate, avoiding the problem of image cleaning errors caused by incorrect cleaning mode, avoiding filtering out useful images or retaining useless images as much as possible, and improving the reliability of the cleaning results.

[0103] In one embodiment, the above-mentioned image cleaning method process can be executed by the image cleaning device 100, such as Figure 2 As shown, the target detection device 100 mainly includes two modules: an image acquisition module 101 and a first image cleaning module 102. The image acquisition module 101 is used to perform the above step S100, and the first image cleaning module 102 is used to perform the above step S200.

[0104] In one embodiment, see Figure 3 After determining the target cleaning mode corresponding to the image to be cleaned and cleaning the image to be cleaned according to the target cleaning mode to obtain the target image, the method further includes the following steps:

[0105] S300: sending the target image to the client, so that the client continues to clean the target image according to the externally input cleaning instruction;

[0106] S400: Acquire the target image after being cleaned by the client.

[0107] In step S300, the target image is sent to the client, so that the client continues to clean the target image according to the externally input cleaning instruction.

[0108] The server has cleaned the image to be cleaned once to obtain the target image, and the server sends the target image to the client, and the target image is further cleaned in the client, that is, the second cleaning of the image to be cleaned is achieved. Different cleaning indicators can be set for the two cleanings. For example, some target images that are roughly similar to each other can be found in the first cleaning, while some target images that are very similar to each other need to be found in the second cleaning. In this way, the problems of filtering out useful target images and retaining useless target images can be avoided.

[0109] Since the cleaned target image is the image obtained by cleaning the image to be cleaned twice, compared with one-time cleaning, valuable images can be screened out more accurately and useless images can be deleted, and the cleaned target image has higher reliability.

[0110] When the target image is cleaned in the client, the target image continues to be cleaned according to the externally input cleaning instructions. The cleaning instructions can be input into the client by external personnel. Due to the instructions of external personnel, it no longer depends solely on the accuracy of the cleaning algorithm, and more flexible cleaning is achieved, which can achieve more accurate cleaning of the target image.

[0111] There can be more than one client, and the server can divide the target images into multiple groups. The similarity between the target images in each group reaches a certain value. Each group of target images is carried in the task and distributed to each client. Each client cleans the target images in the received task respectively. Cleaning is achieved through task distribution, which can improve the cleaning efficiency.

[0112] After the client cleans the target image, external personnel can view it again on the client, quickly browse the cleaning results of the target image, and review the cleaning results of the target image. If there is no error, save it. If there is a problem, modify it, such as re-retaining the target image that was deleted by mistake and deleting the target image that was retained by mistake. The client can review the cleaning results of the target image through the external input review command, and the target image obtained after the review is used as the cleaned target image, and the cleaned target image is uploaded to the server.

[0113] The cleaned target image can also be exported in the client. The target image can be exported in a specified format through the export tool and stored in a local folder. It can be stored in a different folder each time and can be added to the training sample set for training the algorithm model. Of course, the specific purpose is not limited.

[0114] In step S400, the target image cleaned by the client is obtained.

[0115] The client can actively upload the cleaned target image, or the server can pull the cleaned target image from the client. The specific acquisition method is not limited. The server can store the acquired target image in the database for subsequent use when needed. For example, when the algorithm model needs to be trained, the target image can be obtained from the database as a training sample set, and the algorithm model can be trained using the training sample set.

[0116] In the related image cleaning method, only one-time cleaning is performed to filter out useless interfering images. This cleaning method requires strict control of filtering conditions, and it is very likely that useful images will be filtered out or useless images will be retained, and the reliability of the cleaning result is not high.

[0117] In an embodiment of the present application, after the server cleans the image to be cleaned once according to the target cleaning mode to obtain the target image, the target image is sent to the client, and the client cleans the target image twice according to the cleaning instruction input externally. Compared with a one-time cleaning, the embodiment of the present application can improve the reliability of the cleaning result of the image to be cleaned by cleaning twice, avoid the problem of filtering out useful images and retaining useless images, and the two cleanings are implemented in the server and the client respectively, which can reduce the processing load of the server and improve the cleaning efficiency.

[0118] In the embodiment of the present application, the interaction between the server and the client can be seen in Figure 4 The server 10 sends the target image obtained by cleaning the image to be cleaned to the client 20, and the client continues to clean the target image and sends the cleaned target image to the server 10. It can be understood that there can be multiple clients interacting with the server and responsible for continuing to clean the target image. Figure 4 The client 20 is shown for exemplary purposes only and is not intended to be limiting.

[0119] In one embodiment, the above-mentioned image cleaning method process can be executed by the image cleaning device 100, such as Figure 5 As shown, the target detection device 100 mainly includes four modules: an image acquisition module 101, a first image cleaning module 102, a second image cleaning module 103 and a cleaning result acquisition module 104. The image acquisition module 101 is used to perform the above step S100, the first image cleaning module 102 is used to perform the above step S200, the second image cleaning module 103 is used to perform the above step S300, and the cleaning result acquisition module 104 is used to perform the above step S400.

[0120] In one embodiment, in step S200, determining a target cleaning mode corresponding to the image to be cleaned includes:

[0121] Determine the target cleaning mode corresponding to the image to be cleaned according to the cleaning instruction input externally;

[0122] or,

[0123] Determine the target cleaning mode corresponding to the image to be cleaned according to the image attributes of each image to be cleaned;

[0124] or,

[0125] The target cleaning mode corresponding to the image to be cleaned is determined according to the collection scene of each image to be cleaned.

[0126] The cleaning instruction may be input by the user, and the user may input the cleaning instruction into the server through the client, or may directly input the cleaning instruction into the server. The user may carry the cleaning requirement in the cleaning instruction, so that the corresponding cleaning mode may be determined according to the cleaning requirement in the cleaning instruction as the target cleaning mode.

[0127] Image attributes may include pixels, resolution, size, color, bit depth, hue, saturation, brightness, color channel, image level, etc. Based on the image attributes of each image to be cleaned, a cleaning mode suitable for cleaning the images to be cleaned may be determined as a target cleaning mode. For example, if the image to be cleaned is large, a large image cleaning mode is selected as the target cleaning mode, and if the image to be cleaned is small, a small image cleaning mode is selected as the target cleaning mode.

[0128] The collection scenes of the images to be cleaned may include face recognition scenes, target tracking scenes, etc., and the corresponding cleaning modes can be determined according to different scenes. For example, in the face recognition scene, the cleaning mode related to face recognition can be selected as the target cleaning mode, which can clean out some unnecessary face pictures, and the target tracking scene can select the cleaning mode related to target tracking as the target cleaning mode, which can clean out some pictures with incomplete or missing targets (for example, in the scene of tracking airplanes, if there is no airplane in the picture but only blue sky, then the picture can be cleaned).

[0129] There are many ways to determine the target cleaning mode. This embodiment only illustrates several ways and is not intended to be limiting.

[0130] In one embodiment, the database stores pictures collected in multiple different scenes;

[0131] In step S200, determining the target cleaning mode corresponding to the image to be cleaned includes:

[0132] When there is a picture in the first scene among all the acquired pictures to be cleaned, determining that a first cleaning mode corresponding to the first scene is the target cleaning mode; the first scene is a target recognition scene;

[0133] When there is no picture in the first scene among all the acquired pictures to be cleaned, the second cleaning mode is determined to be the target cleaning mode; the second cleaning mode is a preset cleaning mode corresponding to a scene other than the first scene.

[0134] Since the database stores pictures collected in multiple different scenes, the scenes may include target recognition scenes (ie, first scenes) and non-target recognition scenes (ie, non-first scenes). The target recognition scene may be an identity information collection scene.

[0135] In the first scenario, when collecting the image of the object, target recognition will be performed to determine the identity information of the object, so that the collected image will be associated with the identity information of the object in the image. In non-first scenarios, when collecting the image of the object, the identity information of the object will not be determined, so the image will not be associated with the identity information.

[0136] For example, in scenarios where identity information needs to be verified, such as customs gates, the subject's face will be captured to obtain a facial image, and the identity certificate will need to be swiped on the identity information collector, so the collected image will be associated with the identity information of the subject in the image; in scenarios such as supermarkets where identity information does not need to be verified, even if the subject's face is captured, the subject's identity information will not be confirmed, so the collected image will not be associated with the identity information.

[0137] In this embodiment, whether the picture to be cleaned is a picture collected in the first scene can be determined based on whether the picture to be cleaned is associated with identity information; alternatively, the database can mark the scene of the picture when storing the picture, and whether the picture to be cleaned is a picture collected in the first scene can be determined based on the mark of the picture to be cleaned.

[0138] The server may preset two cleaning modes, namely a first cleaning mode and a second cleaning mode, wherein the first cleaning mode is suitable for cleaning the to-be-cleaned pictures when there are pictures in the first scene, and the second cleaning mode is suitable for cleaning the to-be-cleaned pictures when there are no pictures in the first scene. It is understandable that the two cleaning modes are different.

[0139] It can be checked whether there are pictures in the first scene among all the pictures to be cleaned. If so, the first cleaning mode is used as the target cleaning mode, and the acquired pictures to be cleaned are cleaned according to the first cleaning mode; if not, the second cleaning mode is used as the target cleaning mode, and the acquired pictures to be cleaned are cleaned according to the second cleaning mode.

[0140] For example, if all the pictures to be cleaned include pictures collected at the customs gate and pictures collected at the supermarket, then the first cleaning mode is selected as the target cleaning mode. The first cleaning mode can be a cleaning mode that can use the pictures collected at the customs gate as reference pictures to clean the pictures collected at the supermarket, and clean out the pictures collected at the supermarket that are not similar to the pictures collected at the customs gate; if all the pictures to be cleaned only include pictures collected at the supermarket, then the second cleaning mode is selected as the target cleaning mode. The second cleaning mode can be a cleaning mode that can clean the pictures collected at the supermarket to obtain pictures with high similarity, and clean out pictures with low similarity. For example, pictures of human bodies can be cleaned out, while pictures of incomplete human bodies are cleaned out.

[0141] In this embodiment, the corresponding cleaning mode can be determined according to the scene conditions of all the images to be cleaned, so that the images to be cleaned can be cleaned more appropriately, which is conducive to improving the reliability of cleaning.

[0142] In one embodiment, the target cleaning mode is the first cleaning mode;

[0143] In step S200, the step of cleaning the image to be cleaned according to the target cleaning mode to obtain the target image includes:

[0144] S201: Determine reference pictures and non-reference pictures from all acquired pictures to be cleaned, wherein the reference pictures are pictures in a first scene, and the non-reference pictures are pictures other than the reference pictures among all pictures to be cleaned;

[0145] S202: For each reference picture, calculate the similarity between the reference picture and each non-reference picture, select a non-reference picture whose similarity is greater than a first set value from each non-reference picture, and determine the reference picture and the selected non-reference picture as target pictures.

[0146] In this embodiment, there are reference pictures and non-reference pictures in all the pictures to be cleaned, the reference pictures are pictures in the first scene, and the non-reference pictures are pictures other than the reference pictures in all the pictures to be cleaned. The number of reference pictures in all the pictures to be cleaned is more than one, and in most cases, non-reference pictures account for the majority and reference pictures account for a minority of all the pictures to be cleaned.

[0147] In step S201, reference pictures and non-reference pictures are determined from all acquired pictures to be cleaned.

[0148] For each of the acquired pictures to be cleaned, determine whether it is a reference picture or a non-reference picture according to the acquisition scene of the picture to be cleaned. If the acquisition scene is the first scene, then the picture to be cleaned is a reference picture. If the acquisition scene is not the first scene, then the picture to be cleaned is a non-reference picture. Specifically, the acquisition scene of the picture to be cleaned can be identified according to whether the picture to be cleaned is associated with identity information, or the acquisition scene of the picture to be cleaned can be identified according to the scene mark of the picture to be cleaned. Of course, the specific determination method is not limited to this.

[0149] In step S202, for each reference picture, the similarity between the reference picture and each non-reference picture is calculated, a non-reference picture having a similarity greater than a first set value is selected from each non-reference picture, and the reference picture and the selected non-reference picture are determined as target pictures.

[0150] The purpose of cleaning is to find out the pictures with high similarity to the reference pictures from all non-reference pictures. Since there may be one or more reference pictures in the pictures to be cleaned, and different reference pictures generally contain different objects, it is necessary to find out non-reference pictures with high similarity for each reference picture.

[0151] The higher the calculated similarity between the reference image and the non-reference image, the more similar the object in the non-reference image is to the object in the reference image. The first set value is a standard for measuring similarity. If the similarity between the selected non-reference image and the reference image is greater than the first set value, it means that the non-reference image meets the selection requirements. The first set value can be set as needed, for example, it can be 60%. The value here is only an example, and of course it can be other values, such as 50%, 70%, etc.

[0152] Each reference picture and the corresponding selected non-reference picture may be used as a group of target pictures, and the group of target pictures are all similar pictures to the reference picture.

[0153] Among them, the same non-reference pictures can exist in different target picture groups. For example, if the similarity between a non-reference picture and the first reference picture is greater than a first set value, and the similarity between a non-reference picture and the second reference picture is also greater than the first set value, then the non-reference picture will exist in both the target picture group where the first reference picture is located and the target picture group where the second reference picture is located.

[0154] In this embodiment, when sending target images to the client, each group of target images can be carried in the task and distributed to multiple clients. Each client is responsible for the cleaning task of at least one group of target images, ensuring that the cleaning task can be executed in a timely manner, balancing the processing workload of each client, and speeding up the processing speed. The server can distribute tasks to each client in an asynchronous distribution manner, and can process other transactions after distribution. The server and the client can realize pipeline processing to improve processing efficiency.

[0155] After receiving the task, the client can display the reference image on one side of the display screen and scroll the non-reference image on the other side. The client can manually identify the similarity between the two and input instructions to the client. The client further determines the similarity between the non-reference image and the reference image based on the received instructions, thereby selecting the non-reference image with higher similarity to achieve the cleaning of the target image.

[0156] In one embodiment, in step S202, calculating the similarity between the reference picture and each non-reference picture includes:

[0157] Modeling the reference image to obtain a data model corresponding to the reference image;

[0158] Performing modeling processing on each non-reference picture to obtain a data model corresponding to the non-reference picture;

[0159] The similarity between the reference picture and each non-reference picture is calculated according to the data model corresponding to the reference picture and the data model corresponding to each non-reference picture.

[0160] By modeling an image, the image can be abstracted into structured data for representing the object in the image. For example, the features of the object in the image can be extracted, and structured data representing the object can be constructed based on the extracted features. The structured data can, for example, describe which locations of the object have which feature points. Structured data is data that can be processed by a computer, and the structured data is used as the data model corresponding to the image.

[0161] Taking a face as an example, a face modeling algorithm can be used to model the object in the image. For example, face detection can be performed on the image first, the features of the detected face can be extracted, and the extracted features can be vectorized to obtain a feature vector, which can be used as a data model.

[0162] It can be understood that the above modeling method is applicable to both reference images and non-reference images. Of course, the specific modeling method is not limited as long as the data model corresponding to the image can be obtained.

[0163] When calculating the similarity between the reference picture and each non-reference picture based on the data model corresponding to the reference picture and the data model corresponding to each non-reference picture, the Euclidean distance, cosine distance, etc. between the data model corresponding to the reference picture and the data model corresponding to the non-reference picture can be calculated, and the calculated value is used as the similarity between the reference picture and the non-reference picture. Of course, this is just an example, and the specific calculation method is not limited.

[0164] In one embodiment, the target cleaning mode is the second cleaning mode;

[0165] In step S200, the step of cleaning the image to be cleaned according to the target cleaning mode to obtain the target image includes:

[0166] S203: Classify all the acquired images to be cleaned to obtain at least one target class; in each target class, the similarity between any two images to be cleaned is greater than a second set value;

[0167] S204: Determine the to-be-cleaned picture in each target class as the target picture.

[0168] In step S203, a similarity-based clustering method may be used to classify all acquired images to be cleaned, and the images to be cleaned whose similarities are greater than a second set value are clustered into one category to obtain at least one target category.

[0169] The target class contains at least two images to be cleaned, and the similarity between any two images to be cleaned is greater than a second set value. After clustering, if there is a class with only one image to be cleaned, then this class is not the target class.

[0170] The similarity between any two to-be-cleaned images in each target class is greater than a second set value. For example, if there are three to-be-cleaned images A, B, and C in a target class, then the similarity between A and B is greater than the second set value, the similarity between A and C is greater than the second set value, and the similarity between B and C is greater than the second set value.

[0171] The second set value can be set as needed, for example, it can be 60%. The value here is only an example, and of course it can be other values, such as 50%, 70%, etc.

[0172] When classifying all acquired images to be cleaned, each image to be cleaned may be modeled to obtain a data model corresponding to the image to be cleaned, and all images to be cleaned may be classified based on the data model to obtain a target class.

[0173] The similarity between two images to be cleaned can be obtained by calculating the Euclidean distance and the cosine distance between the data models corresponding to the two images to be cleaned, and the calculated value is used as the similarity between the two images to be cleaned. Of course, the specific similarity calculation method is not limited. The higher the calculated similarity, the more similar the objects in the two images to be cleaned are.

[0174] In step S204, the to-be-cleaned pictures in each target class are determined as target pictures.

[0175] In this embodiment, when sending the target image to the client, each target class can be carried in the task and distributed to multiple clients. Each client is responsible for the cleaning task of at least one target class, ensuring that the cleaning task can be executed in a timely manner, balancing the processing workload of each client, and speeding up the processing speed. The server can distribute tasks to each client in an asynchronous distribution manner, and can process other transactions after distribution. The server and the client can realize pipeline processing to improve processing efficiency.

[0176] After receiving the task, the client can display the target image of a target class, and can manually identify the similarity between every two target images in the target class and input instructions to the client. The client further determines the similarity between the two target images based on the received instructions, so as to further screen the target images in the target class and delete the target images in the target class that are not similar to most target images, thereby achieving target image cleaning.

[0177] In one embodiment, before cleaning the to-be-cleaned picture according to the target cleaning mode to obtain the target picture, the following steps are also included:

[0178] The acquired image to be cleaned is pre-cleaned in a pre-cleaning manner, wherein the pre-cleaning manner includes at least one of the following: pre-cleaning based on the resolution of the image and / or the pixel value of each pixel;

[0179] In step S200, the image to be cleaned is cleaned according to the target cleaning mode to obtain a target image, including:

[0180] The image to be cleaned after pre-cleaning is cleaned according to the target cleaning mode to obtain a target image.

[0181] The obtained pictures to be cleaned are pre-cleaned based on the resolution of the pictures, and some pictures to be cleaned with low resolution can be cleaned first. The obtained pictures to be cleaned are pre-cleaned based on the pixel value of each pixel in the pictures, and some pictures to be cleaned with abnormal pixel values ​​or pictures to be cleaned whose pixel values ​​do not meet the requirements can be cleaned first. In this way, the picture quality of the pictures to be cleaned in the subsequent cleaning can be guaranteed to meet the requirements.

[0182] Of course, other pre-cleaning methods may also be included. For example, if the purpose of cleaning is to use the cleaned images for face recognition, then the pre-cleaning method may be to clean some images without faces or with incomplete faces. The specific method is not limited to this.

[0183] The present application also provides a picture cleaning device, which is applied to a server. Figure 2 , the image cleaning device 100 comprises:

[0184] The picture acquisition module 101 is used to acquire the picture to be cleaned from the database;

[0185] The first image cleaning module 102 is used to determine a target cleaning mode corresponding to the image to be cleaned, and clean the image to be cleaned according to the target cleaning mode to obtain a target image.

[0186] In one embodiment, see Figure 5 After the first picture cleaning module 102, the device further includes:

[0187] The second image cleaning module 103 is used to send the target image to the client, so that the client continues to clean the target image according to the externally input cleaning instruction;

[0188] The cleaning result acquisition module 104 is used to acquire the target image after cleaning by the client.

[0189] In one embodiment, when the first image cleaning module determines the target cleaning mode corresponding to the image to be cleaned, it is specifically used to:

[0190] Determine the target cleaning mode corresponding to the image to be cleaned according to the cleaning instruction input externally;

[0191] or,

[0192] Determine the target cleaning mode corresponding to the image to be cleaned according to the image attributes of each image to be cleaned;

[0193] or,

[0194] The target cleaning mode corresponding to the image to be cleaned is determined according to the collection scene of each image to be cleaned.

[0195] In one embodiment, the database stores pictures collected in multiple different scenes;

[0196] When the first image cleaning module determines the target cleaning mode corresponding to the image to be cleaned, it is specifically used to:

[0197] When there is a picture in a first scene among all the acquired pictures to be cleaned, determining a first cleaning mode corresponding to the first scene as the target cleaning mode; the first scene is an identity information collection scene;

[0198] When there is no picture in the first scene among all the acquired pictures to be cleaned, the second cleaning mode is determined to be the target cleaning mode; the second cleaning mode is a preset cleaning mode corresponding to a scene other than the first scene.

[0199] In one embodiment, the target cleaning mode is the first cleaning mode;

[0200] When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to:

[0201] Determine a reference picture and a non-reference picture from all acquired pictures to be cleaned, wherein the reference picture is a picture in the first scene, and the non-reference picture is a picture other than the reference picture among all pictures to be cleaned;

[0202] For each reference picture, the similarity between the reference picture and each non-reference picture is calculated, a non-reference picture having a similarity greater than a first set value is selected from each non-reference picture, and the reference picture and the selected non-reference picture are determined as target pictures.

[0203] In one embodiment, when the first image cleaning module calculates the similarity between the reference image and each non-reference image, it is specifically used to:

[0204] Modeling the reference image to obtain a data model corresponding to the reference image;

[0205] Performing modeling processing on each non-reference picture to obtain a data model corresponding to the non-reference picture;

[0206] The similarity between the reference picture and each non-reference picture is calculated according to the data model corresponding to the reference picture and the data model corresponding to each non-reference picture.

[0207] In one embodiment, the target cleaning mode is the second cleaning mode;

[0208] When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to:

[0209] Classifying all the acquired images to be cleaned to obtain at least one target class; in each target class, the similarity between any two images to be cleaned is greater than a second set value;

[0210] The image to be cleaned in each target class is determined as the target image.

[0211] In one embodiment, before the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is further used to:

[0212] The acquired image to be cleaned is pre-cleaned in a pre-cleaning manner, wherein the pre-cleaning manner includes: pre-cleaning based on the resolution of the image and / or the pixel value of each pixel;

[0213] When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to:

[0214] The image to be cleaned after pre-cleaning is cleaned according to the target cleaning mode to obtain a target image.

[0215] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0216] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units.

[0217] The present application also provides an electronic device, including a processor and a memory; the memory stores a program that can be called by the processor; wherein, when the processor executes the program, the image cleaning method described in the above embodiment is implemented.

[0218] The embodiment of the image cleaning device of the present application can be applied to electronic devices. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the electronic device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 6 As shown, Figure 6 is a hardware structure diagram of an electronic device in which a picture cleaning device 100 is located according to an exemplary embodiment of the present application, except Figure 6 In addition to the processor 510, memory 530, interface 520, and non-volatile memory 540 shown, the electronic device where the device 100 is located in the embodiment may also include other hardware according to the actual function of the electronic device, which will not be described in detail.

[0219] The present application also provides a machine-readable storage medium on which a program is stored. When the program is executed by a processor, the image cleaning method as described in any one of the aforementioned embodiments is implemented.

[0220] The present application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Machine-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of machine-readable storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0221] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for cleaning an image, characterized in that: Applied to a server cluster consisting of multiple nodes, the multiple nodes are divided into task scheduling nodes and execution nodes, the method includes: The task scheduling node obtains the to-be-cleaned picture from the database; the to-be-cleaned picture is at least one picture stored in the specified database in a specified time period; The task scheduling node selects a cleaning mode matching the image to be cleaned from the at least two cleaning modes obtained according to the characteristics of the image to be cleaned as a target cleaning mode corresponding to the image to be cleaned; if the characteristics of different batches of images to be cleaned are different, the target cleaning modes corresponding to the different batches of images to be cleaned are also different; the characteristics of the images to be cleaned include at least: image attributes of each image to be cleaned, or a collection scene of each image to be cleaned; After determining the target cleaning mode, the task is sent to each execution node through the socket protocol according to the task information of the target cleaning mode, and each execution node coordinates and cooperates to complete the first cleaning of the image to be cleaned to obtain the target image; wherein the task scheduling node sends the task to the execution node in an asynchronous task distribution manner; different cleaning modes have different task information, and the task information is used to subdivide the cleaning process into different tasks; the task information at least includes a modeling task and a comparison task, or the task information at least includes a modeling task and a clustering task; Each execution node sends the obtained target image to the client, so that the client continues to perform a second cleaning on the target image obtained after the first cleaning according to the externally input cleaning instruction; the cleaning index of the second cleaning performed by the client is different from that of the first cleaning performed by the server; A target image cleaned by the client is obtained, wherein the target image cleaned by the client is an image obtained by cleaning twice.

2. The image cleaning method according to claim 1, characterized in that: The step of selecting a cleaning mode that matches the image to be cleaned from the at least two cleaning modes obtained according to the characteristics of the image to be cleaned as a target cleaning mode corresponding to the image to be cleaned includes: Determine the target cleaning mode corresponding to the image to be cleaned according to the image attributes of each image to be cleaned; or, The target cleaning mode corresponding to the image to be cleaned is determined according to the collection scene of each image to be cleaned.

3. The image cleaning method according to claim 1, characterized in that: The database stores pictures collected in multiple different scenes; The step of selecting a cleaning mode that matches the image to be cleaned from the at least two cleaning modes obtained according to the characteristics of the image to be cleaned as a target cleaning mode corresponding to the image to be cleaned includes: When there is a picture in the first scene among all the acquired pictures to be cleaned, determining that a first cleaning mode corresponding to the first scene is the target cleaning mode; the first scene is a target recognition scene; When there is no picture in the first scene among all the acquired pictures to be cleaned, the second cleaning mode is determined to be the target cleaning mode; the second cleaning mode is a preset cleaning mode corresponding to a scene other than the first scene.

4. The image cleaning method according to claim 3, characterized in that: The target cleaning mode is the first cleaning mode; The step of cleaning the image to be cleaned according to the target cleaning mode to obtain the target image includes: Determine a reference picture and a non-reference picture from all acquired pictures to be cleaned, wherein the reference picture is a picture in the first scene, and the non-reference picture is a picture other than the reference picture among all pictures to be cleaned; For each reference picture, the similarity between the reference picture and each non-reference picture is calculated, a non-reference picture having a similarity greater than a first set value is selected from each non-reference picture, and the reference picture and the selected non-reference picture are determined as target pictures.

5. The image cleaning method according to claim 4, characterized in that: Calculating the similarity between the reference image and each non-reference image includes: Modeling the reference image to obtain a data model corresponding to the reference image; Performing modeling processing on each non-reference picture to obtain a data model corresponding to the non-reference picture; The similarity between the reference picture and each non-reference picture is calculated according to the data model corresponding to the reference picture and the data model corresponding to each non-reference picture.

6. The image cleaning method according to claim 3, characterized in that: The target cleaning mode is the second cleaning mode; The step of cleaning the image to be cleaned according to the target cleaning mode to obtain the target image includes: Classifying all the acquired images to be cleaned to obtain at least one target class; in each target class, the similarity between any two images to be cleaned is greater than a second set value; The image to be cleaned in each target class is determined as the target image.

7. The image cleaning method according to any one of claims 1 to 6, characterized in that: Before cleaning the to-be-cleaned image according to the target cleaning mode to obtain the target image, the method further includes: The acquired image to be cleaned is pre-cleaned in a pre-cleaning manner, wherein the pre-cleaning manner includes: pre-cleaning based on the resolution of the image and / or the pixel value of each pixel; Cleaning the image to be cleaned according to the target cleaning mode to obtain a target image, including: The image to be cleaned after pre-cleaning is cleaned according to the target cleaning mode to obtain a target image.

8. A picture cleaning device, characterized in that: Applied to a server cluster consisting of multiple nodes, the multiple nodes are divided into task scheduling nodes and execution nodes, the device includes: A picture acquisition module, used to acquire the picture to be cleaned from the database through the task scheduling node; the picture to be cleaned is at least one picture stored in the specified database in a specified time period; The first image cleaning module is used to select a cleaning mode matching the image to be cleaned from the at least two cleaning modes obtained through the task scheduling node according to the characteristics of the image to be cleaned as a target cleaning mode corresponding to the image to be cleaned; if the characteristics of different batches of images to be cleaned are different, the target cleaning modes corresponding to the different batches of images to be cleaned are also different; the characteristics of the images to be cleaned at least include: image attributes of each image to be cleaned, or a collection scene of each image to be cleaned; After determining the target cleaning mode, the task is sent to each execution node through the socket protocol according to the task information of the target cleaning mode, and each execution node coordinates and cooperates to complete the first cleaning of the image to be cleaned to obtain the target image; wherein the task scheduling node sends the task to the execution node in an asynchronous task distribution manner; different cleaning modes have different task information, and the task information is used to subdivide the cleaning process into different tasks; the task information at least includes a modeling task and a comparison task, or the task information at least includes a modeling task and a clustering task; The second image cleaning module is used to send the target image obtained by each execution node to the client, so that the client continues to perform a second cleaning on the target image obtained after the first cleaning according to the external input cleaning instruction; the cleaning index of the second cleaning performed by the client is different from that of the first cleaning performed by the server; The cleaning result acquisition module is used to acquire the target image cleaned by the client through the task scheduling node, wherein the target image cleaned by the client is an image obtained after two cleanings.

9. The image cleaning device according to claim 8, characterized in that: The first image cleaning module selects a cleaning mode matching the image to be cleaned from the at least two cleaning modes obtained according to the characteristics of the image to be cleaned as the target cleaning mode corresponding to the image to be cleaned, specifically for: Determine the target cleaning mode corresponding to the image to be cleaned according to the image attributes of each image to be cleaned; or, The target cleaning mode corresponding to the image to be cleaned is determined according to the collection scene of each image to be cleaned.

10. The image cleaning device according to claim 8, characterized in that: The database stores pictures collected in multiple different scenes; The first image cleaning module selects a cleaning mode matching the image to be cleaned from the at least two cleaning modes obtained according to the characteristics of the image to be cleaned as the target cleaning mode corresponding to the image to be cleaned, specifically for: When there is a picture in the first scene among all the acquired pictures to be cleaned, determining that a first cleaning mode corresponding to the first scene is the target cleaning mode; the first scene is a target recognition scene; When there is no picture under the first scene among all the acquired pictures to be cleaned, determining the second cleaning mode as the target cleaning mode; The second cleaning mode is a preset cleaning mode that does not correspond to the first scene.

11. The image cleaning device according to claim 10, characterized in that: The target cleaning mode is the first cleaning mode; When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to: Determine a reference picture and a non-reference picture from all acquired pictures to be cleaned, wherein the reference picture is a picture in the first scene, and the non-reference picture is a picture other than the reference picture among all pictures to be cleaned; For each reference picture, the similarity between the reference picture and each non-reference picture is calculated, a non-reference picture having a similarity greater than a first set value is selected from each non-reference picture, and the reference picture and the selected non-reference picture are determined as target pictures.

12. The image cleaning device according to claim 11, characterized in that: When the first image cleaning module calculates the similarity between the reference image and each non-reference image, it is specifically used to: Modeling the reference image to obtain a data model corresponding to the reference image; Performing modeling processing on each non-reference picture to obtain a data model corresponding to the non-reference picture; The similarity between the reference picture and each non-reference picture is calculated according to the data model corresponding to the reference picture and the data model corresponding to each non-reference picture.

13. The image cleaning device according to claim 10, characterized in that: The target cleaning mode is the second cleaning mode; When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to: Classifying all the acquired images to be cleaned to obtain at least one target class; in each target class, the similarity between any two images to be cleaned is greater than a second set value; The image to be cleaned in each target class is determined as the target image.

14. The image cleaning device according to any one of claims 8 to 13, characterized in that: Before the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is also used to: The acquired image to be cleaned is pre-cleaned in a pre-cleaning manner, wherein the pre-cleaning manner includes: pre-cleaning based on the resolution of the image and / or the pixel value of each pixel; When the first image cleaning module cleans the image to be cleaned according to the target cleaning mode to obtain the target image, it is specifically used to: The image to be cleaned after pre-cleaning is cleaned according to the target cleaning mode to obtain a target image.

Citation Information

Patent Citations

  • Album classification and optimization method and device and intelligent terminals

    CN106777007A