CN112579803B - Image data cleaning method and device, electronic equipment and storage medium - Google Patents

Image data cleaning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112579803B
CN112579803B CN202011281645.9A CN202011281645A CN112579803B CN 112579803 B CN112579803 B CN 112579803B CN 202011281645 A CN202011281645 A CN 202011281645A CN 112579803 B CN112579803 B CN 112579803B
Authority
CN
China
Prior art keywords
distance
picture
identity
image
base
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011281645.9A
Other languages
Chinese (zh)
Other versions
CN112579803A (en
Inventor
杜佳慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Megvii Technology Co Ltd
Original Assignee
Beijing Megvii Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Megvii Technology Co Ltd filed Critical Beijing Megvii Technology Co Ltd
Priority to CN202011281645.9A priority Critical patent/CN112579803B/en
Publication of CN112579803A publication Critical patent/CN112579803A/en
Application granted granted Critical
Publication of CN112579803B publication Critical patent/CN112579803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an image data cleaning method, an image data cleaning device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a union set comprising a base picture and a picture to be cleaned; respectively determining the image distance between each base picture and each picture to be cleaned; extracting a plurality of segment distances from the image distance range; the image distance range is a distance range for searching for a distance threshold; for each sectional distance, respectively merging the base picture with the image distance smaller than the sectional distance and the picture to be cleaned; determining the maximum segmentation distance of the base pictures under each identity mark and other base pictures without error combination, and taking the maximum segmentation distance corresponding to the identity mark as a distance threshold corresponding to the identity mark; and taking the set corresponding to the identity in the combined searching set under the distance threshold corresponding to the identity as the labeling picture set corresponding to the identity. The invention saves labor cost and improves cleaning efficiency.

Description

Image data cleaning method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an image data cleaning method, an image data cleaning device, an electronic device, and a storage medium.
Background
Face recognition model training requires a high quality training dataset. In the prior art, a high-quality training data set can be generated by large-scale manual annotation, and besides the manual annotation, a model can also be used for auxiliary generation, but when the model is used for auxiliary generation, an appropriate threshold value is set to clean accurate face data, and the threshold value can achieve a better effect by manually repeating trial and error.
Therefore, the image data cleaning method in the prior art needs to consume huge labor cost, and has lower cleaning efficiency.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention are directed to providing an image data cleaning method, apparatus, electronic device, and storage medium that overcome or at least partially solve the foregoing problems.
According to a first aspect of an embodiment of the present invention, there is provided an image data cleaning method including:
determining a union set comprising a base picture and a picture to be cleaned; the base picture comprises a picture corresponding to the identity mark, and the picture to be cleaned comprises a picture without the identity mark;
Respectively determining the image distance between each base picture and each picture to be cleaned;
extracting a plurality of segment distances from the image distance range represented by the upper limit distance and the lower limit distance for comparison with the image distance; wherein the image distance range is a distance range for searching a distance threshold;
aiming at each sectional distance, merging the base pictures with the image distance smaller than the sectional distance and the pictures to be cleaned, and obtaining merging sets corresponding to each sectional distance;
according to the combined set corresponding to each sectional distance, determining the maximum sectional distance of the base picture under each identity mark, which is not combined with other base pictures in error, and taking the maximum sectional distance corresponding to the identity mark as a distance threshold corresponding to the identity mark;
and aiming at each identity, taking a set corresponding to the identity in the combined searching set under the distance threshold corresponding to the identity as a labeling picture set corresponding to the identity.
According to a second aspect of an embodiment of the present invention, there is provided an image data cleaning apparatus including:
the union initialization module is used for determining union including a base picture and a picture to be cleaned; the base picture comprises a picture corresponding to the identity mark, and the picture to be cleaned comprises a picture without the identity mark;
The image distance determining module is used for determining the image distance between each base picture and each picture to be cleaned respectively;
a segment distance extraction module for extracting a plurality of segment distances for comparison with the image distance from within the image distance range represented by the upper limit distance and the lower limit distance; wherein the image distance range is a distance range for searching a distance threshold;
the merging and searching module is used for merging and searching the base pictures and the pictures to be cleaned, which are smaller than the segmentation distance, according to each segmentation distance to obtain merging and searching sets corresponding to each segmentation distance;
the distance threshold determining module is used for respectively determining the maximum segmentation distance of the base picture under each identity mark and other base pictures without error combination according to the combined set corresponding to each segmentation distance, and taking the maximum segmentation distance corresponding to the identity mark as a distance threshold corresponding to the identity mark;
the labeling set determining module is used for taking a set corresponding to the identity in the union set under the distance threshold corresponding to the identity as a labeling picture set corresponding to the identity aiming at each identity.
According to a third aspect of an embodiment of the present invention, there is provided an electronic apparatus including: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the image data cleaning method as described in the first aspect.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the image data cleaning method according to the first aspect.
According to the image data cleaning method, device, electronic equipment and storage medium, through determining the merging set comprising the base pictures and the pictures to be cleaned, the image distance between each base picture and each picture to be cleaned is respectively determined, a plurality of segmentation distances for comparing with the image distance are extracted from the image distance range represented by the upper limit distance and the lower limit distance, for each segmentation distance, merging the base pictures with the image distance smaller than the segmentation distance and the pictures to be cleaned, obtaining the merging set corresponding to each segmentation distance, according to the merging set corresponding to each segmentation distance, determining the maximum segmentation distance without error merging between the base picture and other base pictures under each identity mark, taking the maximum segmentation distance corresponding to the identity mark as a distance threshold corresponding to the identity mark, and taking the merging set corresponding to the identity mark under the distance threshold corresponding to the identity mark as a labeling picture set corresponding to the identity mark. The distance threshold value corresponding to each identity mark can be automatically searched and determined in the image distance range, and the image to be cleaned can be classified under the corresponding identity mark according to the dynamically determined distance threshold value, so that a marked image set corresponding to the identity mark is obtained, compared with manual cleaning data and manual trial and error determining threshold values, the labor cost is saved, and the cleaning efficiency is improved.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention.
FIG. 1 is a flow chart of steps of an image data cleaning method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the relationship between similarity and similarity density in an embodiment of the present invention;
fig. 3 is a block diagram of an image data cleaning apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart of steps of an image data cleaning method according to an embodiment of the present invention, where the method may be applied to a case where a picture to be cleaned without an identity is classified under the identity according to a base picture with the identity, so as to complete cleaning of image data. As shown in fig. 1, the method may include:
step 101, determining a union set comprising a base picture and a picture to be cleaned; the base picture comprises a picture corresponding to the identity, and the picture to be cleaned comprises a picture without the identity.
The base pictures are small numbers of pictures with labels, such as face pictures, human body pictures, vehicle pictures or animal pictures, and each base picture has a corresponding identity. The identification mark corresponding to the picture can be a personal ID number or a self-defined number, and can also be an animal variety or a vehicle brand and the like. When the base picture is a face picture, the face picture with the label in the base picture is a clear face picture of a target person, and the obtaining mode of the face picture with the label can comprise the following steps: crawling the character photo of hundred degrees encyclopedia, and/or providing personal certificate photo(s) of staff/owners for a corporate park/property and the like, wherein the face pictures with marked data obtained by the methods are called base pictures; the pictures to be cleaned can be pictures of people in the corresponding base obtained by crawling from the Internet and/or moving pictures of the people in the base obtained by crawling through cameras erected in the park, the pictures do not correspond to the identification marks, and the identification marks corresponding to the pictures are required to be determined through data cleaning.
After obtaining the bottom library pictures and the pictures to be cleaned, respectively counting the number of the bottom library pictures and the number of the pictures to be cleaned, so as to obtain the sum of the numbers of the bottom library pictures and the pictures to be cleaned, numbering each bottom library picture and each picture to be cleaned, obtaining picture identifications, initializing the bottom library pictures and the pictures to be cleaned into a combined collection with the size equal to the sum of the numbers, and storing the picture identifications of the bottom library pictures or the pictures to be cleaned in each unit pixel set in the combined collection. And initializing a merging set with the size equal to the sum of the numbers of the base pictures and the pictures to be cleaned, and merging the merging set meeting the conditions according to the subsequent image distance to determine the pictures belonging to the same identity.
Step 102, determining the image distance between each base picture and each picture to be cleaned.
And respectively extracting image characteristics from each base picture and each picture to be cleaned, so as to determine the image distance between each base picture and each picture to be cleaned according to the image characteristics. The image distance may represent a similarity between pictures, and may be, for example, a euclidean distance or a manhattan distance.
In one embodiment of the present invention, the determining the image distance between each base picture and each picture to be cleaned includes: respectively extracting the image characteristics of each base picture and each picture to be cleaned through a characteristic extraction model; and determining the image distance between each base picture and each picture to be cleaned according to the image characteristics of each base picture and the image characteristics of each picture to be cleaned.
The feature extraction model may be used to assist in the cleaning of the image data. The feature extraction model is mainly used for extracting image features in a picture, such as the position of a target object in the picture, the features of the target object and the like. And respectively inputting each base picture and each picture to be cleaned into a feature extraction model, and extracting the human image features in the base pictures through the feature extraction model to obtain the image features of each base picture and the image features of each picture to be cleaned. And then, respectively calculating the image distance of each base picture and each picture to be cleaned, namely substituting the image characteristics of the base picture and the image characteristics of the picture to be cleaned into a distance calculation formula or a neural network model to obtain the image distance of the base picture and the picture to be cleaned when determining the image distance of one base picture and one picture to be cleaned, and respectively carrying out such calculation on each base picture and each picture to be cleaned to obtain the image distance of each base picture and each picture to be cleaned. The image features of the base picture and the picture to be cleaned are extracted through the feature extraction model, so that more accurate image features can be extracted, and the more accurate image distance between the base picture and the picture to be cleaned is obtained. When the base picture is a face picture, the feature extraction model is a face feature extraction model, and the image features are face features.
Step 103, extracting a plurality of segment distances for comparing with the image distance from the image distance range represented by the upper limit distance and the lower limit distance; wherein the image distance range is a distance range for searching for a distance threshold.
The image distance range is represented by an upper limit distance and a lower limit distance, and a distance threshold value corresponding to the identity mark can be searched in the image distance range.
For a common feature extraction model, a certain degree of distinction is provided for different objects in the similar objects, for example, for a common face feature extraction model, a certain degree of distinction is provided for a face, that is, the similarity of face features extracted from pictures of the same person at different angles through the face feature extraction model is higher than that of a person and other people. Fig. 2 is a schematic diagram of a relationship between similarity and similarity density in an embodiment of the present invention, as shown in fig. 2, region 1 represents a similarity distribution of facial features of a base picture of a person and a picture to be cleaned of the person, region 2 represents a similarity distribution of facial features of a base picture of a person and a picture to be cleaned of other people, and it can be seen that facial similarity of different pictures of a person is significantly greater than facial similarity of the person and other people, and two pictures can be considered to include the same facial within a similarity range. Also, for other objects than a human face, the same object will have a similarity range of an image. The similarity and the distance have a certain conversion relation, the distance can be obtained through the similarity, and the similarity can also be obtained through the distance, so that the image distance range can be obtained according to the similarity range, namely the upper limit distance and the lower limit distance of the image distance range.
The image distance range is a larger range, different distance thresholds exist for different objects in the similar objects, so that a plurality of segmentation distances are extracted from the image distance range represented by the upper limit distance and the lower limit distance, and are used for comparing with the image distance to determine the distance threshold corresponding to each identity, and therefore the base picture belonging to the identity and the picture to be cleaned are combined into a set according to the distance threshold. The extraction may be equally spaced or random when extracting a plurality of segment distances from the image distance range, although the extraction may be performed in other ways.
Extracting a plurality of segment distances from an image distance range represented by the upper and lower limit distances for comparison with the image distance, comprising: the image distance range represented by the upper limit distance and the lower limit distance is sampled at equal intervals at preset sampling intervals, and the obtained sampling distances are used as a plurality of segmentation distances for comparing with the image distance.
The preset sampling interval is a preset sampling interval, for example, may be preset by a user, or may be a default sampling interval.
And (3) sampling the image distance ranges represented by the upper limit distance and the lower limit distance at equal intervals from the lower limit distance at preset sampling intervals to obtain a plurality of sampling distances in a plurality of image distance ranges, and taking the plurality of sampling distances as a plurality of segmentation distances for comparing with the image distances so as to find out a proper distance threshold corresponding to each identity. By equally sampling, the distance threshold value corresponding to each identity can be determined relatively uniformly according to the segmentation distance, and compared with each object, the distance threshold value corresponding to each identity can be searched for a distance threshold value, for example, the distance threshold value corresponding to each identity can be determined according to the segmentation distance, and compared with each person searching for a distance threshold value, the distance threshold value can be greatly reduced, because the searching frequency of each person searching for a distance threshold value is O (k×n), where k is the number of samples, N is the number of identities, and the searching frequency of equal interval sampling is O (k)), the searching frequency can be greatly reduced, thereby reducing the searching time.
In one embodiment of the present invention, before extracting the plurality of segment distances for comparison with the image distances from the image distance range represented by the upper limit distance and the lower limit distance, the method further comprises: the upper limit distance and the lower limit distance set by the user and representing the image distance range are acquired.
The setting interface for the user to set the upper limit distance and the lower limit distance can be provided, and the upper limit distance and the lower limit distance set by the user are obtained through the setting interface, so that the image distance range set by the user is obtained. In this way, the user can set an appropriate image distance range according to his own needs.
In another embodiment of the present invention, before extracting the plurality of segment distances for comparison with the image distances from the image distance range represented by the upper limit distance and the lower limit distance, the method further comprises: acquiring upper limit similarity and lower limit similarity which are set by a user and represent the image similarity range; and converting the upper limit similarity into an upper limit distance according to the conversion relation between the similarity and the distance, and converting the lower limit similarity into a lower limit distance to obtain an image distance range represented by the upper limit distance and the lower limit distance.
The similarity may be, for example, cosine similarity, and the distance may be, for example, euclidean distance. The image similarity range is a similarity range for searching a similarity threshold, and may be a similarity range for primarily judging whether the base image and the image to be cleaned include the same image features, if the image similarity of the base image and the image to be cleaned is within the image similarity range, it may be primarily judged whether the two images include the same image features, and whether the two specific images correspond to the same identity is further determined according to a dynamic threshold that is a maximum segmentation distance that is determined later. When the image features are face features, the image similarity is face similarity.
And a setting interface for setting the upper limit similarity and the lower limit similarity by a user can be provided, and the upper limit similarity and the lower limit similarity set by the user can be obtained through the setting interface, so that the image similarity range set by the user is obtained. The similarity and the distance have a certain conversion relationship, for example, when the similarity is cosine similarity and the distance is Euclidean distance, the conversion relationship of the similarity and the distance is: similarity = exp (-distance). After the image similarity range set by the user is obtained, the upper limit similarity can be converted into an upper limit distance and the lower limit similarity can be converted into a lower limit distance according to the conversion relation between the similarity and the distance, so that the image distance range represented by the upper limit distance and the lower limit distance is obtained. Thus, the user can directly set the upper and lower limits of the similarity to be searched, and the user can set the appropriate upper and lower limits of the similarity according to the needs.
And 104, respectively merging the base pictures with the image distance smaller than the segmentation distance and the pictures to be cleaned according to each segmentation distance to obtain a merging set corresponding to each segmentation distance.
And comparing the image distance between the base picture and the picture to be cleaned with the segmentation distance for each segmentation distance, and merging the unit pixel sets of the base picture and the picture to be cleaned in the combined searching set into a set if the image distance between one base picture and one picture to be cleaned is smaller than the segmentation distance. And for each segment distance, merging and checking the merging according to the mode to obtain the merging and checking set corresponding to each segment distance.
Step 105, according to the union set corresponding to each segment distance, determining the maximum segment distance of the base picture under each identity mark, which is not combined with other base pictures in error, and taking the maximum segment distance corresponding to the identity mark as the distance threshold corresponding to the identity mark.
And the other base pictures are base pictures under other identity marks.
Since the base pictures with the image distance lower than the segmentation distance and the pictures to be cleaned are combined into one set during the merging of the sets, there is a possibility that the base pictures with two different identities are combined into one set, for example, the base pictures comprise A and C, the pictures to be cleaned comprise B and D, the image distance between the base picture A and the picture to be cleaned B is smaller than the segmentation distance, and the image distance between the base picture C and the picture to be cleaned B is also smaller than the segmentation distance, and then the base picture A, the picture to be cleaned B and the unit pixel set of the base picture C are combined into one set, so that the error merging occurs.
In order to dynamically determine the distance threshold value corresponding to each identity, the distance threshold value corresponding to the identity can be searched in the image distance range, namely, under one identity, the maximum segmentation distance of one base picture and other base pictures which are not combined in error is determined in a plurality of segmentation distances. And in the merging set corresponding to each segment distance, respectively determining the merging set of each identity under different segment distances, at the moment, under one identity, determining whether the set under different segment distances comprises the base pictures of the identity or not, if so, indicating that error merging occurs, determining each segment distance without error merging, determining the maximum segment distance from each segment distance without error merging, and taking the maximum segment distance as a distance threshold corresponding to the identity. And determining a distance threshold corresponding to the identity mark for each identity mark according to the mode.
In one embodiment of the present invention, the determining, according to the union set corresponding to each segment distance, the maximum segment distance between the base picture under each identity and other base pictures without error combination includes: for each identity, determining a set of base pictures corresponding to each segment distance and including the identity in a searching set; when the set corresponding to one segmentation distance does not comprise the bottom library pictures under other identity marks, and the set corresponding to the next segmentation distance which is larger than the segmentation distance and adjacent to the segmentation distance comprises the bottom library pictures under other identity marks, determining that the segmentation distance is the maximum segmentation distance of the bottom library pictures under the identity marks and the bottom library pictures without error combination.
When determining a distance threshold corresponding to an identity, determining a set including a base picture under the identity in a checking set corresponding to each segment distance for each identity, determining whether the set under different segment distances includes base pictures under other identities after obtaining the set including the base picture under the identity under different segment distances corresponding to the identity, and if the set corresponding to one segment distance does not include the base picture under other identities but is larger than the segment distance and the set corresponding to the next segment distance adjacent to the segment distance includes the base picture under other identities, determining that the segment distance is the maximum segment distance at which error combination of the base picture under the identity and other base pictures does not occur, and taking the maximum segment distance as the distance threshold corresponding to the identity. The distance threshold value corresponding to the identity mark can be obtained accurately through the comparison and determination, and the problem that part of objects and other objects are caused by using the globally unique threshold value and the other parts of objects cannot find the same picture can be avoided. For the face picture, because a certain threshold value deviation exists in the face feature extraction model, the threshold value applicable to different people is biased to a certain extent, if a globally unique threshold value is used, the problem that part of people are overlapped with other people and the other part of people cannot find the same picture is caused, and a more accurate labeling picture corresponding to the identity can be obtained through a distance threshold value corresponding to the identity.
In one embodiment of the present invention, according to the union set corresponding to each segment distance, determining the maximum segment distance between the base picture under each identity and other base pictures without error combination includes: and aiming at each identity mark, carrying out binary search on the combined set under all the segmentation distances to determine the maximum segmentation distance of the base picture under the identity mark, which is not combined with other base pictures in error.
For each identity, when searching the maximum segmentation distance without error combination under the identity, the method can be determined by binary search, namely under one identity, firstly determining the average distance of the minimum segmentation distance and the maximum segmentation distance in the multiple segmentation distances, namely an intermediate segmentation distance between the minimum segmentation distance and the maximum segmentation distance, determining whether error combination occurs under the intermediate segmentation distance, if no error combination occurs under the intermediate segmentation distance, continuing binary search between the intermediate segmentation distance and the maximum segmentation distance, and if error combination occurs under the intermediate segmentation distance, continuing binary search between the minimum segmentation distance and the intermediate segmentation distance until the maximum segmentation distance without error combination is found. The searching speed for searching the maximum segmentation distance can be improved through binary searching, and the cleaning speed of the image data is improved.
And 106, aiming at each identity, taking a set corresponding to the identity in the combined searching set under the distance threshold corresponding to the identity as a labeling picture set corresponding to the identity.
After determining the distance threshold value corresponding to each identity, a corresponding labeling picture set can be determined for each identity, namely, a set corresponding to the identity in the union set under the distance threshold value corresponding to the identity is used as the labeling picture set corresponding to the identity. For example, if the distance threshold corresponding to one identity is 6000, searching a set including the base pictures under the identity from the search set corresponding to the segmentation distance of 6000, and taking the set as the labeling picture set corresponding to the identity.
According to the image data cleaning method provided by the embodiment, the image distance between each base picture and each picture to be cleaned is respectively determined by determining the combined set comprising the base picture and the picture to be cleaned, a plurality of segmentation distances for comparing with the image distance are extracted from the image distance range represented by the upper limit distance and the lower limit distance, the base picture and the picture to be cleaned, of which the image distance is smaller than the segmentation distance, are combined by combining the combined set, so that the combined set corresponding to each segmentation distance is obtained, the maximum segmentation distance, at which the base picture and other base pictures under each identity mark do not have error combination, is respectively determined according to the combined set corresponding to each segmentation distance, the maximum segmentation distance corresponding to the identity mark is used as a distance threshold corresponding to the identity mark, and the combined set corresponding to the identity mark under the distance threshold corresponding to the identity mark is used as a labeling picture set corresponding to the identity mark. The distance threshold value corresponding to each identity mark can be automatically searched and determined within the image distance range, and the image to be cleaned can be classified under the corresponding identity mark according to the dynamically determined distance threshold value, so that the marked image set corresponding to the identity mark is obtained, compared with the manual cleaning data and the manual trial and error determining threshold value, the labor cost is saved, and the cleaning efficiency is improved.
On the basis of the technical scheme, after the collection corresponding to the identity in the union check set under the distance threshold corresponding to the identity is used as the labeling picture collection corresponding to the identity for each identity, the method further comprises the following steps: judging whether the marked picture sets corresponding to different identity marks comprise the same picture to be cleaned or not; and sending the marked picture sets corresponding to the at least two identification marks comprising the same picture to be cleaned and the same picture to be cleaned to a checking staff account, so that a checking staff logging in the checking staff account checks the marked picture sets corresponding to the at least two identification marks and the same picture to be cleaned.
After the labeling picture set corresponding to each identity mark is obtained by cleaning, whether a picture to be cleaned is repeatedly divided into labeling picture sets of different identity marks is required to be judged, the occurrence probability of the situation is smaller and is generally smaller than 1%, if the situation exists, the labeling picture sets corresponding to at least two identity marks comprising the same picture to be cleaned and the same picture to be cleaned are sent to a checking staff account, and the checking staff logged in the checking staff account performs manual checking, so that the accuracy of data labeling is improved.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Fig. 3 is a block diagram of an image data cleaning apparatus according to an embodiment of the present invention, and as shown in fig. 3, the image data cleaning apparatus may include:
a union initialization module 301, configured to determine a union including a base picture and a picture to be cleaned; the base picture comprises a picture corresponding to the identity mark, and the picture to be cleaned comprises a picture without the identity mark;
the image distance determining module 302 is configured to determine an image distance between each base picture and each picture to be cleaned;
a segment distance extraction module 303, configured to extract a plurality of segment distances for comparing with the image distances from the image distance range represented by the upper limit distance and the lower limit distance; wherein the image distance range is a distance range for searching a distance threshold;
The merging and merging module 304 is configured to, for each segment distance, merge the merging and merging of the base picture and the picture to be cleaned, where the image distance is smaller than the segment distance, to obtain a merging and merging set corresponding to each segment distance;
the distance threshold determining module 305 is configured to determine, according to the union set corresponding to each segment distance, a maximum segment distance at which error combination does not occur between the base picture under each identity and other base pictures, and use the maximum segment distance corresponding to the identity as a distance threshold corresponding to the identity;
the labeling set determining module 306 is configured to, for each identity, use a set corresponding to the identity in the union set under the distance threshold corresponding to the identity as a labeling picture set corresponding to the identity.
Optionally, the segment distance extraction module is specifically configured to:
the image distance range represented by the upper limit distance and the lower limit distance is sampled at equal intervals at preset sampling intervals, and the obtained sampling distances are used as a plurality of segmentation distances for comparing with the image distance.
Optionally, the apparatus further includes:
and the distance range acquisition module is used for acquiring the upper limit distance and the lower limit distance which are set by the user and represent the image distance range.
Optionally, the apparatus further includes:
the similarity range acquisition module is used for acquiring upper limit similarity and lower limit similarity which are set by a user and represent the image similarity range;
and the distance range determining module is used for converting the upper limit similarity into an upper limit distance according to the conversion relation between the similarity and the distance, and converting the lower limit similarity into a lower limit distance to obtain an image distance range represented by the upper limit distance and the lower limit distance.
Optionally, the image distance determining module includes:
the image feature extraction unit is used for respectively extracting the image features of each base picture and each picture to be cleaned through a feature extraction model;
the image distance determining unit is used for determining the image distance between each base picture and each picture to be cleaned according to the image characteristics of each base picture and the image characteristics of each picture to be cleaned.
Optionally, the distance threshold determining module includes:
and the binary search unit is used for binary search of the combined search set under all the segmentation distances aiming at each identity mark so as to determine the maximum segmentation distance of the base picture under the identity mark and other base pictures without error combination.
Optionally, the apparatus further includes:
the judging module is used for judging whether the marked picture sets corresponding to the different identity marks comprise the same picture to be cleaned or not;
and the repeated picture sending module is used for sending the marked picture sets corresponding to the at least two identification marks comprising the same picture to be cleaned and the same picture to be cleaned to a checking staff account so that a checking staff logged in the checking staff account checks the marked picture sets corresponding to the at least two identification marks and the same picture to be cleaned.
Optionally, the distance threshold determining module is specifically configured to:
for each identity, determining a set of base pictures corresponding to each segment distance and including the identity in a searching set;
when the set corresponding to one segmentation distance does not comprise the bottom library pictures under other identity marks, and the set corresponding to the next segmentation distance which is larger than the segmentation distance and adjacent to the segmentation distance comprises the bottom library pictures under other identity marks, determining that the segmentation distance is the maximum segmentation distance of the bottom library pictures under the identity marks and the bottom library pictures without error combination.
According to the image data cleaning device provided by the embodiment, the image distance between each base picture and each picture to be cleaned is respectively determined by determining the combined set comprising the base picture and the picture to be cleaned, a plurality of segmentation distances for comparing with the image distance are extracted from the image distance range represented by the upper limit distance and the lower limit distance, the base picture and the picture to be cleaned, of which the image distance is smaller than the segmentation distance, are combined by combining the combined set, so that the combined set corresponding to each segmentation distance is obtained, the maximum segmentation distance, at which the base picture and other base pictures under each identity mark do not have error combination, is respectively determined according to the combined set corresponding to each segmentation distance, the maximum segmentation distance corresponding to the identity mark is used as a distance threshold corresponding to the identity mark, and the combined set corresponding to the identity mark under the distance threshold corresponding to the identity mark is used as a labeling picture set corresponding to the identity mark. The distance threshold value corresponding to each identity mark can be automatically searched and determined within the image distance range, and the image to be cleaned can be classified under the corresponding identity mark according to the dynamically determined distance threshold value, so that the marked image set corresponding to the identity mark is obtained, compared with the manual cleaning data and the manual trial and error determining threshold value, the labor cost is saved, and the cleaning efficiency is improved.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Further, according to an embodiment of the present invention, there is provided an electronic device, which may be a computer, a mobile terminal, or the like, including: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the image data cleaning method of the foregoing embodiments.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium including, but not limited to, a disk memory, a CD-ROM, an optical memory, etc., having stored thereon a computer program which, when executed by a processor, implements the image data cleaning method of the foregoing embodiment.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The above description of the image data cleaning method, the device, the electronic equipment and the storage medium provided by the invention applies specific examples to illustrate the principle and the implementation of the invention, and the description of the above examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (11)

1. An image data cleaning method, comprising:
determining a union set comprising a base picture and a picture to be cleaned; the base picture comprises a picture corresponding to the identity mark, and the picture to be cleaned comprises a picture without the identity mark;
respectively determining the image distance between each base picture and each picture to be cleaned;
extracting a plurality of segment distances from the image distance range represented by the upper limit distance and the lower limit distance for comparison with the image distance; wherein the image distance range is a distance range for searching a distance threshold;
aiming at each sectional distance, merging the base pictures with the image distance smaller than the sectional distance and the pictures to be cleaned, and obtaining merging sets corresponding to each sectional distance;
according to the combined set corresponding to each sectional distance, determining the maximum sectional distance of the base picture under each identity mark, which is not combined with other base pictures in error, and taking the maximum sectional distance corresponding to the identity mark as a distance threshold corresponding to the identity mark;
and aiming at each identity, taking a set corresponding to the identity in the combined searching set under the distance threshold corresponding to the identity as a labeling picture set corresponding to the identity.
2. The method of claim 1, wherein extracting a plurality of segment distances from a range of image distances represented by the upper and lower limit distances for comparison with the image distances comprises:
the image distance range represented by the upper limit distance and the lower limit distance is sampled at equal intervals at preset sampling intervals, and the obtained sampling distances are used as a plurality of segmentation distances for comparing with the image distance.
3. The method according to claim 1 or 2, further comprising, prior to extracting a plurality of segment distances from the image distance range represented by the upper and lower limit distances for comparison with the image distance:
the upper limit distance and the lower limit distance set by the user and representing the image distance range are acquired.
4. The method according to claim 1 or 2, further comprising, prior to extracting a plurality of segment distances from the image distance range represented by the upper and lower limit distances for comparison with the image distance:
acquiring upper limit similarity and lower limit similarity which are set by a user and represent the image similarity range;
and converting the upper limit similarity into an upper limit distance according to the conversion relation between the similarity and the distance, and converting the lower limit similarity into a lower limit distance to obtain an image distance range represented by the upper limit distance and the lower limit distance.
5. The method of claim 1, wherein the determining the image distance of each base picture from each picture to be cleaned comprises:
respectively extracting the image characteristics of each base picture and each picture to be cleaned through a characteristic extraction model;
and determining the image distance between each base picture and each picture to be cleaned according to the image characteristics of each base picture and the image face characteristics of each picture to be cleaned.
6. The method of claim 1, wherein determining the maximum segment distance for each base picture under the identity label that is not combined with other base pictures in error according to the union corresponding to each segment distance, respectively, comprises:
and aiming at each identity mark, carrying out binary search on the combined set under all the segmentation distances to determine the maximum segmentation distance of the base picture under the identity mark, which is not combined with other base pictures in error.
7. The method according to claim 1, further comprising, after said for each identity, taking, as the set of tagged pictures corresponding to the identity, a set of the combined sets corresponding to the identity under a distance threshold corresponding to the identity:
Judging whether the marked picture sets corresponding to different identity marks comprise the same picture to be cleaned or not;
and sending the marked picture sets corresponding to the at least two identification marks comprising the same picture to be cleaned and the same picture to be cleaned to a checking staff account, so that a checking staff logging in the checking staff account checks the marked picture sets corresponding to the at least two identification marks and the same picture to be cleaned.
8. The method of claim 1, wherein the determining, according to the union corresponding to each segment distance, the maximum segment distance between the base picture under each identity and other base pictures without error combination includes:
for each identity, determining a set of base pictures corresponding to each segment distance and including the identity in a searching set;
when the set corresponding to one segmentation distance does not comprise the bottom library pictures under other identity marks, and the set corresponding to the next segmentation distance which is larger than the segmentation distance and adjacent to the segmentation distance comprises the bottom library pictures under other identity marks, determining that the segmentation distance is the maximum segmentation distance of the bottom library pictures under the identity marks and the bottom library pictures without error combination.
9. An image data cleaning apparatus, comprising:
the union initialization module is used for determining union including a base picture and a picture to be cleaned; the base picture comprises a picture corresponding to the identity mark, and the picture to be cleaned comprises a picture without the identity mark;
the image distance determining module is used for determining the image distance between each base picture and each picture to be cleaned respectively;
a segment distance extraction module for extracting a plurality of segment distances for comparison with the image distance from within the image distance range represented by the upper limit distance and the lower limit distance; wherein the image distance range is a distance range for searching a distance threshold;
the merging and searching module is used for merging and searching the base pictures and the pictures to be cleaned, which are smaller than the segmentation distance, according to each segmentation distance to obtain merging and searching sets corresponding to each segmentation distance;
the distance threshold determining module is used for respectively determining the maximum segmentation distance of the base picture under each identity mark and other base pictures without error combination according to the combined set corresponding to each segmentation distance, and taking the maximum segmentation distance corresponding to the identity mark as a distance threshold corresponding to the identity mark;
The labeling set determining module is used for taking a set corresponding to the identity in the union set under the distance threshold corresponding to the identity as a labeling picture set corresponding to the identity aiming at each identity.
10. An electronic device, comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the image data cleaning method according to any one of claims 1-8.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the image data cleaning method according to any of claims 1-8.
CN202011281645.9A 2020-11-16 2020-11-16 Image data cleaning method and device, electronic equipment and storage medium Active CN112579803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011281645.9A CN112579803B (en) 2020-11-16 2020-11-16 Image data cleaning method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011281645.9A CN112579803B (en) 2020-11-16 2020-11-16 Image data cleaning method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112579803A CN112579803A (en) 2021-03-30
CN112579803B true CN112579803B (en) 2024-04-02

Family

ID=75123554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011281645.9A Active CN112579803B (en) 2020-11-16 2020-11-16 Image data cleaning method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112579803B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113707325A (en) * 2021-09-23 2021-11-26 浙江玉安康瑞生物科技有限公司 Alzheimer disease early screening system based on space recognition and memory assessment
CN116361279A (en) * 2023-06-02 2023-06-30 北京麟卓信息科技有限公司 Cross-platform artificial intelligent data labeling method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241903A (en) * 2018-08-30 2019-01-18 平安科技(深圳)有限公司 Sample data cleaning method, device, computer equipment and storage medium
CN110825893A (en) * 2019-09-18 2020-02-21 北京旷视科技有限公司 Target searching method, device, system and storage medium
WO2020038136A1 (en) * 2018-08-24 2020-02-27 深圳前海达闼云端智能科技有限公司 Facial recognition method and apparatus, electronic device and computer-readable medium
CN111639667A (en) * 2020-04-14 2020-09-08 北京迈格威科技有限公司 Image recognition method and device, electronic equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020038136A1 (en) * 2018-08-24 2020-02-27 深圳前海达闼云端智能科技有限公司 Facial recognition method and apparatus, electronic device and computer-readable medium
CN109241903A (en) * 2018-08-30 2019-01-18 平安科技(深圳)有限公司 Sample data cleaning method, device, computer equipment and storage medium
CN110825893A (en) * 2019-09-18 2020-02-21 北京旷视科技有限公司 Target searching method, device, system and storage medium
CN111639667A (en) * 2020-04-14 2020-09-08 北京迈格威科技有限公司 Image recognition method and device, electronic equipment and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
改进的SIFT特征人脸识别方法ADSIFT;林哲;闫敬文;;汕头大学学报(自然科学版);20130515(02);全文 *
移动设备网络安全下人脸终端身份识别仿真;韩毓;;计算机仿真;20171015(10);全文 *

Also Published As

Publication number Publication date
CN112579803A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN109977262B (en) Method and device for acquiring candidate segments from video and processing equipment
CN107944020B (en) Face image searching method and device, computer device and storage medium
CN103793697B (en) The identity mask method and face personal identification method of a kind of facial image
WO2019169532A1 (en) License plate recognition method and cloud system
CN109993040B (en) Text recognition method and device
CN106503691B (en) Identity labeling method and device for face picture
CN108921204B (en) Electronic device, picture sample set generation method, and computer-readable storage medium
CN112579803B (en) Image data cleaning method and device, electronic equipment and storage medium
CN104765768A (en) Mass face database rapid and accurate retrieval method
WO2018121287A1 (en) Target re-identification method and device
CN106127222B (en) A kind of the similarity of character string calculation method and similitude judgment method of view-based access control model
CN113033711A (en) Title correction method and device, electronic equipment and computer storage medium
CN111488798B (en) Fingerprint identification method, fingerprint identification device, electronic equipment and storage medium
CN112733666A (en) Method, equipment and storage medium for collecting difficult images and training models
CN107368812B (en) Face recognition data cleaning method based on maximum connected subgraph
CN110516638B (en) Sign language recognition method based on track and random forest
CN111199050B (en) System for automatically desensitizing medical records and application
CN117076455A (en) Intelligent identification-based policy structured storage method, medium and system
CN114925239B (en) Intelligent education target video big data retrieval method and system based on artificial intelligence
CN116740607A (en) Video processing method and device, electronic equipment and storage medium
CN109635798A (en) A kind of information extracting method and device
CN108021918B (en) Character recognition method and device
CN112613341A (en) Training method and device, fingerprint identification method and device, and electronic device
CN111382703A (en) Finger vein identification method based on secondary screening and score fusion
CN108694347B (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant