WO2022166316A1 - 人脸识别补光方法、装置、人脸识别设备及其系统 - Google Patents
人脸识别补光方法、装置、人脸识别设备及其系统 Download PDFInfo
- Publication number
- WO2022166316A1 WO2022166316A1 PCT/CN2021/132166 CN2021132166W WO2022166316A1 WO 2022166316 A1 WO2022166316 A1 WO 2022166316A1 CN 2021132166 W CN2021132166 W CN 2021132166W WO 2022166316 A1 WO2022166316 A1 WO 2022166316A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- face
- image
- light
- preset
- historical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Definitions
- the present application relates to the technical field of face recognition, and in particular, to a method and device for face recognition supplementary light, a face recognition device and a system thereof.
- Face recognition technology is an important method for user authentication, and its recognition accuracy will directly affect the security of user accounts.
- insufficient ambient light will reduce the success rate of face recognition.
- most of the face recognition access control systems that use face recognition technology do not integrate the camera fill light strategy. Even if the fill light strategy is integrated, the light intensity when the face image is collected is usually obtained through the light sensor. Once the light intensity reaches When a certain preset threshold is set, the switch will be controlled to start the fill light program to fill the light intensity with a fixed intensity, or linearly adjust the fill light intensity to a fixed value according to the current light intensity. In addition, you can directly adjust the backlight compensation parameters for the face image collected by the camera to achieve the purpose of filling light.
- the above-mentioned supplementary light strategy has many problems.
- the light intensity obtained by the set light sensor not only has certain errors, but also increases the time-consuming of the face recognition process, and frequent calls will also cause great consumption of hardware resources.
- the light intensity of the face will directly affect the quality of the face image obtained by the access control device. If the light intensity is too bright or too dark, the quality of the collected face image will be low, which will affect the pass rate of face recognition.
- due to uncontrollable factors such as face placement angle and distance during face collection, there will be different requirements for different placement angles or distance light intensity.
- the supplementary light strategy that only increases the fixed supplementary light or linearly adjusts the supplementary light intensity to a fixed value based on the light intensity collected by the light sensor obviously cannot meet the requirements of the actual working conditions, and the supplementary light accuracy is low. Furthermore, in the prior art, the supplementary light strategy that directly adjusts the backlight compensation to the face image collected by the camera does not fundamentally solve the problem that supplementary light needs to be performed due to insufficient light. This supplementary light strategy improves face recognition. The pass rate is very limited.
- the present application provides a face recognition fill light method, device, face recognition device and system thereof, which are used to overcome the existing fill light strategy that relies on hardware to obtain fill light intensity to perform fill light error, which is time-consuming and takes a long time.
- the hardware resource consumption is large and cannot meet the needs of actual working conditions, and the purpose of filling light through backlight compensation is not conducive to improving the pass rate of face recognition.
- the present application provides a face recognition supplementary light method, including:
- the to-be-processed image parameters are determined according to the to-be-recognized face image and a preset image processing model, where the to-be-processed image parameters include the current brightness, first distance, and first angle of the to-be-recognized face image, and the first The distance represents the distance between the face to be recognized and the face recognition device, and the first angle represents the angle at which the face to be recognized deviates from the face recognition device;
- the current supplementary light intensity is determined according to the current brightness of the face image to be recognized, the first distance and the first angle, so as to control the supplementary light to perform supplementation according to the current supplementary light intensity Light.
- the method before the current fill light intensity is determined based on the preset fill light model according to the current brightness of the face image to be recognized, the first distance and the first angle, the method further includes: :
- a respective multiple linear regression model is generated according to each historical face image and the corresponding historical recognition result
- the optimal regression parameter combination is determined according to all multiple linear regression models, and the preset supplementary light model is determined according to the preset multiple linear regression model and the optimal regression parameter combination.
- a respective multiple linear regression model is generated according to each historical face image and the corresponding historical recognition result, including:
- each historical image parameter includes the current brightness of the historical face image, a second distance and a second angle
- the second distance represents the distance between the historical face and the face recognition device
- the first The two angles represent the angle at which the historical face deviates from the face recognition device.
- determining the preset supplementary light model according to the preset multiple linear regression model and the optimal regression parameter combination includes:
- the preset multiple linear regression model after configuring the corresponding regression parameters is determined as the preset supplementary light model.
- determining the current fill light intensity based on the preset fill light model according to the current brightness of the face image to be recognized, the first distance and the first angle including:
- a target mapping relationship is generated according to the target brightness of the face image to be recognized, the first distance, the first angle and the preset fill light model, and the target mapping relationship is used to represent the target face recognition result and the the functional relationship between the target brightness;
- the difference value between the corresponding value of the target brightness and the corresponding value of the current brightness of the face image to be recognized is acquired, and the difference value is determined as the current supplementary light intensity.
- determining the image parameters to be processed according to the face image to be recognized and a preset image processing model includes:
- the current brightness of the face image to be recognized is determined according to a preset grayscale algorithm in the preset image processing model, and the preset grayscale algorithm is used to represent the corresponding pixels of the face image to be recognized.
- the distribution function of each gray value is determined according to a preset grayscale algorithm in the preset image processing model, and the preset grayscale algorithm is used to represent the corresponding pixels of the face image to be recognized.
- the first angle is determined according to a preset image algorithm in the preset image processing model.
- the method before the determining the first distance according to the preset distance algorithm in the preset image processing model, the method further includes:
- For each first face sample image determine the ratio of the face area of the first face sample image to the recognition frame area, and obtain the face and the face corresponding to the first face sample image. distance data between the face recognition devices;
- a distance mapping relationship is generated according to each ratio and the corresponding distance data, and the distance mapping relationship is used to characterize the preset distance algorithm.
- control after the controlling the supplementary light to perform supplementary light according to the current supplementary light intensity, the control further includes:
- a training sample is determined from the face sample according to the recognition result, and the training sample is the face sample for which the recognition result obtained after supplementary light is less than a preset threshold;
- the second face sample image obtained before each training sample is filled with light is used as the historical face image to optimize the optimal regression parameter combination.
- controlling the fill light to fill light according to the current fill light intensity including:
- the supplementary light is controlled to weaken the current supplementary light intensity for the current ambient light.
- the present application provides a face recognition supplementary light device, comprising:
- a first acquisition module used for acquiring a face image to be recognized
- the first processing module is used to determine the image parameters to be processed according to the face image to be recognized and a preset image processing model, and the image parameters to be processed include the current brightness, the first distance and the first distance of the face image to be recognized. an angle, the first distance represents the distance between the face to be recognized and the face recognition device, and the first angle represents the angle at which the face to be recognized deviates from the face recognition device;
- the second processing module is configured to, based on a preset supplementary light model, determine the current supplementary light intensity according to the current brightness of the face image to be recognized, the first distance and the first angle, so as to control the supplementary light according to the selected Fill light according to the current fill light intensity.
- the face recognition light supplement device further includes:
- the second acquisition module is used to acquire a plurality of historical face images and the respective historical recognition results corresponding to each historical face image
- the third processing module is used to generate the respective multiple linear regression model according to each historical face image and the corresponding historical recognition result based on the preset multiple linear regression model;
- the fourth processing module is configured to determine an optimal regression parameter combination according to all multiple linear regression models, and determine the preset supplementary light model according to the preset multiple linear regression model and the optimal regression parameter combination.
- the third processing module is specifically used for:
- each historical image parameter includes the current brightness of the historical face image, a second distance and a second angle
- the second distance represents the distance between the historical face and the face recognition device
- the first The two angles represent the angle at which the historical face deviates from the face recognition device.
- the fourth processing module is specifically used for:
- the preset multiple linear regression model after configuring the corresponding regression parameters is determined as the preset supplementary light model.
- the second processing module is further used for:
- a target mapping relationship is generated according to the target brightness of the face image to be recognized, the first distance, the first angle and the preset fill light model, and the target mapping relationship is used to represent the target face recognition result and the the functional relationship between the target brightness;
- the difference value between the corresponding value of the target brightness and the corresponding value of the current brightness of the face image to be recognized is acquired, and the difference value is determined as the current supplementary light intensity.
- the first processing module is specifically used for:
- the current brightness of the face image to be recognized is determined according to a preset grayscale algorithm in the preset image processing model, and the preset grayscale algorithm is used to represent the corresponding pixels of the face image to be recognized.
- the distribution function of each gray value is determined according to a preset grayscale algorithm in the preset image processing model, and the preset grayscale algorithm is used to represent the corresponding pixels of the face image to be recognized.
- the first angle is determined according to a preset image algorithm in the preset image processing model.
- the first processing module is further used for:
- For each first face sample image determine the ratio of the face area of the first face sample image to the recognition frame area, and obtain the face and the face corresponding to the first face sample image. distance data between the face recognition devices;
- a distance mapping relationship is generated according to each ratio and the corresponding distance data, and the distance mapping relationship is used to characterize the preset distance algorithm.
- the face recognition light supplement device further includes: a fifth processing module; the fifth processing module is used for:
- a training sample is determined from the face sample according to the recognition result, and the training sample is the face sample for which the recognition result obtained after supplementary light is less than a preset threshold;
- the second face sample image obtained before each training sample is filled with light is used as the historical face image to optimize the optimal regression parameter combination.
- the second processing module is further used for:
- the supplementary light is controlled to weaken the current supplementary light intensity for the current ambient light.
- the present application provides a face recognition device, including:
- a memory for storing a computer program for the processor
- the processor is configured to execute any one of the possible face recognition and light supplementation methods provided in the first aspect by executing the computer program.
- the present application provides a computer-readable storage medium on which a computer program is stored, and the computer program is used to execute any one of the possible face recognition and light-filling methods provided in the first aspect.
- the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the possible face recognition and light supplementation methods provided in the first aspect.
- the present application provides a face recognition system, including: any possible face recognition device provided in the third aspect and an access control device communicatively connected to the face recognition device;
- the access control device is used for selecting whether to open the access control according to the corresponding recognition result of the face recognition device.
- the present application provides a method, a device, a face recognition device and a system for supplementing light for face recognition.
- the face recognition fill light method first obtains the face image to be recognized, then determines the parameters of the image to be processed according to the face image to be recognized and a preset image processing model, and finally, based on the preset fill light model, according to the determined image parameters to be processed.
- the current brightness, the first distance, and the first angle of the face image to be recognized in the device determine the current fill light intensity, and then control the fill light to fill the camera of the face recognition device according to the current fill light intensity, so as to complete the face recognition. fill light operation in .
- the first distance represents the distance between the face to be recognized and the face recognition device
- the first angle represents the angle at which the face to be recognized deviates from the face recognition device.
- the face recognition fill light method provided by this application is based on a preset fill light model, determines the current fill light intensity according to the image parameters to be processed, does not need to rely on the hardware resources of the light sensor, and can obtain the current fill light in real time and accurately according to the face to be recognized.
- the supplementary light intensity meets the needs of different light requirements in actual working conditions. And fundamentally solve the problem of fill light to achieve the purpose of fill light, which is beneficial to improve the pass rate of face recognition.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
- FIG. 2 is a schematic flowchart of a method for supplementing light for face recognition provided by an embodiment of the present application
- FIG. 3 is a schematic flowchart of another face recognition fill light method provided by an embodiment of the present application.
- FIG. 4 is a schematic flowchart of yet another method for face recognition supplementary light provided by an embodiment of the present application.
- FIG. 5 is a schematic flowchart of another method for replenishing light for face recognition provided by an embodiment of the present application.
- FIG. 6 is a schematic flowchart of another method for face recognition supplementary light provided by an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a face recognition light supplement device provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of another face recognition supplementary light device provided by an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a face recognition device according to an embodiment of the present application.
- the face recognition device integrated with the supplementary light strategy in the prior art usually needs to obtain the light intensity when the face image is collected through the light sensor.
- the switch is controlled to start the supplementary light program to supplement the light intensity with a fixed intensity, or linearly adjust the supplementary light intensity to a fixed value according to the current light intensity.
- the quality of the collected face image will be low when the light is too bright or too dark, and there are uncontrollable factors such as placement angle and distance when the face image is collected. For different placement angles or distances, the light intensity will be lower. have different requirements. Therefore, the supplementary light strategy that only increases the fixed supplementary light or linearly adjusts the supplementary light intensity to a fixed value based on the light intensity collected by the light sensor obviously cannot meet the requirements of actual working conditions, and the supplementary light accuracy is low. In addition, the supplementary light strategy that directly adjusts the backlight compensation to the face image collected by the camera does not fundamentally solve the problem of supplementary light due to insufficient light. The face recognition pass rate improved by this supplementary light strategy is very limited. It can be seen that, in view of the above-mentioned technical defects in the prior art, a supplementary light strategy for face recognition is urgently needed.
- the present application provides a method, a device, a face recognition device and a system for supplementing light for face recognition.
- the inventive concept of the face recognition fill light method provided by the present application is as follows: first, the parameters of the to-be-processed image are determined according to the collected face-to-be-recognized image and the preset image processing module, that is, to determine the current brightness, The distance between the face to be recognized and the face recognition device, and the angle at which the face to be recognized deviates from the face recognition device.
- the corresponding characterization parameters are determined by the face image to be recognized, without relying on the light sensor to obtain the light intensity, and there is no problem of fill-light error, time-consuming and hardware resource consumption.
- the current fill light intensity is determined according to the obtained characteristic parameters, and then the fill light is controlled to fill the camera of the face recognition device according to the determined current fill light intensity. It can be seen that the current fill light intensity is determined based on the preset fill light model and the to-be-processed image parameters of the face image to be recognized, rather than the face recognition device setting a fixed fill light intensity or fill light to a fixed value. Therefore, the supplementary light strategy provided in this application is real-time and accurate. Combining the above two points, the supplementary light strategy provided by the present application fundamentally solves the supplementary light problem due to insufficient light, which is beneficial to improve the pass rate of the face recognition device.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
- the face recognition supplementary light method provided by the embodiment of the present application may be performed by the face recognition supplementary light device provided by the embodiment of the present application, and specifically, the face recognition supplementary light device 11 provided by the embodiment of the present application may be
- the computer program can be configured in the processor of the face recognition device 12, so that the face recognition device 12 is integrated with the method provided by the embodiment of the present application.
- the face recognition fill light method is to implement a fill light strategy when performing face recognition to achieve a fill light effect and improve the pass rate of the face recognition device 12 .
- the face recognition device 12 can be applied to the access control security system, can also be applied to various face recognition occasions such as financial security and other identity verification, or can be applied to the video conference human-computer interaction system, the attendance system and other occasions, In this regard, this embodiment does not limit it.
- the specific specifications and types of the face recognition device 12 are not shown in FIG. 1 , and a suitable device can be selected and set according to the actual application in actual working conditions.
- FIG. 2 is a schematic flowchart of a method for supplementing light for face recognition provided by an embodiment of the present application. As shown in FIG. 2 , the face recognition fill light method provided in this embodiment includes:
- S101 Acquire a face image to be recognized.
- the image of the face to be recognized is collected through the camera of the face recognition device, that is, the image of the face to be recognized is acquired. For example, if the face to be recognized is within the image collection range of the camera, the image of the face to be recognized can be acquired through the camera.
- the specification of the camera, the setting position of the camera on the face recognition device, and the image acquisition range formed may be set according to the specific application of the face recognition device, which is not limited in this embodiment.
- S102 Determine parameters of the image to be processed according to the face image to be recognized and a preset image processing model.
- the parameters of the image to be processed include the current brightness of the face image to be recognized, the first distance, and the first angle, the first distance represents the distance between the face to be recognized and the face recognition device, and the first angle represents the face to be recognized. An angle off the face recognition device.
- a preset image processing model is used to determine the parameters of the image to be processed according to the face image to be recognized.
- the determined to-be-processed image parameters include the current brightness of the to-be-recognized face image, the distance between the to-be-recognized face and the face recognition device, and the angle at which the to-be-recognized face deviates from the face recognition device.
- the current brightness of the face image to be recognized can be fed back to the current ambient light when the face recognition device acquires the face image to be recognized.
- the distance between the face to be recognized and the face recognition device is defined as the first distance.
- the first distance may be the distance between the face to be recognized and the screen of the face recognition device when the face recognition device collects the image of the face to be recognized.
- the first angle may be the angle at which the face to be recognized deviates from the front face of the face recognition device when the face recognition device collects the face to be recognized.
- the image is processed to obtain the first angle, and the preset image algorithm such as Rotated Rect.rrect of openCV.
- the above image parameters to be processed can be obtained by performing corresponding processing or calculation on the face image to be recognized through a preset image processing model.
- the current brightness of the to-be-recognized face image in the to-be-processed image parameters can be obtained according to the to-be-recognized face image and the preset grayscale algorithm in the preset image processing model.
- the preset grayscale algorithm refers to a distribution function that can characterize the grayscale values corresponding to all the pixels of the face image to be recognized.
- the size of its pixel value can be described by grayscale.
- the grayscale value is in the range of [0, 255], also called grayscale.
- a preset grayscale algorithm such as a grayscale histogram, is a distribution function about grayscale levels, and is a corresponding function for performing statistics on the distribution of grayscale levels in an image.
- the grayscale histogram can count all the pixels in the image according to the size of their respective grayscale values to count the frequency of occurrence of each grayscale value, and then obtain the average value of the pixels in the image, and determine the average value as the image. to obtain the current ambient light when the image is obtained through the current brightness feedback.
- the preset grayscale algorithm can be implemented by the Scalar.mean function of Opencv.
- use the Scalar.mean function of Opencv to process the face image to be recognized, and the obtained processing result is the current brightness of the face image to be recognized.
- the preset grayscale algorithm includes but is not limited to the Scalar.mean function of Opencv listed in this embodiment.
- FIG. 3 is a schematic flowchart of another method for replenishing light for face recognition provided by an embodiment of the present application. As shown in FIG. 3 , in the face recognition fill light method provided by this embodiment, the first distance is determined according to a preset distance algorithm in a preset image processing model, including:
- S201 Acquire a plurality of first face sample images through a face recognition device to obtain a face area and a recognition frame area corresponding to each first face sample image.
- the area of the recognition frame refers to the area of the preset frame when the face recognition device performs face recognition.
- first face sample images through the face recognition device.
- multiple first face sample images that have been obtained by the face recognition device can be obtained from the video library of the face recognition device.
- these first face sample images may be different images, and of course, may also include the same image, which is not limited in this embodiment.
- After obtaining a plurality of first face sample images calculate the face area on each first face sample image and the recognition frame area of the face recognition device that obtained the first face sample image one by one, so as to obtain each first face sample image.
- the face area refers to the area of the face in the first face sample image.
- the area of the recognition frame is the area of the preset frame set when the face recognition device performs face recognition. Each face recognition device has a corresponding preset frame area when it collects face images for face recognition.
- the area is the area of the recognition frame.
- S202 For each first face sample image, determine the ratio of the face area of the first face sample image to the area of the recognition frame, and obtain the relationship between the face corresponding to the first face sample image and the face recognition device distance data.
- each first face sample image, and the face area and recognition frame area corresponding to each first face sample image determine the first face sample image for each first face sample image The ratio between the face area and the recognition frame area.
- the distance data between the face corresponding to the first face sample image and the face recognition device is also obtained, that is, the first face sample image of the first face image is also obtained.
- the distance mapping relationship can be obtained by sorting the obtained data.
- S203 Generate a distance mapping relationship according to each ratio and corresponding distance data.
- the distance mapping relationship is used to represent the preset distance algorithm.
- S k represents the face area of the first face sample image
- a k represents the recognition frame area of the first face sample image
- k represents any one of the multiple first face sample images.
- S k /A k is the ratio of the face area of the first face sample image to the area of the recognition frame.
- L k represents the distance data between the face corresponding to the first face sample image and the face recognition device.
- the relationship represented by the above expression (1) is determined as a distance mapping relationship, that is, according to the ratio of the face area of each first face sample image to the area of the recognition frame and the corresponding distance data of the first face sample image.
- the distance mapping relationship is defined, and the distance mapping relationship is defined as a preset distance algorithm, and then when the face area and the recognition frame area of the face image to be recognized are known, the face image to be recognized can be determined by the above expression (1). the first distance.
- S204 Determine the first distance according to the preset distance algorithm, the face area of the face image to be recognized, and the area of the recognition frame corresponding to the face image to be recognized.
- the face area of the face image to be recognized and the preset frame area of the face recognition device that obtains the face image to be recognized can be obtained, that is, the face to be recognized can be obtained.
- the face area of the image and the area of the recognition frame corresponding to the face image to be recognized, then, the corresponding distance data can be obtained by using the above expression (1), and the distance data is the face image to be recognized corresponding to the person to be recognized.
- the distance between the face and the face recognition device that is, the first distance.
- the first distance is determined according to a preset distance algorithm in a preset image processing model.
- a plurality of first face sample images are obtained through a face recognition device, and the face area and the recognition frame area corresponding to each first face sample image are obtained, and then for each first face sample image, the first face sample image is determined.
- the ratio of the face area of the face sample image to the area of the recognition frame, and the distance data between the face corresponding to the first face sample image and the face recognition device is obtained, and finally each obtained first person
- the ratio of the face sample images and the distance data are used for data sorting, and a distance mapping relationship can be generated, so as to use the generated distance mapping relationship to represent the preset distance algorithm.
- the preset distance algorithm can be used to determine the distance between the face to be recognized corresponding to the face image to be recognized and the face recognition device, That is, the first distance in the image parameters to be processed.
- This embodiment provides an effective implementation solution for determining the first distance, which fills the technical gap of obtaining the first distance in the prior art.
- S103 Based on the preset supplementary light model, determine the current supplementary light intensity according to the current brightness, the first distance and the first angle of the face image to be recognized, so as to control the supplementary light to perform supplementary light according to the current supplementary light intensity.
- the current fill light intensity is determined based on the preset fill light model, and then the fill light is controlled to accurately fill the light according to the corresponding value of the current fill light intensity. Light, so that the face image to be recognized obtained by the face recognition device after the fill light can overcome the problem of low pass rate of face recognition caused by insufficient ambient light.
- the fill light lamp is controlled to enhance the current fill light intensity for the current ambient light. If the value corresponding to the current fill light intensity is less than zero, the fill light is controlled to weaken the current fill light intensity for the current ambient light. Correspondingly, if the determined value corresponding to the current fill light intensity is equal to zero, the fill light lamp is controlled not to perform any fill light operation on the current ambient light.
- the face recognition device re-acquires the face image to be recognized of the face to be recognized based on the ambient light after the fill light, and further according to the face recognition device.
- the integrated preset recognition algorithm determines the recognition result to complete the relevant recognition operation of the face recognition device to be recognized. This embodiment does not limit the recognition work of the face to be recognized by the face recognition device.
- the face image to be recognized is first obtained, and then the image to be recognized is processed by using a preset image processing model to obtain the image parameters to be processed, and then based on the preset fill light model and The to-be-processed image parameters determine the current fill light intensity, and then control the fill light to fill light according to the current fill light intensity.
- the face recognition supplementary light method provided in the embodiment of the present application performs supplementary light, it is not to set a fixed supplementary light intensity in the face recognition device or to supplement the light to a fixed value to achieve the purpose of supplementing light, but to achieve the purpose of supplementing light according to the to-be-recognized light.
- the to-be-processed image parameters of the face image determine the real-time current fill light intensity, so the fill light implemented is adaptive fill light based on the current ambient light when the face recognition device obtains the face image to be recognized, so that the fill light strategy It can meet the actual requirements of different fill light intensity due to uncontrollable factors such as face placement angle and distance in actual working conditions, and effectively improve the fill light accuracy.
- the face recognition supplementary light method provided by the embodiment of the present application does not need to rely on the hardware resources of the light sensor, and there are no problems of supplementary light error, long time consumption, and loss of hardware resources. It fundamentally solves the problem of supplementary light due to insufficient ambient light, which is beneficial to improve the pass rate of face recognition.
- the method for supplementing light for face recognition provided by this embodiment of the present application further includes the steps shown in FIG. 4, which is another face recognition method provided by this embodiment of the present application.
- FIG. 4 is another face recognition method provided by this embodiment of the present application.
- Schematic flow chart of the fill light method As shown in Figure 4, this embodiment includes:
- S301 Acquire a plurality of historical face images and respective historical recognition results corresponding to each historical face image.
- obtain the face-swiping record of the face recognition device obtain a plurality of historical face images and the respective recognition results corresponding to each historical face image, and define the recognition result corresponding to the historical face image as the historical recognition result, that is, it is possible to obtain To a plurality of historical face images and the respective historical recognition results corresponding to each historical face image.
- face recognition equipment For face recognition technology, face recognition equipment usually compares the acquired face image with the face image stored in the video library, obtains the comparison result, and then compares the comparison result with the preset The passing thresholds are compared to determine whether the face corresponding to the face image can pass the access control or security recognition system to which the face recognition device belongs. If the comparison result satisfies the preset passing threshold, it indicates that the face can pass the identification, otherwise, it cannot pass the identification.
- face recognition equipment will express the recognition results in the form of comparison scores.
- the historical recognition result corresponding to each historical face image is also represented as a comparison score.
- each historical face image and the historical recognition result corresponding to each historical face image After obtaining each historical face image and the historical recognition result corresponding to each historical face image, based on the preset multiple linear regression model, construct each historical face image and its corresponding historical recognition result. Linear regression model.
- each historical recognition result By acquiring multiple historical face images and their corresponding historical recognition results, it can be found that there is a certain linear correlation between each historical recognition result and the historical image parameters of the corresponding historical face image. Linear regression models characterize this linear correlation.
- the historical image parameters of each historical face image may be determined according to the historical face image and a preset image processing model.
- the historical image parameters of the historical face image are similar to the to-be-processed image parameters of the to-be-recognized face image in the above embodiment.
- the historical image parameters of the historical face image include the current brightness, the second distance, and the second angle of the historical face image.
- the distance between the historical face corresponding to the historical face image and the face recognition device is defined as the second distance, and the historical face corresponding to the historical face image is deviated from the face recognition device that obtained the historical face image.
- the angle is defined as the second angle.
- a method similar to obtaining the image parameters to be processed according to the face image to be recognized and the preset image processing model can determine the historical image parameters of the historical face image according to the historical face image and the preset image processing model, and the specific determination process can be as follows: Refer to the foregoing detailed steps, which will not be repeated here.
- the historical image parameters of the historical face image are determined by using a preset image processing model for each historical face image, that is, according to Each historical face image and a preset image processing model determine historical image parameters of each historical face image.
- the preset multiple linear regression model can be expressed as the following expression (2):
- x 1 , x 2 and x 3 respectively represent multiple independent variables of the preset multiple linear regression model
- y represents a dependent variable of the preset multiple linear regression model
- ⁇ 1 , ⁇ 2 , ⁇ 3 , ⁇ 4 , ⁇ 5 and ⁇ 6 are the regression coefficients in the preset multiple linear regression model
- ⁇ 0 is the random error term of the preset multiple linear regression model.
- the current brightness, the second distance and the second angle of the historical face image can be respectively determined as independent variables in the above-mentioned change relationship, and the historical identification result corresponding to the group of independent variables can be determined as the corresponding variable in the above-mentioned change relationship. variable.
- a multiple linear regression model corresponding to the historical face image can be generated according to the above-mentioned preset multiple linear regression model, the historical image parameters of the historical face image, and the corresponding historical recognition results, so that the Based on the preset multiple linear regression model, a respective multiple linear regression model is generated according to each historical face image and its corresponding historical recognition result.
- the multiple linear regression model corresponding to all historical face images can be represented by the matrix model shown below.
- the matrix model is represented as follows:
- n represents the number of historical face images in the selected face brushing record, which is greater than zero.
- i represents the number of regression coefficients other than random error terms in the preset multiple linear regression model, and the value of i is greater than zero.
- S303 Determine an optimal regression parameter combination according to all multiple linear regression models, and determine a preset supplementary light model according to the preset multiple linear regression model and the optimal regression parameter combination.
- the optimal value of the regression coefficient is determined according to all the multiple linear regression models.
- the optimal regression parameter combination is determined.
- the optimal regression parameter combination of ⁇ 0 , ⁇ 1 , ⁇ 2 , ⁇ 3 , ⁇ 4 , ⁇ 5 , and ⁇ 6 is determined according to all the multiple linear regression models.
- the least squares estimation method can be used to calculate the loss function of each multiple linear regression model, so as to determine each regression parameter in the multiple linear regression model with the smallest loss function as the optimal regression parameter combination.
- a large number of historical face images can be used to generate the corresponding multiple linear combination regression model, so as to determine the optimal combination of regression parameters based on a large number of sample data.
- the preset supplementary light model is determined according to the optimal regression parameter combination and the preset multiple linear regression model.
- the preset supplementary light model is a regression model obtained by substituting each regression parameter in the optimal regression parameter combination for each regression parameter in the preset multiple linear regression model.
- each optimal regression parameter in the optimal regression parameter combination is, for example, ⁇ ′ 0 , ⁇ ′ 1 , ⁇ ′ 2 , ⁇ ′ 3 , ⁇ ′ 4 , ⁇ ′ 5 , ⁇ ′ 6 , respectively , and then configure each optimized regression parameter as the corresponding regression parameter of the preset multiple linear regression model, and then determine the preset multiple linear regression model with the corresponding regression parameters configured as the preset fill light model.
- configure each optimized regression parameter as each corresponding regression parameter in the above expression (2) then configure the preset multiple linear regression model of the corresponding regression parameter, that is, the preset supplementary light model, as shown in the following expression (3 )express:
- Y represents the recognition result represented by the preset supplementary light model
- X 1 , X 2 , and X3 represent each data in the to-be-processed image parameters of the face image whose recognition result needs to be determined by the preset supplementary light model.
- the face recognition fill light method Before determining the current fill light intensity according to the current brightness, the first distance and the first angle of the face image to be recognized based on the preset fill light model, the face recognition fill light method provided in the embodiment of the present application further includes determining a preset fill light Model. First, obtain multiple historical face images and the corresponding historical recognition results of each historical face image, and then based on the preset multiple linear regression model, generate respective multiple linear regression models according to each historical face image and the corresponding historical recognition results. , and then determine the optimal regression parameter combination according to all the multiple linear regression models, and finally determine the preset fill light model according to the optimal regression parameter combination and the preset multiple linear regression model, so as to use the preset fill light model for any face image to be recognized according to the preset fill light model. Determine the corresponding current fill light intensity, and then overcome the problem of low pass rate of face recognition due to insufficient ambient light, which can fundamentally solve the fill light problem.
- the preset supplementary light model can represent the mapping relationship between the image parameters to be processed and the recognition results corresponding to the image parameters to be processed, wherein the recognition results corresponding to the image parameters to be processed are obtained by the face recognition device.
- the received face image to be recognized is recognized.
- the purpose of implementing fill light is to overcome the problem of low pass rate of face recognition caused by insufficient ambient light. Therefore, the best fill light effect that can be achieved based on the to-be-processed image parameters of the face image to be recognized can be represented by the maximum value of the recognition result represented by the preset fill-light model.
- step S103 based on the preset supplementary light model, a possible implementation manner of determining the current supplementary light intensity according to the current brightness, the first distance and the first angle of the face image to be recognized is shown in FIG. 5 .
- FIG. 5 is a schematic flowchart of another method for supplementing light for face recognition provided by an embodiment of the present application.
- the current fill light intensity is determined according to the current brightness, the first distance and the first angle of the face image to be recognized, including :
- S401 Generate a target mapping relationship according to target brightness, a first distance, a first angle, and a preset fill-light model of the face image to be recognized.
- the target mapping relationship is used to represent the functional relationship between the target face recognition result and the target brightness.
- the target brightness is the brightness that can be achieved by the face recognition device to obtain the face image to be recognized after fill light
- the target brightness is an unknown quantity
- the first distance and the first angle of the face image to be recognized are known quantity.
- Y ⁇ represents the target face recognition result
- X ⁇ represents the target brightness
- X 2 and X 3 represent the first distance and the first angle, respectively.
- S402 Obtain the maximum value of the target face recognition result according to the target mapping relationship, so as to obtain the corresponding value of the target brightness when the target face recognition result takes the maximum value.
- the maximum value of the target face recognition result is obtained, and the corresponding value of the target brightness can be obtained when the target face recognition result takes the maximum value.
- the value of X ⁇ can make the target face recognition result take the maximum value, so as to obtain the corresponding value of the target brightness. brightness.
- S403 Obtain the difference between the corresponding value of the target brightness and the corresponding value of the current brightness of the face image to be recognized, and determine the difference as the current fill light intensity.
- the difference value which is the intensity of the light to be supplemented, that is, the difference value is determined. It is the current fill light intensity to further control the fill light lamp to take fill light measures according to the currently determined current fill light intensity.
- the face recognition fill light method when the current fill light intensity is determined based on the preset fill light model and the to-be-processed parameters of the face image to be recognized, firstly according to the target brightness of the face image to be recognized, the first A distance, a first angle, and a preset fill light model generate a target mapping relationship, and the target mapping relationship is used to represent the functional relationship between the target face recognition result and the target brightness. Then, the maximum value of the target face recognition result is obtained according to the target mapping relationship, and the corresponding value of the target brightness is obtained when the target face recognition result takes the maximum value, and then the corresponding value of the target brightness is compared with the current brightness of the face image to be recognized.
- the current brightness, first distance and first angle of the face image to be recognized determine the current fill light intensity that needs to be filled, so that the face recognition device after the fill light can be used for the face recognition device to be identified.
- the ambient light where the face is currently located can obtain the maximum recognition result, thereby solving the problem of low pass rate of face recognition equipment due to insufficient ambient light from the root cause.
- the method further includes: Set up the verification and optimization process of the fill light model.
- FIG. 6 is a schematic flowchart of another method for supplementing light by face recognition provided by an embodiment of the present application. As shown in Figure 6, this embodiment includes:
- the recognition results corresponding to multiple face samples before and after fill light are collected. For example, for a face sample, obtain the recognition result of the face recognition device for the face sample before the fill light, and then re-obtain the recognition result through the face recognition device after filling the current ambient light where the face sample is located.
- the recognition results corresponding to each face sample before and after fill light can be collected.
- this embodiment does not limit the number of face samples.
- the setting of different ambient light intensities is to enrich the data samples to enhance the verification and optimization effect provided by this embodiment.
- a fill light switch can be configured on the face recognition device, and when the fill light switch is turned on, the face recognition device can perform fill light according to the determined current fill light intensity to obtain a recognition result after fill light. If the fill light switch is turned off, the corresponding identification result before fill light can be obtained.
- S502 Determine a training sample from the face sample according to the recognition result.
- the training samples are face samples whose recognition results obtained after supplementary light are smaller than the preset threshold.
- the face samples whose recognition results after filling light are less than the preset threshold are screened out. These face samples can be considered as samples with unsatisfactory filling light effect, and will be screened.
- the obtained face samples are determined as training samples, that is, the training samples are determined from the face samples according to the recognition results.
- the specific value corresponding to the preset threshold may be set according to the actual working condition, which is not limited in this embodiment.
- S503 Use the second face sample image obtained before each training sample fills the light as a historical face image to optimize the optimal combination of regression parameters.
- the optimal regression parameter combination in the embodiment shown in FIG. 4 is further optimized by using the selected training samples, so as to verify and optimize the determined preset supplementary light model.
- the optimal regression parameter combination is re-determined according to each step of the embodiment shown in FIG. 4, so as to optimize the previously determined optimal regression parameter combination, so as to achieve the verification and optimization prediction. Set the purpose of the fill light model.
- the face recognition fill light method provided by the embodiment of the present application further includes a step of optimizing the optimal regression parameter combination to verify the optimization of the preset fill light model after controlling the fill light to fill light according to the current fill light intensity.
- the recognition results corresponding to multiple face samples before and after fill light are obtained, and then the face samples smaller than the preset threshold are determined from the recognition results after fill light as training samples, and then the The second face sample image obtained before each training sample fill light is used as a historical face image, and the optimal regression parameter combination is re-determined to optimize the previous optimal regression parameter combination, thereby achieving the purpose of verifying and optimizing the preset fill light model , so that the current fill light intensity determined based on the preset fill light model has higher accuracy and validity, which is beneficial to the popularization and use of the face recognition fill light method in actual working conditions.
- FIG. 7 is a schematic structural diagram of a face recognition supplementary light device according to an embodiment of the present application.
- the face recognition supplementary light device 600 provided in this embodiment includes:
- the first acquiring module 601 is used to acquire the face image to be recognized.
- the first processing module 602 is configured to determine the parameters of the image to be processed according to the face image to be recognized and a preset image processing model.
- the parameters of the image to be processed include the current brightness of the face image to be recognized, the first distance, and the first angle, the first distance represents the distance between the face to be recognized and the face recognition device, and the first angle represents the face to be recognized. An angle off the face recognition device.
- the second processing module 603 is configured to, based on the preset supplementary light model, determine the current supplementary light intensity according to the current brightness, the first distance and the first angle of the face image to be recognized, so as to control the supplementary light to perform supplementation according to the current supplementary light intensity Light.
- FIG. 8 is a schematic structural diagram of another face recognition supplementary light device provided by an embodiment of the present application.
- the face recognition supplementary light device 600 provided in this embodiment further includes:
- the second obtaining module 604 is configured to obtain a plurality of historical face images and respective historical recognition results corresponding to each historical face image.
- the third processing module 605 is configured to generate a respective multiple linear regression model according to each historical face image and the corresponding historical recognition result based on the preset multiple linear regression model.
- the fourth processing module 606 is configured to determine the optimal regression parameter combination according to all the multiple linear regression models, and determine the preset supplementary light model according to the preset multiple linear regression model and the optimal regression parameter combination.
- the third processing module 605 is specifically used for:
- each historical image parameter includes the current brightness of the historical face image, the second distance and the second angle, the second distance represents the distance between the historical face and the face recognition device, and the second angle represents the deviation of the historical face from the human face.
- the angle of the face recognition device includes the current brightness of the historical face image, the second distance and the second angle, the second distance represents the distance between the historical face and the face recognition device, and the second angle represents the deviation of the historical face from the human face.
- the fourth processing module 606 is further configured to:
- the preset multiple linear regression model with the corresponding regression parameters configured is determined as the preset supplementary light model.
- the second processing module 603 is further configured to:
- the first processing module 602 is specifically configured to:
- the current brightness of the face image to be recognized is determined according to a preset grayscale algorithm in the preset image processing model, and the preset grayscale algorithm is used to represent the distribution function of each grayscale value corresponding to all pixels of the face image to be recognized;
- the first angle is determined according to a preset image algorithm in the preset image processing model.
- the first processing module 602 is further configured to:
- the recognition frame area refers to the face recognition device performing face recognition. the area of the preset frame;
- For each first face sample image determine the ratio of the face area of the first face sample image to the area of the recognition frame, and obtain the distance between the face corresponding to the first face sample image and the face recognition device data;
- a distance mapping relationship is generated according to each ratio and corresponding distance data, and the distance mapping relationship is used to characterize the preset distance algorithm.
- the face recognition supplementary light device 600 further includes: a fifth processing module; the fifth processing module is used for:
- a training sample is determined from the face sample according to the recognition result, and the training sample is a face sample whose recognition result obtained after fill light is less than a preset threshold;
- the second face sample image obtained before each training sample is filled with light is used as the historical face image to optimize the optimal combination of regression parameters.
- the second processing module 603 is further configured to:
- the device for supplementing light by face recognition provided by the above embodiments can be used to execute each step in the method for supplementary light by face recognition provided by any one of the above embodiments.
- the specific implementation methods and technical effects are similar, and will not be repeated here. .
- modules division is only a logical function division, and there may be other division manners in actual implementation.
- multiple modules can be combined or can be integrated into another system.
- the coupling between the various modules may be implemented through some interfaces, which are usually electrical communication interfaces, but may be mechanical interfaces or other forms of interfaces.
- modules described as separate components may or may not be physically separate, and may be located in one place or distributed in different locations on the same or different devices.
- FIG. 9 is a schematic structural diagram of a face recognition device according to an embodiment of the present application.
- the face recognition device 700 may include: a fill light 701 , at least one processor 702 and a memory 703 .
- FIG. 9 shows a processor as an example.
- the fill light 701 is used for fill light.
- the connection between the fill light 701 and the face recognition device 700 is not limited.
- the memory 703 is used to store the program of the processor 702 .
- the program may include program code, and the program code includes computer operation instructions.
- the memory 703 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
- the processor 702 is configured to execute the computer program stored in the memory 703, so as to implement the steps in the face recognition and light supplementation methods in the above method embodiments.
- the processor 702 may be a central processing unit (central processing unit, referred to as CPU), or a specific integrated circuit (application specific integrated circuit, referred to as ASIC), or is configured to implement one or more of the embodiments of the present application. multiple integrated circuits.
- CPU central processing unit
- ASIC application specific integrated circuit
- the memory 703 may be independent or integrated with the processor 702 .
- the face recognition device 700 may also include:
- the bus 704 is used to connect the processor 702 and the memory 703 .
- the bus may be an industry standard architecture (abbreviated as ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus or the like. Buses can be divided into address bus, data bus, control bus, etc., but it does not mean that there is only one bus or one type of bus.
- ISA industry standard architecture
- PCI peripheral component
- EISA extended industry standard architecture
- the memory 703 and the processor 702 can communicate through an internal interface.
- the present application also provides a computer-readable storage medium
- the computer-readable storage medium may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM) ), magnetic disks or CDs and other media that can store program codes, specifically, a computer program is stored in the computer-readable storage medium, when at least one processor of the above-mentioned face recognition device executes the computer program, the face The recognition device executes each step of the methods for face recognition and light supplement provided by the above-mentioned various embodiments.
- Embodiments of the present application further provide a computer program product, where the computer program product includes a computer program, and the computer program is stored in a readable storage medium.
- At least one processor of the face recognition device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the device implements each step of the face recognition fill light method provided by the above-mentioned various embodiments.
- An embodiment of the present application further provides a face recognition system, including any possible face recognition device provided in the above-mentioned embodiments, and an access control device that is communicatively connected to the face recognition device.
- the access control device is used to select whether to open the access control according to the corresponding recognition result of the face recognition device.
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Input (AREA)
- Image Processing (AREA)
Abstract
本申请提供一种人脸识别补光方法、装置、人脸识别设备及其系统。该方法获取待识别人脸图像,并利用预设图像处理模型根据待识别人脸图像得到待处理图像参数,最后基于预设补光模型和待处理图像参数确定当前补光强度,控制补光灯按照当前补光强度进行补光。从而根据待识别人脸图像实时确定当前补光强度以进行适应性补光,不同于现有技术设置固定补光强度或者补光至固定值的补光策略,以使得所提供的补光策略能够满足实际工况中对补光强度的实际要求,有效提升了补光精确度。并且该人脸识别补光方法无需依赖光感传感器,不存在补光误差、耗时较长以及造成硬件资源损耗的问题,能够从根本上解决因环境光线不足导致人脸识别通过率较低的问题。
Description
本申请要求于2021年2月5日提交中国专利局、申请号为202110167451.4、申请名称为“人脸识别补光方法、装置、人脸识别设备及其系统”的中国专利申请的优先权,其与本申请的相关内容通过引用结合在本申请中。
本申请涉及人脸识别技术领域,尤其涉及一种人脸识别补光方法、装置、人脸识别设备及其系统。
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变。人脸识别技术作为用户身份验证的重要方式,其识别准确率将直接影响到用户账户的安全性。在人脸识别技术领域,环境光线不足则会降低人脸识别的成功率。然而目前采用人脸识别技术的刷脸门禁大多都未集成有摄像头补光策略,即使集成有补光策略,通常是通过光感传感器来获取人脸图像采集时的光照强度,一旦该光照强度达到一定预设阈值,便会控制开关以启动补光程序对光照强度进行固定强度的补光,又或根据当前光照强度线性调整补光强度至固定值。除此之外,还可以直接对摄像头采集到的人脸图像调整逆光补偿参数达到补光目的。
但是,上述的补光策略存在诸多问题。首先,设置的光感传感器获取的光照强度不但存在一定误差,还会增加人脸识别过程的耗时,并且频繁调用也会造成硬件资源的极大消耗。其次,人脸的光照强度会直接影响门禁设备获取到的人脸图像质量,光照强度太亮或太暗所采集到的人脸图像质量都会偏低,进而会影响人脸识别的通过率。而人脸采集时因为存在人脸摆放角度、距离等不可控因素,对于不同的摆放角度或距离光照强度则会具有不一样的要求。基于光感传感器采集到的光照强度仅增加固定补光或者线性调整补光强度至固定值的补光策略显然无法满足实际工况要求,补光精确度较低。再 者,现有技术中直接对摄像头采集到的人脸图像调整逆光补偿的补光策略并未从根本上解决因光线不足而需进行补光的问题,这种补光策略提升的人脸识别通过率十分有限。
可见,现有的解决方案中,需依赖硬件获取光照强度进行补光,不仅存在补光误差、耗时较长且硬件资源消耗较大的问题,还存在补光策略无法满足实际工况要求的问题。另外,直接对人脸图像调整逆光补偿达到补光目的的现有方案对于人脸识别通过率的提升十分有限。因此,亟需一种人脸识别补光策略,以克服现有技术中的上述技术缺陷。
发明内容
本申请提供一种人脸识别补光方法、装置、人脸识别设备及其系统,用于克服现有的补光策略依赖硬件获取补光强度进行补光存在补光误差、耗时较长、硬件资源消耗较大且无法满足实际工况需求,以及通过逆光补偿达到补光目的却不利于提升人脸识别通过率的技术问题。
本申请提供一种人脸识别补光方法,包括:
获取待识别人脸图像;
根据所述待识别人脸图像以及预设图像处理模型确定待处理图像参数,所述待处理图像参数包括所述待识别人脸图像的当前亮度、第一距离以及第一角度,所述第一距离表征待识别人脸与人脸识别设备之间的距离,所述第一角度表征所述待识别人脸偏离所述人脸识别设备的角度;
基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度,以控制补光灯按照所述当前补光强度进行补光。
在一种可能的设计中,在所述基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度之前,还包括:
获取多个历史人脸图像以及各历史人脸图像各自对应的历史识别结果;
基于预设多元线性回归模型,根据每个历史人脸图像以及相应的所述历史识别结果生成各自的多元线性回归模型;
根据所有多元线性回归模型确定最优回归参数组合,并根据所述预设多 元线性回归模型以及所述最优回归参数组合确定所述预设补光模型。
在一种可能的设计中,所述基于预设多元线性回归模型,根据每个历史人脸图像以及相应的所述历史识别结果生成各自的多元线性回归模型,包括:
根据各历史人脸图像以及所述预设图像处理模型确定每个历史人脸图像的历史图像参数;
针对每个历史人脸图像,根据所述预设多元线性回归模型、所述历史图像参数以及相应的所述历史识别结果生成对应的所述多元线性回归模型;
其中,每个历史图像参数包括所述历史人脸图像的当前亮度、第二距离以及第二角度,所述第二距离表征历史人脸与所述人脸识别设备之间的距离,所述第二角度表征所述历史人脸偏离所述人脸识别设备的角度。
在一种可能的设计中,所述根据所述预设多元线性回归模型以及所述最优回归参数组合确定所述预设补光模型,包括:
获取所述最优回归参数组合中的各优化回归参数;
配置各优化回归参数为所述预设多元线性回归模型的相应回归参数;
将配置完所述相应回归参数的所述预设多元线性回归模型确定为所述预设补光模型。
在一种可能的设计中,所述基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度,包括:
根据所述待识别人脸图像的目标亮度、所述第一距离、所述第一角度以及所述预设补光模型生成目标映射关系,所述目标映射关系用于表征目标人脸识别结果与所述目标亮度之间的函数关系;
根据所述目标映射关系获取所述目标人脸识别结果的最大值,以当所述目标人脸识别结果取所述最大值时得到所述目标亮度的对应值;
获取所述目标亮度的对应值与所述待识别人脸图像的当前亮度的对应值之间的差值,将所述差值确定为所述当前补光强度。
在一种可能的设计中,所述根据所述待识别人脸图像以及预设图像处理模型确定待处理图像参数,包括:
根据所述预设图像处理模型中的预设灰度算法确定所述待识别人脸图像的当前亮度,所述预设灰度算法用于表征所述待识别人脸图像的所有像素点对应的各灰度值的分布函数;
根据所述预设图像处理模型中的预设距离算法确定所述第一距离;
根据所述预设图像处理模型中的预设图像算法确定所述第一角度。
在一种可能的设计中,在所述根据所述预设图像处理模型中的预设距离算法确定所述第一距离之前,还包括:
通过所述人脸识别设备获取多个第一人脸样本图像,以得到每个第一人脸样本图像所对应的人脸面积以及识别框面积,所述识别框面积是指所述人脸识别设备在进行人脸识别时的预设框面积;
针对每个第一人脸样本图像,确定所述第一人脸样本图像的所述人脸面积与所述识别框面积的比值,并获取所述第一人脸样本图像所对应的人脸与所述人脸识别设备之间的距离数据;
根据各比值以及相应的所述距离数据生成距离映射关系,所述距离映射关系用于表征所述预设距离算法。
在一种可能的设计中,所述控制补光灯按照所述当前补光强度进行补光之后,还包括:
在不同的环境光线强度中,获取多个人脸样本在补光前和补光后所分别对应的识别结果;
从所述人脸样本中根据所述识别结果确定出训练样本,所述训练样本为补光后得到的所述识别结果小于预设阈值的所述人脸样本;
将每个训练样本补光前得到的第二人脸样本图像作为所述历史人脸图像,以优化所述最优回归参数组合。
在一种可能的设计中,所述控制补光灯按照所述当前补光强度进行补光,包括:
若所述当前补光强度对应的数值大于零,则控制所述补光灯对当前环境光线增强所述当前补光强度;
若所述当前补光强度对应的数值小于零,则控制所述补光灯对当前环境光线减弱所述当前补光强度。
第二方面,本申请提供一种人脸识别补光装置,包括:
第一获取模块,用于获取待识别人脸图像;
第一处理模块,用于根据所述待识别人脸图像以及预设图像处理模型确定待处理图像参数,所述待处理图像参数包括所述待识别人脸图像的当前亮 度、第一距离以及第一角度,所述第一距离表征待识别人脸与人脸识别设备之间的距离,所述第一角度表征所述待识别人脸偏离所述人脸识别设备的角度;
第二处理模块,用于基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度,以控制补光灯按照所述当前补光强度进行补光。
在一种可能的设计中,所述人脸识别补光装置,还包括:
第二获取模块,用于获取多个历史人脸图像以及各历史人脸图像各自对应的历史识别结果;
第三处理模块,用于基于预设多元线性回归模型,根据每个历史人脸图像以及相应的所述历史识别结果生成各自的多元线性回归模型;
第四处理模块,用于根据所有多元线性回归模型确定最优回归参数组合,并根据所述预设多元线性回归模型以及所述最优回归参数组合确定所述预设补光模型。
在一种可能的设计中,所述第三处理模块,具体用于:
根据各历史人脸图像以及所述预设图像处理模型确定每个历史人脸图像的历史图像参数;
针对每个历史人脸图像,根据所述预设多元线性回归模型、所述历史图像参数以及相应的所述历史识别结果生成对应的所述多元线性回归模型;
其中,每个历史图像参数包括所述历史人脸图像的当前亮度、第二距离以及第二角度,所述第二距离表征历史人脸与所述人脸识别设备之间的距离,所述第二角度表征所述历史人脸偏离所述人脸识别设备的角度。
在一种可能的设计中,所述第四处理模块,具体用于:
获取所述最优回归参数组合中的各优化回归参数;
配置各优化回归参数为所述预设多元线性回归模型的相应回归参数;
将配置完所述相应回归参数的所述预设多元线性回归模型确定为所述预设补光模型。
在一种可能的设计中,所述第二处理模块,还用于:
根据所述待识别人脸图像的目标亮度、所述第一距离、所述第一角度以及所述预设补光模型生成目标映射关系,所述目标映射关系用于表征目标人 脸识别结果与所述目标亮度之间的函数关系;
根据所述目标映射关系获取所述目标人脸识别结果的最大值,以当所述目标人脸识别结果取所述最大值时得到所述目标亮度的对应值;
获取所述目标亮度的对应值与所述待识别人脸图像的当前亮度的对应值之间的差值,将所述差值确定为所述当前补光强度。
在一种可能的设计中,所述第一处理模块,具体用于:
根据所述预设图像处理模型中的预设灰度算法确定所述待识别人脸图像的当前亮度,所述预设灰度算法用于表征所述待识别人脸图像的所有像素点对应的各灰度值的分布函数;
根据所述预设图像处理模型中的预设距离算法确定所述第一距离;
根据所述预设图像处理模型中的预设图像算法确定所述第一角度。
在一种可能的设计中,所述第一处理模块,还用于:
通过所述人脸识别设备获取多个第一人脸样本图像,以得到每个第一人脸样本图像所对应的人脸面积以及识别框面积,所述识别框面积是指所述人脸识别设备在进行人脸识别时的预设框面积;
针对每个第一人脸样本图像,确定所述第一人脸样本图像的所述人脸面积与所述识别框面积的比值,并获取所述第一人脸样本图像所对应的人脸与所述人脸识别设备之间的距离数据;
根据各比值以及相应的所述距离数据生成距离映射关系,所述距离映射关系用于表征所述预设距离算法。
在一种可能的设计中,所述人脸识别补光装置,还包括:第五处理模块;所述第五处理模块,用于:
在不同的环境光线强度中,获取多个人脸样本在补光前和补光后所分别对应的识别结果;
从所述人脸样本中根据所述识别结果确定出训练样本,所述训练样本为补光后得到的所述识别结果小于预设阈值的所述人脸样本;
将每个训练样本补光前得到的第二人脸样本图像作为所述历史人脸图像,以优化所述最优回归参数组合。
在一种可能的设计中,所述第二处理模块,还用于:
若所述当前补光强度对应的数值大于零,则控制所述补光灯对当前环境 光线增强所述当前补光强度;
若所述当前补光强度对应的数值小于零,则控制所述补光灯对当前环境光线减弱所述当前补光强度。
第三方面,本申请提供一种人脸识别设备,包括:
补光灯;
处理器;以及
存储器,用于存储所述处理器的计算机程序;
其中,所述处理器配置为经由执行所述计算机程序来执行第一方面所提供的任意一种可能的人脸识别补光方法。
第四方面,本申请提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序用于执行第一方面所提供的任意一种可能的人脸识别补光方法。
第五方面,本申请还提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现第一方面所提供的任意一种可能的人脸识别补光方法。
第六方面,本申请提供一种人脸识别系统,包括:第三方面所提供的任意一种可能的人脸识别设备以及与所述人脸识别设备通信连接的门禁设备;
所述门禁设备用于根据所述人脸识别设备的相应识别结果选择是否开启门禁。
本申请提供一种人脸识别补光方法、装置、人脸识别设备及其系统。该人脸识别补光方法首先获取待识别人脸图像,然后根据待识别人脸图像以及预设图像处理模型确定待处理图像参数,最后基于预设补光模型,根据所确定的待处理图像参数中的待识别人脸图像的当前亮度、第一距离以及第一角度确定当前补光强度,进而控制补光灯对人脸识别设备的摄像头按照当前补光强度进行补光,从而完成人脸识别中的补光操作。其中,第一距离表征待识别人脸与人脸识别设备之间的距离,第一角度表征待识别人脸偏离人脸识别设备的角度。本申请提供的人脸识别补光方法基于预设补光模型,根据待处理图像参数确定当前补光强度,无需依赖于光感传感器的硬件资源,能够根据待识别人脸实时且精确地获得当前补光强度,满足实际工况中光线要求不一的需求。并且从根本上解决了补光问题达到补光目的,有利于提升人脸 识别通过率。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种应用场景示意图;
图2为本申请实施例提供的一种人脸识别补光方法的流程示意图;
图3为本申请实施例提供的另一种人脸识别补光方法的流程示意图;
图4为本申请实施例提供的再一种人脸识别补光方法的流程示意图;
图5为本申请实施例提供的又一种人脸识别补光方法的流程示意图;
图6为本申请实施例提供的又一种人脸识别补光方法的流程示意图;
图7为本申请实施例提供的一种人脸识别补光装置的结构示意图;
图8为本申请实施例提供的另一种人脸识别补光装置的结构示意图;
图9为本申请实施例提供的一种人脸识别设备的结构示意图。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的方法和装置的例子。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清 楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
现有技术中集成有补光策略的人脸识别设备,通常需要通过光感传感器获取人脸图像采集时的光照强度。在当光照强度达到一定预设阈值时,便控制开关启动补光程序对光照强度进行固定强度的补光,又或是根据当前光照强度线性调整补光强度至固定值。另外,现有技术中还可以直接对采集到的人脸图像调整逆光补偿参数以达到补光目的。然而,现有的补光策略存在诸多问题。首先,设置光感传感器获取光照强度存在一定误差,并且会增加人脸识别过程耗时以及频繁调用也会造成硬件资源的极大消耗。其次,光照太亮或太暗所采集到的人脸图像质量都会偏低,而人脸图像采集时又存在摆放角度、距离等不可控因素,对于不同的摆放角度或距离,光照强度则会具有不一样的要求。因此,基于光感传感器采集到的光照强度仅增加固定补光或者线性调整补光强度至固定值的补光策略显然无法满足实际工况要求,补光精确度较低。另外,直接对摄像头采集的人脸图像调整逆光补偿的补光策略并未从根本上解决因光线不足而需进行补光的问题,这种补光策略提升的人脸识别通过率十分有限。可见,针对现有技术中存在的上述技术缺陷,亟需一种人脸识别的补光策略。
本申请提供一种人脸识别补光方法、装置、人脸识别设备及其系统。本申请提供的人脸识别补光方法的发明构思在于:第一,根据采集到的待识别人脸图像以及预设图像处理模块确定待处理图像参数,即确定待识别人脸图像的当前亮度、待识别人脸与人脸识别设备之间的距离、待识别人脸偏离人脸识别设备的角度。通过待识别人脸图像确定相应的表征参数,无需依赖光感传感器得到光照强度,不存在补光误差、耗时以及硬件资源消耗的问题。第二,基于预设补光模型,根据所得到的各表征参数确定当前补光强度,进而控制补光灯对人脸识别设备的摄像头按照所确定的当前补光强度进行补光。可见,当前补光强度是基于预设补光模型以及待识别人脸图像的待处理图像参数所确定的,并非是人脸识别设备设置固定补光强度或者补光至固定值。因此,本申请提供的补光策略实时且精确。结合以上两点,本申请提供的补光策略从根本上解决了因光线不足存在的补光问题,有利于提升人脸识别设备的通过率。
以下,对本申请实施例的示例性应用场景进行介绍。
图1为本申请实施例提供的一种应用场景示意图。如图1所示,本申请实施例提供的人脸识别补光方法可以由本申请实施例提供的人脸识别补光装置执行,具体地,本申请实施例提供的人脸识别补光装置11可以通过执行计算机程序以完成本申请实施例提供的人脸识别补光方法,该计算机程序可以被配置于人脸识别设备12的处理器中,使得人脸识别设备12集成有本申请实施例提供的人脸识别补光方法,以当进行人脸识别时实施补光策略以达到补光效果,提升人脸识别设备12的通过率。其中,人脸识别设备12可以被应用于门禁安防系统中,也可以被应用于金融安全等身份验证的各种人脸识别场合,亦或应用于电视会议人机交互系统、考勤系统等场合,对此,本实施例不作限定。另外,图1中对于人脸识别设备12的具体规格和类型不作图示,在实际工况中可以根据实际的应用场合选择设置相适宜的设备。
需要说明的是,上述应用场景仅仅是示意性的,本申请实施例提供的人脸识别补光方法、装置、人脸识别设备及其系统包括但不仅限于上述应用场景。
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。
图2为本申请实施例提供的一种人脸识别补光方法的流程示意图。如图2所示,本实施例提供的人脸识别补光方法,包括:
S101:获取待识别人脸图像。
通过人脸识别设备的摄像头采集待识别人脸的图像,即获取到待识别人脸图像。例如,待识别人脸处于摄像头的图像采集范围内,即可通过摄像头获取到待识别人脸图像。其中,对于摄像头的规格、摄像头在人脸识别设备上的设置位置以及所形成的图像采集范围,可以根据人脸识别设备具体的应用场合进行设置,本实施例不作限定。
S102:根据待识别人脸图像以及预设图像处理模型确定待处理图像参数。
其中,待处理图像参数包括待识别人脸图像的当前亮度、第一距离以及第一角度,第一距离表征待识别人脸与人脸识别设备之间的距离,第一角度表征待识别人脸偏离人脸识别设备的角度。
在得到待识别人脸图像之后,利用预设图像处理模型根据待识别人脸图像确定待处理图像参数。所确定的待处理图像参数包括待识别人脸图像的当前亮度、待识别人脸与人脸识别设备之间的距离以及待识别人脸偏离人脸识别设备的角度。其中,待识别人脸图像的当前亮度可以反馈人脸识别设备获取待识别人脸图像时的当前环境光线。待识别人脸与人脸识别设备之间的距离定义为第一距离。例如,第一距离可以为人脸识别设备采集待识别人脸的图像时,待识别人脸与人脸识别设备的屏幕之间的距离。相应地,第一角度可以为人脸识别设备采集待识别人脸时,待识别人脸偏离人脸识别设备正视面的角度,比如可以通过预设图像处理模型中的预设图像算法对待识别人脸图像进行处理,得到第一角度,预设图像算法例如openCV的Rotated Rect.rrect。
当获取到待识别人脸图像后,通过预设图像处理模型对待识别人脸图像进行相应处理或者计算即可得到上述的待处理图像参数。
在一种可能的设计中,根据待识别人脸图像以及预设图像处理模型中的预设灰度算法可以得到待处理图像参数中的待识别人脸图像的当前亮度。其中,预设灰度算法是指能够表征待识别人脸图像的所有像素点对应的各灰度值的分布函数。
对于任意图像而言,其像素值的大小可以采用灰度进行描述,通常而言,灰度值的范围为[0,255],也称之为灰度级。预设灰度算法,例如灰度直方图,则为关于灰度级的分布函数,是对图像灰度级的分布进行统计的相应函数。具体地,灰度直方图可以将图像中所有的像素点按照各自灰度值的大小统计出每个灰度值出现的频率,进而得到图像的像素的平均值,将该平均值确定为该图像的当前亮度,以通过该当前亮度反馈获取该图像时的当前环境光线。
在实际工况中,预设灰度算法可以为Opencv的Scalar.mean函数得以实现。换言之,使用Opencv的Scalar.mean函数对待识别人脸图像进行处理,得到的处理结果即为待识别人脸图像的当前亮度。需要说明的是,预设灰度算法包括但不仅限于本实施例中列举的Opencv的Scalar.mean函数。
第一距离的确定可以根据预设图像处理模型中的预设距离算法实现。其可能的实现方式如图3所示。图3为本申请实施例提供的另一种人脸识别补光方法的流程示意图。如图3所示,本实施例提供的人脸识别补光方法中,根据预设图像处理模型中的预设距离算法确定第一距离,包括:
S201:通过人脸识别设备获取多个第一人脸样本图像,以得到每个第一人脸样本图像所对应的人脸面积以及识别框面积。
其中,识别框面积是指人脸识别设备在进行人脸识别时的预设框面积。
通过人脸识别设备获取多个第一人脸样本图像,例如,可以从人脸识别设备的视频库中获取到人脸识别设备曾经获取到的多个第一人脸样本图像,为了提高确定的第一距离的精确度,这些第一人脸样本图像可以为不同的图像,当然,其中也可以包含有相同的图像,对此,本实施例不作限定。获取到多个第一人脸样本图像之后,逐一计算每个第一人脸样本图像上人脸面积以及获取该第一人脸样本图像的人脸识别设备的识别框面积,从而得到每个第一人脸样本图像所对应的人脸面积以及识别框面积。其中,人脸面积则指第一人脸样本图像中人脸的面积。识别框面积是人脸识别设备进行人脸识别时设置好的预设框面积,每个人脸识别设备在进行人脸识别采集人脸图像时都设置有对应的预设框面积,该预设框面积即为识别框面积。
S202:针对每个第一人脸样本图像,确定第一人脸样本图像的人脸面积与识别框面积的比值,并获取第一人脸样本图像所对应的人脸与人脸识别设备之间的距离数据。
在得到每个第一人脸样本图像,以及每个第一人脸样本图像所对应的人脸面积和识别框面积之后,针对每个第一人脸样本图像,确定该第一人脸样本图像的人脸面积与识别框面积之间的比值。同时,还对采集第一人脸样本图像时,该第一人脸样本图像所对应的人脸与人脸识别设备之间的距离数据进行获取,即还获取第一人脸样本图像的第一距离,第一距离的具体内容可参考前述步骤,在此不再赘述。
当获取到每个第一人脸样本图像的人脸面积与其识别框面积的比值以及距离数据之后,对所获取到的数据进行整理,即可得到距离映射关系。
S203:根据各比值以及相应的距离数据生成距离映射关系。
其中,距离映射关系用于表征预设距离算法。
假设以S
k表征第一人脸样本图像的人脸面积,A
k表征第一人脸样本图像的识别框面积,k表示多个第一人脸样本图像中的任意一个第一人脸样本图像,其取值为大于0的正整数,S
k/A
k则为该第一人脸样本图像的人脸面积与识别框面积的比值。L
k表征该第一人脸样本图像所对应的人脸与人脸识别设 备之间的距离数据。
通过对获取到的各人脸面积与识别框面积的比值以及距离数据进行数据整理,可以发现,距离数据和人脸面积与识别框面积的比值之间具有如下表达式(1)所示的关系:
L
k=S
k/A
k×Q (1)
其中,Q为常数。
将上述表达式(1)表征的关系确定为距离映射关系,即为根据各第一人脸样本图像的人脸面积与识别框面积的比值以及对应的该第一人脸样本图像的距离数据生成了距离映射关系,将该距离映射关系定义为预设距离算法,进而当已知待识别人脸图像的人脸面积和识别框面积,即可通过上述表达式(1)确定待识别人脸图像的第一距离。
S204:根据预设距离算法、待识别人脸图像的人脸面积以及待识别人脸图像对应的识别框面积确定第一距离。
在获取到待识别人脸图像后,则可以获取到该待识别人脸图像的人脸面积以及获取该待识别人脸图像的人脸识别设备的预设框面积,即可以获取待识别人脸图像的人脸面积以及待识别人脸图像对应的识别框面积,之后,利用上述表达式(1)即可得到相应的距离数据,该距离数据则为待识别人脸图像所对应的待识别人脸与人脸识别设备之间的距离,即第一距离。
本申请实施例提供的人脸识别补光方法,根据预设图像处理模型中的预设距离算法确定第一距离。首先通过人脸识别设备获取多个第一人脸样本图像,得到每个第一人脸样本图像所对应的人脸面积和识别框面积,进而针对每个第一人脸样本图像,确定该第一人脸样本图像的人脸面积与识别框面积的比值,并获取该第一人脸样本图像所对应的人脸与人脸识别设备之间距离数据,最后对获取到的每个第一人脸样本图像的比值以及距离数据进行数据整理,可以生成距离映射关系,以采用所生成的距离映射关系表征预设距离算法。从而在获取到待识别人脸图像的人脸面积与识别框面积后,则可以利用该预设距离算法确定待识别人脸图像所对应的待识别人脸与人脸识别设备之间的距离,即待处理图像参数中的第一距离。本实施例提供了一种确定第一距离的有效实现方案,填补了现有技术中获取第一距离的技术空白。
S103:基于预设补光模型,根据待识别人脸图像的当前亮度、第一距离 以及第一角度确定当前补光强度,以控制补光灯按照当前补光强度进行补光。
在得到待识别人脸图像的当前亮度、第一距离以及第一角度之后,基于预设补光模型,确定当前补光强度,进而控制补光灯按照当前补光强度的对应值精确地进行补光,以使得人脸识别设备在补光后获取到的待识别人脸图像能够克服环境光线不足所导致的人脸识别通过率较低的问题。
若确定的当前补光强度对应的数值大于零,则控制补光灯对当前环境光线增强当前补光强度。而若当前补光强度对应的数值小于零,则控制补光灯对当前环境光线减弱当前补光强度。相应地,若确定的当前补光强度对应的数值等于零,则控制补光灯不对当前环境光线进行任何补光操作。
可以理解的是,补光灯对当前环境光线进行补光之后,人脸识别设备基于补光后的环境光线中重新获取待识别人脸的待识别人脸图像,并进一步根据人脸识别设备中集成的预设识别算法确定识别结果,以完成人脸识别设备对待识别人脸的相关识别操作。对于人脸识别设备对待识别人脸的识别工作本实施例不作限定。
本申请实施例提供的人脸识别补光方法,首先获取待识别人脸图像,然后利用预设图像处理模型对待识别人脸图像进行处理,得到待处理图像参数,再基于预设补光模型以及待处理图像参数确定出当前补光强度,进而控制补光灯按照当前补光强度进行补光。可见,本申请实施例提供的人脸识别补光方法在进行补光时,并非是于人脸识别设备中设置固定补光强度或者补光至固定值来达到补光目的,而是根据待识别人脸图像的待处理图像参数确定实时的当前补光强度,因而实施的补光是对根据人脸识别设备获取待识别人脸图像时的当前环境光线进行适应性补光,从而使得补光策略可以满足实际工况中由于人脸摆放角度、距离等不可控因素导致补光强度不一样的实际要求,有效提升了补光精确度。并且,本申请实施例提供的人脸识别补光方法无需依赖光感传感器的硬件资源,不存在补光误差、耗时较长以及造成硬件资源损耗的问题。从根本上解决了因环境光线不足存在的补光问题,有利于提升人脸识别通过率。
如上实施例所描述,基于预设补光模型,根据待识别人脸图像的待处理图像参数可以确定出待识别人脸图像的当前补光强度。在一种可能的设计中,在步骤S103之前,本申请实施例提供的人脸识别补光方法还包括如图4所示 的步骤,图4为本申请实施例提供的再一种人脸识别补光方法的流程示意图。如图4所示,本实施例包括:
S301:获取多个历史人脸图像以及各历史人脸图像各自对应的历史识别结果。
例如,获取人脸识别设备的刷脸记录,从中获取多个历史人脸图像和各历史人脸图像各自对应的识别结果,将历史人脸图像对应的识别结果定义为历史识别结果,即可以获取到多个历史人脸图像以及各历史人脸图像各自对应的历史识别结果。
对于人脸识别技术而言,人脸识别设备通常是将获取到的人脸图像与其视频库中所存储的人脸图像进行特征比对,得出比对结果,再将比对结果与其预设的通过阈值进行比较,以确定该人脸图像所对应的人脸是否可以通过人脸识别设备所属的门禁或安防等识别系统。若比较结果满足预设的通过阈值,则表明该人脸可以通过识别,反之,则不能通过识别。通常人脸识别设备会将识别结果以比对分数的形式进行表示。
相应地,各历史人脸图像各自对应的历史识别结果也为比对分数进行表示。
S302:基于预设多元线性回归模型,根据每个历史人脸图像以及相应的历史识别结果生成各自的多元线性回归模型。
在获取到每个历史人脸图像以及每个历史人脸图像所对应的历史识别结果之后,基于预设多元线性回归模型,构建每个历史人脸图像和其所对应的历史识别结果各自的多元线性回归模型。
通过获取多个历史人脸图像以及各自对应的历史识别结果,可以发现每个历史识别结果与其对应的历史人脸图像的历史图像参数之间呈一定的线性相关性,因此,可以采用预设多元线性回归模型表征这种线性相关性。其中,每个历史人脸图像的历史图像参数可以根据该历史人脸图像以及预设图像处理模型进行确定。
历史人脸图像的历史图像参数与上述实施例中的待识别人脸图像的待处理图像参数相类似。其中,历史人脸图像的历史图像参数包括历史人脸图像的当前亮度、第二距离以及第二角度。将历史人脸图像所对应的历史人脸与人脸识别设备之间的距离定义为第二距离,将历史人脸图像所对应的历史人 脸偏离获取该历史人脸图像的人脸识别设备的角度定义为第二角度。与根据待识别人脸图像和预设图像处理模型获取待处理图像参数相类似的方法即可根据历史人脸图像以及预设图像处理模型确定历史人脸图像的历史图像参数,具体地确定过程可参考前述详细步骤,在此不再赘述。
通过对获取到的各历史人脸图像的历史图像参数和其所对应的历史识别结果对每个历史人脸图像都利用预设图像处理模型确定出该历史人脸图像的历史图像参数,即根据各历史人脸图像以及预设图像处理模型确定每个历史人脸图像的历史图像参数。
预设多元线性回归模型可以如下表达式(2)所示:
其中,x
1、x
2和x
3分别表示预设多元线性回归模型的多个自变量,y表示预设多元线性回归模型的一个应变量,β
1、β
2、β
3、β
4、β
5、β
6均为预设多元线性回归模型中的各回归系数,β
0为预设多元线性回归模型的随机误差项。
获取到的历史人脸图像的历史图像参数中的历史人脸图像的当前亮度、第二距离以及第二角度与该历史人脸图像的历史识别结果之间呈现一定的相关性,这种相关性符合一个应变量依赖多个自变量的变化关系,比如,对于各历史人脸图像和其历史识别结果而言,可以发现,当历史人脸图像的当前相对、第二距离以及第二角度适中时则相应的历史识别结果对应的数值较大,即刷脸通过率更高,而当历史人脸图像的当前亮度、第二距离以及第二角度越大或者越小所对应的历史识别结果对应的数值都较小,即刷脸通过率更低。因此,可以将历史人脸图像的当前亮度、第二距离以及第二角度分别确定为上述变化关系中的自变量,而将该组自变量所对应的历史识别结果确定为上述变化关系中的应变量。
针对每个历史人脸图像,根据上述预设多元线性回归模型、该历史人脸图像的历史图像参数以及相应的历史识别结果则可以生成该历史人脸图像所对应的多元线性回归模型,从而可以基于预设多元线性回归模型,根据每个历史人脸图像以及其相应的历史识别结果生成各自的多元线性回归模型。
假设有n个历史人脸图像,则可以通过如下所示的矩阵模型表征所有历史人脸图像对应的多元线性回归模型。
矩阵模型如下表示:
上述矩阵模型可以写作y=xβ,其中y表示人脸识别设备对历史人脸图像的历史识别结果,x表示历史人脸图像的历史图像参数,β表示多元线性回归模型中的各回归参数。n表示选取的刷脸记录中历史人脸图像的数量,该数量大于零。i表示预设多元线性回归模型中除随机误差项之外回归系数的数量,i的取值大于零。
S303:根据所有多元线性回归模型确定最优回归参数组合,并根据预设多元线性回归模型以及最优回归参数组合确定预设补光模型。
针对每个历史人脸图像,都可以形成各自的多元线性回归模型。根据所有的多元线性回归模型确定回归系数的最佳值,当确定了回归系数的最佳值,即确定了最优回归参数组合。换言之,根据所有多元线性回归模型确定出β
0、β
1、β
2、β
3、β
4、β
5、β
6的最佳回归参数组合。例如,基于所有的多元线性回归模型,可以利用最小二乘估计法来计算每个多元线性回归模型的损失函数,以将损失函数最小的多元线性回归模型中的各回归参数确定为最优回归参数组合。
可以理解的是,为了确定出精确度更高的最优回归参数组合,可以采用大量的历史人脸图像生成其对应的多元线性组合回归模型,以基于大量的样本数据确定出最优回归参数组合。
在确定了最优回归参数组合之后,根据最优回归参数组合以及预设多元线性回归模型确定预设补光模型。换言之,预设补光模型是将最优回归参数组合中的各回归参数替代预设多元线性回归模型中的各回归参数之后得到的回归模型。
例如,首先获取最优回归参数组合中的各优化回归参数,各优化回归参数比如分别为β′
0、β′
1、β′
2、β′
3、β′
4、β′
5、β′
6,然后将各优化回归参数配置为预设多元线性回归模型的相应回归参数中,则将配置完相应回归参数的预设多元线性回归模型确定为预设补光模型。具体地,将各优化回归参数配置为上述表达式(2)中的各相应回归参数中,则配置完相应回归参数的预设多元线性回归模型,即预设补光模型,如下表达式(3)表示:
其中,Y表示预设补光模型所表征的识别结果,X
1、X
2、X
3则表征需要通过预设补光模型确定识别结果的人脸图像的待处理图像参数中的各数据。
本申请实施例提供的人脸识别补光方法在基于预设补光模型根据待识别人脸图像的当前亮度、第一距离以及第一角度确定当前补光强度之前,还包括确定预设补光模型。首先获取多个历史人脸图像以及各历史人脸图像各自对应的历史识别结果,然后基于预设多元线性回归模型,根据每个历史人脸图像以及相应的历史识别结果生成各自的多元线性回归模型,再根据所有多元线性回归模型确定最优回归参数组合,最后根据最优回归参数组合以及预设多元线性回归模型确定预设补光模型,以对任意待识别人脸图像根据预设补光模型确定对应的当前补光强度,进而克服因环境光线不足导致人脸识别通过率较低的问题,能够从根本上解决补光问题。
通过上述实施例可知,预设补光模型能够表征待处理图像参数与待处理图像参数所对应的识别结果之间的映射关系,其中,待处理图像参数所对应的识别结果为人脸识别设备对获取到的待识别人脸图像进行识别得到。实施补光的目的是为了克服环境光线不足导致人脸识别通过率较低的问题。因此,基于待识别人脸图像的待处理图像参数所能达到的最佳补光效果则可以通过预设补光模型所表征的识别结果的最大值进行体现。基于此,步骤S103中基于预设补光模型,根据待识别人脸图像的当前亮度、第一距离以及第一角度确定当前补光强度的可能实现方式如图5所示。
图5为本申请实施例提供的又一种人脸识别补光方法的流程示意图。如图5所示,本实施例提供的人脸识别补光方法中,基于预设补光模型,根据待识别人脸图像的当前亮度、第一距离以及第一角度确定当前补光强度,包括:
S401:根据待识别人脸图像的目标亮度、第一距离、第一角度以及预设补光模型生成目标映射关系。
其中,目标映射关系用于表征目标人脸识别结果与目标亮度之间的函数关系。
假设目标亮度为补光后期望人脸识别设备获取待识别人脸图像所能达到的亮度,则该目标亮度为未知量,而待识别人脸图像的第一距离以及第一角 度均为已知量。将待识别人脸图像的已知量代入至上述表达式(3)表示的预设补光模型中,即可得到目标映射关系如下表达式(4)所示:
其中,Y
α表示目标人脸识别结果,X
α表示目标亮度,X
2和X
3分别表示第一距离和第一角度。
S402:根据目标映射关系获取目标人脸识别结果的最大值,以当目标人脸识别结果取最大值时得到目标亮度的对应值。
在上述表达式(4)中,除过表示目标人脸识别结果的Y
α和目标亮度X
α为未知量,其余的参量均为已知量。而当目标人脸识别结果取最大值时,目标亮度的取值即为补光效果所期望达到的最佳值。
因此,基于上述表达式(4)表征的目标映射关系,获取目标人脸识别结果的最大值,以当目标人脸识别结果取最大值可以得到目标亮度的对应值。
为了获取目标人脸识别结果的最大值,可将上述表达式(4)改写为如下表达式(5):
可见,上述表达式(5)是关于X
α的一元二次表达式。
若要获取目标人脸识别结果的最大值,即可对f(X
α)表达式进行求导运算,得到f′(X
α),以当f′(X
α)=0时,获得X
α的取值,该X
α的取值可以使得目标人脸识别结果取最大值,从而得到目标亮度的对应值,目标亮度的该对应值即为补光后期望待识别人脸图像所能达到的亮度。
S403:获取目标亮度的对应值与待识别人脸图像的当前亮度的对应值之间的差值,将差值确定为当前补光强度。
在得到目标亮度的对应值后,将目标亮度的对应值与待识别人脸图像的当前亮度的对应值求差,以得到差值,该差值即为需要补光的强度,即将差值确定为当前补光强度,以进一步控制补光灯按照当前所确定的当前补光强度采取补光措施。
本申请实施例提供的人脸识别补光方法,在基于预设补光模型,根据待识别人脸图像的待处理参数确定当前补光强度时,首先根据待识别人脸图像的目标亮度、第一距离、第一角度以及预设补光模型生成目标映射关系,该目标映射关系用于表征目标人脸识别结果与目标亮度之间的函数关系。然后 根据目标映射关系获取目标人脸识别结果的最大值,以当目标人脸识别结果取最大值时得到目标亮度的对应值,再将目标亮度的对应值与待识别人脸图像的当前亮度的对应值作差,得到差值,将差值确定为当前补光强度。从而基于预设补光模型,待识别人脸图像的当前亮度、第一距离以及第一角度确定出需要进行补光的当前补光强度,以使的补光后人脸识别设备能够针对待识别人脸当前所处的环境光线得到最大的识别结果,进而从根源上解决因环境光线不足导致人脸识别设备通过率较低的问题。
为了进一步提高本申请实施例提供的人脸识别补光方法的有效性,本申请实施例提供的人脸识别补光方法在控制补光灯按照当前补光强度进行补光之后,还包括对预设补光模型的验证优化过程。
图6为本申请实施例提供的又一种人脸识别补光方法的流程示意图。如图6所示,本实施例包括:
S501:在不同的环境光线强度中,获取多个人脸样本在补光前和补光后所分别对应的识别结果。
在不同的环境光线强度中,比如不同的日照明暗环境,或者不同的光线明暗环境,采集多个人脸样本在补光前和补光后所分别对应的识别结果。例如,对于一人脸样本,获取补光前人脸识别设备针对该人脸样本的识别结果,然后对人脸样本所处的当前环境光线进行补光之后通过人脸识别设备重新获得识别结果,从而可以采集到每个人脸样本在补光前和补光后所分别对应的识别结果。
其中,本实施例对于人脸样本的数量不作限定。不同的环境光线强度的设置是为了丰富数据样本,以加强本实施例提供的验证优化效果。
可以理解的是,在人脸识别设备上可以配置补光开关,开启补光开关,则人脸识别设备可以根据所确定的当前补光强度进行补光,以获得补光后的识别结果。若将补光开关关闭,则可以获取到补光前的相应识别结果。
S502:从人脸样本中根据识别结果确定出训练样本。
其中,训练样本为补光后得到的识别结果小于预设阈值的人脸样本。
在得到各人脸样本补光前后所对应的识别结果之后,筛选出补光后的识别结果小于预设阈值的人脸样本,这些人脸样本可以认为是补光效果不理想的样本,将筛选出的人脸样本确定为训练样本,即从人脸样本中根据识别结 果确定出了训练样本。其中,预设阈值所对应的具体数值可以根据实际工况设置,对此本实施例不作限定。
S503:将每个训练样本补光前得到的第二人脸样本图像作为历史人脸图像,以优化最优回归参数组合。
利用筛选出的训练样本进一步优化图4所示实施例中的最优回归参数组合,以对已确定出的预设补光模型进行验证优化。
例如,针对筛选出的每个训练样本,采集该训练样本补光前人脸识别设备所获取到的该训练样本的图像,即第二人脸样本图像,然后将第二人脸样本图像确定作为图4所示实施例中的历史人脸图像,以根据图4所示实施例的各步骤重新确定最优回归参数组合,以对之前确定的最优回归参数组合进行优化,从而达到验证优化预设补光模型的目的。
将各第二人脸样本图像作为历史人脸图像重新确定最优回归参数组合,以验证优化预设补光模型的实现过程与图4所示实施例中确定最优回归参数组合确定预设补光模型的过程相类似,在此不再赘述。
本申请实施例提供的人脸识别补光方法,在控制补光灯按照当前补光强度进行补光之后,还包括对最优回归参数组合进行优化,以验证优化预设补光模型的步骤。首先在不同的环境光线强度中,获取多个人脸样本在补光前后所分别对应的识别结果,然后从补光后的识别结果中确定出小于预设阈值的人脸样本作为训练样本,再将每个训练样本补光前得到的第二人脸样本图像作为历史人脸图像,重新确定最优回归参数组合,以优化之前的最优回归参数组合,进而达到验证优化预设补光模型的目的,使得基于预设补光模型确定的当前补光强度具备更高的精确度和有效性,有利于人脸识别补光方法在实际工况中的普及使用。
下述为本申请装置实施例,可以用于执行本申请对应的方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请对应的方法实施例。
图7为本申请实施例提供的一种人脸识别补光装置的结构示意图。如图7所示,本实施例提供的人脸识别补光装置600,包括:
第一获取模块601,用于获取待识别人脸图像。
第一处理模块602,用于根据待识别人脸图像以及预设图像处理模型确定待处理图像参数。
其中,待处理图像参数包括待识别人脸图像的当前亮度、第一距离以及第一角度,第一距离表征待识别人脸与人脸识别设备之间的距离,第一角度表征待识别人脸偏离人脸识别设备的角度。
第二处理模块603,用于基于预设补光模型,根据待识别人脸图像的当前亮度、第一距离以及第一角度确定当前补光强度,以控制补光灯按照当前补光强度进行补光。
在图7所示实施例的基础上,图8为本申请实施例提供的另一种人脸识别补光装置的结构示意图。如图8所示,本实施例提供的人脸识别补光装置600,还包括:
第二获取模块604,用于获取多个历史人脸图像以及各历史人脸图像各自对应的历史识别结果。
第三处理模块605,用于基于预设多元线性回归模型,根据每个历史人脸图像以及相应的历史识别结果生成各自的多元线性回归模型。
第四处理模块606,用于根据所有多元线性回归模型确定最优回归参数组合,并根据预设多元线性回归模型以及最优回归参数组合确定预设补光模型。
在一种可能的设计中,第三处理模块605,具体用于:
根据各历史人脸图像以及预设图像处理模型确定每个历史人脸图像的历史图像参数;
针对每个历史人脸图像,根据预设多元线性回归模型、历史图像参数以及相应的历史识别结果生成对应的多元线性回归模型;
其中,每个历史图像参数包括历史人脸图像的当前亮度、第二距离以及第二角度,第二距离表征历史人脸与人脸识别设备之间的距离,第二角度表征历史人脸偏离人脸识别设备的角度。
在一种可能的设计中,第四处理模块606,还用于:
获取最优回归参数组合中的各优化回归参数;
配置各优化回归参数为预设多元线性回归模型的相应回归参数;
将配置完相应回归参数的预设多元线性回归模型确定为预设补光模型。
在一种可能的设计中,第二处理模块603,还用于:
根据待识别人脸图像的目标亮度、第一距离、第一角度以及预设补光模 型生成目标映射关系,目标映射关系用于表征目标人脸识别结果与目标亮度之间的函数关系;
根据目标映射关系获取目标人脸识别结果的最大值,以当目标人脸识别结果取最大值时得到目标亮度的对应值;
获取目标亮度的对应值与待识别人脸图像的当前亮度的对应值之间的差值,将差值确定为当前补光强度。
在一种可能的设计中,第一处理模块602,具体用于:
根据预设图像处理模型中的预设灰度算法确定待识别人脸图像的当前亮度,预设灰度算法用于表征待识别人脸图像的所有像素点对应的各灰度值的分布函数;
根据预设图像处理模型中的预设距离算法确定第一距离;
根据预设图像处理模型中的预设图像算法确定第一角度。
在一种可能的设计中,第一处理模块602,还用于:
通过人脸识别设备获取多个第一人脸样本图像,以得到每个第一人脸样本图像所对应的人脸面积以及识别框面积,识别框面积是指人脸识别设备在进行人脸识别时的预设框面积;
针对每个第一人脸样本图像,确定第一人脸样本图像的人脸面积与识别框面积的比值,并获取第一人脸样本图像所对应的人脸与人脸识别设备之间的距离数据;
根据各比值以及相应的距离数据生成距离映射关系,距离映射关系用于表征预设距离算法。
在一种可能的设计中,人脸识别补光装置600,还包括:第五处理模块;该第五处理模块,用于:
在不同的环境光线强度中,获取多个人脸样本在补光前和补光后所分别对应的识别结果;
从人脸样本中根据识别结果确定出训练样本,训练样本为补光后得到的识别结果小于预设阈值的人脸样本;
将每个训练样本补光前得到的第二人脸样本图像作为历史人脸图像,以优化最优回归参数组合。
在一种可能的设计中,第二处理模块603,还用于:
若当前补光强度对应的数值大于零,则控制补光灯对当前环境光线增强当前补光强度;
若当前补光强度对应的数值小于零,则控制补光灯对当前环境光线减弱当前补光强度。
值得说明的,上述各实施例提供的人脸识别补光装置,可用于执行上述任一实施例提供的人脸识别补光方法中的各步骤,具体实现方式和技术效果类似,这里不再赘述。
本申请所提供的上述各装置实施例仅仅是示意性的,其中的模块划分仅仅是一种逻辑功能划分,实际实现时可以有另外的划分方式。例如多个模块可以结合或者可以集成到另一个系统。各个模块相互之间的耦合可以是通过一些接口实现,这些接口通常是电性通信接口,但是也不排除可能是机械接口或其它的形式接口。因此,作为分离部件说明的模块可以是或者也可以不是物理上分开的,既可以位于一个地方,也可以分布到同一个或不同设备的不同位置上。
图9为本申请实施例提供的一种人脸识别设备的结构示意图。如图9所示,该人脸识别设备700可以包括:补光灯701、至少一个处理器702以及存储器703。图9以一个处理器为例示出。
补光灯701,用于进行补光。对于补光灯701与人脸识别设备700的连接不作限定。
存储器703,用于存放处理器702的程序。具体地,程序可以包括程序代码,程序代码包括计算机操作指令。
存储器703可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器702配置为用于执行存储器703存储的计算机程序,以实现以上各方法实施例中人脸识别补光方法中的各步骤。
其中,处理器702可能是一个中央处理器(central processing unit,简称为CPU),或者是特定集成电路(application specific integrated circuit,简称为ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路。
可选地,存储器703既可以是独立的,也可以跟处理器702集成在一起。当存储器703是独立于处理器702之外的器件时,该人脸识别设备700,还 可以包括:
总线704,用于连接处理器702以及存储器703。总线可以是工业标准体系结构(industry standard architecture,简称为ISA)总线、外部设备互连(peripheral component,PCI)总线或扩展工业标准体系结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等,但并不表示仅有一根总线或一种类型的总线。
可选的,在具体实现上,如果存储器703和处理器702集成在一块芯片上实现,则存储器703和处理器702可以通过内部接口完成通信。
本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁盘或者光盘等各种可以存储程序代码的介质,具体的,该计算机可读存储介质中存储有计算机程序,当上述人脸识别设备的至少一个处理器执行该计算机程序时,该人脸识别设备执行上述的各种实施方式提供的人脸识别补光方法的各个步骤。
本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在可读存储介质中。人脸识别设备的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得设备实施上述的各种实施方式提供的人脸识别补光方法的各个步骤。
本申请实施例还提供一种人脸识别系统,包括上述实施例所提供的任意一种可能的人脸识别设备以及与人脸识别设备通信连接的门禁设备。其中,门禁设备用于根据人脸识别设备的相应识别结果选择是否开启门禁。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由权利要求书指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求书来限制。
Claims (14)
- 一种人脸识别补光方法,其特征在于,包括:获取待识别人脸图像;根据所述待识别人脸图像以及预设图像处理模型确定待处理图像参数,所述待处理图像参数包括所述待识别人脸图像的当前亮度、第一距离以及第一角度,所述第一距离表征待识别人脸与人脸识别设备之间的距离,所述第一角度表征所述待识别人脸偏离所述人脸识别设备的角度;基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度,以控制补光灯按照所述当前补光强度进行补光。
- 根据权利要求1所述的人脸识别补光方法,其特征在于,在所述基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度之前,还包括:获取多个历史人脸图像以及各历史人脸图像各自对应的历史识别结果;基于预设多元线性回归模型,根据每个历史人脸图像以及相应的所述历史识别结果生成各自的多元线性回归模型;根据所有多元线性回归模型确定最优回归参数组合,并根据所述预设多元线性回归模型以及所述最优回归参数组合确定所述预设补光模型。
- 根据权利要求2所述的人脸识别补光方法,其特征在于,所述基于预设多元线性回归模型,根据每个历史人脸图像以及相应的所述历史识别结果生成各自的多元线性回归模型,包括:根据各历史人脸图像以及所述预设图像处理模型确定每个历史人脸图像的历史图像参数;针对每个历史人脸图像,根据所述预设多元线性回归模型、所述历史图像参数以及相应的所述历史识别结果生成对应的所述多元线性回归模型;其中,每个历史图像参数包括所述历史人脸图像的当前亮度、第二距离以及第二角度,所述第二距离表征历史人脸与所述人脸识别设备之间的距离,所述第二角度表征所述历史人脸偏离所述人脸识别设备的角度。
- 根据权利要求2所述的人脸识别补光方法,其特征在于,所述根据所述预设多元线性回归模型以及所述最优回归参数组合确定所述预设补光模型, 包括:获取所述最优回归参数组合中的各优化回归参数;配置各优化回归参数为所述预设多元线性回归模型的相应回归参数;将配置完所述相应回归参数的所述预设多元线性回归模型确定为所述预设补光模型。
- 根据权利要求1-4任一项所述的人脸识别补光方法,其特征在于,所述基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度,包括:根据所述待识别人脸图像的目标亮度、所述第一距离、所述第一角度以及所述预设补光模型生成目标映射关系,所述目标映射关系用于表征目标人脸识别结果与所述目标亮度之间的函数关系;根据所述目标映射关系获取所述目标人脸识别结果的最大值,以当所述目标人脸识别结果取所述最大值时得到所述目标亮度的对应值;获取所述目标亮度的对应值与所述待识别人脸图像的当前亮度的对应值之间的差值,将所述差值确定为所述当前补光强度。
- 根据权利要求1-4任一项所述的人脸识别补光方法,其特征在于,所述根据所述待识别人脸图像以及预设图像处理模型确定待处理图像参数,包括:根据所述预设图像处理模型中的预设灰度算法确定所述待识别人脸图像的当前亮度,所述预设灰度算法用于表征所述待识别人脸图像的所有像素点对应的各灰度值的分布函数;根据所述预设图像处理模型中的预设距离算法确定所述第一距离;根据所述预设图像处理模型中的预设图像算法确定所述第一角度。
- 根据权利要求6所述的人脸识别补光方法,其特征在于,在所述根据所述预设图像处理模型中的预设距离算法确定所述第一距离之前,还包括:通过所述人脸识别设备获取多个第一人脸样本图像,以得到每个第一人脸样本图像所对应的人脸面积以及识别框面积,所述识别框面积是指所述人脸识别设备在进行人脸识别时的预设框面积;针对每个第一人脸样本图像,确定所述第一人脸样本图像的所述人脸面积与所述识别框面积的比值,并获取所述第一人脸样本图像所对应的人脸与 所述人脸识别设备之间的距离数据;根据各比值以及相应的所述距离数据生成距离映射关系,所述距离映射关系用于表征所述预设距离算法。
- 根据权利要求2-4任一项所述的人脸识别补光方法,其特征在于,所述控制补光灯按照所述当前补光强度进行补光之后,还包括:在不同的环境光线强度中,获取多个人脸样本在补光前和补光后所分别对应的识别结果;从所述人脸样本中根据所述识别结果确定出训练样本,所述训练样本为补光后得到的所述识别结果小于预设阈值的所述人脸样本;将每个训练样本补光前得到的第二人脸样本图像作为所述历史人脸图像,以优化所述最优回归参数组合。
- 根据权利要求1-4任一项所述的人脸识别补光方法,其特征在于,所述控制补光灯按照所述当前补光强度进行补光,包括:若所述当前补光强度对应的数值大于零,则控制所述补光灯对当前环境光线增强所述当前补光强度;若所述当前补光强度对应的数值小于零,则控制所述补光灯对当前环境光线减弱所述当前补光强度。
- 一种人脸识别补光装置,其特征在于,包括:第一获取模块,用于获取待识别人脸图像;第一处理模块,用于根据所述待识别人脸图像以及预设图像处理模型确定待处理图像参数,所述待处理图像参数包括所述待识别人脸图像的当前亮度、第一距离以及第一角度,所述第一距离表征待识别人脸与人脸识别设备之间的距离,所述第一角度表征所述待识别人脸偏离所述人脸识别设备的角度;第二处理模块,用于基于预设补光模型,根据所述待识别人脸图像的当前亮度、所述第一距离以及所述第一角度确定当前补光强度,以控制补光灯按照所述当前补光强度进行补光。
- 一种人脸识别设备,其特征在于,包括:补光灯;处理器;以及存储器,用于存储所述处理器的计算机程序;其中,所述处理器配置为经由执行所述计算机程序来执行权利要求1至9任一项所述的人脸识别补光方法。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至9任一项所述的人脸识别补光方法。
- 一种计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至9任一项所述的人脸识别补光方法。
- 一种人脸识别系统,其特征在于,包括:权利要求11所述的人脸识别设备以及与所述人脸识别设备通信连接的门禁设备;所述门禁设备用于根据所述人脸识别设备的相应识别结果选择是否开启门禁。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110167451.4A CN112906529B (zh) | 2021-02-05 | 2021-02-05 | 人脸识别补光方法、装置、人脸识别设备及其系统 |
| CN202110167451.4 | 2021-02-05 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022166316A1 true WO2022166316A1 (zh) | 2022-08-11 |
Family
ID=76124269
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/132166 Ceased WO2022166316A1 (zh) | 2021-02-05 | 2021-11-22 | 人脸识别补光方法、装置、人脸识别设备及其系统 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112906529B (zh) |
| WO (1) | WO2022166316A1 (zh) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116233582A (zh) * | 2023-01-28 | 2023-06-06 | 浙江大华技术股份有限公司 | 一种补光方法、装置、设备及存储介质 |
| CN116245769A (zh) * | 2023-03-16 | 2023-06-09 | 北京百度网讯科技有限公司 | 图像处理方法、装置、设备以及存储介质 |
| CN117133042A (zh) * | 2023-09-20 | 2023-11-28 | 中国邮政储蓄银行股份有限公司 | 自适应场景的人脸识别方法、装置、存储介质与电子设备 |
| CN118433962A (zh) * | 2024-05-06 | 2024-08-02 | 深圳欧拓圃科技有限公司 | 一种智能补光控制方法和系统 |
| CN118430046A (zh) * | 2024-05-15 | 2024-08-02 | 广东银讯信息服务有限公司 | 一种支付前人脸识别数据处理方法及系统 |
| CN118522059A (zh) * | 2024-07-23 | 2024-08-20 | 湖南警察学院 | 一种用于公安实战场景人脸识别数据处理系统 |
| CN119071641A (zh) * | 2024-08-05 | 2024-12-03 | 浙江工业大学 | 一种基于光源强度自适应调整的图像质量增强方法 |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112906529B (zh) * | 2021-02-05 | 2024-06-04 | 深圳前海微众银行股份有限公司 | 人脸识别补光方法、装置、人脸识别设备及其系统 |
| CN113569721B (zh) * | 2021-07-26 | 2024-09-27 | 北京科技大学 | 一种基于分布式智能补光的人脸识别系统及方法 |
| CN114051101A (zh) * | 2021-10-29 | 2022-02-15 | 聚好看科技股份有限公司 | 一种人脸补光的自动调节方法及装置 |
| CN114093015A (zh) * | 2022-01-21 | 2022-02-25 | 杭州魔点科技有限公司 | 针对人脸识别的智能补光方法、电子设备及存储介质 |
| CN117541478B (zh) * | 2022-02-28 | 2025-01-07 | 荣耀终端有限公司 | 图像处理方法及其相关设备 |
| CN114596620B (zh) * | 2022-05-10 | 2022-08-05 | 深圳市海清视讯科技有限公司 | 人脸识别设备补光控制方法、装置、设备及存储介质 |
| CN115604557A (zh) * | 2022-08-23 | 2023-01-13 | 山东大学(Cn) | 一种隧道图像采集的车载相机智能补光装置及方法 |
| CN116233619B (zh) * | 2023-04-27 | 2023-07-14 | 北京城建智控科技股份有限公司 | 一种应用于人脸识别的补光控制方法 |
| CN116634280A (zh) * | 2023-06-13 | 2023-08-22 | 光控特斯联(上海)信息科技有限公司 | 一种智能补光方法、装置及一种人脸识别系统和门禁系统 |
| CN117831262A (zh) * | 2023-11-22 | 2024-04-05 | 超级视线科技有限公司 | 基于图像处理的行人违章实时纠正方法及系统 |
| CN120047915B (zh) * | 2025-04-25 | 2025-07-11 | 华南理工大学 | 一种变电站智能巡检机器人巡检图像的识别方法 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107071292A (zh) * | 2017-03-10 | 2017-08-18 | 深圳市金立通信设备有限公司 | 一种补光方法及终端 |
| WO2020078243A1 (zh) * | 2018-10-19 | 2020-04-23 | 阿里巴巴集团控股有限公司 | 一种图像处理和人脸图像识别方法、装置及设备 |
| CN111885304A (zh) * | 2020-07-16 | 2020-11-03 | 深圳传音控股股份有限公司 | 拍摄方法、移动终端和计算机存储介质 |
| CN112040108A (zh) * | 2020-09-16 | 2020-12-04 | 重庆紫光华山智安科技有限公司 | 一种人脸抓拍相机混合补光控制方法、系统、介质及终端 |
| CN112906529A (zh) * | 2021-02-05 | 2021-06-04 | 深圳前海微众银行股份有限公司 | 人脸识别补光方法、装置、人脸识别设备及其系统 |
Family Cites Families (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10579871B2 (en) * | 2016-02-03 | 2020-03-03 | Hefei Xu | Biometric composite imaging system and method reusable with visible light |
| CN106303565B (zh) * | 2016-08-12 | 2019-06-18 | 广州华多网络科技有限公司 | 视频直播的画质优化方法和装置 |
| CN108197546B (zh) * | 2017-12-26 | 2020-12-11 | 深圳市友信长丰科技有限公司 | 人脸识别中光照处理方法、装置、计算机设备及存储介质 |
| CN108319940A (zh) * | 2018-04-12 | 2018-07-24 | Oppo广东移动通信有限公司 | 人脸识别处理方法、装置、设备及存储介质 |
| CN109151337A (zh) * | 2018-10-25 | 2019-01-04 | Oppo(重庆)智能科技有限公司 | 人脸识别补光方法、人脸识别补光装置及移动终端 |
| CN109784281A (zh) * | 2019-01-18 | 2019-05-21 | 深圳壹账通智能科技有限公司 | 基于人脸特征的产品推荐方法、装置及计算机设备 |
| CN112307806A (zh) * | 2019-07-25 | 2021-02-02 | 深圳爱思普芯科技有限公司 | 头部姿态检测装置和方法 |
| CN110738142B (zh) * | 2019-09-26 | 2022-12-20 | 广州广电卓识智能科技有限公司 | 一种自适应改善人脸图像采集的方法、系统及存储介质 |
| CN111698409A (zh) * | 2020-06-23 | 2020-09-22 | 韶关市启之信息技术有限公司 | 一种室内拍照灯光调光方法 |
-
2021
- 2021-02-05 CN CN202110167451.4A patent/CN112906529B/zh active Active
- 2021-11-22 WO PCT/CN2021/132166 patent/WO2022166316A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107071292A (zh) * | 2017-03-10 | 2017-08-18 | 深圳市金立通信设备有限公司 | 一种补光方法及终端 |
| WO2020078243A1 (zh) * | 2018-10-19 | 2020-04-23 | 阿里巴巴集团控股有限公司 | 一种图像处理和人脸图像识别方法、装置及设备 |
| CN111885304A (zh) * | 2020-07-16 | 2020-11-03 | 深圳传音控股股份有限公司 | 拍摄方法、移动终端和计算机存储介质 |
| CN112040108A (zh) * | 2020-09-16 | 2020-12-04 | 重庆紫光华山智安科技有限公司 | 一种人脸抓拍相机混合补光控制方法、系统、介质及终端 |
| CN112906529A (zh) * | 2021-02-05 | 2021-06-04 | 深圳前海微众银行股份有限公司 | 人脸识别补光方法、装置、人脸识别设备及其系统 |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116233582A (zh) * | 2023-01-28 | 2023-06-06 | 浙江大华技术股份有限公司 | 一种补光方法、装置、设备及存储介质 |
| CN116245769A (zh) * | 2023-03-16 | 2023-06-09 | 北京百度网讯科技有限公司 | 图像处理方法、装置、设备以及存储介质 |
| CN117133042A (zh) * | 2023-09-20 | 2023-11-28 | 中国邮政储蓄银行股份有限公司 | 自适应场景的人脸识别方法、装置、存储介质与电子设备 |
| CN118433962A (zh) * | 2024-05-06 | 2024-08-02 | 深圳欧拓圃科技有限公司 | 一种智能补光控制方法和系统 |
| CN118430046A (zh) * | 2024-05-15 | 2024-08-02 | 广东银讯信息服务有限公司 | 一种支付前人脸识别数据处理方法及系统 |
| CN118522059A (zh) * | 2024-07-23 | 2024-08-20 | 湖南警察学院 | 一种用于公安实战场景人脸识别数据处理系统 |
| CN119071641A (zh) * | 2024-08-05 | 2024-12-03 | 浙江工业大学 | 一种基于光源强度自适应调整的图像质量增强方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112906529A (zh) | 2021-06-04 |
| CN112906529B (zh) | 2024-06-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022166316A1 (zh) | 人脸识别补光方法、装置、人脸识别设备及其系统 | |
| US20210341998A1 (en) | Gaze-point determining method, contrast adjusting method, and contrast adjusting apparatus, virtual reality device and storage medium | |
| CN119338823B (zh) | 人脸图像质量评估方法、系统及计算机可读存储介质 | |
| WO2022042135A1 (zh) | 人脸图像的选择方法、装置、设备及存储介质 | |
| CN114222121B (zh) | 视频编码方法、装置、电子设备和计算机可读存储介质 | |
| CN101287073A (zh) | 变光照环境中机器视觉系统稳定亮度图像自适应获取方法 | |
| CN112200736B (zh) | 基于强化学习的图像处理方法及模型训练方法、装置 | |
| CN114298985B (zh) | 缺陷检测方法、装置、设备及存储介质 | |
| CN112614109B (zh) | 图像质量评估方法、装置以及计算机可读存储介质 | |
| WO2019223068A1 (zh) | 虹膜图像局部增强方法、装置、设备及存储介质 | |
| CN110909772B (zh) | 一种高精度实时多尺度表盘指针检测方法和系统 | |
| CN118392891A (zh) | 基于机器视觉的芯片封装缺陷检测方法及系统 | |
| CN116645527A (zh) | 图像识别方法、系统、电子设备和存储介质 | |
| CN110580452A (zh) | 一种基于视频的人脸识别系统中的多模板人脸自动录入方法 | |
| US20220107398A1 (en) | Method for controlling working frequency of tof sensor, and apparatus, device, and medium | |
| CN118864332A (zh) | 受限资源下室内vslam的光照自适应调节方法及装置 | |
| CN117670818A (zh) | 一种水泥杆倾斜的检测方法、装置、设备及存储介质 | |
| CN110458754A (zh) | 图像生成方法及终端设备 | |
| CN111311610A (zh) | 图像分割的方法及终端设备 | |
| CN120673716A (zh) | 基于图像区域特征的分区调光方法、装置、设备及介质 | |
| CN118096720B (zh) | 基于人工智能的手机主板视觉检测方法及系统 | |
| CN119313623A (zh) | 一种半导体芯片的缺陷分类方法、系统及可读存储介质 | |
| WO2025025465A1 (zh) | 一种红外人脸图像质量评价的方法及装置 | |
| CN111242047A (zh) | 图像处理方法和装置、电子设备及计算机可读存储介质 | |
| CN113870127B (zh) | 一种图像对比度调节方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21924311 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14.11.2023) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21924311 Country of ref document: EP Kind code of ref document: A1 |
