Brightness adjustment method and device of light supplement lamp, computer device and storage medium

CN116129481BActive Publication Date: 2026-06-16JINAN YUSHI INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN YUSHI INTELLIGENT TECH CO LTD
Filing Date
2021-11-12
Publication Date
2026-06-16

Smart Images

  • Figure CN116129481B_ABST
    Figure CN116129481B_ABST
Patent Text Reader

Abstract

The application discloses a light supplement lamp brightness adjusting method and device, computer equipment and a storage medium. The method comprises the following steps: if it is determined that the score values of two continuous living body detections are all less than a living body detection score threshold value, then a living body detection score difference value between the current living body detection and the last living body detection is determined, wherein the brightness of the light supplement lamp in the current living body detection is different from that in the last living body detection; the score value of the current living body detection and the living body detection score difference value are input into a fuzzy controller to obtain a current increment output by the fuzzy controller; and the light supplement lamp current value of the next living body detection is determined according to the current increment, so as to adjust the brightness of the light supplement lamp in the next living body detection. The technical scheme of the application can realize the rapid adjustment of the brightness of the light supplement lamp and has applicability to various environmental brightness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the fields of data processing and face recognition technology, and in particular to a method, device, computer equipment, and storage medium for adjusting the brightness of a fill light. Background Technology

[0002] As facial recognition technology continues to improve, the security requirements for it are also increasing. A liveness detection process has been incorporated into facial recognition technology to verify whether the user is indeed a living person. The accuracy of liveness detection is related to image quality, which is limited by ambient brightness.

[0003] In existing technologies, the overall ambient brightness is adjusted by regulating the brightness of the fill light. This is achieved through 3A technology—Automatic Focus (AF), Automatic Exposure (AE), and Automatic White Balance (AWB)—to adjust the fill light brightness and thus improve image quality. However, existing fill light brightness adjustment methods fix the fill light at high brightness, resulting in varying effects on different ambient brightness levels, such as front lighting, backlighting, low illumination, and high illumination. Consequently, the adjusted overall ambient brightness may not be suitable for liveness detection. Summary of the Invention

[0004] This invention provides a method, apparatus, computer device, and storage medium for adjusting the brightness of a fill light, enabling rapid adjustment of the fill light's brightness and making it applicable to various ambient brightness levels.

[0005] In a first aspect, embodiments of the present invention provide a method for adjusting the brightness of a supplementary light, the method comprising:

[0006] If it is determined that the scores of two consecutive liveness detections are both less than the liveness detection score threshold, then the difference in liveness detection scores between the current liveness detection and the previous liveness detection is determined.

[0007] Among them, the brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection;

[0008] The current liveness detection score and the difference in liveness detection scores are input into the fuzzy controller to obtain the current increment output by the fuzzy controller.

[0009] The current value of the supplementary light for the next liveness detection is determined based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

[0010] Secondly, embodiments of the present invention also provide a brightness adjustment device for a supplementary light, the device comprising:

[0011] The liveness detection score difference determination module is used to determine the liveness detection score difference between the current liveness detection and the previous liveness detection if the scores of two consecutive liveness detections are both less than the liveness detection score threshold.

[0012] Among them, the brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection;

[0013] The current increment determination module is used to input the current liveness detection score and the difference between the liveness detection scores into the fuzzy controller to obtain the current increment output by the fuzzy controller.

[0014] The brightness adjustment module is used to determine the supplementary light current value for the next liveness detection based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

[0015] Thirdly, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the brightness adjustment method of the fill light as described in any of the embodiments of the present invention.

[0016] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a brightness adjustment method for a fill light as described in any of the embodiments of the present invention.

[0017] This invention, in its embodiments, obtains the current liveness detection score and the difference between the current and previous scores when two consecutive liveness detections fail. This score and score difference are then input into a fuzzy controller. Based on the current increment output by the fuzzy controller, the supplementary light current value for the next liveness detection is determined, thus adjusting the supplementary light brightness for the next liveness detection. This solves the problem in existing liveness detection methods where the supplementary light brightness is fixed at high, and the adjusted ambient brightness may not be suitable for liveness detection, affecting accuracy. The invention achieves rapid adjustment of the supplementary light brightness and is applicable to various ambient brightness levels, thereby improving liveness detection accuracy. Attached Figure Description

[0018] Figure 1 This is a flowchart of a method for adjusting the brightness of a supplementary light according to Embodiment 1 of the present invention;

[0019] Figure 2a This is a flowchart of a method for adjusting the brightness of a supplementary light according to Embodiment 2 of the present invention;

[0020] Figure 2bThis is a schematic diagram of a membership function between a fractional value and a current increment in Embodiment 2 of the present invention;

[0021] Figure 3 This is a schematic diagram of the structure of a brightness adjustment device for a supplementary light according to Embodiment 3 of the present invention;

[0022] Figure 4 This is a schematic diagram of the structure of a computer device according to Embodiment 4 of the present invention. Detailed Implementation

[0023] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0024] Example 1

[0025] Figure 1 This is a flowchart of a method for adjusting the brightness of a fill light according to Embodiment 1 of the present invention. This embodiment can be applied to situations where the brightness of the fill light is adjusted for supplementary lighting during liveness detection in face recognition. The method can be executed by a brightness adjustment device for the fill light, which can be implemented by software and / or hardware and is generally integrated into a computer device for use in conjunction with the fill light.

[0026] like Figure 1 As shown, the technical solution of this embodiment of the invention specifically includes the following steps:

[0027] S110. If it is determined that the scores of two consecutive liveness detections are both less than the liveness detection score threshold, then determine the difference in liveness detection scores between the current liveness detection and the previous liveness detection.

[0028] The brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection.

[0029] In this embodiment of the invention, the score for liveness detection can be represented by the liveness detection score output by the liveness detection model, or the optimal average brightness of the video or image to be detected can be preset, and a score can be calculated based on the average brightness of the video or image in the liveness detection and the optimal average brightness. This embodiment does not impose any restrictions on this.

[0030] Taking the liveness detection score as an example, if the scores for two consecutive liveness detections are both below the liveness detection score threshold, it means that the user has failed the liveness detection twice. To avoid the influence of unsuitable ambient lighting on the liveness detection results, the brightness of the supplementary lighting needs to be adjusted to regulate the ambient lighting.

[0031] In this embodiment of the invention, when a user fails the liveness detection twice in a row, the difference between the current liveness detection score and the previous liveness detection score is calculated, and the brightness of the supplementary light is adjusted according to the difference in liveness detection score, which can improve the positive detection rate of liveness detection.

[0032] S120. Input the current liveness detection score and the difference in liveness detection scores into the fuzzy controller to obtain the current increment output by the fuzzy controller.

[0033] A fuzzy controller is a type of control that mimics human control. In controlling a controlled object, it typically makes decisions based on the deviation between the setpoint and the controlled variable, the change in deviation, and the rate of change of deviation. In this embodiment of the invention, a fuzzy controller is pre-set to control the current increment of the supplementary lighting lamp based on the liveness detection score. The current liveness detection score, and the difference between the current and previous liveness detection scores, are used as the controller's inputs, and the current increment is used as the controller's output.

[0034] In this embodiment of the invention, since there is a correlation between the increase in the fill light current and the brightness of the fill light, a fuzzy rule between the liveness detection score and the increase in the fill light current is established through a fuzzy control algorithm. The increase in the fill light current is controlled by the liveness detection score, thereby controlling the brightness of the fill light and improving the positive detection rate of liveness detection.

[0035] S130. Determine the supplementary light current value for the next liveness detection based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

[0036] Specifically, the sum of the current value of the supplementary light for the current detection and the current increment can be used as the supplementary light current value for the next current detection.

[0037] This invention controls the brightness of the supplementary light during the next liveness detection by using the liveness detection score. This allows for a more direct utilization of the hidden relationship between the liveness detection score and the supplementary light brightness, thereby improving the positive detection rate. Simultaneously, this embodiment achieves gradual adjustment of the supplementary light brightness through the liveness detection score, quickly adjusting the brightness to a suitable level. Compared to the prior art's method of directly fixing the supplementary light to high brightness, this significantly reduces the supplementary light's power consumption.

[0038] The technical solution of this embodiment obtains the current liveness detection score and the difference between the current and previous scores when two consecutive liveness detections fail. This score and score difference are then input into a fuzzy controller. Based on the current increment output by the fuzzy controller, the supplementary light current value for the next liveness detection is determined, thus adjusting the supplementary light brightness for the next liveness detection. This solves the problem in existing liveness detection methods where the supplementary light brightness is fixed at high brightness, and the adjusted ambient brightness may not be suitable for liveness detection, affecting accuracy. The solution achieves rapid adjustment of the supplementary light brightness and is applicable to various ambient brightness levels, thereby improving liveness detection accuracy.

[0039] Example 2

[0040] Figure 2a This is a flowchart of a method for adjusting the brightness of a supplementary light according to Embodiment 2 of the present invention. Based on the above embodiments, the present invention further specifies the process of the fuzzy controller determining the current increment, and adds a step of adjusting the brightness of the supplementary light for the second liveness detection according to the initial value of the circuit increment after the first liveness detection fails.

[0041] Correspondingly, such as Figure 2a As shown, the technical solution of this embodiment of the invention specifically includes the following steps:

[0042] S210. Determine whether the score of the first liveness detection is less than the liveness detection score threshold. If yes, execute S220; otherwise, execute S2100.

[0043] If the score is greater than or equal to the liveness detection score threshold during the first liveness detection, it means that the ambient brightness of the first liveness detection meets the requirements of liveness detection. At this time, there is no need to adjust the brightness, and subsequent face recognition can be performed directly.

[0044] If the score of the first liveness detection is less than the liveness detection score threshold, it means that the ambient brightness of the first liveness detection does not meet the requirements of liveness detection. It is necessary to determine the adjustment direction and magnitude of the supplementary light current and conduct a second liveness detection.

[0045] S220. The sum of the supplementary light current value of the first liveness detection and the initial value of the current increment is used as the supplementary light current value of the second liveness detection.

[0046] The initial value of the current increment can be positive or negative. Its purpose is to create a difference in the supplementary light current values ​​between the first and second liveness detections, thus resulting in a difference in the scores of the two liveness detections. Therefore, this embodiment does not restrict the sign of the initial current increment. Specifically, when the score of the first liveness detection is less than the liveness detection score threshold, if the adjustment direction of the supplementary light current is determined to be increasing, the initial current increment is positive; if the adjustment direction is determined to be decreasing, the initial current increment is negative. It should be noted that the supplementary light can be turned on or off during the first liveness detection. Specifically, a daytime mode and a nighttime mode can be set for liveness detection. When the detection time exceeds a preset time point, the liveness detection mode is switched. When the liveness detection is in nighttime mode, the first liveness detection is set to turn on the supplementary light, and the initial value of the supplementary light current is set.

[0047] When the supplementary light is turned on for the first liveness detection, the supplementary light current value for the second liveness detection is the sum of the initial value of the supplementary light current and the initial value of the current increment. When the supplementary light is not turned on for the first liveness detection, the supplementary light current value for the first liveness detection is zero, and the supplementary light current value for the second liveness detection is the initial value of the current increment. This embodiment does not restrict whether the supplementary light is turned on during the first liveness detection.

[0048] S230. Determine whether the scores of two consecutive liveness detections are both less than the liveness detection score threshold. If yes, execute S240; otherwise, execute S2100.

[0049] If the scores of the current liveness detection and the previous liveness detection are both less than the liveness detection score threshold, and the number of liveness detections is less than the preset number, then the brightness of the supplementary light will be adjusted according to the liveness detection scores.

[0050] S240. Determine whether the number of liveness detections is less than the preset number. If yes, execute S250; otherwise, execute S2100.

[0051] In this embodiment of the invention, if the liveness detection still fails after reaching the preset upper limit number of times, the brightness adjustment of the supplementary light will no longer be performed, and the liveness detection is considered to have failed.

[0052] S250. Determine the difference in liveness detection score between the current liveness detection and the previous liveness detection.

[0053] The difference in liveness detection scores can be positive or negative; this embodiment does not impose any restrictions on this.

[0054] S260. Quantize the current liveness detection score and the liveness detection score difference to obtain the quantized score value and the quantized score difference value.

[0055] Correspondingly, S260 may include:

[0056] S261. Quantify the current liveness detection score based on the liveness detection score quantization factor to obtain the quantized score value.

[0057] The quantization factor for the liveness detection score is the ratio of the maximum value of the score range to the maximum value of the quantized score range.

[0058] Specifically, the quantification factor for the liveness detection score can be determined using the following formula:

[0059]

[0060] Among them, K H H is the quantification factor for the liveness detection score. max h is the maximum value in the interval of fraction values. max This represents the maximum value within the range of quantized values ​​for the fraction.

[0061] For example, the liveness detection score can be quantized from [0,100] to [0,3], with a universe of discourse of {0,1,2,3}. The quantization factor of the liveness detection score is the ratio of the maximum value of the score range to the maximum value of the quantization range.

[0062] S262. Quantify the liveness detection score difference according to the liveness detection score difference quantization factor to obtain the score difference quantization value.

[0063] Specifically, when the difference in liveness detection scores is less than zero, the quantization factor for the difference in liveness detection scores is negative; when the difference in liveness detection scores is greater than or equal to zero, the quantization factor for the difference in liveness detection scores is positive.

[0064] Specifically, the quantization factor for the difference in liveness detection scores can be determined using the following formula:

[0065]

[0066] Among them, K ΔH ΔH represents the quantization factor for the difference in liveness detection scores.

[0067] For example, the difference in liveness detection scores can be quantized as -1,1, with a universe of discourse of {-1,1}, where the difference in liveness detection scores is quantized as 1 when it is greater than or equal to zero, and as -1 when it is less than zero.

[0068] S270. Calculate the membership degree based on the current liveness detection score and the membership function between the score and the current increment.

[0069] Among them, the membership function between the fractional value and the current increment is a triangular membership function.

[0070] Specifically, the current increment is also quantized to [-3,3], with a universe of discourse of {NB,NM,NS,ZO,PS,PM,PB}. Figure 2b A schematic diagram of the membership function between the fractional value and the current increment is provided, such as... Figure 2b As shown, the membership function between the score value and the current increment is a trigonometric function. Since the liveness detection score difference is quantized to -1 or 1 in this embodiment of the invention, the direction of the current increment can be determined based on the sign of the liveness detection score difference. Therefore, the membership function of the triangle only needs to be set in the first quadrant.

[0071] Based on the membership function, the fuzzy rule table shown in Table 1 below can be obtained:

[0072] Table 1

[0073]

[0074] In this embodiment of the invention, the difference in liveness detection scores is directly quantized as -1,1, and no membership function is designed for the difference in liveness detection scores. This reduces the amount of computation, enables the fuzzy control algorithm to converge quickly, and allows for faster adjustment of the supplementary light brightness, thereby improving the positive detection rate of liveness detection.

[0075] S280. Calculate the current increment based on the fractional quantized value, the fractional difference quantized value, and the membership degree.

[0076] Specifically, the product of the current increment quantization factor, the fractional quantization value, the fractional difference quantization value, and the membership degree is used as the current increment;

[0077] The current increment quantization factor is the ratio of the maximum value of the current increment interval to the maximum value of the current increment quantization value interval.

[0078] Specifically, the current increment can be calculated using the following defuzzification function:

[0079]

[0080] Where ΔI is the current increment, K ΔI It is the current increment quantization factor. It is the quantized value of the score difference, ΔH is the score difference of the liveness detection, and K ΔHThis is the quantification factor for the difference in liveness detection scores, where g(k) is the membership degree of the current liveness detection score, and k is the number of liveness detections. H is the score quantization value, where H is the current score for liveness detection, and K is the score for liveness detection. H It is a quantification factor for the liveness detection score.

[0081] S290. Determine the supplementary light current value for the next liveness detection based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

[0082] The sum of the current increment output by the fuzzy controller and the current value of the supplementary light for the current detection of liveness is used as the supplementary light current value for the next liveness detection. Supplementary light is applied based on the supplementary light current value for the next liveness detection, and the next liveness detection is performed. This process continues until a preset upper limit is reached. If the liveness detection score is greater than or equal to the liveness detection score threshold, the liveness detection is considered successful.

[0083] S2100, End.

[0084] The technical solution of this embodiment obtains the current liveness detection score and the difference between the current and previous scores when two consecutive liveness detections fail. These scores and differences are then input into a fuzzy controller for quantification. The membership degree between the liveness detection score and the current increment is calculated, and defuzzification is performed using a defuzzification function. The current increment is then summed with the current value of the supplementary lighting for the next liveness detection, thus adjusting the supplementary lighting brightness for the next liveness detection. This solves the problem in existing liveness detection methods where the supplementary lighting brightness is fixed at high brightness, and the adjusted ambient brightness may not be suitable for liveness detection, affecting accuracy. The solution achieves rapid adjustment of the supplementary lighting brightness, is applicable to various ambient brightness levels, and thus improves the accuracy of liveness detection.

[0085] Example 3

[0086] Figure 3 This is a schematic diagram of a brightness adjustment device for a supplementary light according to Embodiment 3 of the present invention. The device includes: a liveness detection fraction difference determination module 310, a current increment determination module 320, and a brightness adjustment module 330. This device can be deployed in a computer device and used in conjunction with a supplementary light. Wherein:

[0087] The liveness detection score difference determination module 310 is used to determine the liveness detection score difference between the current liveness detection and the previous liveness detection if the scores of two consecutive liveness detections are both less than the liveness detection score threshold.

[0088] Among them, the brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection;

[0089] The current increment determination module 320 is used to input the current liveness detection score and the difference in liveness detection scores into the fuzzy controller to obtain the current increment output by the fuzzy controller.

[0090] The brightness adjustment module 330 is used to determine the supplementary light current value for the next liveness detection based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

[0091] The technical solution of this embodiment obtains the current liveness detection score and the difference between the current and previous scores when two consecutive liveness detections fail. This score and score difference are then input into a fuzzy controller. Based on the current increment output by the fuzzy controller, the supplementary light current value for the next liveness detection is determined, thus adjusting the supplementary light brightness for the next liveness detection. This solves the problem in existing liveness detection methods where the supplementary light is fixed at high brightness, and the adjusted ambient brightness may not be suitable for liveness detection, affecting accuracy. The solution achieves rapid adjustment of the supplementary light brightness, is applicable to various ambient brightness levels, and thus improves the accuracy of liveness detection.

[0092] Based on the above embodiments, the current increment determination module 320 includes:

[0093] The numerical quantization unit is used to quantize the current liveness detection score and the liveness detection score difference, respectively, to obtain the quantized score value and the quantized score difference value.

[0094] The membership calculation unit is used to calculate the membership degree based on the current liveness detection score and the membership function between the score and the current increment.

[0095] The current increment calculation unit is used to calculate the current increment based on the fractional quantized value, the fractional difference quantized value, and the membership degree.

[0096] Based on the above embodiments, the numerical quantization unit is specifically used for:

[0097] The current liveness detection score is quantized based on the liveness detection score quantization factor to obtain the quantized score value.

[0098] Wherein, the quantization factor of the liveness detection score is the ratio of the maximum value of the score range to the maximum value of the quantized score range;

[0099] The difference in liveness detection scores is quantified using a liveness detection score difference quantization factor to obtain the quantized score difference value.

[0100] Specifically, when the difference in liveness detection scores is less than zero, the quantization factor for the difference in liveness detection scores is negative; when the difference in liveness detection scores is greater than or equal to zero, the quantization factor for the difference in liveness detection scores is positive.

[0101] Based on the above embodiments, the membership function between the fractional value and the current increment is a triangular membership function; the triangular membership function is set in the first quadrant of the coordinate system.

[0102] Based on the above embodiments, the current increment calculation unit is specifically used for:

[0103] The current increment is the product of the current increment quantization factor, the fractional quantization value, the fractional difference quantization value, and the membership degree.

[0104] The current increment quantization factor is the ratio of the maximum value of the current increment interval to the maximum value of the current increment quantization value interval.

[0105] Based on the above embodiments, the device further includes:

[0106] The supplementary light current value determination module is used to determine the supplementary light current value for the second liveness detection if the score of the first liveness detection is less than the liveness detection score threshold.

[0107] Based on the above embodiments, the liveness detection score difference determination module 310 includes:

[0108] The liveness detection score difference determination unit is used to determine the liveness detection score difference between the current liveness detection and the previous liveness detection if the scores of two consecutive liveness detections are both less than the liveness detection score threshold and the number of liveness detections is less than a preset number.

[0109] The brightness adjustment device for the supplementary light provided in this embodiment of the invention can execute the brightness adjustment method for the supplementary light provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0110] Example 4

[0111] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention, as shown below. Figure 4 As shown, the computer device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the computer device can be one or more. Figure 4Taking a processor 70 as an example; the processor 70, memory 71, input device 72, and output device 73 in a computer device can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0112] The memory 71, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the modules corresponding to the brightness adjustment method of the supplementary lighting in this embodiment of the invention (e.g., the liveness detection fractional difference determination module 310, the current increment determination module 320, and the brightness adjustment module 330 in the brightness adjustment device of the supplementary lighting). The processor 70 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 71, thereby implementing the aforementioned brightness adjustment method. This method includes:

[0113] If it is determined that the scores of two consecutive liveness detections are both less than the liveness detection score threshold, then the difference in liveness detection scores between the current liveness detection and the previous liveness detection is determined.

[0114] Among them, the brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection;

[0115] The current liveness detection score and the difference in liveness detection scores are input into the fuzzy controller to obtain the current increment output by the fuzzy controller.

[0116] The current value of the supplementary light for the next liveness detection is determined based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

[0117] The memory 71 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 71 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 71 may further include memory remotely located relative to the processor 70, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0118] Input device 72 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the computer device. Output device 73 may include display devices such as a display screen.

[0119] Example 5

[0120] Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a method for adjusting the brightness of a fill light, the method comprising:

[0121] If it is determined that the scores of two consecutive liveness detections are both less than the liveness detection score threshold, then the difference in liveness detection scores between the current liveness detection and the previous liveness detection is determined.

[0122] Among them, the brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection;

[0123] The current liveness detection score and the difference in liveness detection scores are input into the fuzzy controller to obtain the current increment output by the fuzzy controller.

[0124] The current value of the supplementary light for the next liveness detection is determined based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

[0125] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the brightness adjustment method of the supplementary light provided in any embodiment of the present invention.

[0126] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0127] It is worth noting that in the embodiments of the brightness adjustment device for the above-mentioned supplementary light, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0128] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for adjusting the brightness of a supplementary light, characterized in that, include: If it is determined that the scores of two consecutive liveness detections are both less than the liveness detection score threshold, then the difference in liveness detection scores between the current liveness detection and the previous liveness detection is determined. Among them, the brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection; The current liveness detection score and the difference in liveness detection scores are input into the fuzzy controller to obtain the current increment output by the fuzzy controller, including: The current liveness detection score and the difference between the liveness detection scores are quantized to obtain the quantized score value and the quantized difference value. Calculate the membership degree based on the current liveness detection score and the membership function between the score and the current increment. The membership function between the fractional value and the current increment is a triangular membership function; the triangular membership function is set in the first quadrant of the coordinate system. The current increment is calculated based on the fractional quantized value, the fractional difference quantized value, and the membership degree. The current value of the supplementary light for the next liveness detection is determined based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

2. The method according to claim 1, characterized in that, The current liveness detection score and the difference in liveness detection scores are quantized separately to obtain quantized scores and quantized difference scores, including: The current liveness detection score is quantized based on the liveness detection score quantization factor to obtain the quantized score value. Wherein, the quantization factor of the liveness detection score is the ratio of the maximum value of the score range to the maximum value of the quantized score range; The difference in liveness detection scores is quantified using a liveness detection score difference quantization factor to obtain the quantized score difference value. Specifically, when the difference in liveness detection scores is less than zero, the quantization factor for the difference in liveness detection scores is negative; when the difference in liveness detection scores is greater than or equal to zero, the quantization factor for the difference in liveness detection scores is positive.

3. The method according to claim 1, characterized in that, The current increment is calculated based on the fractional quantized value, the fractional difference quantized value, and the membership degree, including: The current increment is the product of the current increment quantization factor, the fractional quantization value, the fractional difference quantization value, and the membership degree. The current increment quantization factor is the ratio of the maximum value of the current increment interval to the maximum value of the current increment quantization value interval.

4. The method according to claim 1, characterized in that, Before determining the difference in liveness detection scores between the current and previous liveness detections, the following steps are also included: If the score of the first liveness detection is less than the liveness detection score threshold, the sum of the supplementary light current value of the first liveness detection and the initial value of the current increment will be used as the supplementary light current value for the second liveness detection.

5. The method according to claim 4, characterized in that, If it is determined that the scores of two consecutive liveness detections are both less than the liveness detection score threshold, then the difference in liveness detection scores between the current liveness detection and the previous liveness detection is determined, including: If it is determined that the scores of two consecutive liveness detections are both less than the liveness detection score threshold, and the number of liveness detections is less than the preset number, then the difference in liveness detection scores between the current liveness detection and the previous liveness detection is determined.

6. A brightness adjustment device for a supplementary light, characterized in that, include: The liveness detection score difference determination module is used to determine the liveness detection score difference between the current liveness detection and the previous liveness detection if the scores of two consecutive liveness detections are both less than the liveness detection score threshold. Among them, the brightness of the supplementary light used for the current liveness detection is different from that used for the previous liveness detection; The current increment determination module is used to input the current liveness detection score and the difference between the liveness detection scores into the fuzzy controller to obtain the current increment output by the fuzzy controller. The current increment determination module includes: The numerical quantization unit is used to quantize the current liveness detection score and the liveness detection score difference, respectively, to obtain the quantized score value and the quantized score difference value. The membership calculation unit is used to calculate the membership degree based on the current liveness detection score and the membership function between the score and the current increment. The membership function between the fractional value and the current increment is a triangular membership function; the triangular membership function is set in the first quadrant of the coordinate system. The current increment calculation unit is used to calculate the current increment based on the fractional quantized value, the fractional difference quantized value, and the membership degree. The brightness adjustment module is used to determine the supplementary light current value for the next liveness detection based on the current increment, so as to adjust the brightness of the supplementary light during the next liveness detection.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the brightness adjustment method of the fill light as described in any one of claims 1-5.

8. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the brightness adjustment method of the fill light as described in any one of claims 1-5.