CN111061899B - Archive representative picture generation method and device and electronic equipment - Google Patents

Archive representative picture generation method and device and electronic equipment Download PDF

Info

Publication number
CN111061899B
CN111061899B CN201911310641.6A CN201911310641A CN111061899B CN 111061899 B CN111061899 B CN 111061899B CN 201911310641 A CN201911310641 A CN 201911310641A CN 111061899 B CN111061899 B CN 111061899B
Authority
CN
China
Prior art keywords
face
angle
picture
absolute value
preset
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
CN201911310641.6A
Other languages
Chinese (zh)
Other versions
CN111061899A (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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies 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 Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN201911310641.6A priority Critical patent/CN111061899B/en
Publication of CN111061899A publication Critical patent/CN111061899A/en
Application granted granted Critical
Publication of CN111061899B publication Critical patent/CN111061899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/55Clustering; Classification
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/93Document management systems
    • 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
    • G06V40/161Detection; Localisation; Normalisation

Landscapes

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

Abstract

The embodiment of the invention provides a method and a device for generating an archive representative picture and electronic equipment, wherein the method comprises the following steps: acquiring a face pose angle of an archived picture in the archive, wherein the archived picture is an archived picture except for an existing representative picture in the archive; comparing the face attitude angle with a preset attitude condition, and judging the face attitude type of the archived picture according to a comparison result; judging whether a representative picture corresponding to the face gesture type exists in the file or not based on the face gesture type; and if the representative picture corresponding to the face posture type does not exist in the archive, determining the archived picture as a new representative picture of the archive. The invention can set representative pictures of various human face posture types for files, and further provides more accurate and comprehensive judgment basis for picture filing, thereby improving the accuracy and recall rate of picture filing.

Description

Archive representative picture generation method and device and electronic equipment
Technical Field
The invention relates to the technical field of archive management, in particular to an archive representative picture generation method and device and electronic equipment.
Background
Clustering and archiving the snap shots, and further analyzing valuable information capable of improving the security efficiency and effect of a certain area based on the archived information becomes an important research landing direction. When a new picture is accessed into the system, the characteristic value of the new picture is compared with the characteristic value of the representative picture of the existing file, the similarity is calculated, and whether the picture is archived or not is determined based on the similarity and some judgment strategies. In the existing document gathering method, each existing document generally has only one representative picture, which mainly comes from real-name information such as certificate photo, or non-real-name picture with good quality. In the actual use process, most face pictures are shot under some nonstandard conditions and are easily interfered by head rotation of people or rotation, inclination and the like of image acquisition equipment, so that the postures of the shot face pictures are different, the captured face pictures are greatly different from representative pictures in the existing archives, the similarity of the face pictures is sometimes influenced by different face posture angles, the similarity cannot meet the threshold requirement, and the face pictures cannot be classified into the archives or even can be filed into wrong archives. Therefore, the representative pictures of the existing archives are single, and a more accurate and comprehensive judgment basis cannot be provided for picture filing, so that the problems of low picture filing recall rate and low accuracy rate are caused.
Disclosure of Invention
The embodiment of the invention provides a method for generating representative pictures of files, which can solve the problems of low recall rate and low accuracy rate of picture filing caused by the fact that the representative pictures of the existing files are single and cannot provide more accurate and comprehensive judgment basis for the picture filing, thereby improving the recall rate and the accuracy rate of the picture filing.
In a first aspect, an embodiment of the present invention provides a method for generating an archive representative picture, where the archive representative picture is used to generate a plurality of face representative pictures of different pose types of a face picture archive, and the method includes the steps of:
acquiring a face pose angle of an archived picture in the archive, wherein the archived picture is an archived picture except for an existing representative picture in the archive;
comparing the face attitude angle with a preset attitude condition, and judging the face attitude type of the archived picture according to a comparison result;
judging whether a representative picture corresponding to the face gesture type exists in the file or not based on the face gesture type;
and if the representative picture corresponding to the face posture type does not exist in the archive, determining the archived picture as a new representative picture of the archive.
Optionally, the preset posture condition includes a first preset posture condition, the face posture type includes a front face, the step of comparing the face posture angle with the preset posture condition and judging the face posture type of the filed picture according to the comparison result includes:
comparing the face attitude angle with the first preset attitude condition, and judging whether the face attitude angle meets the first preset attitude condition;
and if the face posture angle meets the first preset posture condition, judging that the face posture type is a front face.
Optionally, the face pose angle includes a face pitch angle, a face rotation angle, and a face side angle of the archived picture; the first preset posture condition comprises a face pitch angle absolute value threshold, a face rotation angle absolute value threshold and a face side face angle absolute value threshold;
the step of comparing the face pose angle with the first preset pose condition and judging whether the face pose angle meets the first preset pose condition comprises the following steps:
respectively calculating the absolute values of the face pitch angle, the face rotation angle and the face side angle;
judging whether the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold or not;
judging whether the absolute value of the face pitch angle is smaller than the first face pitch angle absolute value threshold or not;
judging whether the absolute value of the face rotation angle is smaller than the face rotation angle threshold absolute value or not;
and if the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, determining that the face attitude angle meets the first preset attitude condition.
Optionally, the preset posture condition includes a second preset posture condition, the face posture type includes a side face, the face posture angle is compared with the preset posture condition, and the step of judging the face posture type of the filed picture according to the comparison result includes:
comparing the face attitude angle with the second preset attitude condition, and judging whether the face attitude angle meets the second preset attitude condition;
and if the face posture angle meets the second preset posture condition, judging that the face posture type is a side face.
Optionally, the face pose angle includes a face pitch angle, a face rotation angle, and a face side angle of the face picture; the second preset posture condition comprises a face side face angle threshold range, a face pitch angle absolute value threshold and a face rotation angle absolute value threshold; the human face side face angle threshold range is a right side face angle threshold range or a left side face angle threshold range, and the side face is a right side face or a left side face;
comparing the face attitude angle with the second preset attitude condition, and judging whether the face attitude angle meets the second preset attitude condition comprises the following steps:
respectively calculating the absolute values of the face pitch angle and the face rotation angle;
judging whether the human face side face angle is within the right side face angle threshold range or within the left side face angle threshold range;
judging whether the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold or not;
judging whether the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold or not;
if the face side face angle is within the right side face angle threshold range or within the left side face angle threshold range, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, determining that the face attitude angle meets the second preset attitude condition;
if the face pose angle meets the second preset pose condition, the step of judging that the face pose type is a side face comprises the following steps of:
if the face side face angle is within the range of the right side face angle threshold value, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold value, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold value, judging that the face posture type is a right side face;
alternatively, the first and second electrodes may be,
and if the face side face angle is in the range of the left side face angle threshold value, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold value, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold value, judging that the face posture type is a left side face.
Optionally, the preset posture condition includes a third preset posture condition, the face posture type includes a pitching face, the face posture angle is compared with the preset posture condition, and the step of judging the face posture type of the archived picture according to the comparison result includes:
comparing the face attitude angle with the third preset attitude condition, and judging whether the face attitude angle meets the third preset attitude condition;
and if the face posture angle meets the third preset posture condition, judging that the face posture type is a pitching face.
Optionally, after the representative picture corresponding to the face pose type does not exist in the archive, before the archived picture is used as the new representative picture of the archive, the method further includes:
acquiring the face characteristic value of the archived picture and the face characteristic value of the existing representative picture;
calculating the similarity between the face characteristic value of the archived picture and the face characteristic value of the existing representative picture based on the face characteristic value of the archived picture and the face characteristic value of the existing representative picture so as to obtain the similarity between the archived picture and the existing representative picture;
judging whether the similarity between the archived picture and the existing representative picture meets a preset similarity threshold value or not;
and if the similarity between the archived picture and the existing representative picture meets a preset similarity threshold, taking the archived picture as a new representative picture of the archive.
In a second aspect, an embodiment of the present invention further provides an archive representative picture generation apparatus for generating face representative pictures of a plurality of different pose types of a face picture archive, where the archive representative picture generation apparatus includes:
the face image acquisition module is used for acquiring a face pose angle of an archived image in the archive, wherein the archived image is an archived image except for an existing representative image in the archive;
the face posture type judging module is used for comparing the face posture angle with a preset posture condition and judging the face posture type of the archived picture according to a comparison result;
the representative picture judging module is used for judging whether a representative picture corresponding to the face gesture type exists in the file or not based on the face gesture type;
and the representative picture determining module is used for determining the filed picture as a new representative picture of the archive if the representative picture corresponding to the face posture type does not exist in the archive.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: the system comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps in the archive representative picture generation method provided by the embodiment.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps in the archive representative picture generation method provided in the foregoing embodiment.
In the embodiment of the invention, the face pose angle of the filed picture in the file is obtained, and the filed picture is the filed picture except the existing representative picture in the file; comparing the face attitude angle with a preset attitude condition, and judging the face attitude type of the archived picture according to a comparison result; judging whether a representative picture corresponding to the face gesture type exists in the file or not based on the face gesture type; and if the representative picture corresponding to the face posture type does not exist in the archive, determining the archived picture as a new representative picture of the archive. The face pose type of the filed picture can be judged through the face pose angle obtained from the filed picture in the file, the face pose type of the filed picture is compared with the face pose type of the existing representative picture in the file, and a plurality of representative pictures of different pose types of the file are generated according to the comparison result, so that a more accurate and comprehensive basis is provided for picture filing, and the accuracy and the recall rate of the picture filing are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for generating an archive representative picture according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a face pose angle according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method provided in step 102 of the embodiment of FIG. 1;
FIG. 4 is a flow chart of a method provided in step 201 of the embodiment of FIG. 3;
FIG. 5 is a flow chart of another method provided by step 102 in the embodiment of FIG. 1;
FIG. 6 is a flow chart of a method provided in step 401 of the embodiment of FIG. 5;
FIG. 7 is a flow chart of yet another method provided in step 102 of the embodiment of FIG. 1;
FIG. 8 is a flow chart of a method provided in step 601 of the embodiment of FIG. 7;
FIG. 9 is a schematic flow chart of a method provided in step 104 of the embodiment of FIG. 1;
FIG. 10 is a schematic structural diagram of an apparatus for generating a digital archive representative picture according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a structure provided by the face pose type determination module in the embodiment of FIG. 10;
FIG. 12 is a schematic diagram of a structure provided by the first determining unit in the embodiment of FIG. 11;
FIG. 13 is a schematic diagram of another structure provided by the face pose type determination module in the embodiment of FIG. 10;
FIG. 14 is a schematic diagram of a structure provided by the second determining unit in the embodiment of FIG. 13;
FIG. 15 is a schematic diagram of still another structure provided by the face pose type determination module in the embodiment of FIG. 10;
FIG. 16 is a schematic diagram illustrating a structure provided by the third determining unit in the embodiment of FIG. 15;
FIG. 17 is a schematic diagram of a representative picture determination module 904 provided in the embodiment of FIG. 10;
fig. 18 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for generating an archive representative picture according to an embodiment of the present invention, the method is used to generate a plurality of face representative pictures with different pose types of a face picture archive, as shown in fig. 1, the method includes the following steps:
step 101, obtaining a face pose angle of an archived picture in a file.
The archived pictures are archived pictures except for the existing representative pictures in the archive. The number of the archived pictures other than the current representative picture is multiple, that is, the number of the archived pictures is multiple. The archived picture is used as an alternative representative picture of the preset archive. It should be noted that there may be a plurality of archived pictures in the archive, and the archived pictures are classified into the archive after calculating the similarity between the picture to be archived and the current representative picture in the archive, and the similarity satisfies the preset similarity threshold. If the archive is a face archive, it can be determined that the archived picture in the archive and the face in the existing representative picture in the archive are substantially the same person. The existing representative picture in the file may be a representative cover of the file. The representative picture is a picture that can represent most all the archived pictures in the archive.
The filed picture may be referred to as a filed image, a filed photograph, or the like. And the filed picture contains a face, specifically a single face. If a plurality of faces exist in the filed pictures, the representative picture judgment is preferentially carried out on the face with the largest face area in the filed picture group. Or preferentially judging the representative picture of the face at the top in the filed picture.
The above-mentioned face pose angle may be referred to as a face pose attribute value. The face posture angle includes a face pitch angle (pitch), a face rotation angle (roll), and a face side angle (yaw). In a specific embodiment, referring to fig. 2, fig. 2 is a schematic diagram of a face pose angle provided by an embodiment of the present invention. For convenience of explaining the face pose angle, a three-dimensional coordinate system is established firstly, specifically: the human head is set (the human face is set), the human head is taken as the origin of coordinates, then the x axis is vertical to the side face, the y axis is vertical to the front face, and the z axis is vertical to the top of the head, so as to obtain a three-dimensional coordinate system. And the face pitch angle corresponds to the angle of the front face rotated clockwise or counterclockwise around the x-axis in the three-dimensional coordinate system of fig. 2. The face rotation angle corresponds to an angle at which the face is rotated clockwise or counterclockwise about the y-axis in the three-dimensional coordinate system of fig. 2. The face side face angle corresponds to the angle of the front face rotated clockwise or counterclockwise around the z-axis in the three-dimensional coordinate system of fig. 2. The face pose angle is extracted from the archived picture by a face pose algorithm model. It should be noted that, when more face pose types need to be determined, a multidimensional coordinate system may be set, so that more face pose types are more conveniently embodied.
Specifically, a face pose angle corresponding to the face pose angle is extracted from the archived picture through a face pose algorithm model. And when a plurality of archived pictures exist in the archive, sequentially generating a corresponding face pose angle for each archived picture based on the face pose algorithm model.
It should be noted that the above-mentioned manner of obtaining the face pose angle is flexible, and may be extracted from the archived picture temporarily through the face pose algorithm model during use, or may be generated and stored for use before the archived picture is accessed to the archive system.
As an implementation manner, after the face pose angle of the archived picture is obtained, the face picture quality of the archived picture is obtained, and whether the face picture quality of the archived picture meets a preset face picture quality threshold is determined, if yes, step 102 is executed again. Specifically, the face image quality of the archived picture is extracted from the face picture in the archived picture through a face image quality algorithm model. And when a plurality of archived pictures exist in the archive, extracting the corresponding face picture quality for each archived picture based on the face picture quality algorithm model.
And 102, comparing the face posture angle with a preset posture condition, and judging the face posture type of the archived picture according to the comparison result.
The preset posture condition is set by a user in advance according to different human face postures and is used for judging the posture type of the human face. In specific implementation, the preset posture conditions may include a first preset posture condition used for determining whether the face is a front face, a second preset posture condition used for determining whether the face is a side face, and a third preset posture condition used for determining whether the face is a pitching face. Wherein, this side face includes left side face and right side face, and every single move face is including lifting the head face and low head face.
Preferably, when the preset pose condition includes a first preset pose condition and the face pose type includes a front face, referring to fig. 3, step 102 specifically includes the steps of:
step 201, comparing the face attitude angle with a first preset attitude condition, and judging whether the face attitude angle meets the first preset attitude condition.
In specific implementation, the face pose angle includes a face pitch angle, a face rotation angle and a face side angle of the archived picture. The first preset posture condition comprises a face pitch angle absolute value threshold, a face rotation angle absolute value threshold and a face side face angle absolute value threshold. The face pitch angle, the face rotation angle and the face side angle of the filed picture are the face pitch angle, the face rotation angle and the face side angle which actually exist in the filed picture. And the face pitch angle absolute value threshold, the face rotation angle absolute value threshold and the face side face angle absolute value threshold are preset by a user and are used for judging whether the face is raised or lowered, whether the face turns left or right, whether the face is inclined and the like.
Preferably, referring to fig. 4, step 201 comprises the steps of:
step 301, calculating the absolute values of the face pitch angle, the face rotation angle and the face side angle respectively.
The angle is positive and negative, and the positive and negative angles are used for indicating the rotation direction of the face. Such as face pitch angle, head up and head down are one positive and one negative, where we assume that head up angle is positive and head down angle is negative, and the absolute values of which can represent the magnitude of head up and head down. The head-up and the head-down can be used as independent variables, the angle threshold interval is controlled independently, and the same face rotation angle and the face side angle can be divided into independent variables according to the rotation direction.
Specifically, the absolute value of the face pitch angle is calculated to determine the actual amplitude of the face heading and heading in the archived picture. The absolute value of the face rotation angle is calculated in order to determine the actual magnitude of the face tilt in the archived picture. Of course, the absolute value of the face side corner is calculated to determine the actual magnitude of the left and right turns of the face in the archived picture.
Step 302, judging whether the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold.
Specifically, the face side face angle absolute value threshold is a preset face side face angle absolute value, and is used for judging whether the face in the archived picture rotates left or right. When the absolute value of the face side face angle is smaller than the absolute value threshold of the face side face angle, the left or right rotation amplitude of the face in the filed picture is smaller, and the amplitude is within an allowable amplitude range, so that the face in the filed picture is similar to the face without left or right rotation. For example, the absolute value threshold of the face side face angle may be set to 5 degrees, and the absolute value of the actual face side face angle of the face in the archived picture is 2 degrees, so that it can be determined that the absolute value of the face side face angle of the face in the archived picture is smaller than the absolute value threshold of the face side face angle, that is, it can be determined that the face in the archived picture does not rotate in the left-right direction. It should be noted that when the absolute value of the face side angle is equal to 0, it indicates that the face in the archived picture is not rotated to the left or right.
And step 303, judging whether the absolute value of the face pitch angle is smaller than a first face pitch angle absolute value threshold value.
Specifically, the face pitch angle absolute value threshold is a preset face pitch angle absolute value, and is used for judging whether the face in the archived picture rotates upwards or downwards. When the absolute value of the face pitch angle is smaller than the absolute value threshold of the face pitch angle, the amplitude of the face in the filed picture rotating upwards or downwards is smaller, and the face in the filed picture is in an allowable amplitude range, so that the face in the filed picture does not rotate upwards or downwards approximately. For example, the face pitch angle absolute value threshold may be set to 5 degrees, and the absolute value of the actual face pitch angle of the face in the archived picture is 1 degree, so that it may be determined that the absolute value of the face pitch angle of the face in the archived picture is smaller than the face pitch angle absolute value threshold, that is, it may be determined that the face in the archived picture does not rotate in the up-down direction. It should be noted that when the absolute value of the face pitch angle is equal to 0, it indicates that the face in the archived picture is not rotated upward or downward.
And step 304, judging whether the absolute value of the face rotation angle is smaller than the face rotation angle threshold absolute value.
Specifically, the face rotation angle absolute value threshold is a preset face rotation angle absolute value, and is used for judging whether the face in the archived picture rotates obliquely or not. When the absolute value of the face rotation angle is smaller than the absolute value threshold of the face rotation angle, the amplitude of face tilt rotation in the archived picture is smaller, and the face tilt rotation is within the allowable amplitude range, so that the face in the archived picture is approximately not rotated upwards or downwards in the left direction. For example, the absolute value threshold of the face rotation angle may be set to 5 degrees, and the absolute value of the actual face rotation angle of the face in the archived picture is 4 degrees, so that it may be determined that the absolute value of the face rotation angle of the face in the archived picture is smaller than the absolute value threshold of the face rotation angle, that is, it may be determined that the face in the archived picture does not rotate in an oblique direction (e.g., clockwise or counterclockwise around the y-axis in fig. 2). It should be noted that when the absolute value of the face rotation angle is equal to 0, it indicates that the face in the archived picture is not tilted and rotated.
And 305, if the absolute value of the face side angle is smaller than the face side angle absolute value threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, determining that the face attitude angle meets a first preset attitude condition.
Specifically, when the face in the filed picture simultaneously satisfies that the absolute value of the face side angle is smaller than the face side angle absolute value threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, it is determined that the face attitude angle satisfies a first preset attitude condition.
Step 202, if the face pose angle meets the first preset pose condition, judging that the face pose type is a positive face.
Specifically, when the face in the archived picture simultaneously satisfies that the absolute value of the face side angle is smaller than the face side angle absolute value threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, it is determined that the face in the archived picture is similar to no rotation in the left-right direction, the up-down direction, and the tilt direction, that is, the face in the archived picture belongs to the front face.
In this embodiment, the face pose angle of the archived picture may be compared with a first preset pose condition to determine whether the face in the archived picture is a front face. And then, providing a judgment basis for setting the left front face representative picture for the file, and prompting the generation of the front face representative picture of the file when no front face representative picture exists in the file.
Preferably, when the preset posture condition includes a second preset posture condition, the face posture type includes a side face. Referring to fig. 5, step 102 specifically includes the further steps of:
step 401, comparing the face pose angle with a second preset pose condition, and determining whether the face pose angle meets the second preset pose condition.
And step 402, if the face pose angle meets a second preset pose condition, judging that the face pose type is a side face.
In specific implementation, the face pose angle includes a face pitch angle, a face rotation angle and a face side angle of the archived picture. The second preset posture condition comprises a face side face angle threshold range, a face pitch angle absolute value threshold and a face rotation angle absolute value threshold. The human face side face angle threshold range is a right side face angle threshold range or a left side face angle threshold range, and the side face is a right side face or a left side face. The face pitch angle, the face rotation angle and the face side angle of the filed picture are the face pitch angle, the face rotation angle and the face side angle which actually exist in the filed picture. The face pitch angle absolute value threshold, the face rotation angle absolute value threshold and the face side angle threshold range are preset by a user, for example, the face pitch angle absolute value threshold is preset to 5 degrees, the face rotation angle absolute value threshold is preset to 5 degrees, the right side angle threshold range is set to (-20, -10), and the left side angle threshold range is set to (10, 20). The right face angle threshold range is set as a negative threshold range, and the left face angle threshold range is set as a positive threshold range only to indicate the direction of the left and right faces, and is not limited to the threshold range. Of course, the right face angle threshold range may be set as a positive threshold range, and the left face angle threshold range may be set as a negative threshold range.
Preferably, referring to fig. 6, step 401 comprises the steps of:
and step 501, calculating the face pitch angle and the absolute value of the face rotation angle respectively.
Specifically, the calculation method and the function of the absolute values of the face pitch angle and the face rotation angle in step 501 are the same as those of the calculation method and the function of the absolute values of the face pitch angle and the face rotation angle in step 301.
Step 502, judging whether the human face side face angle is in the range of the right side face angle threshold value or in the range of the left side face angle threshold value.
Specifically, the right-side face angle threshold range or the left-side face angle threshold range is preset, and is used for judging a threshold condition of whether the face in the archived picture rotates leftwards or rightwards. When the actual value of the face side angle is within the range of the right side angle threshold value, the face in the filed picture is indicated to rotate rightwards, and the rotating amplitude is the size of the actual face side angle of the filed picture. When the actual value of the face side face angle is within the threshold range of the left side face angle, the face in the filed picture is indicated to rotate leftwards, and the rotating amplitude is the size of the actual face side face angle of the filed picture. For example, if the right face angle threshold range is set to (-20, -10), and the actual face side angle of the face in the archived picture is-15 degrees, it can be determined that the face side angle of the face in the archived picture is within the right face angle threshold range. Alternatively, for example, if the left face angle threshold range is set to (10,20), and the actual face side angle of the face in the archived picture is 13 degrees, it may be determined that the face side angle of the face in the archived picture is within the left face angle threshold range.
Step 503, judging whether the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold.
Specifically, step 503 and step 303 have the same execution procedure and achieve the same effect, and are not described herein again to avoid repetition.
And step 504, judging whether the absolute value of the face rotation angle is smaller than a face rotation angle absolute value threshold value.
Specifically, step 504 and step 304 have the same execution procedure and achieve the same effect, and are not described herein for avoiding repetition.
And 505, if the face side angle is within the right side face angle threshold range or within the left side face angle threshold range, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, determining that the face attitude angle meets a second preset attitude condition.
Specifically, when the face in the archived picture simultaneously satisfies the face side angle in the right side face angle threshold range or the left side face angle threshold range, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, it is determined that the face attitude angle satisfies the second preset attitude condition.
Preferably, step 402 specifically includes:
and if the face side angle is in the range of the right side angle threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold, judging that the face posture type is a right side face. Alternatively, the first and second electrodes may be,
and if the face side face angle is within the range of the face side face angle threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold, judging that the face posture type is a left face.
In this embodiment, the face pose angle of the archived picture may be compared with a second preset pose condition to determine whether the face in the archived picture is a left face or a right face. And then set up left side face representative picture or right side face representative picture for the archives and provide the basis of judging, when there is not left side face in the archives or there is not right side face representative picture, impel the generation of archives left side face, right side face representative picture.
Preferably, when the preset posture condition comprises a third preset posture condition and the face posture type comprises a pitching face, referring to fig. 7, step 102 comprises the steps of:
step 601, comparing the face attitude angle with a third preset attitude condition, and judging whether the face attitude angle meets the third preset attitude condition.
Step 602, if the face pose angle meets a third preset pose condition, determining that the face pose type is a pitching face.
In specific implementation, the human face attitude angle comprises a human face pitch angle, a human face rotation angle and a human face side face angle of the archived picture; the second preset posture condition comprises a face pitch angle threshold range, a face side face angle absolute value threshold and a face rotation angle absolute value threshold; the human face pitch angle threshold range is a head-up face angle threshold range or a low head face angle threshold range, and the pitching face is a head-up face or a low head face. The face pitch angle, the face rotation angle and the face side angle of the filed picture are the face pitch angle, the face rotation angle and the face side angle which actually exist in the filed picture. And the face pitch angle threshold range, the face side face angle absolute value threshold and the face rotation angle absolute value threshold are preset by a user. The face side face angle absolute value threshold is preset to 5 degrees, the face rotation angle absolute value threshold is preset to 5 degrees, the low head face angle threshold range is set to (-20, -10), and the head-up angle threshold range is set to (10, 20). It should be noted that the low head angle threshold range is set as the negative threshold range, and the head-up angle threshold range is set as the positive threshold range only for indicating the head-up or low head direction, and is not limited to the threshold range. Of course, the low head face angle threshold range may be set as the positive threshold range, and the left face angle threshold range of the head-up angle threshold range may be set as the negative threshold range.
Preferably, referring to fig. 8, step 601 includes:
step 701, calculating absolute values of a face side face angle and a face rotation angle respectively.
Specifically, the calculation method and the function of the absolute values of the face side face angle and the face rotation angle in step 701 are the same as those of the calculation method and the function of the absolute values of the face side face angle and the face rotation angle in step 301.
Step 702, judging whether the face pitch angle is within the head-up angle threshold range or within the low head-up angle threshold range.
Specifically, the head-up angle threshold range or the low head angle threshold range is preset, and is used for judging the threshold condition of whether the face in the archived picture rotates upwards or downwards. When the actual value of the face pitch angle is within the range of the head-up angle threshold value, the face in the filed picture is indicated to rotate upwards, and the rotating amplitude is the size of the actual face pitch angle of the filed picture. When the actual value of the face pitch angle is within the range of the low face angle threshold, the face in the filed picture is indicated to rotate downwards, and the rotating amplitude is the size of the actual face pitch angle of the filed picture. For example, the head-up angle threshold range is set to (10,20), and the actual face pitch angle of the face in the archived picture is 15 degrees, it can be determined that the face pitch angle of the face in the archived picture is within the head-up angle threshold range. Or, for example, if the head lowering angle threshold range is set to (-20, -10), and the actual face pitch angle of the face in the archived picture is-14 degrees, it can be determined that the face pitch angle of the face in the archived picture is within the head lowering angle threshold range.
And step 703, judging whether the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold.
Specifically, step 703 and step 302 have the same execution procedure and achieve the same effect, and are not described herein again to avoid repetition.
Step 704, determining whether the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold.
Specifically, step 704 has the same execution procedure and the same effect as step 304, and is not described herein for avoiding repetition.
Step 705, if the face pitch angle is within the head-up angle threshold range or within the low head-up angle threshold range, the absolute value of the face side angle is smaller than the face side angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, it is determined that the face attitude angle meets a third preset attitude condition.
Specifically, when the face in the archived picture simultaneously satisfies the face-up angle threshold range or the low face angle threshold range, the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, it is determined that the face pose angle satisfies the third preset pose condition.
Preferably, step 702 specifically includes:
and if the face pitch angle is within the range of the head-up face angle threshold value, the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold value, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold value, judging that the face posture type is the head-up face. Alternatively, the first and second electrodes may be,
and if the face pitch angle is within the range of the low head face angle threshold value, the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold value, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold value, judging that the face posture type is the low head face.
Optionally, the preset posture conditions include a fourth preset posture condition, an … … nth preset posture condition, etc., where N is set according to actual needs, and N should be controlled within a feasible range, and if N is set to be wireless, the archive needs to set a plurality of wireless representative pictures, and the plurality of wireless representative pictures in the archive increases the efficiency of picture archiving, and for this reason, N is preferably set to be 2, 3, 4, 5, etc., and may also be 6, 7, 8, 9, 10, etc. The face pose types may also include other face poses such as a tilted face. When the archive management system has high requirements on the archiving accuracy and the recall rate, a plurality of preset posture conditions and corresponding representative pictures of a plurality of human face posture types can be set.
In this embodiment, the face pose angle of the archived picture may be compared with a third preset pose condition to determine whether the face in the archived picture is a head-up face or a head-down face. And further providing a judgment basis for setting the head-up representative picture or the head-down representative picture for the file, and prompting the generation of the head-up representative picture or the head-down representative picture of the file when the head-up representative picture or the head-down representative picture does not exist in the file.
And 103, judging whether a representative picture corresponding to the face gesture type exists in the file or not based on the face gesture type.
Specifically, after the face pose type of the filed picture is determined, the face pose type of the existing representative picture in the file is searched, whether the face pose type of the existing representative picture in the file is the same as the face pose type of the filed picture is judged, if yes, the face pose type of the filed picture already exists, and if not, the face with the pose type same as the face pose type of the filed picture does not exist in the file, namely, the face pose type of the filed picture which is lack in the file corresponds to the representative picture is explained.
And step 104, if the representative picture corresponding to the face posture type does not exist in the archive, determining the archived picture as a new representative picture of the archive.
Wherein, the newly added representative picture is the representative picture newly added to the file.
Specifically, when it is determined that there is no representative picture in the archive that is the same as the face pose type of the archived picture, the archived picture can be directly used as a new representative picture of the archive. Then a representative picture corresponding to the face pose type of the archived picture is present in the archive.
In another embodiment, when there are multiple archived pictures, after step 103 is executed to obtain the face pose type of the first archived picture, step 104 is executed to use the first archived picture as the representative picture of the archive. After the steps 101 and 103 are sequentially executed, it is found that the face pose types of the second archived picture and the first archived picture are the same, in order to avoid the representative picture with the same face pose type appearing in the archive, the second archived picture may be directly discarded, and the second archived picture is not used as the representative picture of the archive because the first archived picture and the representative picture of the archive are both used. If the second filed picture is taken as the representative picture of the archive, two representative pictures with the same human face posture type appear in the archive, and the repeated representative pictures have no comparative value when the pictures are filed.
As another embodiment, step 101-. When it is determined that there is no representative picture of a certain face pose in the archive, the archived picture with the highest quality can be selected from the archived pictures classified according to the face pose types corresponding to the face pose types lacking in the archive to be determined as the representative picture of the archive. Therefore, representative pictures with better picture quality and different human face posture types can be set for the files, more comprehensive and accurate judgment basis is provided for the picture filing, and the picture filing accuracy and recall rate are improved.
It should be noted that the number of representative pictures may be set, and the type of the face pose may also be set, where one typical scheme is as follows: each file is set with 5 representative pictures, which comprises: 1 front face picture, 1 left side face picture, 1 right side face picture, 1 new line picture, 1 low head picture.
When all the representative pictures of the face pose types in the file are set, the generation work of the representative pictures can be stopped.
In the embodiment of the invention, the face pose angle of the filed picture in the file is obtained, and the filed picture is a filed picture except the existing representative picture in the file; comparing the face posture angle with a preset posture condition, and judging the face posture type of the archived picture according to the comparison result; judging whether a representative picture corresponding to the face posture type exists in the file or not based on the face posture type; and if the representative picture corresponding to the face posture type does not exist in the archive, determining the archived picture as a new representative picture of the archive. The face pose type of the filed picture can be judged through the face pose angle obtained from the filed picture in the file, the face pose type of the filed picture is compared with the face pose type of the existing representative picture in the file, and a plurality of representative pictures of different pose types of the file are generated according to the comparison result, so that a more accurate and comprehensive basis is provided for picture filing, and the accuracy and the recall rate of the picture filing are improved.
Referring to fig. 9, fig. 9 is a schematic flow chart of a method provided in step 104 in the embodiment of fig. 1. As shown in fig. 9, step 104 includes the steps of:
step 801, acquiring a face characteristic value of the filed picture and a face characteristic value of the existing representative picture.
The face feature value is a bit string with a certain length generated by processing a face picture by using a face feature algorithm model. The face feature value of the archived picture may be a bit string with a certain length, which is generated by processing a face in the archived picture by using a face feature algorithm model. The face feature value of the existing representative picture may be a bit string with a certain length, which is generated by processing a face in the existing representative picture by using a face feature algorithm model.
And step 802, calculating the similarity between the face characteristic value of the archived picture and the face characteristic value of the existing representative picture based on the face characteristic value of the archived picture and the face characteristic value of the existing representative picture to obtain the similarity between the archived picture and the existing representative picture.
Specifically, after the similarity between the face feature value of the archived picture and the face feature value of the existing representative picture is calculated, the similarity between the archived picture and the existing representative picture is correspondingly obtained.
Step 803, judging whether the similarity between the archived picture and the existing representative picture meets a preset similarity threshold value.
The preset similarity threshold is a similarity threshold preset by a user and used for judging whether the faces in the archived picture and the existing representative picture are the same face. And when the similarity between the archived picture and the existing representative picture is greater than a preset similarity threshold, the archived picture and the existing representative picture are the face of the same person. When the similarity between the archived picture and the existing representative picture is smaller than a preset similarity threshold value, the faces in the archived picture and the existing representative picture are different from the face of the same person.
And step 804, if the similarity between the archived picture and the existing representative picture meets a preset similarity threshold, taking the archived picture as a new representative picture of the archive.
Specifically, when it is determined that the faces of the archived picture and the current representative picture are the same person, and it is determined in step 101 and 103 that the archived picture meets the condition of the new representative picture as the archive, the archived picture can be directly added as the new representative picture of the archive. Since all the representative pictures of the archive are pictures capable of representing persons in the archive, in order to ensure that the representative pictures and the persons in the represented archive are the same person, it is necessary to use the archived pictures with high similarity to the existing representative pictures of the archive as the representative pictures of the archive. The way of using the archived picture as the new representative picture of the archive may be to identify the archived picture meeting the requirement of the representative picture, or to store the archived picture as the representative picture of the archive in another storage space, etc.
In the embodiment of the present invention, when an archived picture with an archiving error exists in the archived pictures in the archive, whether the archived picture and the existing representative picture are faces of the same person can be determined by determining the similarity between the archived picture and the existing representative picture. If the similarity between the archived picture and the existing representative picture meets a preset similarity threshold, the archived picture and the existing representative picture can be determined to be the face of the same person. Thus, the representative picture of the archive can improve the archiving accuracy of the picture.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an apparatus for generating a digital archive representative picture according to an embodiment of the present invention, configured to generate a plurality of face representative pictures with different pose types of a face picture archive, as shown in fig. 10, the archive representative picture generating apparatus 900 includes:
the face image obtaining module 901 is configured to obtain a face pose angle of an archived picture in the archive, where the archived picture is an archived picture in the archive except for an existing representative picture.
And the face pose type judging module 902 is configured to compare the face pose angle with a preset pose condition, and judge the face pose type of the archived picture according to the comparison result.
Preferably, the preset posture condition comprises a first preset posture condition, and the face posture type comprises a front face. Referring to fig. 11, the face pose type determination module 902 includes:
the first determining unit 9021 is configured to compare the face pose angle with a first preset pose condition, and determine whether the face pose angle meets the first preset pose condition.
Preferably, the face pose angle comprises a face pitch angle, a face rotation angle and a face side angle of the archived picture; the first preset posture condition comprises a face pitch angle absolute value threshold, a face rotation angle absolute value threshold and a face side face angle absolute value threshold. Referring to fig. 12, the first judgment unit 9021 includes:
a first calculating sub-unit 90211 for calculating the absolute values of the face pitch angle, the face rotation angle and the face side angle, respectively.
A first judging subunit 90212, configured to judge whether the absolute value of the face side angle is smaller than a face side angle absolute value threshold;
a second judgment subunit 90213, configured to judge whether the absolute value of the face pitch angle is smaller than the threshold of the absolute value of the first face pitch angle;
a third judgment subunit 90214, configured to judge whether the absolute value of the face rotation angle is smaller than a face rotation angle threshold absolute value;
a first determining subunit 90215, configured to determine that the face pose angle satisfies a first preset pose condition if the absolute value of the face side angle is smaller than the face side angle absolute value threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold.
The front face determining unit 9022 is configured to determine that the face pose type is a front face if the face pose angle satisfies the first preset pose condition.
Preferably, when the preset posture condition includes a second preset posture condition, the face posture type includes a side face. Referring to fig. 13, the face pose type determination module 902 further includes:
the second judging unit 9023 is configured to compare the face pose angle with a second preset pose condition, and judge whether the face pose angle meets the second preset pose condition.
And the side face judgment unit 9024 is configured to judge that the face posture type is a side face if the face posture angle meets the second preset posture condition.
Preferably, the face pose angle comprises a face pitch angle, a face rotation angle and a face side angle of the archived picture. The second preset posture condition comprises a face side face angle threshold range, a face pitch angle absolute value threshold and a face rotation angle absolute value threshold. The human face side face angle threshold range is a right side face angle threshold range or a left side face angle threshold range, and the side face is a right side face or a left side face.
Referring to fig. 14, the second judgment unit 9023 includes:
a second calculating subunit 90231, configured to calculate the absolute values of the face pitch angle and the face rotation angle, respectively.
And the fourth judgment subunit 90232 is configured to judge whether the human face side face angle is within the right side face angle threshold range or within the left side face angle threshold range.
And a fifth judging subunit 90233, configured to judge whether the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold.
A sixth judging subunit 90234, configured to judge whether the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold.
A second determining subunit 90235, configured to determine that the face pose angle satisfies a second preset pose condition if the face side angle is within the right side face angle threshold range or within the left side face angle threshold range, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is the face rotation angle absolute value threshold.
Preferably, the side face determining unit 9024 is further configured to determine that the face posture type is a right side face if the face side face angle is within the range of the right side face angle threshold, the absolute value of the face pitch angle satisfies that the absolute value of the face pitch angle is smaller than the absolute value threshold of the face pitch angle, and the absolute value of the face rotation angle satisfies the absolute value threshold of the face rotation angle. Alternatively, the first and second electrodes may be,
and if the face side face angle is within the range of the face side face angle threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold, judging that the face posture type is a left face.
Preferably, referring to fig. 15, the face pose type determination module 902 further includes:
a third judging unit 9025, configured to compare the face pose angle with a third preset pose condition, and judge whether the face pose angle meets the third preset pose condition;
and the pitching face judging unit 9026 is configured to judge that the face posture type is a pitching face if the face posture angle meets a third preset posture condition.
Preferably, the face pose angle comprises a face pitch angle, a face rotation angle and a face side angle of the archived picture; the second preset posture condition comprises a face pitch angle threshold range, a face side face angle absolute value threshold and a face rotation angle absolute value threshold; the human face pitch angle threshold range is a head-up face angle threshold range or a low head face angle threshold range, and the pitching face is a head-up face or a low head face;
referring to fig. 16, the third judgment unit 9025 includes:
a third computing subunit 90251, for computing the absolute values of the face side face angle and the face rotation angle, respectively.
A seventh judging subunit 90252, configured to judge whether the face pitch angle is within the head-up angle threshold range or within the low head-up angle threshold range.
An eighth judging subunit 90253, configured to judge whether the absolute value of the face side angle is smaller than the face side angle absolute value threshold.
A ninth judging sub-unit 90254 for judging whether the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold.
A third determining subunit 90255, configured to determine that the face pose angle satisfies a third preset pose condition if the face pitch angle is within the head-up angle threshold range or within the low head-face angle threshold range, the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold, and the absolute value of the face rotation angle is the face rotation angle absolute value threshold.
Preferably, the face-to-face judgment unit 9026 is configured to judge that the face posture type is a face-to-face type if the face pitch angle is within the range of the face-to-face angle threshold, the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold, and the absolute value of the face rotation angle satisfies the face rotation angle absolute value threshold. Alternatively, the first and second electrodes may be,
and if the face pitch angle is within the range of the face lowering angle threshold value, the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold value, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold value, judging that the face posture type is the face lowering type.
And the representative picture judging module 903 is configured to judge whether a representative picture corresponding to the face pose type exists in the archive based on the face pose type.
A determining module 904, configured to determine, if there is no representative picture corresponding to the face pose type in the archive, a new representative picture of the archive from the archived pictures.
Referring to fig. 17, fig. 17 is a schematic structural diagram provided by the representative picture determining module 904 in the embodiment of fig. 10. The representative picture determination module 904 includes:
a face feature value obtaining unit 9041, configured to obtain a face feature value of the archived picture and a face feature value of an existing representative picture.
And a similarity calculation unit 9042, configured to calculate, based on the face feature value of the archived picture and the face feature value of the existing representative picture, a similarity between the face feature value of the archived picture and the face feature value of the existing representative picture, so as to obtain a similarity between the archived picture and the existing representative picture.
The similarity determining unit 9043 is configured to determine whether the similarity between the archived picture and the current representative picture meets a preset similarity threshold.
A representative picture determining unit 9044, configured to, if the similarity between the archived picture and the existing representative picture satisfies a preset similarity threshold, take the archived picture as a new representative picture of the archive.
The archive representative picture generation device provided by the embodiment of the invention can realize each process realized by the archive representative picture generation method in the above method embodiments, and is not repeated here to avoid repetition. And the same beneficial effects can be achieved.
Referring to fig. 18, fig. 18 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 18, an electronic device 1000 includes: the memory 1002, the processor 1001 and a computer program stored on the memory 1002 and executable on the processor 1001, when the processor 1001 executes the computer program, the steps in the archive representative picture generating method provided by the above embodiments are implemented.
It should be noted that the electronic device 1000 may be an intelligent terminal of a file system, a mobile phone, a tablet computer, or the like.
The electronic device 1000 according to the embodiment of the present invention can implement each implementation manner in the foregoing method embodiments and corresponding beneficial effects, and details are not described here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the archive representative picture generation method provided in the embodiment of the present invention, and can achieve the same technical effect, and is not described herein again to avoid repetition.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, and the program can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A method for generating a plurality of face representative pictures of different pose types for a face picture archive, said method comprising the steps of:
acquiring a face pose angle of an archived picture in the archive, wherein the archived picture is an archived picture which is calculated between a picture to be archived and an existing representative picture in the archive, meets a preset similarity threshold and is other than the existing representative picture in the archive, and the face pose angle of the archived picture is a face pose angle corresponding to a face with the largest face area in faces contained in the archived picture;
comparing the face attitude angle with a preset attitude condition, and judging the face attitude type of the archived picture according to a comparison result; the preset posture conditions comprise a first preset posture condition used for judging whether the face is a front face or not, a second preset posture condition used for judging whether the face is a side face or not and a third preset posture condition used for judging whether the face is a pitching face or not;
judging whether a representative picture corresponding to the face gesture type exists in the file or not based on the face gesture type;
and if the representative picture corresponding to the face posture type does not exist in the archive, determining the archived picture as a new representative picture of the archive.
2. The method for generating an archive representative picture according to claim 1, wherein the preset pose conditions include a first preset pose condition, the face pose type includes a front face, and the step of comparing the face pose angle with the preset pose conditions and determining the face pose type of the archived picture according to the comparison result includes:
comparing the face attitude angle with the first preset attitude condition, and judging whether the face attitude angle meets the first preset attitude condition;
and if the face posture angle meets the first preset posture condition, judging that the face posture type is a front face.
3. The archive representative picture generation method according to claim 2, wherein the face pose angle includes a face pitch angle, a face rotation angle, and a face side angle of the archived picture; the first preset posture condition comprises a face pitch angle absolute value threshold, a face rotation angle absolute value threshold and a face side face angle absolute value threshold;
the step of comparing the face pose angle with the first preset pose condition and judging whether the face pose angle meets the first preset pose condition comprises the following steps:
respectively calculating the absolute values of the face pitch angle, the face rotation angle and the face side angle;
judging whether the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold or not;
judging whether the absolute value of the face pitch angle is smaller than a first face pitch angle absolute value threshold or not;
judging whether the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold or not;
and if the absolute value of the face side face angle is smaller than the face side face angle absolute value threshold, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, determining that the face attitude angle meets the first preset attitude condition.
4. The method for generating an archive representative picture according to claim 1, wherein the preset pose conditions include a second preset pose condition, the face pose type includes a side face, and the step of comparing the face pose angle with the preset pose conditions and determining the face pose type of the archived picture according to the comparison result includes:
comparing the face attitude angle with the second preset attitude condition, and judging whether the face attitude angle meets the second preset attitude condition;
and if the face posture angle meets the second preset posture condition, judging that the face posture type is a side face.
5. The archive representative picture generation method according to claim 4, wherein the face pose angle includes a face pitch angle, a face rotation angle, and a face side angle of the archived picture; the second preset posture condition comprises a face side face angle threshold range, a face pitch angle absolute value threshold and a face rotation angle absolute value threshold; the human face side face angle threshold range is a right side face angle threshold range or a left side face angle threshold range, and the side face is a right side face or a left side face;
comparing the face attitude angle with the second preset attitude condition, and judging whether the face attitude angle meets the second preset attitude condition comprises the following steps:
respectively calculating the absolute values of the face pitch angle and the face rotation angle;
judging whether the human face side face angle is within the right side face angle threshold range or within the left side face angle threshold range;
judging whether the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold or not;
judging whether the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold or not;
if the face side face angle is within the right side face angle threshold range or within the left side face angle threshold range, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold, and the absolute value of the face rotation angle is smaller than the face rotation angle absolute value threshold, determining that the face attitude angle meets the second preset attitude condition;
if the face pose angle meets the second preset pose condition, the step of judging that the face pose type is a side face comprises the following steps of:
if the face side face angle is within the range of the right side face angle threshold value, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold value, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold value, judging that the face posture type is a right side face;
alternatively, the first and second electrodes may be,
and if the face side face angle is in the range of the left side face angle threshold value, the absolute value of the face pitch angle is smaller than the face pitch angle absolute value threshold value, and the absolute value of the face rotation angle meets the face rotation angle absolute value threshold value, judging that the face posture type is a left side face.
6. The archive representative picture generation method according to claim 1, wherein the preset pose conditions include a third preset pose condition, the face pose type includes a pitch face, and the step of comparing the face pose angle with the preset pose conditions and determining the face pose type of the archived picture according to the comparison result includes:
comparing the face attitude angle with the third preset attitude condition, and judging whether the face attitude angle meets the third preset attitude condition;
and if the face posture angle meets the third preset posture condition, judging that the face posture type is a pitching face.
7. The archive representative picture generation method according to any one of claims 1 to 6, wherein after the if there is no representative picture corresponding to the face pose type in the archive, before the then using the archived picture as the new representative picture of the archive, the method further comprises:
acquiring the face characteristic value of the archived picture and the face characteristic value of the existing representative picture;
calculating the similarity between the face characteristic value of the archived picture and the face characteristic value of the existing representative picture based on the face characteristic value of the archived picture and the face characteristic value of the existing representative picture so as to obtain the similarity between the archived picture and the existing representative picture;
judging whether the similarity between the archived picture and the existing representative picture meets a preset similarity threshold value or not;
and if the similarity between the archived picture and the existing representative picture meets a preset similarity threshold, taking the archived picture as a new representative picture of the archive.
8. An archive representative picture generation apparatus for generating a plurality of face representative pictures of different pose types of a face picture archive, the archive representative picture generation apparatus comprising:
a face image obtaining module, configured to obtain a face pose angle of a filed image in the archive, where the filed image is a filed image that satisfies a preset similarity threshold and is obtained by calculation between a to-be-filed image and an existing representative image in the archive, and the filed image is an image other than the existing representative image in the archive, and the face pose angle of the filed image is a face pose angle corresponding to a face with a largest face area in faces included in the filed image;
the face posture type judging module is used for comparing the face posture angle with a preset posture condition and judging the face posture type of the archived picture according to a comparison result; the preset posture conditions comprise a first preset posture condition used for judging whether the face is a front face or not, a second preset posture condition used for judging whether the face is a side face or not and a third preset posture condition used for judging whether the face is a pitching face or not;
the representative picture judging module is used for judging whether a representative picture corresponding to the face gesture type exists in the file or not based on the face gesture type;
and the representative picture determining module is used for determining the filed picture as a new representative picture of the archive if the representative picture corresponding to the face posture type does not exist in the archive.
9. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the archive representative picture generation method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the archive representative picture generation method according to any one of claims 1 to 7.
CN201911310641.6A 2019-12-18 2019-12-18 Archive representative picture generation method and device and electronic equipment Active CN111061899B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911310641.6A CN111061899B (en) 2019-12-18 2019-12-18 Archive representative picture generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911310641.6A CN111061899B (en) 2019-12-18 2019-12-18 Archive representative picture generation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111061899A CN111061899A (en) 2020-04-24
CN111061899B true CN111061899B (en) 2022-04-26

Family

ID=70302273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911310641.6A Active CN111061899B (en) 2019-12-18 2019-12-18 Archive representative picture generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111061899B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395037B (en) * 2020-12-07 2024-01-05 深圳云天励飞技术股份有限公司 Dynamic cover selection method and device, electronic equipment and storage medium
CN112686141A (en) * 2020-12-29 2021-04-20 杭州海康威视数字技术股份有限公司 Personnel filing method and device and electronic equipment
CN113326805B (en) * 2021-06-24 2024-04-05 杭州海康威视数字技术股份有限公司 Human body cover updating method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8724910B1 (en) * 2010-08-31 2014-05-13 Google Inc. Selection of representative images
CN105138962A (en) * 2015-07-28 2015-12-09 小米科技有限责任公司 Image display method and image display device
CN105404863A (en) * 2015-11-13 2016-03-16 小米科技有限责任公司 Figure feature recognition method and system
CN107545252A (en) * 2017-08-31 2018-01-05 北京图铭视界科技有限公司 Face identification method and device in video based on multi-pose Face model
CN108304829A (en) * 2018-03-08 2018-07-20 北京旷视科技有限公司 Face identification method, apparatus and system
CN108733819A (en) * 2018-05-22 2018-11-02 深圳云天励飞技术有限公司 A kind of personnel's archives method for building up and device
CN109118233A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 Authentication method and device based on recognition of face
CN109359526A (en) * 2018-09-11 2019-02-19 深圳大学 A kind of face pose estimation, device and equipment
CN109583348A (en) * 2018-11-22 2019-04-05 阿里巴巴集团控股有限公司 A kind of face identification method, device, equipment and system
CN110443297A (en) * 2019-07-30 2019-11-12 浙江大华技术股份有限公司 Clustering method, device and the computer storage medium of image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2497545B1 (en) * 2011-03-08 2019-08-07 Nintendo Co., Ltd. Information processing program, information processing system, and information processing method
CN107871098B (en) * 2016-09-23 2021-04-13 北京眼神科技有限公司 Method and device for acquiring human face characteristic points
CN109145844A (en) * 2018-08-29 2019-01-04 北京旷视科技有限公司 Archive management method, device and electronic equipment for city safety monitoring
CN109376684B (en) * 2018-11-13 2021-04-06 广州市百果园信息技术有限公司 Face key point detection method and device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8724910B1 (en) * 2010-08-31 2014-05-13 Google Inc. Selection of representative images
CN105138962A (en) * 2015-07-28 2015-12-09 小米科技有限责任公司 Image display method and image display device
CN105404863A (en) * 2015-11-13 2016-03-16 小米科技有限责任公司 Figure feature recognition method and system
CN109118233A (en) * 2017-06-23 2019-01-01 百度在线网络技术(北京)有限公司 Authentication method and device based on recognition of face
CN107545252A (en) * 2017-08-31 2018-01-05 北京图铭视界科技有限公司 Face identification method and device in video based on multi-pose Face model
CN108304829A (en) * 2018-03-08 2018-07-20 北京旷视科技有限公司 Face identification method, apparatus and system
CN108733819A (en) * 2018-05-22 2018-11-02 深圳云天励飞技术有限公司 A kind of personnel's archives method for building up and device
CN109359526A (en) * 2018-09-11 2019-02-19 深圳大学 A kind of face pose estimation, device and equipment
CN109583348A (en) * 2018-11-22 2019-04-05 阿里巴巴集团控股有限公司 A kind of face identification method, device, equipment and system
CN110443297A (en) * 2019-07-30 2019-11-12 浙江大华技术股份有限公司 Clustering method, device and the computer storage medium of image

Also Published As

Publication number Publication date
CN111061899A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
CN111061899B (en) Archive representative picture generation method and device and electronic equipment
CN109074084B (en) Robot control method, device and system and applicable robot
CN109829437A (en) Image processing method, text recognition method, device and electronic system
CN111242973A (en) Target tracking method and device, electronic equipment and storage medium
CN109087261B (en) Face correction method based on unlimited acquisition scene
WO2021143865A1 (en) Positioning method and apparatus, electronic device, and computer readable storage medium
CN105678241B (en) A kind of cascade two dimensional image face pose estimation
CN105991924A (en) Shooting assisting method and device
CN110648363A (en) Camera posture determining method and device, storage medium and electronic equipment
CN105654531B (en) Method and device for drawing image contour
CN103617631B (en) A kind of tracking based on Spot detection
CN110598647B (en) Head posture recognition method based on image recognition
WO2022237048A1 (en) Pose acquisition method and apparatus, and electronic device, storage medium and program
CN109993108A (en) Gesture error correction method, system and device under a kind of augmented reality environment
CN108460333B (en) Ground detection method and device based on depth map
CN112747734B (en) Method, system and device for adjusting direction of environment map
CN111079535B (en) Human skeleton action recognition method and device and terminal
CN116091781B (en) Data processing method and device for image recognition
CN113850238B (en) Document detection method and device, electronic equipment and storage medium
JP6874987B2 (en) Feature shape extraction device, feature shape extraction method, and program
JP2022103427A (en) Information processing system
CN111738085B (en) System construction method and device for realizing automatic driving simultaneous positioning and mapping
CN116469156A (en) Method, apparatus, computer device and computer readable storage medium for identifying body state
CN111368674B (en) Image recognition method and device
CN114078258A (en) Image matching method applied to fingerprint identification and related 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
CB02 Change of applicant information

Address after: 518000 1st floor, building 17, Shenzhen Dayun software Town, 8288 Longgang Avenue, Yuanshan street, Longgang District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Yuntian lifeI Technology Co., Ltd

Address before: 518000 1st floor, building 17, Shenzhen Dayun software Town, 8288 Longgang Avenue, Yuanshan street, Longgang District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN INTELLIFUSION TECHNOLOGIES Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant