CN111680574B - Face detection method and device, electronic equipment and storage medium - Google Patents

Face detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111680574B
CN111680574B CN202010420807.6A CN202010420807A CN111680574B CN 111680574 B CN111680574 B CN 111680574B CN 202010420807 A CN202010420807 A CN 202010420807A CN 111680574 B CN111680574 B CN 111680574B
Authority
CN
China
Prior art keywords
face
depth map
depth
determining
standard
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
CN202010420807.6A
Other languages
Chinese (zh)
Other versions
CN111680574A (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.)
Hefei Dilusense Technology Co Ltd
Original Assignee
Hefei Dilusense Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Dilusense Technology Co Ltd filed Critical Hefei Dilusense Technology Co Ltd
Priority to CN202010420807.6A priority Critical patent/CN111680574B/en
Publication of CN111680574A publication Critical patent/CN111680574A/en
Application granted granted Critical
Publication of CN111680574B publication Critical patent/CN111680574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a face detection method, a face detection device, electronic equipment and a storage medium, wherein the face detection method comprises the following steps: acquiring a depth map; inputting the depth map into a face detection model to obtain the face position of the depth map output by the face detection model; determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map; the face detection model is obtained through training based on a sample depth map and the face position of the sample depth map. According to the face detection method, the face detection device, the electronic equipment and the storage medium, the face detection is carried out on the depth map through the face detection model, the face can be accurately detected in a scene with poor illumination conditions without depending on two-dimensional images, the limitation of the type of the depth camera is avoided, the accuracy of the face position is judged by fully utilizing the depth information, and the false detection risk of face detection is reduced.

Description

Face detection method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a face detection method, a face detection device, an electronic device, and a storage medium.
Background
With the continuous development of face recognition technology, people are increasingly concerned about the accuracy and safety problems of face recognition. The common two-dimensional face recognition technology (face recognition is usually carried out by adopting RGB images) is more difficult to improve the accuracy of face recognition due to the limitation of the information quantity of the images. In addition, the authentication system adopting the two-dimensional face recognition technology is easy to attack by malicious attackers by using props such as face photos of users. Compared with the two-dimensional face recognition technology, the three-dimensional face recognition technology has more data dimension and larger information quantity, and can break through the accuracy limit of the two-dimensional face recognition technology. And the three-dimensional information can judge plane targets such as photos, videos and the like more easily, so that the plane targets are more reliable than living bodies by adopting the two-dimensional information. Among the above advantages of three-dimensional face recognition technology, three-dimensional face recognition technology application is receiving more and more attention at present.
Face detection is one of the relying technologies of face recognition technology, and generally for two-dimensional images (such as RGB images), a two-dimensional face detection technology can be directly adopted to obtain the position of a face frame, then a face region is cut out, and the face region is applied to subsequent steps. However, for the common three-dimensional face recognition, besides the two-dimensional image, a depth map is additionally acquired, and the face frame area obtained on the two-dimensional image and the face area on the depth map do not necessarily completely correspond. The existing scheme for acquiring the face position in the depth map mainly comprises two types: one is to directly align the depth map with each pixel point of the two-dimensional image when generating the depth map, and the scheme is generally completed by camera hardware manufacturer design; the other is to convert the face frame on the two-dimensional image to the depth map by using the camera parameter information.
The existing face detection schemes all need to convert a two-dimensional image face frame into a depth map face frame, and then perform face detection based on the depth map, so that the position of a face target on the depth map is required to be acquired depending on the detected face position information on the two-dimensional image. However, the acquisition of a two-dimensional image (for example, RGB image) is easily affected by conditions such as illumination, and in a scene with poor illumination conditions, a two-dimensional image with high quality cannot be acquired, and the existing face detection scheme cannot perform face detection in a scene with poor illumination conditions.
Disclosure of Invention
The embodiment of the invention provides a face detection method, a face detection device, electronic equipment and a storage medium, which are used for solving the technical problem that the existing face detection scheme cannot detect a face in a scene with poor illumination conditions.
In a first aspect, an embodiment of the present invention provides a face detection method, including:
acquiring a depth map;
inputting the depth map to a face detection model to obtain the face position of the depth map output by the face detection model;
determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map;
the face detection model is obtained through training based on a sample depth map and the face position of the sample depth map.
Optionally, the determining the detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map specifically includes:
determining a face depth value of the face position based on the face position and the depth map;
determining the standard face size range based on the face depth value and a preset face size range;
and determining the detection result based on the face size and the standard face size range.
Optionally, the determining the standard face size range based on the face depth value and a preset face size range specifically includes:
determining a standard face size minimum value based on the face depth value, a preset face size minimum value and a depth camera focal length;
and determining a standard face size maximum value based on the face depth value, a preset face size maximum value and the depth camera focal length.
Optionally, the calculation formula of the minimum standard face size and the maximum standard face size specifically includes:
in the formula, h min H is the minimum value of the standard face size max For the maximum value of the standard face size, H min H is the minimum value of the preset face size max F is the focal length of the depth camera, and D is the face depth value.
Optionally, the determining a face depth value of the face position based on the face position and the depth map specifically includes:
determining a center region of the face position based on the face position;
and determining the face depth value based on the depth value of each pixel point in the central area.
Optionally, the determining the detection result based on the face size and the standard face size range specifically includes:
if the face size is within the standard face size range, determining the face position as an effective face position; otherwise, determining the face position as an invalid face position.
Optionally, before the depth map is input to the face detection model, the method further includes:
and preprocessing the depth map, wherein the preprocessing is to normalize the depth map based on a preset face depth value range or a maximum depth value and a minimum depth value of the depth map.
In a second aspect, an embodiment of the present invention provides a face detection apparatus, including:
the data acquisition module is used for acquiring a depth map;
the face detection module is used for inputting the depth map into a face detection model to obtain the face position of the depth map output by the face detection model;
the result evaluation module is used for determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map;
the face detection model is obtained through training based on a sample depth map and the face position of the sample depth map.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the face detection method according to the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the face detection method according to the first aspect.
According to the face detection method, the face detection device, the electronic equipment and the storage medium, the face detection is carried out on the depth map through the face detection model, two-dimensional images are not relied on, the face can be accurately detected in a scene with poor illumination conditions, and the method, the device and the storage medium are not limited by the type of the depth camera. The detection result of the face position is determined based on the face size corresponding to the face position and the standard face size range of the depth map, the accuracy of the face position is judged by fully utilizing the depth information, and the false detection risk of face detection is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a face detection method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a standard center imaging principle provided by an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a face detection apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flow chart of a face detection method provided by an embodiment of the present invention, and as shown in fig. 1, the face detection method provided by the embodiment of the present invention includes:
step 110, a depth map is acquired.
Specifically, the depth map is acquired by a depth camera, and the depth map may include face targets to be detected, and the number of the face targets in the depth map may be one or more. The depth camera may be a structured light depth camera, a TOF (Time of Flight) camera, or a binocular camera. The structured light depth camera projects light with certain structural characteristics onto an object to be detected through the near infrared laser, and the light is collected through the infrared camera. Determining depth information of an object to be detected through structural change of the structural light caused by the object to be detected; the TOF camera continuously emits laser pulses to an object to be detected and receives the laser pulses reflected by the object to be detected. Determining depth information of an object to be measured through the flying round trip time of the laser pulse; the binocular camera is based on the parallax principle, acquires two images of an object to be measured from different positions by using imaging equipment, and determines depth information of the object to be measured by calculating position deviation between corresponding points of the images. The embodiment of the invention does not particularly limit the type of the depth camera.
Step 120, inputting the depth map to a face detection model to obtain the face position of the depth map output by the face detection model; the face detection model is obtained through training based on a sample depth map and the face position of the sample depth map.
Specifically, the face detection model is used for performing face detection on the depth map based on the depth information in the depth map, and outputting the face position in the depth map, wherein the face position can be coordinate information of an circumscribed polygon of a face target in the depth map. The shape of the circumscribing polygon may be a rectangle, and when the circumscribing polygon is a rectangle, correspondingly, the face position may be the coordinates of two vertices in the diagonal direction of the rectangle, or may be the coordinates of four vertices of the rectangle, which is not particularly limited in the embodiment of the present invention.
Because the imaging of the depth map is less affected by illumination, the depth map can still provide some effective face information under the scene with poor illumination conditions, and the face detection method provided by the embodiment of the invention can judge whether a face target exists in front of a lens according to the face depth information provided by the depth map, so that the face detection can be performed without depending on a two-dimensional image.
Before executing step 120, a face detection model may be trained in advance, and specifically, the face detection model may be trained by the following manner: firstly, a large number of sample depth maps are collected, and the face positions of the sample depth maps are determined in a manual labeling mode. And then, inputting the sample depth map and the face position of the sample depth map into the initial model for training, thereby obtaining a face detection model. The initial model herein may be constructed based on convolutional neural networks, including, but not limited to: RPN (Region Proposal Network, regional generation network), SSD (Single Shot MultiBox Detector) and YOLO (You Only Look Once), and the like.
Step 130, determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map.
Specifically, after the face position of the depth map is obtained, the face size corresponding to the face position may be determined based on the face position. Wherein the face size can be that the coordinates in the face position are verticalThe difference between the maximum and minimum values in the direction, e.g. two vertex coordinates (x min ,y min ) And (x) max ,y max ) The corresponding face size is h=y max -y min
The standard face size range of the depth map may be a height range of a normal face in the vertical direction in the depth map. Based on the face size corresponding to the face position and the standard face size range of the depth map, the accuracy of the face position output by the face detection model can be judged, and the detection result of the face position can be determined.
According to the face detection method provided by the embodiment of the invention, the face detection is carried out on the depth map through the face detection model, the two-dimensional image is not relied on, the face can be accurately detected in a scene with poor illumination conditions, and the type of the depth camera is not limited. The detection result of the face position is determined based on the face size corresponding to the face position and the standard face size range of the depth map, the accuracy of the face position is judged by fully utilizing the depth information, and the false detection risk of face detection is reduced.
Based on the above embodiment, in the face detection method, step 130 specifically includes:
step 131, determining a face depth value of the face position based on the face position and the depth map;
step 132, determining a standard face size range based on the face depth value and a preset face size range;
step 133, determining a detection result based on the face size and the standard face size range.
Specifically, the face depth value is used to represent depth information of a face target in the depth map, and because the face position can be coordinate information of a polygon circumscribed by the face target in the depth map, the face depth value can be determined based on the face position and the depth map. The embodiment of the invention does not specifically limit the mode of determining the face depth value of the face position based on the face position and the depth map, and comprises but is not limited to: and calculating the average value of the depth values of all the pixel points in the corresponding area of the face position, and taking the average value as the face depth value.
The depth value of the pixel point in the depth map is the distance between the target and the imaging center of the depth camera, the face depth value is the distance between the face target and the imaging center of the depth camera, and the standard face size range can be determined based on the face depth value and the preset face size range according to the standard center imaging principle. The preset face size range may be a height range of a normal face in a vertical direction, for example, 180-250 pixels.
Based on the face size and the standard face size range, the accuracy of the face position can be judged, and then the detection result of the face position is determined.
According to the face detection method provided by the embodiment of the invention, the accuracy of the face position is judged by fully utilizing the depth information by determining the standard face size range and determining the detection result based on the face size and the standard face size range, so that the false detection risk of face detection is reduced.
Based on any one of the above embodiments, step 132 specifically includes:
determining a standard face size minimum value based on the face depth value, a preset face size minimum value and a depth camera focal length;
and determining a standard face size maximum value based on the face depth value, the preset face size maximum value and the depth camera focal length.
Specifically, according to standard center imaging principles, the ratio of the target size to the corresponding size of the target in the depth map is equal to the ratio of the target to the imaging center distance to the depth camera focal length. The face depth value is a distance from the face target to the imaging center, and according to the principle, based on the face depth value and the focal length of the depth camera, and the preset face size minimum value and the preset face size maximum value, the standard face size minimum value and the standard face size maximum value can be respectively determined. The minimum value and the maximum value of the preset face size are respectively the minimum value and the maximum value of the preset face size range, and the minimum value and the maximum value of the standard face size are respectively the minimum value and the maximum value of the standard face size range.
Based on any one of the above embodiments, in the face detection method, the calculation formula of the minimum standard face size and the maximum standard face size specifically includes:
in the formula, h min Is the minimum value of the standard face size, h max Is the maximum value of the standard face size, H min For presetting the minimum face size, H max And f is the focal length of the depth camera, and D is the depth value of the face.
Specifically, fig. 2 is a schematic diagram of a standard center imaging principle provided by the embodiment of the present invention, in a three-dimensional coordinate system XYZ, a plane M is a depth camera imaging plane, O is a depth camera imaging center, H is a face target size, H is a size corresponding to the face target in a depth map, f is a depth camera focal length, and D is a face depth value, and according to the standard center imaging principle, a standard face size minimum value can be determined based on the face depth value and the depth camera focal length, and a preset face size minimum value; based on the face depth value and the depth camera focal length, and a preset face size maximum, a standard face size maximum may be determined.
Based on any one of the above embodiments, in the face detection method, step 131 specifically includes:
determining a central area of the face position based on the face position;
a face depth value is determined based on the depth value of each pixel point in the center region.
Specifically, the central area of the face position may be an area around the center of the area corresponding to the face position, and the central area may be a circular area formed by taking the center of the area corresponding to the face position as a center and taking a preset distance as a radius; the shape of the central area is not particularly limited in the embodiment of the present invention.
After the center area is obtained, an average value of the depth values of all the pixel points in the center area is calculated based on the depth value of each pixel point in the center area, and the average value is used as a face depth value.
According to the face detection method provided by the embodiment of the invention, the depth value of the face is determined by determining the central area of the face position and based on the depth value of each pixel point in the central area, so that the depth value of the face can effectively represent the depth information of the face target in the depth map.
Based on any one of the above embodiments, step 133 specifically includes:
if the face size is within the standard face size range, determining the face position as an effective face position; otherwise, determining the face position as the invalid face position.
Specifically, since the standard face size range is a face size range corresponding to a normal face in the depth map, if the face size is within the standard face size range, it can be known that the detected face target meets the standard of the normal face, and the face position output by the face detection model is determined to be an effective face position; if the face size is not in the standard face size range, the detected face target is not in accordance with the standard of the normal face, and the detected face target is of other types, the face position output by the face detection model is determined to be an invalid face position.
According to the face detection method provided by the embodiment of the invention, the accuracy of the face position is judged by fully utilizing the depth information through the relationship between the face size and the standard face size range, so that the false detection risk of face detection is reduced.
Based on any one of the above embodiments, the face detection method further includes, before the depth map is input to the face detection model:
and preprocessing the depth map, namely normalizing the depth map based on a preset face depth value range or a maximum depth value and a minimum depth value of the depth map.
Specifically, in order to improve the computing efficiency and accuracy of the face detection model, the depth map needs to be preprocessed before being input into the face detection model, and the preprocessing is normalization processing is performed on the depth map based on a preset face depth value range or a maximum depth value and a minimum depth value of the depth map.
The specific formula of the normalization process is as follows:
wherein v is the depth value of the pixel point in the depth map, v * For the normalized depth value of the pixel point, min and max can be respectively the minimum value and the maximum value of the preset face depth value range, or can be respectively the maximum depth value and the minimum depth value of the depth map.
According to the face detection method provided by the embodiment of the invention, the depth map is preprocessed, so that the calculation efficiency and the accuracy of the face detection model are improved, and the accuracy of face detection is further improved.
Based on any of the foregoing embodiments, fig. 3 is a schematic structural diagram of a face detection apparatus according to an embodiment of the present invention, and as shown in fig. 3, the face detection apparatus according to the embodiment of the present invention includes:
a data acquisition module 310, configured to acquire a depth map;
the face detection module 320 is configured to input the depth map to a face detection model, so as to obtain a face position of the depth map output by the face detection model;
the result evaluation module 330 is configured to determine a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map;
the face detection model is obtained through training based on a sample depth map and the face position of the sample depth map.
According to the face detection device provided by the embodiment of the invention, the face detection is carried out on the depth map through the face detection model, the two-dimensional image is not relied on, the face can be accurately detected in a scene with poor illumination conditions, and the type of the depth camera is not limited. The detection result of the face position is determined based on the face size corresponding to the face position and the standard face size range of the depth map, the accuracy of the face position is judged by fully utilizing the depth information, and the false detection risk of face detection is reduced.
Based on any one of the above embodiments, in the face detection apparatus, the result evaluation module 330 specifically includes:
the face depth value determining submodule 331 is configured to determine a face depth value of a face position based on the face position and the depth map;
a standard face size range determination submodule 332, configured to determine a standard face size range based on a face depth value and a preset face size range;
the detection result determination submodule 333 is configured to determine a detection result based on the face size and the standard face size range.
According to the face detection device provided by the embodiment of the invention, the detection result is determined by determining the standard face size range and based on the face size and the standard face size range, the accuracy of the face position is judged by fully utilizing the depth information, and the false detection risk of face detection is reduced.
Based on any of the above embodiments, in the face detection apparatus, the standard face size range determining submodule 332 is specifically configured to:
determining a standard face size minimum value based on the face depth value, a preset face size minimum value and a depth camera focal length;
and determining a standard face size maximum value based on the face depth value, the preset face size maximum value and the depth camera focal length.
Based on any one of the above embodiments, in the face detection apparatus, the calculation formula of the minimum standard face size and the maximum standard face size specifically includes:
in the formula, h min Is the minimum value of the standard face size, h max Is the maximum value of the standard face size, H min For presetting the minimum face size, H max And f is the focal length of the depth camera, and D is the depth value of the face.
Based on any of the above embodiments, in the face detection apparatus, the face depth value determining submodule 331 is specifically configured to:
determining a central area of the face position based on the face position;
a face depth value is determined based on the depth value of each pixel point in the center region.
According to the face detection device provided by the embodiment of the invention, the depth value of the face is determined by determining the central area of the face position and based on the depth value of each pixel point in the central area, so that the depth value of the face can effectively represent the depth information of the face target in the depth map.
Based on any one of the above embodiments, in the face detection apparatus, the detection result determining submodule 333 is specifically configured to:
if the face size is within the standard face size range, determining the face position as an effective face position; otherwise, determining the face position as the invalid face position.
According to the face detection device provided by the embodiment of the invention, the accuracy of the face position is judged by fully utilizing the depth information through the relationship between the face size and the standard face size range, so that the false detection risk of face detection is reduced.
Based on any one of the above embodiments, the face detection device further includes a depth map preprocessing module, where the depth map preprocessing module is configured to preprocess the depth map, and the preprocessing is to normalize the depth map based on a preset face depth value range or a maximum depth value and a minimum depth value of the depth map.
According to the face detection device provided by the embodiment of the invention, the depth map is preprocessed, so that the calculation efficiency and the accuracy of the face detection model are improved, and the accuracy of face detection is further improved.
Fig. 4 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 4, where the electronic device may include: the device comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 are in communication with each other through the communication bus 404. The processor 401 may call logic instructions in the memory 403 to perform the following method: acquiring a depth map; inputting the depth map into a face detection model to obtain the face position of the depth map output by the face detection model; determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map; the face detection model is obtained through training based on a sample depth map and the face position of the sample depth map.
Further, the logic instructions in the memory 403 may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present invention also provide a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the method provided in the above embodiments, for example, including: acquiring a depth map; inputting the depth map into a face detection model to obtain the face position of the depth map output by the face detection model; determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map; the face detection model is obtained through training based on a sample depth map and the face position of the sample depth map.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A face detection method, comprising:
acquiring a depth map;
inputting the depth map to a face detection model to obtain the face position of the depth map output by the face detection model;
determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map;
the face detection model is obtained by training based on a sample depth map and the face position of the sample depth map;
the determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map specifically includes:
determining a face depth value of the face position based on the face position and the depth map;
determining the standard face size range based on the face depth value and a preset face size range;
and determining the detection result based on the face size and the standard face size range.
2. The face detection method according to claim 1, wherein the determining the standard face size range based on the face depth value and a preset face size range specifically includes:
determining a standard face size minimum value based on the face depth value, a preset face size minimum value and a depth camera focal length;
and determining a standard face size maximum value based on the face depth value, a preset face size maximum value and the depth camera focal length.
3. The face detection method according to claim 2, wherein the calculation formulas of the standard face size minimum value and the standard face size maximum value specifically include:
in the formula, h min H is the minimum value of the standard face size max For the maximum value of the standard face size, H min H is the minimum value of the preset face size max F is the focal length of the depth camera, and D is the face depth value.
4. The face detection method according to claim 1, wherein the determining a face depth value of the face position based on the face position and the depth map specifically includes:
determining a center region of the face position based on the face position;
and determining the face depth value based on the depth value of each pixel point in the central area.
5. The face detection method according to claim 1, wherein the determining the detection result based on the face size and the standard face size range specifically includes:
if the face size is within the standard face size range, determining the face position as an effective face position; otherwise, determining the face position as an invalid face position.
6. The face detection method according to any one of claims 1-5, wherein before the depth map is input to a face detection model, further comprising:
and preprocessing the depth map, wherein the preprocessing is to normalize the depth map based on a preset face depth value range or a maximum depth value and a minimum depth value of the depth map.
7. A face detection apparatus, comprising:
the data acquisition module is used for acquiring a depth map;
the face detection module is used for inputting the depth map into a face detection model to obtain the face position of the depth map output by the face detection model;
the result evaluation module is used for determining a detection result of the face position based on the face size corresponding to the face position and the standard face size range of the depth map;
the face detection model is obtained by training based on a sample depth map and the face position of the sample depth map;
the result evaluation module specifically comprises:
determining a face depth value of the face position based on the face position and the depth map;
determining the standard face size range based on the face depth value and a preset face size range;
and determining the detection result based on the face size and the standard face size range.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the face detection method of any one of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the face detection method according to any of claims 1 to 6.
CN202010420807.6A 2020-05-18 2020-05-18 Face detection method and device, electronic equipment and storage medium Active CN111680574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010420807.6A CN111680574B (en) 2020-05-18 2020-05-18 Face detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010420807.6A CN111680574B (en) 2020-05-18 2020-05-18 Face detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111680574A CN111680574A (en) 2020-09-18
CN111680574B true CN111680574B (en) 2023-08-04

Family

ID=72433505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010420807.6A Active CN111680574B (en) 2020-05-18 2020-05-18 Face detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111680574B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115913B (en) * 2020-09-28 2023-08-25 杭州海康威视数字技术股份有限公司 Image processing method, device and equipment and storage medium
CN112329726B (en) * 2020-11-27 2023-01-13 合肥的卢深视科技有限公司 Face recognition method and device
CN113780222B (en) * 2021-09-17 2024-02-27 深圳市繁维科技有限公司 Face living body detection method and device, electronic equipment and readable storage medium
CN114299016B (en) * 2021-12-28 2023-01-10 合肥的卢深视科技有限公司 Depth map detection device, method, system and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491881A (en) * 2018-03-23 2018-09-04 百度在线网络技术(北京)有限公司 Method and apparatus for generating detection model
CN108647594A (en) * 2018-04-26 2018-10-12 北京小米移动软件有限公司 Information processing method and equipment
CN109948467A (en) * 2019-02-28 2019-06-28 中国科学院深圳先进技术研究院 Method, apparatus, computer equipment and the storage medium of recognition of face
CN109961021A (en) * 2019-03-05 2019-07-02 北京超维度计算科技有限公司 Method for detecting human face in a kind of depth image
CN109993086A (en) * 2019-03-21 2019-07-09 北京华捷艾米科技有限公司 Method for detecting human face, device, system and terminal device
CN110580454A (en) * 2019-08-21 2019-12-17 北京的卢深视科技有限公司 Living body detection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590430A (en) * 2017-07-26 2018-01-16 百度在线网络技术(北京)有限公司 Biopsy method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491881A (en) * 2018-03-23 2018-09-04 百度在线网络技术(北京)有限公司 Method and apparatus for generating detection model
CN108647594A (en) * 2018-04-26 2018-10-12 北京小米移动软件有限公司 Information processing method and equipment
CN109948467A (en) * 2019-02-28 2019-06-28 中国科学院深圳先进技术研究院 Method, apparatus, computer equipment and the storage medium of recognition of face
CN109961021A (en) * 2019-03-05 2019-07-02 北京超维度计算科技有限公司 Method for detecting human face in a kind of depth image
CN109993086A (en) * 2019-03-21 2019-07-09 北京华捷艾米科技有限公司 Method for detecting human face, device, system and terminal device
CN110580454A (en) * 2019-08-21 2019-12-17 北京的卢深视科技有限公司 Living body detection method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Real-Time Head Pose Estimation and Face Modeling From a Depth Image;Changwei Luo et al.;《IEEE Transactions on Multimedia》;第21卷(第10期);全文 *

Also Published As

Publication number Publication date
CN111680574A (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN111680574B (en) Face detection method and device, electronic equipment and storage medium
US11048953B2 (en) Systems and methods for facial liveness detection
KR102320649B1 (en) Methods and devices for determining facial image quality, electronic devices and computer storage media
JP7134012B2 (en) Parallax estimation device and method
CN107563304B (en) Terminal equipment unlocking method and device and terminal equipment
US10032082B2 (en) Method and apparatus for detecting abnormal situation
EP3528209A1 (en) Method and device for determining external parameter of stereoscopic camera
CN109640066B (en) Method and device for generating high-precision dense depth image
CN112487921B (en) Face image preprocessing method and system for living body detection
CN109191513B (en) Power equipment stereo matching method based on global optimization
EP4033458A2 (en) Method and apparatus of face anti-spoofing, device, storage medium, and computer program product
KR101202448B1 (en) Apparatus and method for recognizing iris
CN108304801B (en) Anti-cheating face recognition method, storage medium and face recognition device
CN112683228A (en) Monocular camera ranging method and device
CN107368817B (en) Face recognition method and device
WO2021046773A1 (en) Facial anti-counterfeiting detection method and apparatus, chip, electronic device and computer-readable medium
CN114919584A (en) Motor vehicle fixed point target distance measuring method and device and computer readable storage medium
CN112800888B (en) Target reporting method and device based on image recognition
CN113607064A (en) Target object distance measuring and calculating method, device and equipment and readable storage medium
CN111160233B (en) Human face in-vivo detection method, medium and system based on three-dimensional imaging assistance
CN112270693B (en) Method and device for detecting motion artifact of time-of-flight depth camera
CN113108919B (en) Human body temperature detection method, device and storage medium
CN108629333A (en) A kind of face image processing process of low-light (level), device, equipment and readable medium
CN114549825A (en) Target detection method and device, electronic equipment and storage medium
CN112950709A (en) Pose prediction method, pose prediction device and robot

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
TA01 Transfer of patent application right

Effective date of registration: 20220701

Address after: Room 611-217, R & D center building, China (Hefei) international intelligent voice Industrial Park, 3333 Xiyou Road, high tech Zone, Hefei City, Anhui Province

Applicant after: Hefei lushenshi Technology Co.,Ltd.

Address before: Room 3032, gate 6, block B, 768 Creative Industry Park, 5 Xueyuan Road, Haidian District, Beijing 100083

Applicant before: BEIJING DILUSENSE TECHNOLOGY CO.,LTD.

Applicant before: Hefei lushenshi Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant