Face detection method, device, equipment, storage medium and program product

By setting multiple levels of detection distance and detection box size on the mobile terminal, the problem of small field of view for face detection on the mobile terminal is solved, the detection efficiency and accuracy are improved, and the required detection distance is ensured.

CN122116432APending Publication Date: 2026-05-29CHENGDU TD TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU TD TECH LTD
Filing Date
2024-11-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, the face detection field of view of mobile terminals is small, resulting in low detection efficiency. Furthermore, due to limitations in size, dimensions, and cost, optical zoom lenses cannot be installed, leading to detection distances that are too short to meet practical needs.

Method used

Based on the farthest detection distance of face detection, multiple tiered detection distances are set, and an accurate face detection bounding box size is configured for each tier. Face detection is performed sequentially until the detection cutoff tier that meets the detection requirements is reached, thus determining the accurate target detection distance.

Benefits of technology

It improves the efficiency and accuracy of face detection, reduces the occurrence of missed detections, and ensures that the required number and accuracy of detections are achieved based on the detection distance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122116432A_ABST
    Figure CN122116432A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a face detection method, device, equipment, storage medium and program product. The method comprises: acquiring a farthest detection distance of face detection; determining ladder detection distances of N gears according to the farthest detection distance, wherein N is an arbitrary positive integer greater than 1; determining face detection frame sizes corresponding to the gears according to the ladder detection distances corresponding to the gears; in order of the ladder detection distances from small to large, sequentially adopting at least one gear of the N gears to perform face detection according to the face detection frame sizes corresponding to the gears; determining a detection cutoff gear according to a face detection quantity corresponding to the at least one gear; and determining a target detection distance of face recognition according to the detection cutoff gear. On the basis of ensuring the detection distance, the occurrence of missed detection can be effectively reduced, and the efficiency of face detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a face detection method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the continuous development of artificial intelligence technology, facial recognition technology in the video surveillance field has gradually matured, and its application in various industries has brought convenience to life. Facial recognition in video surveillance falls into two categories: fixed wired cameras + cloud-based facial recognition; and mobile terminals + cloud-based upload and recognition. For mobile terminal facial recognition, the mobile terminal first needs to perform face detection and image segmentation, and then upload the image to a cloud server for face comparison. The accuracy of face detection directly affects the result of facial recognition.

[0003] In related technologies, due to limitations in size, dimensions, and cost, mobile terminals generally do not have optical zoom lenses. Since face detection distance is strongly correlated with the input image resolution and field of view, this limits the detection range. Often, products are designed with large field-of-view lenses, resulting in detection distances that are too short to meet practical needs. Because the input resolution is fixed, existing technologies mostly consider reducing the field of view to increase face pixel density to address this issue. Current technologies often employ digital magnification, cropping the original image and forcibly sacrificing the input image's field of view to increase the pixel density of the input detection model.

[0004] However, existing face detection technologies have a small detection field of view and low efficiency. Summary of the Invention

[0005] This application provides face detection methods, apparatus, equipment, storage media, and program products to solve the problems of small detection field of view and low efficiency in existing face detection technologies.

[0006] Firstly, this application provides a face detection method, including:

[0007] Obtain the furthest detection distance for face detection;

[0008] Based on the maximum detection distance, determine the step detection distances for N gears, where N is any positive integer greater than 1;

[0009] The size of the face detection box corresponding to the gear level is determined based on the step detection distance corresponding to the gear level.

[0010] In accordance with the order of increasing step detection distance, at least one of the N levels is used sequentially, and face detection is performed according to the size of the corresponding face detection box.

[0011] The detection cutoff level is determined based on the number of face detections corresponding to at least one level.

[0012] The target detection distance for face recognition is determined based on the detection cutoff level.

[0013] This application provides an efficient and accurate face detection method. When performing face detection, multiple stepped detection distances are set based on the farthest detection distance, and an accurate face detection bounding box size is configured for each stepped detection distance to improve detection accuracy. After determining the face detection bounding box size corresponding to each step, face detection is performed sequentially according to the stepped detection distance corresponding to each step, from smallest to largest, until a detection cutoff point that meets the face detection requirements is reached. This determines the accurate target detection distance, which meets the face detection requirements for both the number of detections and / or the detection accuracy. The multiple steps and the setting of the face detection bounding box effectively reduce the occurrence of missed detections while ensuring the detection distance, thus improving the efficiency of face detection.

[0014] Optionally, determining the detection cutoff level based on the number of face detections corresponding to the at least one level includes:

[0015] If the number of face detections corresponding to the gear level is equal to the first preset number, or the number of face detections corresponding to the gear level is greater than the first preset number and less than the second preset number, then the gear level is determined to be the detection cutoff gear level.

[0016] In this application, a first preset number and a second preset number are set. If the number of face detections corresponding to a certain level is equal to the first preset number, or the number of face detections corresponding to a certain level is greater than the first preset number and less than the second preset number, it can be determined that the detection distance and the number of detections meet the detection requirements, thereby obtaining an accurate detection cutoff level and improving the efficiency and accuracy of face detection.

[0017] Optionally, determining the detection cutoff level based on the number of face detections corresponding to the at least one level further includes:

[0018] If the number of faces detected at the specified level is less than the first preset number, then the specified level is determined to be a non-detection cutoff level.

[0019] Based on the aforementioned detection level, the detection level is increased by one step according to the step detection distance from small to large, and face detection is continued according to the corresponding face detection box size.

[0020] If the number of faces detected at a certain level is less than the first preset number, it can be determined that too few faces are recognized at that level, and efficient face detection cannot be achieved at that level. Therefore, the detection distance is increased by one level to continue detection until the detection cutoff level is reached, thereby increasing the number of faces detected and further improving the efficiency of face detection.

[0021] Optionally, determining the detection cutoff level based on the number of face detections corresponding to the at least one level further includes:

[0022] If the number of face detections corresponding to the specified level is greater than or equal to the second preset number, then face detection is performed again according to the order of increasing step detection distance, using at least one of the N levels, based on the size of the corresponding face detection box.

[0023] Here, the determination of the number of face detections is mainly affected by the detection latency. Because horizontal scanning of the face bounding box is required, when there are multiple faces, a small detection box may not be able to complete the detection within the specified time. If the number of face detections detected at a certain level is greater than or equal to the second preset number, that is, when the number of face detections is too large, at least one of the N levels is used again in sequence to perform face detection according to the size of the corresponding face detection box, so as to gradually reduce the detection distance, increase the detection box, and improve the detection accuracy and detection efficiency.

[0024] Optionally, determining the size of the face detection box corresponding to the gear position based on the step detection distance corresponding to the gear position includes:

[0025] Based on the step detection distance corresponding to the gear level, determine the vertical pixel height of the top of the head and the pixel height of the chin of the face;

[0026] Based on the top pixel height, chin pixel height, and preset input aspect ratio requirements, determine the target height and target width of the face detection box;

[0027] The size of the face detection box corresponding to the gear position is determined based on the target height and the target width.

[0028] This application can determine the vertical pixel height of the top of the face and the pixel height of the chin based on the step detection distance corresponding to each level, thereby accurately determining the target height and target width of the face detection box and obtaining the size of the face detection box corresponding to each level, thus improving the distance and accuracy of face detection.

[0029] Optionally, determining the vertical pixel height of the top of the head and the pixel height of the chin of the face includes:

[0030] Obtain the installation height and vertical field of view of the image acquisition device;

[0031] The height of the top pixel is calculated based on the installation height of the image acquisition device, the vertical field of view, the preset height, the preset vertical resolution, and the step detection distance corresponding to the gear level.

[0032] The chin pixel height is calculated based on the top pixel height and the preset ratio of the face to the body.

[0033] In this application, when determining the vertical pixel height of the top of the head and the pixel height of the chin of a face, i.e., when determining the size of the face detection box, parameters such as the vertical field of view of the lens, height, face size, and detection distance requirements are combined to calculate the possible positions of the face and select an appropriate detection box size, thereby improving the detection distance.

[0034] Optionally, the step of performing face detection based on the size of the corresponding face detection bounding box includes:

[0035] The horizontal scanning height range is determined based on the vertical pixel height of the top of the head and the pixel height of the chin of the face.

[0036] Based on the size of the corresponding face detection bounding box, a horizontal scan is performed within the horizontal scanning height range to achieve face detection.

[0037] Here, this application predetermines the horizontal scanning height range, and uses a small detection box to perform a horizontal scan at possible face locations based on the detection box, covering the entire horizontal field of view of the lens. This improves face detection efficiency and accuracy while increasing the detection distance.

[0038] Optionally, obtaining the furthest detection distance for face detection includes:

[0039] Obtain the actual usage distance and the preset maximum distance for face comparison;

[0040] The minimum value between the actual usage requirement distance and the farthest distance for face comparison is determined as the farthest detection distance for face detection.

[0041] In this application, based on the actual usage distance and the farthest distance for face comparison, the farthest detection distance for face detection that meets the actual usage distance and the farthest distance for face comparison is determined, thereby improving the efficiency and accuracy of detection while increasing the detection distance.

[0042] Secondly, this application provides a face detection device, comprising:

[0043] The acquisition module is used to obtain the farthest detection distance for face detection;

[0044] The first determining module is used to determine the step detection distances for N gears based on the farthest detection distance, where N is any positive integer greater than 1;

[0045] The second determining module is used to determine the size of the face detection box corresponding to the gear position based on the step detection distance corresponding to the gear position.

[0046] The detection module is used to perform face detection according to the N levels, in order of increasing step detection distance, by using at least one level from the N levels and according to the size of the corresponding face detection box.

[0047] The third determining module is used to determine the detection cutoff level based on the number of face detections corresponding to the at least one level.

[0048] The fourth determining module is used to determine the target detection distance for face recognition based on the detection cutoff level.

[0049] Optionally, the third determining module is specifically used for:

[0050] If the number of face detections corresponding to the gear level is equal to the first preset number, or the number of face detections corresponding to the gear level is greater than the first preset number and less than the second preset number, then the gear level is determined to be the detection cutoff gear level.

[0051] Optionally, the third determining module is further specifically used for:

[0052] If the number of faces detected at the specified level is less than the first preset number, then the specified level is determined to be a non-detection cutoff level.

[0053] Based on the aforementioned detection level, the detection level is increased by one step according to the step detection distance from small to large, and face detection is continued according to the corresponding face detection box size.

[0054] Optionally, the third determining module is further specifically used for:

[0055] If the number of face detections corresponding to the specified level is greater than or equal to the second preset number, then face detection is performed again according to the order of increasing step detection distance, using at least one of the N levels, based on the size of the corresponding face detection box.

[0056] Optionally, the second determining module is specifically used for:

[0057] Based on the step detection distance corresponding to the gear level, determine the vertical pixel height of the top of the head and the pixel height of the chin of the face;

[0058] Based on the top pixel height, chin pixel height, and preset input aspect ratio requirements, determine the target height and target width of the face detection box;

[0059] The size of the face detection box corresponding to the gear position is determined based on the target height and the target width.

[0060] Optionally, the second determining module is further specifically used for:

[0061] Obtain the installation height and vertical field of view of the image acquisition device;

[0062] The height of the top pixel is calculated based on the installation height of the image acquisition device, the vertical field of view, the preset height, the preset vertical resolution, and the step detection distance corresponding to the gear level.

[0063] The chin pixel height is calculated based on the top pixel height and the preset ratio of the face to the body.

[0064] Optionally, the detection module is specifically used for:

[0065] The horizontal scanning height range is determined based on the vertical pixel height of the top of the head and the pixel height of the chin of the face.

[0066] Based on the size of the corresponding face detection bounding box, a horizontal scan is performed within the horizontal scanning height range to achieve face detection.

[0067] Optionally, the acquisition module is specifically used for:

[0068] Obtain the actual usage distance and the preset maximum distance for face comparison;

[0069] The minimum value between the actual usage requirement distance and the farthest distance for face comparison is determined as the farthest detection distance for face detection.

[0070] Thirdly, this application provides a face detection device, including: a memory and a processor;

[0071] The memory stores computer-executed instructions;

[0072] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0073] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible embodiments of the first aspect.

[0074] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0075] The face detection method, apparatus, device, storage medium, and program products provided in this application, when performing face detection, set multiple stepped detection distances based on the farthest detection distance of face detection, and configure accurate face detection box sizes for each stepped detection distance to improve detection accuracy. After determining the face detection box sizes corresponding to each level, face detection is performed sequentially according to the stepped detection distances corresponding to each level, from smallest to largest, until the detection cutoff level that meets the face detection requirements is reached, thereby determining an accurate target detection distance. At this target detection distance, the requirements for the number of detections and / or detection accuracy of face detection can be met. The setting of multiple levels and face detection boxes can effectively reduce the occurrence of missed detections while ensuring the detection distance, thus improving the efficiency of face detection. Attached Figure Description

[0076] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0077] Figure 1 A schematic diagram showing the field of view before and after digital magnification processing, provided for existing technologies;

[0078] Figure 2 A schematic diagram of a face detection system architecture provided in this application embodiment;

[0079] Figure 3 A schematic flowchart of a face detection method provided in an embodiment of this application;

[0080] Figure 4 A schematic diagram of a face detection process provided in an embodiment of this application;

[0081] Figure 5 A schematic diagram of a face input detection box provided in an embodiment of this application;

[0082] Figure 6 A schematic diagram illustrating the process of determining a face detection bounding box as provided in an embodiment of this application;

[0083] Figure 7 This is a schematic diagram of the structure of a face detection device provided in an embodiment of this application;

[0084] Figure 8 This is a schematic diagram of the structure of a face detection device provided in an embodiment of this application.

[0085] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0086] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0087] First, let me explain the terms used in this application:

[0088] Face detection principle: In general, artificial intelligence (AI) face detection processes require scaling down the original image resolution to a smaller resolution due to computational and speed requirements. The proportion of faces in the original image directly affects the pixel density of faces after scaling. The pixel density of faces input into the model after scaling directly affects detection performance; the lower the pixel density, the more difficult the detection.

[0089] Field of view (FOV): The entire face recognition process is divided into face detection and face comparison. Due to the large amount of data, detection is generally completed on the device side, while comparison can be performed on the device side or on a cloud server. There is a contradictory relationship between the detection FOV and the detection distance: for the same resolution, a larger FOV results in a smaller pixel density and a shorter detection distance.

[0090] Maximum detection distance: refers to the farthest distance at which face detection can be performed when the terminal and the person being tested are face to face.

[0091] Minimum detection eye distance: refers to the minimum eye distance that the detection algorithm can recognize, which is determined by the capabilities of the face detection algorithm.

[0092] Effective detection distance: If the terminal and the person being tested are always face-to-face during movement, the effective detection distance and the maximum detection distance are equal. However, there are two reasons why the effective detection distance is smaller than the maximum detection distance in actual use: Generally, when the person being tested approaches the terminal, they will not be facing the terminal directly, but at an angle. If the terminal's detection field of view is small, the person being tested will be outside the detection range when they are very close to the terminal. Most terminals have insufficient vertical field of view, so when the person being tested is very close to the terminal, their face will be outside the detection frame.

[0093] Minimum eye distance for recognition: refers to the minimum eye distance that the comparison algorithm can recognize, which is determined by the capability of the face comparison algorithm.

[0094] Success rate: The success rate is calculated by dividing the number of successful identifications by the number of tests conducted when a blacklisted individual faces the terminal and performs multiple walking detection tests.

[0095] Mobile terminal lenses typically feature ultra-wide-angle lenses with a horizontal field of view (FOV) exceeding 90 degrees, and video resolutions are generally 1080P, 2K, or 4K. Due to limitations in size, dimensions, and cost, mobile terminals generally lack optical zoom lenses. Since face detection distance is strongly correlated with input image resolution and FOV, this limits the detection range. Often, products designed with large FOV lenses result in detection distances that are too short (2-3m), failing to meet practical needs. Because the input resolution is fixed, current technologies largely aim to increase face pixel density by reducing the FOV. Existing technologies often employ digital magnification, forcibly sacrificing the input image's FOV to increase the pixel density of the input detection model. While this improves detection distance, the sacrifice in FOV is too significant; the final FOV may only be 30-40 degrees, limiting detection to individuals within the center of the FOV, drastically reducing detection efficiency. For example… Figure 1 A schematic diagram illustrating the field of view before and after digital magnification processing in the prior art, as shown below. Figure 1 As shown, the cropped field of view is obtained by directly reducing the original field of view. Directly centering the image without considering the detection target as a face or the height of the person results in wasted pixels in the vertical direction and limited improvement in detection distance. It is necessary to consider how to take into account the height of the person at different detection distances, refine the possible vertical positions of the face, and design a detection box of a reasonable size. Directly centering the field of view results in significant FOV loss, severely affecting the face detection range and easily causing missed detections. Simple centering cropping also results in significant FOV loss due to cropping the image edges. It is necessary to consider how to design a reasonable detection position that ensures no missed detections while meeting the requirements of recognition FOV and speed. In summary, current face detection technologies have a small detection field of view and low efficiency.

[0096] To address the aforementioned issues, embodiments of this application provide a face detection method, device, medium, and product. Based on the farthest detection distance for face detection, multiple tiered detection distances are set, and an accurate face detection bounding box size is configured for each tiered detection distance to improve detection accuracy. After determining the face detection bounding box size corresponding to each tier, face detection is performed sequentially according to the tiered detection distances corresponding to each tier, from smallest to largest, until the detection cutoff tier that meets the face detection requirements is reached, thereby determining the accurate target detection distance.

[0097] Optionally, to address the issue of directly centering the image without considering the detection target as a face, or factors such as height and face size, resulting in wasted pixels in the vertical direction and limited improvement in detection distance, the possible positions of the face are calculated based on the lens's vertical FOV, average human height, face size, and preset detection distance requirements. An appropriate detection box size is then selected to improve the detection distance.

[0098] Optionally, to address the issue that direct centering and cropping of the field of view results in significant FOV loss, severely impacting the face detection range and easily causing missed detections, a small detection frame is used to perform horizontal scanning at possible face locations, covering the entire horizontal field of view of the lens, based on the designed detection frame.

[0099] Optional, Figure 2 This is a schematic diagram of a face detection system architecture provided in an embodiment of this application. Figure 2 In the above architecture, at least one of data acquisition device 201, processing device 202 and display device 203 is included.

[0100] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the architecture of a face detection system. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here. Figure 2 The components shown can be implemented in hardware, software, or a combination of both.

[0101] In the specific implementation process, the data acquisition device 201 may include an input / output interface or a communication interface, and the data acquisition device 201 can be connected to the processing device through the input / output interface or the communication interface.

[0102] The processing device 202 can set multiple stepped detection distances based on the farthest detection distance of face detection, and configure an accurate face detection box size for each stepped detection distance to improve detection accuracy. After determining the face detection box size corresponding to each level, face detection is performed sequentially according to the stepped detection distance corresponding to each level in ascending order until the detection cutoff level that meets the face detection requirements is reached, thereby determining the accurate target detection distance.

[0103] The display device 203 can also be a touch screen or the screen of a terminal device, used to receive user commands while displaying the above-mentioned content, so as to realize interaction with the user.

[0104] It should be understood that the aforementioned processing device can be implemented by a processor reading instructions from memory and executing those instructions, or it can be implemented by a chip circuit.

[0105] Optionally, the face detection system is connected to a mobile terminal. In this embodiment, the mobile terminal is also called a terminal. The terminal is equipped with an image acquisition device, such as a camera, for acquiring images and sending them to the face detection system for face recognition.

[0106] Furthermore, the network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0107] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0108] Optionally, Figure 3 This is a flowchart illustrating a face detection method provided in an embodiment of this application. The execution entity of this embodiment can be... Figure 2 The specific execution entity for the processing device 202 can be determined based on the actual application scenario. For example... Figure 3 As shown, the method includes the following steps:

[0109] S301: Obtain the furthest detection distance for face detection.

[0110] Optionally, obtaining the farthest detection distance for face detection includes: obtaining the actual usage requirement distance and the preset farthest face comparison distance; and determining the minimum value between the actual usage requirement distance and the farthest face comparison distance as the farthest detection distance for face detection.

[0111] In this embodiment, the maximum detection distance for face detection that meets the actual usage requirements and the maximum face comparison distance is determined based on the actual usage requirements and the maximum face comparison distance. This improves the efficiency and accuracy of detection by increasing the detection distance.

[0112] Optionally, the actual usage distance can be the actual usage distance sent by the user's terminal device, or the actual usage distance input by the user through an input / output device, or it can be preset. This application embodiment does not impose specific limitations on this.

[0113] Optionally, the requirement for the farthest detection distance is determined: the farthest detection distance Sm comes from two aspects. One is the actual usage requirement distance Sx and the farthest distance Sb that the backend comparison algorithm can achieve for face comparison, Sm = min(Sx, Sb).

[0114] Optionally, the farthest distance Sb for face comparison can be determined based on at least one of the minimum detection eye distance, the effective detection distance, and the minimum recognition eye distance.

[0115] S302: Determine the step detection distance for N gears based on the farthest detection distance.

[0116] Where N is any positive integer greater than 1.

[0117] Optionally, different detection distance levels can be determined: In practice, different levels can be determined based on the original detection distance SY and the maximum detection distance Sm, gradually increasing the actual detection distance until it reaches Sm. For example: Actual detection distance = SY + i*(S-SY) / N, i = 1, 2, 3…N.

[0118] S303: Determine the size of the face detection box corresponding to the gear position based on the step detection distance corresponding to the gear position.

[0119] S304: Following the order of increasing step detection distance, at least one of the N levels is used sequentially to perform face detection based on the size of the corresponding face detection box.

[0120] S305: Determine the detection cutoff level based on the number of face detections corresponding to at least one level.

[0121] Optionally, the detection cutoff level is determined based on the number of face detections corresponding to at least one level, including: if the number of face detections corresponding to the level is equal to a first preset number, or the number of face detections corresponding to the level is greater than the first preset number and less than the second preset number, then the level is determined as the detection cutoff level.

[0122] In this embodiment, a first preset number and a second preset number are set. If the number of face detections corresponding to a certain level is equal to the first preset number, or the number of face detections corresponding to a certain level is greater than the first preset number and less than the second preset number, it can be determined that the detection distance and the number of detections meet the detection requirements, thereby obtaining an accurate detection cutoff level and improving the efficiency and accuracy of face detection.

[0123] Optionally, determining the detection cutoff level based on the number of face detections corresponding to at least one level further includes: if the number of face detections corresponding to a level is less than a first preset number, then determining the level as a non-detection cutoff level; based on the level, increasing the detection level by one level in ascending order of step detection distance and continuing to perform face detection according to the size of the corresponding face detection box.

[0124] If the number of faces detected at a certain level is less than the first preset number, it can be determined that too few faces are recognized at that level, and efficient face detection cannot be achieved at that level. Therefore, the detection distance is increased by one level to continue detection until the detection cutoff level is reached, thereby increasing the number of faces detected and further improving the efficiency of face detection.

[0125] Optionally, determining the detection cutoff level based on the number of face detections corresponding to at least one level further includes: if the number of face detections corresponding to a level is greater than or equal to a second preset number, then re-perform face detection according to the order of increasing step detection distance, using at least one of the N levels in sequence, based on the size of the corresponding face detection box.

[0126] Here, the determination of the number of face detections is mainly affected by the detection latency. Because horizontal scanning of the face bounding box is required, when there are multiple faces, a small detection box may not be able to complete the detection within the specified time. In this embodiment, if the number of face detections detected at a certain level is greater than or equal to the second preset number, that is, when the number of face detections is too large, at least one of the N levels is used again in sequence to perform face detection according to the size of the corresponding face detection box, so as to gradually reduce the detection distance, increase the detection box, and improve the detection accuracy and detection efficiency.

[0127] The first and second preset quantities can be determined based on actual circumstances, and this application embodiment does not impose specific limitations on them. It is understood that the first preset quantity is less than the second preset quantity.

[0128] In one possible implementation, the sequential detection based on gear position is performed as follows:

[0129] If detecting faces, determine the number of faces detected within a certain time period:

[0130] If the number of face detections is 0, then increase the detection distance by one level and continue detection.

[0131] If the number of face detections is n, then face detection will continue at the current level.

[0132] If the number of face detections exceeds n, the detection will revert to the default detection distance SY and continue detection.

[0133] It is understood that n here is any positive integer, which can be determined according to the actual situation, and the embodiments of this application do not impose specific restrictions on it.

[0134] The determination of the face detection value 'n' is mainly affected by the detection latency. This is because horizontal scanning of the face bounding box is required, and when there are multiple faces, a small bounding box may not be able to complete the detection within the specified time. In this case, it is necessary to reduce the detection distance and increase the size of the bounding box. In this example, the default value 'SY' is used.

[0135] If no face is detected, the search for a face will continue at the furthest detection distance setting.

[0136] Exemplary, Figure 4 This is a schematic diagram of a face detection process provided in an embodiment of this application. Figure 4 The detection method shown can improve the detection distance by a ratio of (S-SY) / S*100%, where S refers to the detection distance corresponding to the detection cutoff position. Furthermore, due to the horizontal detection frame scanning, the detection field of view is the same as the original field of view with almost no loss.

[0137] S306: Determine the target detection distance for face recognition based on the detection cutoff level.

[0138] Optionally, the detection distance corresponding to the detection cutoff point is determined as the target detection distance for face recognition.

[0139] This application provides an efficient and accurate face detection method. When performing face detection, multiple stepped detection distances are set based on the farthest detection distance, and an accurate face detection bounding box size is configured for each stepped detection distance to improve detection accuracy. After determining the face detection bounding box size corresponding to each step, face detection is performed sequentially according to the stepped detection distance corresponding to each step, from smallest to largest, until a detection cutoff point that meets the face detection requirements is reached. This determines the accurate target detection distance, which meets the face detection requirements for the number of detections and / or detection accuracy. The multiple steps and the setting of the face detection bounding box effectively reduce the occurrence of missed detections while ensuring the detection distance, thus improving the efficiency of face detection.

[0140] The following is a detailed explanation of step S303:

[0141] Optionally, the size of the face detection box corresponding to the gear position is determined based on the step detection distance corresponding to the gear position, including:

[0142] Based on the step detection distance corresponding to the gear level, determine the vertical pixel height of the top of the head and the pixel height of the chin of the face; based on the top of the head pixel height, the pixel height of the chin and the preset input aspect ratio requirements, determine the target height and target width of the face detection box; based on the target height and target width, determine the size of the face detection box corresponding to the gear level.

[0143] In this embodiment, the pixel height of the top of the face and the pixel height of the chin in the vertical direction can be determined based on the step detection distance corresponding to each level, thereby accurately determining the target height and target width of the face detection box and obtaining the size of the face detection box corresponding to each level, which improves the distance and accuracy of face detection.

[0144] Optionally, determining the vertical pixel height of the face at the top of the head and the pixel height of the chin includes: acquiring the installation height and vertical field of view of the image acquisition device; and calculating the pixel height at the top of the head based on the installation height of the image acquisition device, the vertical field of view, the preset height, the preset vertical resolution, and the step detection distance corresponding to the level.

[0145] The chin pixel height is calculated based on the top pixel height and the preset ratio of the face to the body.

[0146] In this embodiment of the application, when determining the vertical pixel height of the top of the head and the pixel height of the chin of the face, that is, when determining the size of the face detection box, parameters such as the vertical field of view of the lens, height, face size and detection distance requirements are combined to calculate the possible position of the face and select an appropriate detection box size, thereby improving the detection distance.

[0147] Optionally, Figure 5 This is a schematic diagram of a face input detection frame provided in an embodiment of this application. Due to shooting range requirements, mobile terminals are generally designed with wide field-of-view lenses, resulting in a relatively small proportion of the face in the overall image. To improve detection distance, it is necessary to increase the pixel density of the scaled face, typically by cropping the field of view to increase the face's proportion in the image. However, simply centering and cropping the field of view without considering factors such as height and head size results in the cropping of many body and leg pixels, leading to pixel waste and affecting detection distance. Figure 5 As shown, the embodiments of this application can take into account factors such as a person's height and head size, thereby enabling accurate design of a face detection input box.

[0148] Optionally, Figure 6 This is a schematic diagram illustrating the process of determining a face detection bounding box, provided in an embodiment of this application. Figure 6 The face detection bounding box is designed as follows:

[0149] Prerequisites:

[0150] Considering that the height of an adult is generally between 1.5m and 1.9m, the height of an adult can be set as H, with Hmax = 1.9m and Hmin = 1.5m. Here, H is a preset height. It can be understood that H can be determined according to the actual situation, and this application embodiment does not impose specific restrictions on it.

[0151] The vertical height of a human face is generally between 18-25cm. In one possible design, we directly design based on a maximum height of 25cm, setting Ht = 0.25m.

[0152] Hz is the installation height of the image acquisition device, also known as the terminal wearing height. In one possible design, Hz = 1.5m.

[0153] The detection distance is S, where S refers to the actual detection distance. In this embodiment of the application, when each gear is used for detection, S refers to the stage detection distance corresponding to that gear.

[0154] The original image's vertical field of view is θ V The horizontal field of view is θ H .

[0155] The distance S1 between the intersection of the field of view and the ground and the terminal.

[0156] The vertical field of view height Hv at the location of the face.

[0157] The height h1 (pixels) of the top of the face in the image is detected, where h1 is the pixel height of the top of the head.

[0158] The height of the chin in the image is detected as h2 (pixels), where h2 is the pixel height of the chin.

[0159] The horizontal resolution of the detected image is X.

[0160] The vertical resolution of the detected image is Y.

[0161] Face location calculation:

[0162] The actual height of a person's head, H1, equals their height, H, plus the height below the ground, Hf.

[0163] Actual chin height H2 = height H + below-the-ground portion Hf - face height Ht. S1 = cot(θ) V / 2)*Hz;

[0164] Hz / Hf=S1 / (S-S1);

[0165] Hf = Hz * (S - S1) / S1;

[0166] H1 / Hv = h1 / X;

[0167] h1=H1*Y / Hv=(H+Hf)*Y / (tan(θ V / 2)*S);

[0168] =(H+Hz*(S-S1) / S1)*Y / (tan(θ)) V / 2)*S)

[0169] = (H+tan(θ) V / 2)*S-Hz)*Y / (tan(θ V / 2)*S)

[0170] = (H-Hz)*Y / (tan(θ) V / 2)*S)+Y.

[0171] The value of h2 can be determined based on the proportion of the face to the body (a preset proportion that can be adjusted according to the actual situation).

[0172] h2 = h1 * (h - Ht) / h.

[0173] With the vertical h1 and h2, and considering the aspect ratio requirements of the face detection model (the preset aspect ratio requirements can be determined according to the actual situation, such as 1:1 or 1.625), the width of the detection box in the horizontal direction can be determined as w = (h1-h2) / aspect ratio.

[0174] In fact, with the terminal selected, all other parameters are already determined; only the detection distance S needs to be specified. The steps above have already calculated the length and width of the detection box, as well as its vertical coordinates, under the specified detection distance requirement.

[0175] Detecting horizontal field-of-view coverage: Because the detection frame is much smaller than the original image, there is significant loss in the horizontal direction, and a single detection frame can lead to missed detections in the horizontal direction. To solve this problem, two solutions are proposed:

[0176] Since the detection box gradually decreases with the detection distance, reducing the detection distance S can result in a larger detection box. In practice, different levels can be determined based on the original detection distance SY and the final detection distance S, gradually increasing the actual detection distance until it reaches S. For example: actual detection distance = SY + i*(S-SY) / N, where N is a fixed value and i = 1, 2, 3…N.

[0177] Even with a large detection bounding box, cropping still results in a loss of field of view. One possible implementation is to divide the original image into multiple horizontal regions based on the detection bounding box size to cover the entire image. However, in extreme cases, the face image at the detection bounding box segmentation may be incomplete, and the detection bounding boxes can overlap to some extent (the overlap should cover one face). To ensure complete detection, the detection bounding box width *w* must be at least twice the size of a face and overlap by one face size, i.e., *w* >= 2(h1-h2) / aspect ratio.

[0178] It is understandable that the above parameters and specific values ​​are only illustrative and can be determined according to the actual situation in the specific implementation process.

[0179] Optionally, face detection is performed based on the size of the corresponding face detection bounding box, including:

[0180] The horizontal scanning height range is determined based on the vertical pixel height of the top of the head and the pixel height of the chin of the face; based on the size of the corresponding face detection box, a horizontal scan is performed within the horizontal scanning height range to achieve face detection.

[0181] Here, in this embodiment of the application, the horizontal scanning height range is predetermined. Based on the detection frame, a small detection frame is used to perform a horizontal scan at possible face positions, covering the entire horizontal field of view of the lens. This improves the efficiency and accuracy of face detection while increasing the detection distance.

[0182] Figure 7 This is a schematic diagram of the structure of a face detection device provided in an embodiment of this application, as shown below. Figure 7 As shown, the face detection device provided in this embodiment includes: an acquisition module 701, a first determination module 702, a second determination module 703, a detection module 704, a third determination module 705, and a fourth determination module 706. The face detection device here can be the aforementioned processing device, the processor itself, or a chip or integrated circuit that implements the processor's functions. It should be noted that the division of the acquisition module 701, the first determination module 702, the second determination module 703, the detection module 704, the third determination module 705, and the fourth determination module 706 is only a logical functional division; physically, they can be integrated or independent.

[0183] The acquisition module is used to obtain the farthest detection distance for face detection;

[0184] The first determining module is used to determine the step detection distance of N gears based on the farthest detection distance, where N is any positive integer greater than 1;

[0185] The second determining module is used to determine the size of the face detection box corresponding to the gear position based on the step detection distance corresponding to the gear position.

[0186] The detection module is used to perform face detection according to the size of the corresponding face detection box, by sequentially using at least one of the N levels of the stepped detection distance in ascending order.

[0187] The third determining module is used to determine the detection cutoff level based on the number of face detections corresponding to at least one level.

[0188] The fourth determination module is used to determine the target detection distance for face recognition based on the detection cutoff level.

[0189] Optionally, the third determining module is specifically used for:

[0190] If the number of face detections corresponding to a certain level is equal to the first preset number, or if the number of face detections corresponding to a certain level is greater than the first preset number but less than the second preset number, then the level is determined to be the detection cutoff level.

[0191] Optionally, the third determining module is also specifically used for:

[0192] If the number of faces detected at a given level is less than the first preset number, then the level is determined to be a non-detection cutoff level.

[0193] Based on the existing detection levels, the detection level is increased by one level according to the step detection distance from small to large, and face detection is continued according to the corresponding face detection box size.

[0194] Optionally, the third determining module is also specifically used for:

[0195] If the number of face detections corresponding to a certain level is greater than or equal to the second preset number, then face detection will be performed again according to the order of the step detection distance from small to large, using at least one of the N levels, based on the size of the corresponding face detection box.

[0196] Optionally, the second determining module is specifically used for:

[0197] Based on the step detection distance corresponding to the gear, determine the vertical pixel height of the top of the head and the pixel height of the chin of the face;

[0198] Based on the top pixel height, chin pixel height, and preset input aspect ratio requirements, determine the target height and target width of the face detection box;

[0199] Determine the size of the face detection box corresponding to each gear level based on the target height and target width.

[0200] Optionally, the second determining module is also specifically used for:

[0201] Obtain the installation height and vertical field of view of the image acquisition device;

[0202] Calculate the top pixel height based on the installation height of the image acquisition device, the vertical field of view, the preset height, the preset vertical resolution, and the step detection distance corresponding to the gear level;

[0203] The chin pixel height is calculated based on the top pixel height and the preset ratio of the face to the body.

[0204] Optionally, the detection module is specifically used for:

[0205] The horizontal scanning height range is determined based on the vertical pixel height of the top of the head and the pixel height of the chin of the face;

[0206] Based on the size of the corresponding face detection bounding box, a horizontal scan is performed within the horizontal scanning height range to achieve face detection.

[0207] Optionally, the acquisition module is specifically used for:

[0208] Obtain the actual usage distance and the preset maximum distance for face comparison;

[0209] The minimum value between the actual usage requirement distance and the farthest distance for face comparison is determined as the farthest detection distance for face detection.

[0210] refer to Figure 8 The diagram illustrates a structural schematic suitable for implementing a face detection 800 according to embodiments of the present disclosure. The face detection 800 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 8 The face detection shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0211] like Figure 8As shown, the face detection 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 802 or a program loaded from storage device 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the face detection 800. The processing device 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0212] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows face detection 800 to exchange data wirelessly or via wired communication with other devices. Although Figure 8 A face detection 800 with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented alternatively.

[0213] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by a processing device 801, it performs the functions defined in the methods of embodiments of this disclosure.

[0214] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0215] The aforementioned computer-readable medium may be included in the aforementioned face detection; or it may exist independently and not incorporated into the face detection.

[0216] The aforementioned computer-readable medium carries one or more programs, which, when executed by the face detection system, cause the face detection system to perform the method shown in the above embodiments.

[0217] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0218] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0219] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0220] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0221] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0222] The face detection method in this application can be used to execute the technical solutions in the above-described method embodiments of this application. Its implementation principle and technical effect are similar, and will not be repeated here.

[0223] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement any of the above-described face detection methods.

[0224] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement any of the above-described face detection methods.

[0225] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A face detection method, characterized in that, include: Obtain the furthest detection distance for face detection; Based on the maximum detection distance, determine the step detection distances for N gears, where N is any positive integer greater than 1; The size of the face detection box corresponding to the gear level is determined based on the step detection distance corresponding to the gear level. In accordance with the order of increasing step detection distance, at least one of the N levels is used sequentially, and face detection is performed according to the size of the corresponding face detection box. The detection cutoff level is determined based on the number of face detections corresponding to at least one level. The target detection distance for face recognition is determined based on the detection cutoff level.

2. The method according to claim 1, characterized in that, The step of determining the detection cutoff level based on the number of face detections corresponding to the at least one level includes: If the number of face detections corresponding to the gear level is equal to the first preset number, or the number of face detections corresponding to the gear level is greater than the first preset number and less than the second preset number, then the gear level is determined to be the detection cutoff gear level.

3. The method according to claim 2, characterized in that, The step of determining the detection cutoff level based on the number of face detections corresponding to the at least one level further includes: If the number of faces detected at the specified level is less than the first preset number, then the specified level is determined to be a non-detection cutoff level. Based on the aforementioned detection level, the detection level is increased by one step according to the step detection distance from small to large, and face detection is continued according to the corresponding face detection box size.

4. The method according to claim 2, characterized in that, The step of determining the detection cutoff level based on the number of face detections corresponding to the at least one level further includes: If the number of face detections corresponding to the specified level is greater than or equal to the second preset number, then face detection is performed again according to the order of increasing step detection distance, using at least one of the N levels, based on the size of the corresponding face detection box.

5. The method according to any one of claims 1 to 4, characterized in that, The step of determining the size of the face detection box corresponding to the gear level based on the step detection distance corresponding to the gear level includes: Based on the step detection distance corresponding to the gear level, determine the vertical pixel height of the top of the head and the pixel height of the chin of the face; Based on the top pixel height, chin pixel height, and preset input aspect ratio requirements, determine the target height and target width of the face detection box; The size of the face detection box corresponding to the gear position is determined based on the target height and the target width.

6. The method according to claim 5, characterized in that, Determining the vertical pixel height of the top of the head and the pixel height of the chin of the face includes: Obtain the installation height and vertical field of view of the image acquisition device; The height of the top pixel is calculated based on the installation height of the image acquisition device, the vertical field of view, the preset height, the preset vertical resolution, and the step detection distance corresponding to the gear level. The chin pixel height is calculated based on the top pixel height and the preset ratio of the face to the body.

7. The method according to claim 6, characterized in that, The step of performing face detection based on the size of the corresponding face detection bounding box includes: The horizontal scanning height range is determined based on the vertical pixel height of the top of the head and the pixel height of the chin of the face. Based on the size of the corresponding face detection bounding box, a horizontal scan is performed within the horizontal scanning height range to achieve face detection.

8. The method according to any one of claims 1 to 4, characterized in that, The method for obtaining the furthest detection distance for face detection includes: Obtain the actual usage distance and the preset maximum distance for face comparison; The minimum value between the actual usage requirement distance and the farthest distance for face comparison is determined as the farthest detection distance for face detection.

9. A face detection device, characterized in that, include: The acquisition module is used to obtain the farthest detection distance for face detection; The first determining module is used to determine the step detection distances for N gears based on the farthest detection distance, where N is any positive integer greater than 1; The second determining module is used to determine the size of the face detection box corresponding to the gear position based on the step detection distance corresponding to the gear position. The detection module is used to perform face detection according to the N levels, in order of increasing step detection distance, by using at least one level from the N levels and according to the size of the corresponding face detection box. The third determining module is used to determine the detection cutoff level based on the number of face detections corresponding to the at least one level. The fourth determining module is used to determine the target detection distance for face recognition based on the detection cutoff level.

10. A face detection device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.

12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.