CN111680574A - 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
CN111680574A
CN111680574A CN202010420807.6A CN202010420807A CN111680574A CN 111680574 A CN111680574 A CN 111680574A CN 202010420807 A CN202010420807 A CN 202010420807A CN 111680574 A CN111680574 A CN 111680574A
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.)
Granted
Application number
CN202010420807.6A
Other languages
Chinese (zh)
Other versions
CN111680574B (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
Beijing Dilusense Technology Co Ltd
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 Beijing Dilusense Technology Co Ltd, Hefei Dilusense Technology Co Ltd filed Critical Beijing 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

Images

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 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 by face position training based on the sample depth map and 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 detection is independent of two-dimensional images, accurate face detection can be carried out on the face under the scene with poor illumination conditions, 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 method and an apparatus for detecting a human face, an electronic device, and a storage medium.
Background
With the continuous development of face recognition technology, people are more and more concerned about the accuracy and security of face recognition. The common two-dimensional face recognition technology (usually, the RGB image is used for face recognition) has difficulty in improving the face recognition accuracy due to the limitation of the information amount of the image itself. In addition, the authentication system adopting the two-dimensional face recognition technology is easily attacked by a malicious attacker using props such as a face photo of a user. Compared with a two-dimensional face recognition technology, the three-dimensional face recognition technology has more data dimensions and larger information quantity, and can break through the accuracy limit of the two-dimensional face recognition technology. And the three-dimensional information can easily judge plane targets such as photos, videos and the like, so that the in-vivo detection is more reliable than the in-vivo detection by adopting two-dimensional information. In the light of the above advantages of the three-dimensional face recognition technology, the three-dimensional face recognition technology is now receiving more and more attention.
Face detection is one of the techniques that depend on face recognition technology, and generally, for a two-dimensional image (for example, an RGB image), a two-dimensional face detection technology can be directly adopted to obtain a face frame position, and then a face region is cut out and applied to the subsequent steps. However, for common three-dimensional face recognition, in addition to acquiring a two-dimensional image, a depth map is additionally acquired, and a face frame area obtained on the two-dimensional image does not necessarily completely correspond to a face area on the depth map. The existing scheme for acquiring the face position in the depth map mainly comprises two types: one is that when generating the depth map, the depth map is directly aligned with each pixel point of the two-dimensional image one by one, and the scheme is generally designed and completed by a camera hardware manufacturer; and the other method is to convert a face frame on the two-dimensional image to a 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 image face frame, and then carry out face detection based on a depth image, so that the position of a face target on the obtained depth image must depend on face position information detected on the two-dimensional image. However, the acquisition of a two-dimensional image (for example, an RGB image) is easily affected by conditions such as illumination, and in a scene with a poor illumination condition, a two-dimensional image with high quality cannot be acquired, and the existing face detection scheme cannot perform face detection in a scene with a poor illumination condition.
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 carry out face detection 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 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 by face position training based on the sample depth map and the sample depth map.
Optionally, 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.
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 the maximum value of the standard face size based on the face depth value, the preset maximum value of the face size and the focal length of the depth camera.
Optionally, the formula for calculating the minimum standard face size and the maximum standard face size specifically includes:
Figure BDA0002496795230000031
Figure BDA0002496795230000032
in the formula, hminIs the minimum value of the standard face size, hmaxIs the maximum value of the standard face size, HminIs the preset minimum face size, HmaxAnd f is the preset maximum value of the face size, f is the focal length of the depth camera, and D is the face depth value.
Optionally, the determining, based on the face position and the depth map, a face depth value of the face position specifically includes:
determining a central 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 a valid face position; otherwise, determining the face position as an invalid face position.
Optionally, before inputting the depth map into the face detection model, the method further includes:
and preprocessing the depth map, wherein the preprocessing is to perform normalization processing on the depth map based on a preset human face depth value range or the maximum depth value and the 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 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;
the face detection model is obtained by face position training based on the sample depth map and 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, and the computer program, 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, the two-dimensional image is not relied on, the face can be accurately detected in a scene with poor illumination conditions, and the limitation of the type of the depth camera is avoided. 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 in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
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
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.
Fig. 1 is a schematic flow diagram of a face detection method according to an embodiment of the present invention, and as shown in fig. 1, the face detection method according to the embodiment of the present invention includes:
step 110, a depth map is obtained.
Specifically, the depth map is acquired by a depth camera, the depth map may include a human face target to be detected, and the number of the human face targets in the depth map may be one or multiple. 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 to an object to be measured through a near-infrared laser and collects the light through an infrared camera. Determining the depth information of the object to be detected through the structural change of the structured light caused by the object to be detected; the TOF camera continuously transmits laser pulses to the object to be detected and receives the laser pulses reflected by the object to be detected. Determining the depth information of the object to be detected through the flight round-trip time of the laser pulse; the binocular camera is based on a parallax principle, two images of an object to be detected are obtained from different positions by using imaging equipment, and the depth information of the object to be detected is determined by calculating the position deviation between corresponding points of the images. The type of the depth camera is not particularly limited in the embodiments of the present invention.
Step 120, 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 face detection model is obtained by face position training based on the sample depth map and 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 a face position in the depth map, where the face position may be coordinate information of a circumscribed polygon of a face target in the depth map. The shape of the circumscribed polygon may be a rectangle, and when the circumscribed polygon is a rectangle, the face position may be the coordinates of two vertices in the diagonal direction of the rectangle, or the coordinates of four vertices of the rectangle, which is not specifically limited in the embodiment of the present invention.
Because the imaging of the depth map is less influenced by illumination, the depth map can still provide some effective face information under the scene with poor illumination conditions.
Before step 120 is executed, a face detection model may also be obtained through pre-training, and specifically, the face detection model may be obtained through training in 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 a convolutional neural network, including but not limited to: RPN (Region pro-active Network), ssd (single Shot multi box detector), yolo (young Only Look one), and the like.
And 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, a face size corresponding to the face position may be determined based on the face position. The face size may be a difference between a maximum value and a minimum value of coordinates in the face position in the vertical direction, for example, the face position is two vertex coordinates (x) in a diagonal direction of a circumscribed rectangle of the face targetmin,ymin) And (x)max,ymax) Then the corresponding face size is h ═ ymax-ymin
The standard face size range of the depth map may be a height range of a normal face in the depth map in the vertical direction. 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 is 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 face detection is independent of two-dimensional images, the face can be accurately detected in a scene with poor illumination conditions, and the method is not limited by the type of a 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.
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 determines the 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 since the face position may be coordinate information of a polygon circumscribing the face target in the depth map, the face depth value may be determined based on the face position and the depth map. The embodiment of the present invention does not specifically limit the manner of determining the face depth value of the face position based on the face position and the depth map, and includes but is not limited to: and calculating the average value of the depth values of all pixel points in the corresponding area of the face position, and taking the average value as the face depth value.
The depth value of a pixel point in the depth map is the distance between a target and the imaging center of the depth camera, the face depth value is the distance between a 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 the normal face in the vertical direction, for example, 180 and 250 pixel points.
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 standard face size range is determined, the detection result is determined 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 method, 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 the maximum value of the standard face size based on the face depth value, the preset maximum value of the face size and the focal length of the depth camera.
Specifically, according to standard center imaging principles, the ratio of the size of the target to the corresponding size of the target in the depth map is equal to the ratio of the distance of the target to the imaging center to the depth camera focal length. The face depth value is the distance from the face target to the imaging center, and according to the principle, the standard face size minimum value and the standard face size maximum value can be respectively determined based on the face depth value, the depth camera focal length, the preset face size minimum value and the preset face size maximum value. The preset minimum value and the preset maximum value of the face size are respectively the minimum value and the maximum value of a preset face size range, and the standard minimum value and the standard maximum value of the face size are respectively the minimum value and the maximum value of a standard face size range.
Based on any 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:
Figure BDA0002496795230000071
Figure BDA0002496795230000081
in the formula, hminIs the minimum value of the standard face size, hmaxIs the maximum value of the standard face size, HminFor a preset minimum face size, HmaxThe maximum value of the preset face size is obtained, f is the focal length of the depth camera, and D is the face depth value.
Specifically, fig. 2 is a schematic diagram of a standard center imaging principle provided by an 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 size of a face target, H is a corresponding size of a face target in a depth map, f is a depth camera focal length, and D is a face depth value, as shown in fig. 2, according to the standard center imaging principle, based on the face depth value and the depth camera focal length, and a preset minimum face size value, a minimum standard face size value may be determined; based on the face depth value and the depth camera focal length, and the preset face size maximum value, a standard face size maximum value may be determined.
Based on any 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;
and determining the face depth value based on the depth value of each pixel point in the central area.
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 circle center and taking a preset distance as a radius; the center of the region corresponding to the face position may be a center, and the shape of the center region is not particularly limited in the embodiment of the present invention.
After the central area is obtained, calculating the average value of the depth values of all the pixel points in the central area based on the depth value of each pixel point in the central area, and taking the average value as the face depth value.
The face detection method provided by the embodiment of the invention determines the face depth value 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 face depth value can effectively represent the depth information of a face target in the depth map.
Based on any of the above embodiments, in the face detection method, 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 an invalid face position.
Specifically, because 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 a 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 within the range of the standard face size, the detected face target is known to be not in accordance with the standard of a normal face, and the detected face target is a target 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 of the above embodiments, in the face detection method, before inputting the depth map into the face detection model, the method further includes:
and preprocessing the depth map, wherein the preprocessing is to perform normalization processing on the depth map based on a preset human face depth value range or the maximum depth value and the minimum depth value of the depth map.
Specifically, to improve the calculation efficiency and accuracy of the face detection model, the depth map needs to be preprocessed before being input into the face detection model, where 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.
The specific formula of the normalization process is as follows:
Figure BDA0002496795230000091
where v is the depth value of a pixel in the depth map, v*For the depth value after the pixel point normalization, min and max may be the minimum value and the maximum value of the range of the preset face depth value, or may be the maximum depth value and the minimum depth value of the depth map, respectively.
According to the face detection method provided by the embodiment of the invention, the depth map is preprocessed, so that the calculation efficiency and precision of the face detection model are improved, and the accuracy of face detection is further improved.
Based on any of the above embodiments, fig. 3 is a schematic structural diagram of a face detection device provided in an embodiment of the present invention, and as shown in fig. 3, the face detection device provided in 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 into a face detection model to obtain a face position of the depth map output by the face detection model;
a result evaluation module 330, configured to determine a detection result of the face position based on a face size corresponding to the face position and a standard face size range of the depth map;
the face detection model is obtained by face position training based on the sample depth map and the sample depth map.
The face detection device provided by the embodiment of the invention can be used for detecting the face of the depth image through the face detection model, does not depend on a two-dimensional image, can be used for accurately detecting the face in a scene with poor illumination conditions, and is 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.
Based on any of the above embodiments, in the face detection apparatus, the result evaluation module 330 specifically includes:
a face depth value determining sub-module 331, configured to determine a face depth value of the face position based on the face position and the depth map;
a standard face size range determining submodule 332, configured to determine a standard face size range based on the face depth value and a preset face size range;
the detection result determining sub-module 333 is configured to determine a detection result based on the face size and the standard face size range.
The face detection device provided by the embodiment of the invention determines the detection result by determining the standard face size range and based on the face size and the standard face size range, fully utilizes the depth information to judge the accuracy of the face position, and reduces the false detection risk of face detection.
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 the maximum value of the standard face size based on the face depth value, the preset maximum value of the face size and the focal length of the depth camera.
Based on any 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:
Figure BDA0002496795230000101
Figure BDA0002496795230000111
in the formula, hminIs the minimum value of the standard face size, hmaxIs the maximum value of the standard face size, HminFor a preset minimum face size, HmaxThe maximum value of the preset face size is obtained, f is the focal length of the depth camera, and D is the face depth value.
Based on any of the above embodiments, in the face detection apparatus, the face depth value determining sub-module 331 is specifically configured to:
determining a central area 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.
The face detection device provided by the embodiment of the invention determines the face depth value 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 face depth value can effectively represent the depth information of a face target in the depth map.
Based on any of the embodiments, in the face detection apparatus, the detection result determining sub-module 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 an 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 of the above embodiments, the face detection apparatus 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.
The face detection device provided by the embodiment of the invention improves the calculation efficiency and precision of the face detection model by preprocessing the depth map, thereby improving the accuracy of face detection.
Fig. 4 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device may include: the system 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 communicated with each other through the communication bus 404. Processor 401 may call logic instructions in 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 by face position training based on the sample depth map and the sample depth map.
In addition, 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 the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to perform the method provided by the foregoing 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 by face position training based on the sample depth map and the sample depth map.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A face detection method, comprising:
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 by face position training based on the sample depth map and the sample depth map.
2. The method according to claim 1, wherein 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.
3. The method according to claim 2, wherein the determining the standard face size range based on the face depth value and a preset face size range specifically comprises:
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 the maximum value of the standard face size based on the face depth value, the preset maximum value of the face size and the focal length of the depth camera.
4. The face detection method according to claim 3, wherein the calculation formula of the minimum standard face size and the maximum standard face size specifically comprises:
Figure FDA0002496795220000011
Figure FDA0002496795220000012
in the formula, hminIs the minimum value of the standard face size, hmaxIs the maximum value of the standard face size, HminIs the preset minimum face size, HmaxAnd f is the preset maximum value of the face size, f is the focal length of the depth camera, and D is the face depth value.
5. The method according to claim 2, wherein the determining the face depth value of the face position based on the face position and the depth map specifically comprises:
determining a central 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.
6. The method according to claim 2, 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 a valid face position; otherwise, determining the face position as an invalid face position.
7. The face detection method according to any of claims 1-6, wherein before inputting the depth map into a face detection model, further comprising:
and preprocessing the depth map, wherein the preprocessing is to perform normalization processing on the depth map based on a preset human face depth value range or the maximum depth value and the minimum depth value of the depth map.
8. 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 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;
the face detection model is obtained by face position training based on the sample depth map and the sample depth map.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the face detection method according to any of claims 1 to 7 are implemented when the processor executes the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the face detection method according to any one of claims 1 to 7.
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 true CN111680574A (en) 2020-09-18
CN111680574B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115913A (en) * 2020-09-28 2020-12-22 杭州海康威视数字技术股份有限公司 Image processing method, device and equipment and storage medium
CN112329726A (en) * 2020-11-27 2021-02-05 合肥的卢深视科技有限公司 Face recognition method and device
CN113780222A (en) * 2021-09-17 2021-12-10 深圳市繁维科技有限公司 Face living body detection method and device, electronic equipment and readable storage medium
CN114299016A (en) * 2021-12-28 2022-04-08 北京的卢深视科技有限公司 Depth map detection device, method, system and storage medium

Citations (7)

* 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
US20190034702A1 (en) * 2017-07-26 2019-01-31 Baidu Online Network Technology (Beijing) Co., Ltd. Living body detecting method and apparatus, device and storage medium
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034702A1 (en) * 2017-07-26 2019-01-31 Baidu Online Network Technology (Beijing) Co., Ltd. Living body detecting method and apparatus, device and storage medium
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 (3)

* Cited by examiner, † Cited by third party
Title
CHANGWEI LUO ET AL.: "Real-Time Head Pose Estimation and Face Modeling From a Depth Image", 《IEEE TRANSACTIONS ON MULTIMEDIA》, vol. 21, no. 10, XP011747288, DOI: 10.1109/TMM.2019.2903724 *
叶长明;蒋建国;詹曙;S.ANDO;: "不同姿态人脸深度图识别的研究", 电子测量与仪器学报, no. 10 *
陈伟栋;张杨;杨晓龙;: "基于肤色特征和深度模型的人脸检测方法", 工业控制计算机, no. 03 *

Cited By (7)

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

Also Published As

Publication number Publication date
CN111680574B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN111680574B (en) Face detection method and device, electronic equipment and storage medium
CN106683070B (en) Height measuring method and device based on depth camera
US11048953B2 (en) Systems and methods for facial liveness detection
US20180005018A1 (en) System and method for face recognition using three dimensions
CN107563304B (en) Terminal equipment unlocking method and device and terminal equipment
EP3528209A1 (en) Method and device for determining external parameter of stereoscopic camera
CN109640066B (en) Method and device for generating high-precision dense depth image
CN107560592B (en) Precise distance measurement method for photoelectric tracker linkage target
CN109191513B (en) Power equipment stereo matching method based on global optimization
CN111160232B (en) Front face reconstruction method, device and system
KR101444538B1 (en) 3d face recognition system and method for face recognition of thterof
CN112287869A (en) Image data detection method and device
CN112683228A (en) Monocular camera ranging method and device
CN112184793B (en) Depth data processing method and device and readable storage medium
CN106937532A (en) System and method for detecting actual user
CN112883955A (en) Shelf layout detection method and device and computer readable storage medium
WO2021046773A1 (en) Facial anti-counterfeiting detection method and apparatus, chip, electronic device and computer-readable medium
CN112802114A (en) Multi-vision sensor fusion device and method and electronic equipment
CN114919584A (en) Motor vehicle fixed point target distance measuring method and device and computer readable storage medium
CN112733678A (en) Ranging method, ranging device, computer equipment and storage medium
CN116929290A (en) Binocular visual angle difference three-dimensional depth measurement method, binocular visual angle difference three-dimensional depth measurement system and storage medium
CN115423804B (en) Image calibration method and device and image processing method
CN113723380B (en) Face recognition method, device, equipment and storage medium based on radar technology
CN111160233A (en) Human face in-vivo detection method, medium and system based on three-dimensional imaging assistance
CN115908551A (en) Vehicle distance measuring method and device, electronic equipment and storage medium

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
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.

GR01 Patent grant
GR01 Patent grant