Face recognition method and device, electronic equipment, storage medium and program product

Through intelligent management with dual-mode switching and exposure parameter memory mechanism, the problem of unstable image quality in traditional face recognition technology under different lighting conditions has been solved, realizing fast and accurate face recognition, improving recognition efficiency and user experience.

CN121811538APending Publication Date: 2026-04-07GUANGZHOU ANYKA MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Traditional facial recognition technology suffers from unstable image quality under different lighting conditions, resulting in poor recognition performance. Furthermore, the slow exposure adjustment process affects recognition efficiency and user experience.

Method used

A dual-mode face recognition method is adopted, combining normal mode and pixel merging mode. Through exposure parameter memory mechanism and intelligent management, it can quickly adjust exposure parameters and improve image quality.

Benefits of technology

It significantly improves the efficiency and accuracy of facial recognition, enhances its adaptability to varying lighting environments, and improves user experience and recognition success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121811538A_ABST
    Figure CN121811538A_ABST
Patent Text Reader

Abstract

The invention relates to a face recognition method and device, electronic equipment, a storage medium and a program product. The method comprises the steps that a current image is obtained, and the current image is obtained by adopting a manual exposure mode when image acquisition equipment is in a first working mode; under the condition that the current image meets the recognition condition, performing face recognition on the current image; and under the condition that the current image does not meet the identification condition, converting the current exposure parameter into an exposure parameter in a second working mode, switching the image acquisition equipment into the second working mode to execute exposure parameter control until the current image is normally exposed, converting the current exposure parameter into an exposure parameter in a first working mode, and switching the image acquisition equipment into the second working mode to execute exposure parameter control until the current image is normally exposed. Switching the image acquisition equipment into a first working mode; the frame rate of the second working mode is higher than that of the first working mode. According to the invention, the dual-mode switching is provided, the image quality can be improved, the adaptive capacity to a variable illumination environment is enhanced, and the recognition success rate is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, in particular to a face recognition method and device, electronic equipment, storage medium and program product. BACKGROUND

[0002] With the popularization of smart home and security systems, devices such as face intelligent locks have higher requirements for the speed and stability of face recognition. However, under different light conditions, the traditional scheme has the problem of unstable image quality, which affects the face recognition effect. SUMMARY

[0003] Therefore, it is necessary to provide a face recognition method, device, electronic equipment, storage medium and program product capable of improving the recognition effect in view of the above technical problems.

[0004] In a first aspect, the present application provides a face recognition method, which comprises: acquiring a current image, the current image being obtained by an image acquisition device in a first working mode using a manual exposure mode; performing face recognition on the current image if the current image meets a recognition condition; converting the current exposure parameter into an exposure parameter in a second working mode and switching the image acquisition device to the second working mode to perform exposure parameter control until the current image is normally exposed, converting the current exposure parameter into an exposure parameter in the first working mode, and switching the image acquisition device to the first working mode if the current image does not meet the recognition condition; the frame rate of the second working mode being higher than that of the first working mode.

[0005] In one of the embodiments, the first working mode comprises a normal mode; and the second working mode comprises a pixel merging mode.

[0006] In one of the embodiments, when the image acquisition device is in the first working mode and the face brightness of the current image is in a normal range, it is determined that the current image meets the recognition condition.

[0007] In one of the embodiments, the face brightness comprises an average brightness of a face region; and the method further comprises: determining that the exposure state of the current image is an underexposure state when the average brightness of the face region is less than a first brightness threshold; determining that the exposure state of the current image is a normal exposure state when the average brightness of the face region is greater than or equal to the first brightness threshold and less than or equal to a second brightness threshold; and determining that the exposure state of the current image is an overexposure state when the average brightness of the face region is greater than the second brightness threshold.

[0008] In one of the embodiments, the method further comprises: saving the exposure parameter of the current face recognition to obtain a historical exposure parameter when the current face recognition is completed; and calling the historical exposure parameter to perform face recognition in the next face recognition.

[0009] In one of the embodiments, the historical exposure parameter is called to perform the face recognition, including: when the ambient light intensity is not acquired, the historical exposure parameter saved last time is selected; and when the ambient light intensity is acquired, the historical exposure parameter corresponding to the ambient light intensity is selected.

[0010] In one of the embodiments, the current exposure parameter is converted into the exposure parameter in the second working mode and the exposure parameter in the first working mode through the exposure parameter mapping relationship, and the exposure parameter mapping relationship is obtained through a lookup table established by pre-calibration.

[0011] In one of the embodiments, the exposure parameter control includes determining the exposure parameter based on a plurality of groups of target brightness values related to the light environment in the second working mode; the configuration rule of the plurality of groups of target brightness values includes one or more of environment classification configuration, experience value setting and device characteristic adaptation; and the target brightness values in the plurality of groups of target brightness values satisfy a preset relationship.

[0012] In one of the embodiments, the environment classification configuration includes that different target brightness values correspond to an extremely strong light environment, a strong light environment, a normal light environment, a weak light environment and an extremely weak light environment respectively; the experience value setting includes determining the target brightness value based on experimental data and human eye visual characteristics; the device characteristic adaptation includes optimizing the target brightness value according to a characteristic curve of the image acquisition device until the target brightness value falls into a target working interval of the image acquisition device; and the preset relationship includes one or more of a piecewise function relationship, a linear interpolation relationship and an ambient light mapping relationship.

[0013] In one of the embodiments, the face recognition is performed on the current image, including: in the face recognition process, if an execution condition of the exposure parameter control is triggered, the exposure parameter control is executed; and the execution condition includes one or more of the following conditions: the face brightness of the current image deviates from the target brightness value corresponding to the current light environment, the current image is overexposed or underexposed.

[0014] In one of the embodiments, if the difference between the face brightness and the target brightness value corresponding to the current light environment is greater than a brightness difference threshold value, it is determined that the face brightness deviates from the target brightness value corresponding to the current light environment.

[0015] In one of the embodiments, in the second working mode, the exposure parameter is determined based on a plurality of groups of target brightness values related to the light environment, including: in the second working mode, the exposure parameter is obtained by estimation according to the difference between the face brightness of the current image and the target brightness value corresponding to the current light environment.

[0016] In one of the embodiments, the method further comprises: when there is a historical exposure parameter, taking the historical exposure parameter as an initial exposure value; and when there is no historical exposure parameter, taking an initial default exposure value as the initial exposure value.

[0017] In a second aspect, the present application further provides a face recognition device, the device comprising:

[0018] an image acquisition unit configured to acquire a current image, the current image being obtained by using a manual exposure mode in a first working mode of an image acquisition device;

[0019] a face recognition unit configured to perform face recognition on the current image when the current image meets a recognition condition;

[0020] a parameter control unit configured to, when the current image does not meet the recognition condition, convert the current exposure parameter into an exposure parameter in a second working mode, and switch the image acquisition device to the second working mode to perform exposure parameter control until the current image is normally exposed, convert the current exposure parameter into an exposure parameter in the first working mode, and switch the image acquisition device to the first working mode, the frame rate of the second working mode being higher than that of the first working mode.

[0021] In a third aspect, the present application further provides an electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the above method when executing the computer program.

[0022] In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the above method.

[0023] In a fifth aspect, the present application further provides a computer program product comprising a computer program, the computer program being executed by a processor to implement the steps of the above method.

[0024] The face recognition method, device, electronic device, storage medium and program product described above perform face recognition on a current image when the current image meets a recognition condition, and convert the current exposure parameter into an exposure parameter in a second working mode when the current image does not meet the recognition condition, and switch the image acquisition device to the second working mode to perform exposure parameter control until the current image is normally exposed, convert the current exposure parameter into an exposure parameter in the first working mode, and switch the image acquisition device to the first working mode, the frame rate of the second working mode being higher than that of the first working mode, wherein the current image is obtained by using a manual exposure mode in a first working mode of an image acquisition device. The face recognition method with double-mode switching proposed by the present application can improve image quality, enhance the adaptability to variable lighting environments, and thus significantly improve the recognition success rate. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is a diagram illustrating the application environment of a face recognition method in one embodiment.

[0027] Figure 2 This is a flowchart illustrating a face recognition method in one embodiment;

[0028] Figure 3 This is a flowchart illustrating the process of obtaining and retrieving historical exposure parameters in one embodiment;

[0029] Figure 4 This is a flowchart illustrating a face recognition method in another embodiment;

[0030] Figure 5 This is a schematic diagram of an exposure parameter memory reuse mechanism in one embodiment;

[0031] Figure 6 This is a schematic diagram illustrating the exposure parameter conversion process between normal mode and pixel binning mode.

[0032] Figure 7 This is a structural block diagram of a face recognition device in one embodiment;

[0033] Figure 8 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0035] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0036] With the rapid development of smart home and security technologies, facial recognition smart locks, as a secure and convenient access control device, are gradually replacing traditional mechanical locks and combination locks. Facial recognition smart locks authenticate users by collecting their facial features, offering advantages such as contactless operation and high security, and are widely used in access control systems in residential, office, and commercial buildings. However, in practical applications, facial recognition smart locks face numerous technical challenges. Due to the complexity of the installation environment, smart locks often need to operate under various lighting conditions, including strong direct sunlight, dim nighttime environments, and complex indoor lighting environments. These different lighting conditions can cause overexposure or underexposure of facial images, severely affecting recognition accuracy.

[0037] Traditional smart lock facial recognition technology uses fixed image acquisition parameters, making it unable to adapt to varying environmental lighting conditions. In extreme lighting environments, the quality of the captured facial images is poor, potentially leading to recognition failures. Users need to attempt unlocking multiple times, severely impacting the user experience. While some products feature automatic exposure adjustment, the process is slow, especially in continuous recognition scenarios, requiring parameter optimization for each unlock, thus extending unlocking time. Furthermore, based on traditional facial recognition smart lock technology, repeated parameter adjustments are necessary when the same user uses the smart lock multiple times in similar environments, reducing overall recognition efficiency.

[0038] In summary, under different lighting conditions, traditional solutions have at least the following problems: ① Fixed parameters are difficult to adapt to complex environmental changes, resulting in unstable image quality; ② The exposure adjustment process is relatively long, affecting the response speed of continuous recognition; ③ There is a lack of an effective mechanism for reusing historical parameters, resulting in resource waste; ④ A single image acquisition mode cannot simultaneously meet the requirements of high precision and fast convergence.

[0039] Based on the aforementioned traditional technologies, this application provides a face recognition method and corresponding electronic device that combines normal mode and pixel-merging mode switching and is based on an exposure parameter memory mechanism. Through intelligent exposure parameter management and reuse mechanisms, the efficiency and accuracy of continuous face recognition are significantly improved. Specifically, the face recognition method based on exposure parameter memory and dual-mode switching accelerates unlocking speed, improves image quality, and enhances the system's adaptability to varying lighting environments. For example, this application proposes a face recognition method that integrates normal mode and pixel-merging mode, combining exposure parameter memory storage and intelligent retrieval mechanisms to significantly improve image acquisition efficiency and recognition success rate. Furthermore, this application proposes an efficient parameter memory and mode switching mechanism that can effectively utilize historical recognition data, thereby fully leveraging previously verified parameter settings.

[0040] This application improves the efficiency of exposure parameter adjustment during face recognition by memorizing historical optimization parameters to accelerate continuous recognition speed. Simultaneously, it adaptively selects target brightness values ​​based on different lighting environments, enhancing user experience. Specifically, this application improves face recognition efficiency and user experience through intelligent parameter management and a dual-mode switching mechanism, while ensuring image quality and recognition accuracy. Furthermore, it enhances the recognition efficiency and user experience of smart face locks under various lighting conditions through intelligent parameter management and reuse mechanisms, while maintaining security.

[0041] Furthermore, the embodiments of this application are highly compatible and applicable to various electronic devices with facial recognition functions, including smartphones, tablets, access control systems, etc., and this application is not limited in this regard. It should be noted that the beneficial effects or technical problems solved by the embodiments of this application are not limited to this one, but may also be other implicit or related problems, which can be referred to in the following description of the embodiments.

[0042] 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 be described below with reference to the accompanying drawings.

[0043] The face recognition method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0044] In one exemplary embodiment, such as Figure 2 As shown, a face recognition method is provided. The method is illustrated using an electronic device as an example. The electronic device can be... Figure 1The terminal in the process is not limited in this application, and includes the steps 202 to 206.

[0045] Step 202: Acquire the current image. The current image is obtained by the image acquisition device in the first working mode using the manual exposure method.

[0046] The image acquisition device can be a standalone device or an image acquisition module of an electronic device, which performs image acquisition tasks. For example, the image acquisition module includes a camera component that supports manual exposure control and dual-mode switching. Further, the image acquisition module has corresponding operating modes, such as a first operating mode and a second operating mode.

[0047] Specifically, electronic devices can acquire the current image through image acquisition devices. For example, during the image acquisition configuration phase, the image acquisition device is configured to manual exposure mode, adjusting the brightness level of the facial image by controlling exposure parameters to provide a stable image input basis for face recognition. Optionally, during the image acquisition configuration phase, the image acquisition device is configured to a first working mode and switched to manual exposure mode for precise control of image brightness. It should be noted that the first working mode provides higher resolution and richer image details, better preserving facial feature information compared to the second working mode, thereby ensuring the accuracy of face recognition.

[0048] In this embodiment, the electronic device may include a processor. Optionally, the processor is configured as a face recognition processing unit, responsible for executing exposure parameter control (e.g., exposure parameter optimization) and the face recognition process. Further, the electronic device may also include a parameter management module, responsible for the dynamic adjustment, storage, and retrieval of exposure parameters. Furthermore, the processor can be responsible for overall control and calculation, the image acquisition module performs image acquisition tasks, and the parameter management module handles the management of exposure parameters, working in conjunction with the processor and relying on the processor's calculation results to execute specific parameter adjustment operations. This application, by constructing a complete closed-loop feedback optimization system, achieves intelligent management of exposure parameters, significantly improving the user experience while ensuring recognition accuracy.

[0049] Step 204: If the current image meets the recognition conditions, perform face recognition on the current image.

[0050] Specifically, if the current image meets the recognition conditions, the electronic device can perform face recognition on that image. That is, the electronic device only invokes the face recognition function when the current image meets the recognition conditions. These recognition conditions can be used to characterize whether the image brightness (e.g., facial brightness) is within the ideal range, or whether the image is properly exposed. This application enables high-quality image recognition, performing face recognition processing only when the image brightness is within the ideal range, thus ensuring high recognition accuracy.

[0051] Step 206: If the current image does not meet the recognition conditions, the current exposure parameters are converted to the exposure parameters in the second working mode, and the image acquisition device is switched to the second working mode to perform exposure parameter control until the current image is properly exposed. Then, the current exposure parameters are converted to the exposure parameters in the first working mode, and the image acquisition device is switched to the first working mode. The frame rate of the second working mode is higher than that of the first working mode.

[0052] Specifically, if the current image does not meet the recognition conditions, the electronic device can convert the current exposure parameters to the exposure parameters in the second working mode and switch the image acquisition device to the second working mode to perform exposure parameter control. Here, exposure parameter control can refer to the process of exposure parameter optimization, while the second working mode is a mode that is conducive to brightness adjustment. The electronic device can perform exposure parameter control in the second working mode.

[0053] Until the current image is properly exposed, the electronic device can convert the current exposure parameters to the exposure parameters of the first working mode and switch the image acquisition device to the first working mode. The frame rate of the second working mode is higher than that of the first working mode. For example, the resolution of the first working mode is greater than that of the second working mode. It is understood that the second working mode can significantly increase the frame rate by reducing the resolution. This application utilizes a high frame rate image feedback mechanism to significantly accelerate the exposure convergence process, achieving fast and stable brightness adjustment.

[0054] Furthermore, this application converts the current exposure parameters to exposure parameters in the second working mode, and converts the current exposure parameters to exposure parameters in the first working mode, through a corresponding relationship. During the conversion process, abrupt changes in brightness must be avoided. It is understood that the above conversion method can also take other forms, not limited to those mentioned in the above embodiments, as long as it can achieve the function of converting exposure parameters under multiple working modes.

[0055] In the aforementioned face recognition method, while ensuring image quality and recognition accuracy, a dual-mode switching mechanism is used to improve face recognition efficiency, thereby enhancing image quality and improving adaptability to varying lighting environments. Furthermore, this application enables intelligent invocation of face recognition functions, significantly improving image acquisition efficiency and recognition success rate.

[0056] Regarding the dual-mode switching in this application, in one embodiment, the first working mode includes a normal mode; the second working mode includes a pixel merging mode. Specifically, the first working mode can be a normal mode, and the second working mode can be a pixel merging mode. This application can fuse the normal mode and the pixel merging mode in face recognition.

[0057] In the image acquisition configuration phase, the image acquisition device is initially configured in normal mode and switched to manual exposure mode for precise control of image brightness. Normal mode retains full resolution and maximum detail, which is beneficial for high-quality face recognition. Further, the electronic device can switch the image acquisition device to pixel-binding mode (Binning mode). Compared to normal mode, this mode significantly increases the frame rate by reducing resolution, utilizing a high frame rate image feedback mechanism to significantly accelerate the exposure convergence process, achieving fast and stable brightness adjustment. Optionally, exposure parameter control can be performed in pixel-binding mode for rapid parameter adjustments. Once the current image returns to normal exposure, the electronic device can switch the image acquisition device back to normal mode to continue acquisition, thus restoring high-definition acquisition.

[0058] The aforementioned face recognition method can initialize the image acquisition device. Taking a camera as an example, before starting face recognition, the camera is set to normal mode and manual exposure control is enabled to obtain high-quality image input. Furthermore, through a dual-mode switching mechanism, exposure parameters can be intelligently managed to achieve precise control over the image brightness of the current image.

[0059] In some embodiments, when the image acquisition device is in a first operating mode and the brightness of the face in the current image is within a normal range, it is determined that the current image meets the recognition conditions. Specifically, as an image processing operation, face recognition is performed by the electronic device only when the image acquisition device is in the first operating mode and the brightness of the face in the current image is within a normal range.

[0060] Based on this application, face recognition processing is only performed when the image brightness is within the ideal range, ensuring recognition accuracy and guaranteeing high-quality image recognition. The embodiments of this application can optimize resource utilization by avoiding unnecessary image processing operations and reducing system power consumption through a hierarchical processing mechanism.

[0061] In one embodiment, the face brightness includes the average brightness of the face region; the method further includes: when the average brightness of the face region is less than the first brightness threshold, determining that the exposure state of the current image is underexposed; when the average brightness of the face region is greater than or equal to the first brightness threshold and less than or equal to the second brightness threshold, determining that the exposure state of the current image is normal exposure; when the average brightness of the face region is greater than the second brightness threshold, determining that the exposure state of the current image is overexposed.

[0062] Specifically, in this application, the face brightness includes the average brightness of the face region. Regarding the acquisition method of the average brightness of the face region, it can be regional pixel statistics. For example, the brightness of all pixel points within the entire face region is statistically calculated to obtain the average brightness value. Exemplarily, the electronic device can statistically calculate the brightness of all pixel points in the face region and calculate the average brightness value L0, that is, statistically calculate the average brightness L0 of all pixel points in the face region as the average brightness of the face region. This application proposes a brightness grading judgment mechanism, that is, a multi-level brightness threshold judgment mechanism, which distinguishes the exposure state of the current image through corresponding brightness thresholds to determine whether the current image meets the recognition conditions.

[0063] Optionally, the brightness thresholds can be set based on empirical values. Taking the first brightness threshold T1 and the second brightness threshold T2 as an example, the setting of the brightness thresholds is usually based on the following principles: in practical applications, the values of T1 and T2 are usually determined through a large amount of experimental data. For example, T1 may be set within the range of 30-80 to indicate underexposure, and T2 is set within the range of 180-220 to indicate overexposure, and the intermediate range is regarded as normal exposure. This application proposes to establish a three-level brightness judgment system, and two groups of key brightness thresholds T1 and T2 are preset, and their settings are usually based on empirical values. For example, T1 may be set within the range of 30-80 to indicate underexposure, and T2 is set within the range of 180-220 to indicate overexposure.

[0064] Taking the comparison of the average brightness L0 within the face region with the preset thresholds T1 and T2 to determine whether the current image meets the recognition conditions as an example, the brightness states can be divided into the following types. ① Underexposure determination: When L0 < T1, it is determined to be in an underexposed state, that is, the face underexposure state is determined; ② Normal exposure: When T1 ≤ L0 ≤ T2, it is determined to be in a normal exposure state, that is, the face exposure is determined to be normal; ③ Overexposure determination: When L0 > T2, it is determined to be in an overexposed state, that is, the face overexposure state is determined.

[0065] The above face recognition method determines whether the current image meets the recognition conditions through a brightness grading judgment mechanism, which can reduce recognition failures caused by improper exposure, improve the recognition success rate and response speed, and enhance the user experience.

[0066] To improve recognition efficiency, this application also proposes the memory storage of exposure parameters. In one embodiment, such as... Figure 3 As shown, the method also includes steps 302 to 304.

[0067] Step 302: Once the face recognition of the current image is completed, save the exposure parameters of the current face recognition to obtain the historical exposure parameters.

[0068] Specifically, once face recognition of the current image is complete, the electronic device can save the exposure parameters for this face recognition, thus obtaining historical exposure parameters. This application proposes a parameter memory mechanism, whereby the optimized exposure parameters can be written into the storage area after recognition is completed for subsequent use. For example, after face recognition is completed, the final exposure parameters used can be stored in the storage medium.

[0069] Step 304: In the next face recognition, call the historical exposure parameters to perform face recognition.

[0070] Specifically, the electronic device can call historical exposure parameters for face recognition in the next face recognition operation, realizing a rapid convergence and reuse mechanism. In this embodiment, when face recognition is initiated next time, the saved historical exposure parameters are directly called for image acquisition, achieving rapid convergence of image brightness to the target value and significantly shortening parameter adjustment time. Taking a smart face lock as an example, this can improve unlocking response speed.

[0071] The aforementioned face recognition method, by memorizing historically optimized exposure parameters, enables the storage and reuse of exposure parameters, which can be directly used in the next recognition, avoiding the repeated parameter adjustment process and significantly improving the continuous recognition speed.

[0072] Regarding the retrieval of historical exposure parameters, in one embodiment, retrieving historical exposure parameters for face recognition may include: when ambient light intensity is not obtained, selecting the most recently saved historical exposure parameter; when ambient light intensity is obtained, selecting the historical exposure parameter corresponding to the ambient light intensity. Specifically, the electronic device can obtain the ambient light intensity through an ambient light sensor. The ambient light intensity can be used to represent environmental information. Based on the embodiments of this application, when face recognition is initiated next time, the electronic device can preferentially retrieve the most recently saved exposure parameter, or select the closest historical exposure parameter by combining the ambient light sensor with environmental information.

[0073] This application reuses exposure parameters following a "recent priority" principle, or by matching the best historical records based on environmental characteristics. Taking the acquisition of ambient light intensity via an ambient light sensor as an example, if no ambient light sensor is available, the most recently saved exposure parameters are selected, as these are most likely suitable for the current environmental conditions. If an ambient light sensor is available, the ambient light intensity can be directly measured, allowing for environment-matched selection: the electronic device can quickly assess the current ambient light conditions and then select the historical exposure parameters most similar to the current environment. For example, if a strong light environment is detected, exposure parameters previously optimized for strong light environments are selected.

[0074] It should be noted that the exposure parameter memory reuse mechanism in this application can also be applied to exposure parameter optimization. For example, even if the face image meets the basic recognition requirements, if the brightness deviates too much from the target, the exposure parameters will still be fine-tuned. For details, please refer to the following description.

[0075] The aforementioned face recognition method accelerates continuous recognition speed by memorizing historical optimization parameters and significantly improves the efficiency and accuracy of continuous face recognition based on an intelligent exposure parameter reuse mechanism.

[0076] Regarding the conversion of exposure parameters under different working modes in this application, in some embodiments, the current exposure parameter is converted into the exposure parameter in the second working mode and the current exposure parameter is converted into the exposure parameter in the first working mode through the exposure parameter mapping relationship; wherein, the exposure parameter mapping relationship is obtained through a lookup table established by pre-calibration.

[0077] Specifically, electronic devices can use exposure parameter mapping relationships to switch exposure parameters between different operating modes. For example, the exposure parameter mapping relationship is obtained through a pre-calibrated lookup table to prevent abrupt changes in brightness.

[0078] Optionally, the calibration steps may include: ① setting fixed illumination conditions; ② adjusting exposure parameters to achieve the target brightness in pixel merging mode (Binning mode); ③ recording the stabilized exposure parameters; ④ switching to normal mode (Normal mode) and adjusting to the same brightness; ⑤ recording the corresponding exposure parameters; ⑥ repeating different illumination conditions; ⑦ establishing a complete conversion lookup table. It can be understood that the target brightness can be the target brightness from multiple sets of target brightness values. For details on multiple sets of target brightness values, please refer to the description below; it will not be elaborated here.

[0079] The aforementioned face recognition method, by using a calibrated lookup table during the conversion of exposure parameters in different working modes, can ensure a smooth transition in brightness.

[0080] Furthermore, regarding the exposure parameter control in this application, in one embodiment, the exposure parameter control includes determining exposure parameters based on multiple sets of target brightness values ​​related to the lighting environment in a second working mode; the configuration rules for the multiple sets of target brightness values ​​include one or more of environmental classification configuration, empirical value setting, and device characteristic adaptation; the target brightness values ​​in the multiple sets of target brightness values ​​satisfy a preset relationship.

[0081] Specifically, this application proposes an environment-adaptive target brightness configuration, where the target brightness value (hereinafter referred to as target brightness) can be understood as the target face brightness value. For example, based on the characteristics of different lighting environments, multiple sets of target face brightness values ​​{M1, M2, M3, ..., Mn} can be pre-configured, and then the electronic device can intelligently select the most suitable target brightness standard according to the current environmental conditions.

[0082] Taking the pre-configured multiple sets of target face brightness values ​​{M1, M2, M3, ..., Mn} as an example, the electronic device can dynamically select the corresponding target brightness according to different lighting environments. The configuration rules include environment classification configuration (e.g., different target brightness values ​​correspond to extremely strong light, strong light, normal light, weak light, and extremely weak light environments), empirical value settings, and device characteristic adaptation. Furthermore, there are preset relationships between the target brightness values.

[0083] As described above, the embodiments of this application can perform adaptive environmental adjustment, setting multiple sets of target brightness according to different lighting environments to achieve more precise exposure control.

[0084] In one embodiment, the environment classification configuration includes extremely strong light environment, strong light environment, normal light environment, weak light environment, and extremely weak light environment, each corresponding to different target brightness values; the empirical value setting includes determining the target brightness value based on experimental data and human visual characteristics; the device characteristic adaptation includes optimizing the target brightness value according to the characteristic curve of the image acquisition device until the target brightness value falls into the target working range of the image acquisition device; the preset relationship includes one or more of the following: piecewise function relationship, linear interpolation relationship, and ambient lighting mapping relationship.

[0085] Specifically, regarding the environmental classification configuration, it can be classified and configured according to the characteristics of different lighting environments. Taking multiple pre-configured target face brightness values ​​{M1, M2, M3, ..., Mn} as an example, in extremely strong light environments (such as under direct sunlight), the lowest target brightness value M1 can be set; in strong light environments (such as bright outdoor environments), a lower target brightness value M2 can be set; in normal light environments (such as indoor natural light), a medium target brightness value M3 can be set; in weak light environments (such as dusk or dark indoor environments), a higher target brightness value M4 can be set; and in extremely weak light environments (such as night or almost dark environments), the highest target brightness value M5 can be set.

[0086] For example, regarding the setting of empirical values, the target brightness value can be determined based on a large amount of experimental data and the characteristics of human visual perception, ensuring that facial features are most clearly distinguishable at that brightness level. Optionally, regarding device characteristic adaptation, taking a camera sensor as an example, the target brightness value can be optimized according to the characteristic curve of the specific camera sensor, so that it falls within the sensor's optimal operating range.

[0087] The preset relationships in this application may include one or more of the following: piecewise function relationships, linear interpolation relationships, and ambient lighting mapping relationships. Specifically, a piecewise function relationship refers to using different target brightness mapping rules according to different light intensity ranges to form piecewise function characteristics. A linear interpolation relationship ensures a smooth transition of target brightness values ​​between adjacent lighting environments, avoiding abrupt brightness changes. An ambient lighting mapping relationship establishes an inverse proportional function relationship between target brightness values ​​and ambient light intensity; that is, the stronger the ambient light, the lower the target brightness setting, and vice versa.

[0088] Based on the multiple sets of target brightness values ​​in the embodiments of this application, target brightness can be selected. For example, in exposure parameter control, the target brightness value corresponding to the current lighting environment can be the target brightness selected from multiple sets of target brightness values, which can be called the current target brightness, such as a specific value in a pre-configured set of face brightness values ​​{M1, M2, M3, ..., Mn}.

[0089] The selection of the target brightness value can be determined based on the current lighting conditions. For example, the electronic device can select the most suitable brightness value from a set of preset target brightness values ​​based on the real-time detected ambient lighting conditions. For instance, when an extremely bright light environment is detected, the lowest target brightness value M1 is selected; when a strong light environment is detected, a lower target brightness value M2 is selected; when a normal light environment is detected, a medium target brightness value M3 is selected; when a weak light environment is detected, a higher target brightness value M4 is selected; and when an extremely weak light environment is detected, the highest target brightness value M5 is selected. This application does not limit this selection.

[0090] The above embodiments of this application propose a target brightness configuration strategy, which selects a suitable Mn value from a preset set as the target brightness according to the environmental category (strong light / weak light, etc.), and can also be used in conjunction with an ambient light sensor to achieve real-time matching.

[0091] This application proposes a parameter optimization mechanism. In one embodiment, face recognition is performed on the current image, including: during the face recognition process, if the execution condition of exposure parameter control is triggered, then exposure parameter control is executed; the execution condition includes one or more of the following conditions: the brightness of the face in the current image deviates from the target brightness value corresponding to the current lighting environment, or the current image is overexposed or underexposed.

[0092] Specifically, during the face recognition process, when the execution conditions for exposure parameter control are triggered, the electronic device can perform exposure parameter control. The execution conditions include, but are not limited to, the brightness of the face in the current image deviating from the target brightness value corresponding to the current lighting environment, and the current image being overexposed or underexposed.

[0093] The statement that the brightness of the face in the current image deviates from the target brightness value corresponding to the current lighting environment can refer to a situation where the face brightness is within the normal exposure range, but still deviates from the target brightness by a certain range.

[0094] The image processing decision in this application can refer to executing differentiated processing strategies based on real-time face brightness analysis results. Specifically, the electronic device only performs face recognition when the face brightness is within the normal exposure range in the first operating mode (e.g., normal mode). During the face recognition process, abnormal state handling and normal state optimization can be performed.

[0095] Optionally, abnormal state handling can refer to pausing face recognition processing and re-estimating better exposure parameters when the face brightness is abnormal (underexposed or overexposed); normal state optimization can refer to continuing to optimize exposure parameters even if the current image is within the normal exposure range, if the actual brightness deviates significantly from the target brightness, so that the image quality gradually approaches the optimal state.

[0096] The aforementioned face recognition methods, even if the face image meets basic recognition requirements, will still perform fine-tuning if the brightness deviates too much from the target. This application enables intelligent parameter optimization by establishing a complete closed-loop feedback system to dynamically adjust the processing strategy based on the face brightness status.

[0097] In one embodiment, when the difference between the face brightness and the target brightness value corresponding to the current lighting environment is greater than a brightness difference threshold, it is determined that the face brightness deviates from the target brightness value corresponding to the current lighting environment. Specifically, this application can determine the degree to which the face brightness deviates from the target brightness using a brightness difference threshold. For example, it can be determined by absolute value judgment, setting a fixed brightness difference threshold, such as when |L0 - target brightness| > 30, it is determined that the deviation is large. It should be noted that the specific judgment criteria for the degree to which the face brightness deviates from the target brightness need to be determined based on the actual application scenario and device performance to ensure both image quality and avoid over-adjustment affecting recognition speed.

[0098] In some embodiments, in the second working mode, the exposure parameters are determined based on multiple sets of target brightness values ​​related to the lighting environment, including: in the second working mode, the exposure parameters are obtained by estimation based on the difference between the face brightness of the current image and the target brightness value corresponding to the current lighting environment.

[0099] Specifically, taking abnormal state handling as an example, when underexposure or overexposure of the current image is detected, face recognition processing is paused, and exposure parameters can be intelligently estimated and adjusted based on the difference between the current target brightness and the actual brightness (i.e., the actual face brightness, such as the average brightness L0 in the face area). As another example, taking normal state optimization, when the face brightness is within normal exposure but still deviates from the target brightness by a certain range (e.g., |L0−target brightness|>30), the exposure parameters are further optimized.

[0100] The specific process of intelligently estimating and adjusting exposure parameters may include: based on the current exposure parameters, estimating an optimal combination of exposure parameters suitable for the current environmental conditions by calculating the difference between the current target brightness and the actual face brightness.

[0101] Furthermore, the specific process of further optimizing exposure parameters may include: when the current brightness L0 (i.e., the average brightness L0 within the face area) is detected to be within the normal exposure range (i.e., T1≤L0≤T2), the electronic device can perform face recognition processing on the current image. However, during face recognition processing, if a significant deviation is found between the current brightness L0 and the target brightness in the current environment, the electronic device can still estimate more suitable exposure parameters based on this brightness difference. Through the above parallel processing mechanism, this embodiment of the application can continuously optimize the exposure parameter settings without affecting the current recognition task, thereby gradually bringing the quality of subsequently acquired face images closer to the optimal state, further improving recognition accuracy and image quality.

[0102] In one embodiment, the method further includes: if historical exposure parameters exist, using the historical exposure parameters as the initial exposure value; if no historical exposure parameters exist, using the initial default exposure value as the initial exposure value. Specifically, regarding the use of historical exposure parameters, in exposure parameter optimization, the electronic device can use historical exposure parameters as the initial exposure value. When no historical exposure parameters exist, the electronic device can use the initial default exposure value as the initial exposure value.

[0103] To further illustrate the scheme of this application, a specific example is given below, taking the first working mode as the normal mode and the second working mode as the pixel merging mode as an example, such as... Figure 4As shown, the face recognition process may include: initially configuring the image acquisition device to normal mode and switching to manual exposure mode to check if historical exposure parameters exist; if they exist, loading the historical exposure parameters as the initial exposure value; if they do not exist, using the initial default exposure value. If the face brightness is underexposed / overexposed in normal mode, the current exposure parameters are converted to exposure parameters in pixel-merging mode, and the image acquisition device is switched to pixel-merging mode; when the face brightness is at normal exposure, face recognition is performed directly; when the face brightness and target brightness exceed a certain range, the exposure parameters are further optimized; in pixel-merging mode, based on the current exposure parameters, the new exposure parameters are estimated according to the difference between the target brightness and the current face brightness; when the face brightness returns to normal exposure, the exposure parameters are mapped back to normal mode, and the process switches back to normal mode to continue image acquisition.

[0104] Furthermore, if the face brightness is normal in normal mode, face recognition is performed. However, if the face brightness exceeds a certain range from the target brightness, the exposure parameters are further optimized. If the face brightness is overexposed or underexposed, face recognition processing is paused, and better exposure parameters are re-estimated. The optimized and verified exposure parameters are saved to the storage medium. When face recognition is initiated next time, the image is adjusted using the stored exposure parameters to speed up the unlocking process.

[0105] The dual-mode switching logic can include: 1) When the face brightness is abnormal (underexposed or overexposed) in normal mode and historical exposure parameters exist, the historical exposure parameters can be converted into exposure parameters in pixel merging mode. Furthermore, the image acquisition device is switched to pixel merging mode. Compared with normal mode, this mode can significantly improve the frame rate by reducing the resolution and significantly accelerate the exposure convergence process by utilizing the high frame rate image feedback mechanism to achieve fast and stable brightness adjustment; 2) In pixel merging mode, based on the current exposure parameters, the new exposure parameters are estimated and adjusted by calculating the difference between the target face brightness and the current face brightness to achieve precise control of face brightness; 3) If the face brightness returns to normal exposure in pixel merging mode, its exposure parameters are mapped back to normal mode, and the acquisition is switched back to normal mode.

[0106] It should be noted that regarding the dual-mode switching mechanism in this application, when the face brightness is abnormal in normal mode and there are available historical exposure parameters, the system switches to pixel merging mode for rapid parameter adjustment; in pixel merging mode, new exposure parameters are estimated based on the current brightness difference; after normal exposure is achieved, the parameters are switched back to normal mode to restore high-definition acquisition; during the conversion process, the lookup table obtained from calibration is used to ensure a smooth brightness transition.

[0107] like Figure 5As shown, the exposure parameter memory reuse mechanism can include: starting the face recognition process, initially configuring the image acquisition device to normal mode and switching to manual exposure, checking whether historical exposure parameters exist, and if so, loading the historical exposure parameters as the initial exposure value; if not, using the initial default exposure value; selecting the most suitable target brightness based on the current lighting conditions, and estimating new exposure parameters to adjust the image based on the difference between the target brightness and the face brightness; and updating the optimized and verified exposure parameters to the storage medium after face recognition is completed.

[0108] like Figure 6 The diagram illustrates the exposure parameter conversion process between normal mode and pixel binning mode. This process may include: initially configuring the image acquisition device to normal mode and switching to manual exposure to check for historical exposure parameters; if present, loading these parameters as the initial exposure value; otherwise, using the initial default exposure value. Further, in normal mode, the average brightness of the face area is calculated. If the brightness is underexposed / overexposed, the current exposure parameters are converted to those for pixel binning mode, and the image acquisition device is switched to pixel binning mode. In pixel binning mode, based on the current lighting conditions, the most suitable target brightness is selected, and the new exposure parameters are estimated and adjusted based on the difference between the target brightness and the face brightness. When the face brightness exposure is normal in pixel binning mode, the current exposure parameters are mapped back to those for normal mode, and the image acquisition device is switched back to normal mode to continue acquiring images.

[0109] In summary, the embodiments of this application have achieved intelligent management of exposure parameters by constructing a complete closed-loop feedback optimization system, which significantly improves the user experience while ensuring recognition accuracy.

[0110] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0111] Based on the same inventive concept, this application also provides a face recognition device for implementing the face recognition method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more face recognition device embodiments provided below can be found in the limitations of the face recognition method described above, and will not be repeated here.

[0112] In one exemplary embodiment, such as Figure 7 As shown, a face recognition device is provided, comprising:

[0113] Image acquisition unit 901 is used to acquire the current image, which is obtained by the image acquisition device in the first working mode using manual exposure.

[0114] The face recognition unit 902 is used to perform face recognition on the current image if the current image meets the recognition conditions;

[0115] The parameter control unit 903 is used to convert the current exposure parameters to the exposure parameters in the second working mode and switch the image acquisition device to the second working mode when the current image does not meet the recognition conditions, so as to perform exposure parameter control until the current image is properly exposed, convert the current exposure parameters to the exposure parameters in the first working mode, and switch the image acquisition device to the first working mode; the frame rate of the second working mode is higher than the frame rate of the first working mode.

[0116] In one embodiment, the first operating mode includes a normal mode; the second operating mode includes a pixel merging mode.

[0117] In one embodiment, when the image acquisition device is in a first working mode and the brightness of the face in the current image is within the normal range, it is determined that the current image meets the recognition conditions.

[0118] In one embodiment, the face brightness includes the average brightness of the face region; the device further includes an exposure state determination unit, configured to determine the current image's exposure state as underexposed when the average brightness of the face region is less than a first brightness threshold; determine the current image's exposure state as normally exposed when the average brightness of the face region is greater than or equal to the first brightness threshold and less than or equal to a second brightness threshold; and determine the current image's exposure state as overexposed when the average brightness of the face region is greater than the second brightness threshold.

[0119] In one embodiment, the device further includes a parameter saving and recalling unit, which is used to save the exposure parameters of the current face recognition and obtain historical exposure parameters when the current face recognition of the current image is completed; and to recall the historical exposure parameters for face recognition in the next face recognition.

[0120] In one embodiment, the parameter saving and recall unit is used to select the most recently saved historical exposure parameters when the ambient light intensity is not obtained, and to select the historical exposure parameters corresponding to the ambient light intensity when the ambient light intensity is obtained.

[0121] In one embodiment, the current exposure parameters are converted into exposure parameters in the second working mode and into exposure parameters in the first working mode through an exposure parameter mapping relationship; wherein the exposure parameter mapping relationship is obtained through a lookup table established by pre-calibration.

[0122] In one embodiment, the exposure parameter control includes determining exposure parameters based on multiple sets of target brightness values ​​related to the lighting environment in a second operating mode; the configuration rules for the multiple sets of target brightness values ​​include one or more of environmental classification configuration, empirical value setting, and device characteristic adaptation; and the target brightness values ​​in the multiple sets of target brightness values ​​satisfy a preset relationship.

[0123] In one embodiment, the environment classification configuration includes extremely strong light environment, strong light environment, normal light environment, weak light environment, and extremely weak light environment, each corresponding to different target brightness values; the empirical value setting includes determining the target brightness value based on experimental data and human visual characteristics; the device characteristic adaptation includes optimizing the target brightness value according to the characteristic curve of the image acquisition device until the target brightness value falls into the target working range of the image acquisition device; the preset relationship includes one or more of the following: piecewise function relationship, linear interpolation relationship, and ambient lighting mapping relationship.

[0124] In one embodiment, the face recognition unit 902 is further configured to execute exposure parameter control if the execution conditions for exposure parameter control are triggered during the face recognition process; the execution conditions include one or more of the following conditions: the brightness of the face in the current image deviates from the target brightness value corresponding to the current lighting environment, or the current image is overexposed or underexposed.

[0125] In one embodiment, when the difference between the face brightness and the target brightness value corresponding to the current lighting environment is greater than the brightness difference threshold, it is determined that the face brightness deviates from the target brightness value corresponding to the current lighting environment.

[0126] In one embodiment, in the second operating mode, the exposure parameters are determined based on multiple sets of target brightness values ​​related to the lighting environment, including: in the second operating mode, the exposure parameters are obtained by estimation based on the difference between the face brightness of the current image and the target brightness value corresponding to the current lighting environment.

[0127] In one embodiment, the apparatus further includes an initial exposure unit, configured to use historical exposure parameters as the initial exposure value when such historical exposure parameters exist, and to use an initial default exposure value as the initial exposure value when such historical exposure parameters do not exist.

[0128] The modules in the aforementioned face recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.

[0129] In one exemplary embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, this electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a facial recognition method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the electronic device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the electronic device, or external keyboards, touchpads, or mice, etc.

[0130] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0131] In one embodiment, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0132] It is understood that this application also provides a system architecture implementation, such as a corresponding electronic device implementation scheme, including a memory, a processor, an image acquisition module, and a parameter management module. The memory is used for data storage, saving various parameters and data required for system operation, including preset brightness thresholds, target brightness parameter sets, and historically optimized exposure parameters, providing data for face recognition. The processor, as the core control unit, can be configured as a face recognition processing unit, responsible for executing the complete exposure parameter optimization and face recognition process. The processor undertakes the main computation and decision-making tasks, controlling the execution of the entire recognition process. The image acquisition module provides image acquisition functionality; it can be a camera component that supports manual exposure control, or a camera component that supports both manual exposure control and dual-mode switching. The image acquisition module can be used to acquire face images according to the set exposure parameters, providing image input for subsequent recognition processing. The parameter management module is used for managing exposure parameters, including dynamic adjustment, storage, and retrieval functions. It is understood that the parameter management module is a dedicated function for parameter management.

[0133] Furthermore, the memory is used for data storage, the processor is used for overall control and calculation, the image acquisition module is used to execute image acquisition tasks, and the parameter management module is used to manage exposure parameters, working in conjunction with the processor and relying on the processor's calculation results to perform specific parameter adjustment operations.

[0134] This application embodiment achieves intelligent management of exposure parameters by constructing a complete closed-loop feedback optimization system, which significantly improves the user experience while ensuring recognition accuracy.

[0135] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0136] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0137] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0138] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0139] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A face recognition method, characterized in that, The method includes: Acquire the current image, which is obtained by the image acquisition device in the first working mode using manual exposure; If the current image meets the recognition conditions, perform face recognition on the current image; If the current image does not meet the recognition conditions, the current exposure parameters are converted to the exposure parameters in the second working mode, and the image acquisition device is switched to the second working mode to perform exposure parameter control until the current image is properly exposed. Then, the current exposure parameters are converted to the exposure parameters in the first working mode, and the image acquisition device is switched to the first working mode. The frame rate of the second working mode is higher than that of the first working mode.

2. The method according to claim 1, characterized in that, The first working mode includes a normal mode; the second working mode includes a pixel merging mode.

3. The method according to claim 1, characterized in that, When the image acquisition device is in the first working mode and the brightness of the face in the current image is within the normal range, it is determined that the current image meets the recognition conditions.

4. The method according to claim 3, characterized in that, The face brightness includes the average brightness of the face region; the method further includes: When the average brightness of the face region is less than the first brightness threshold, the current image is determined to be underexposed. When the average brightness of the face region is greater than or equal to the first brightness threshold and the average brightness of the face region is less than or equal to the second brightness threshold, the exposure state of the current image is determined to be a normal exposure state. When the average brightness of the face region is greater than the second brightness threshold, the current image is determined to be overexposed.

5. The method according to claim 1, characterized in that, The method further includes: Once the face recognition of the current image is completed, the exposure parameters of the current face recognition are saved to obtain the historical exposure parameters; In the next face recognition operation, the historical exposure parameters will be used to perform face recognition.

6. The method according to claim 5, characterized in that, Using the historical exposure parameters for face recognition includes: If the ambient light intensity is not obtained, select the most recently saved historical exposure parameters; Once the ambient light intensity is obtained, select the historical exposure parameters corresponding to that ambient light intensity.

7. The method according to claim 1, characterized in that, By mapping the exposure parameters, the current exposure parameters are converted into exposure parameters in the second working mode, and the current exposure parameters are converted into exposure parameters in the first working mode. The exposure parameter mapping relationship is obtained through a lookup table established by pre-calibration.

8. The method according to any one of claims 1 to 7, characterized in that, The exposure parameter control includes determining the exposure parameters based on multiple sets of target brightness values ​​related to the lighting environment in the second working mode; The configuration rules for the multiple sets of target brightness values ​​include one or more of environmental classification configuration, empirical value setting, and device characteristic adaptation; the target brightness values ​​in the multiple sets of target brightness values ​​satisfy a preset relationship.

9. The method according to claim 8, characterized in that, The environmental classification configuration includes extremely strong light environment, strong light environment, normal light environment, weak light environment, and extremely weak light environment, each corresponding to different target brightness values; the empirical value setting includes determining the target brightness value based on experimental data and the characteristics of human visual perception; the device characteristic adaptation includes optimizing the target brightness value according to the characteristic curve of the image acquisition device until the target brightness value falls into the target working range of the image acquisition device. The preset relationship includes one or more of the following: piecewise function relationship, linear interpolation relationship, and ambient lighting mapping relationship.

10. The method according to claim 8, characterized in that, Performing face recognition on the current image includes: During the face recognition process, if the execution condition of the exposure parameter control is triggered, the exposure parameter control will be executed; the execution condition includes one or more of the following conditions: the brightness of the face in the current image deviates from the target brightness value corresponding to the current lighting environment, or the current image is overexposed or underexposed.

11. The method according to claim 10, characterized in that, If the difference between the face brightness and the target brightness value corresponding to the current lighting environment is greater than the brightness difference threshold, then the face brightness is determined to deviate from the target brightness value corresponding to the current lighting environment.

12. The method according to claim 8, characterized in that, In the second working mode, exposure parameters are determined based on multiple sets of target brightness values ​​related to the lighting environment, including: In the second working mode, the exposure parameters are estimated based on the difference between the face brightness of the current image and the target brightness value corresponding to the current lighting environment.

13. The method according to claim 12, characterized in that, The method further includes: If historical exposure parameters exist, use those parameters as the initial exposure value. If no historical exposure parameters exist, the initial default exposure value will be used as the initial exposure value.

14. A face recognition device, characterized in that, The device includes: The image acquisition unit is used to acquire the current image, which is obtained by the image acquisition device in the first working mode using a manual exposure method; A face recognition unit is used to perform face recognition on the current image if the current image meets the recognition conditions; The parameter control unit is used to convert the current exposure parameters to the exposure parameters in the second working mode and switch the image acquisition device to the second working mode when the current image does not meet the recognition conditions, so as to perform exposure parameter control until the current image is properly exposed, convert the current exposure parameters to the exposure parameters in the first working mode, and switch the image acquisition device to the first working mode; the frame rate of the second working mode is higher than the frame rate of the first working mode.

15. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.