Face recognition method and device and computer equipment
By obtaining information parameters of facial images and adjacent images, combining nonlinear mapping and fault-tolerant smoothing processing, and dynamically adjusting weights, the problem of inaccurate anti-false detection results in face recognition methods is solved, and accurate face recognition in complex environments is achieved.
Patent Information
- Application Number
- CN202510961726.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-17
AI Technical Summary
In existing face recognition methods, fixed anti-counterfeiting patterns and parameters are difficult to apply to all application scenarios, resulting in inaccurate anti-counterfeiting detection results.
By obtaining the image information parameters of the face image to be identified and the adjacent images, combining nonlinear mapping and fault-tolerant smoothing processing, dynamically adjusting the weights of the image information parameters, determining the quality evaluation results, and selecting the matching anti-counterfeiting strategy from the anti-counterfeiting strategy library for face recognition.
The accuracy of anti-counterfeiting detection results in the face recognition process is improved, and the appropriate anti-counterfeiting strategy can be selected according to the specific scenario to adapt to complex and changing application environments.
Smart Images

Figure CN120808419A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of face recognition, in particular to a face recognition method, device and computer equipment. BACKGROUND
[0002] With the development of face recognition technology, face recognition technology is applied in multiple fields. With the wide application of face recognition technology, the anti-fake problem in the face recognition process is gradually valued.
[0003] The existing face recognition method mainly detects anti-fake by pre-setting fixed anti-fake mode and parameters in the face recognition process. However, in actual application, the deployment scene or environment has complex and changeable characteristics, such as backlight in the corridor or doorway being photographed, rain causing light scattering imaging, camera tilt installation, and clothing changes (dress, helmet, etc.) of the person being photographed. Therefore, the fixed anti-fake mode and parameters are difficult to adapt to all application scenarios, and there is a problem that the anti-fake detection result in the face recognition process is inaccurate in some cases.
[0004] For the existing face recognition method, the fixed anti-fake mode and parameters are difficult to adapt to all application scenarios, and there is a problem that the anti-fake detection result in the face recognition process is inaccurate in some cases. At present, there is no effective solution. SUMMARY
[0005] Therefore, it is necessary to provide a face recognition method, device and computer equipment for the above technical problems.
[0006] In a first aspect, the present application provides a face recognition method. The method comprises:
[0007] obtaining a face image to be recognized and at least one adjacent image; the adjacent image is an image frame adjacent to the face image to be recognized;
[0008] determining a quality evaluation result of the face image to be recognized based on image information parameters of the face image to be recognized and image information parameters of the adjacent image, and an initial weight of the image information parameters of the face image to be recognized; the image information parameters include at least two of the following parameters: light parameter, face occlusion parameter, face sharpness parameter, face position parameter and face angle parameter;
[0009] determining an anti-fake strategy corresponding to the quality evaluation result of the face image to be recognized based on the quality evaluation result of the face image to be recognized, and performing face recognition on the face image to be recognized based on the determined anti-fake strategy.
[0010] In one of the embodiments, before determining the quality evaluation result of the to-be-identified face image based on the image information parameters of the to-be-identified face image and the adjacent image, and the initial weight of the image information parameters of the to-be-identified face image, comprising:
[0011] Determining the image information parameters of the to-be-identified face image and the adjacent image based on the to-be-identified face image and the adjacent image.
[0012] In one of the embodiments, the determining the image information parameters of the to-be-identified face image and the adjacent image based on the to-be-identified face image and the adjacent image, comprising:
[0013] Respectively performing the same image recognition on the to-be-identified face image and the adjacent image to obtain the image recognition result of the to-be-identified face image and the image recognition result of the adjacent image; the image recognition comprises at least two of strong light reflection recognition, face occlusion recognition, face sharpness recognition, face position recognition and angle recognition between face and camera;
[0014] Determining the image information parameters of the to-be-identified face image and the adjacent image based on the image recognition result of the to-be-identified face image and the image recognition result of the adjacent image.
[0015] In one of the embodiments, the determining the quality evaluation result of the to-be-identified face image based on the image information parameters of the to-be-identified face image and the adjacent image, and the initial weight of the image information parameters of the to-be-identified face image, comprising:
[0016] Based on the image information parameters of the to-be-identified face image and the adjacent image, performing non-linear mapping and fault-tolerant smoothing processing on the image information parameters of the to-be-identified face image to obtain the processed image information parameters of the to-be-identified face image;
[0017] Determining the quality evaluation result of the to-be-identified face image based on the processed image information parameters of the to-be-identified face image, and the initial weight of the image information parameters of the to-be-identified face image.
[0018] In one of the embodiments, the performing non-linear mapping and fault-tolerant smoothing processing on the image information parameters of the to-be-identified face image based on the image information parameters of the to-be-identified face image and the adjacent image to obtain the processed image information parameters of the to-be-identified face image, comprising:
[0019] performing nonlinear mapping on the image information parameter of the to-be-identified face image to obtain a mapped image information parameter;
[0020] performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image to obtain a processed image information parameter of the to-be-identified face image.
[0021] In one of the embodiments, the performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image to obtain a processed image information parameter of the to-be-identified face image comprises:
[0022] performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image in a sliding average manner to obtain a processed image information parameter of the to-be-identified face image.
[0023] In one of the embodiments, the determining the quality evaluation result of the to-be-identified face image based on the processed image information parameter of the to-be-identified face image and the initial weight of the image information parameter of the to-be-identified face image comprises:
[0024] adjusting the initial weight of each image information parameter of the to-be-identified face image based on the difference between the processed image information parameter of the to-be-identified face image and the parameter adjustment threshold of the image information parameter of the to-be-identified face image to obtain the adjusted weight of the processed image information parameter of the to-be-identified face image;
[0025] performing weighted summation on the processed image information parameter of the to-be-identified face image and the adjusted weight of the processed image information parameter of the to-be-identified face image to obtain the quality evaluation result of the to-be-identified face image.
[0026] In one of the embodiments, the determining the anti-fraud strategy corresponding to the quality evaluation result of the to-be-identified face image based on the quality evaluation result of the to-be-identified face image and performing face recognition on the to-be-identified face image based on the determined anti-fraud strategy comprises:
[0027] selecting the anti-fraud strategy corresponding to the quality evaluation result of the to-be-identified face image from a preset anti-fraud strategy library based on the quality evaluation result of the to-be-identified face image;
[0028] performing face recognition on the to-be-identified face image by using the anti-fraud strategy parameter corresponding to the selected anti-fraud strategy.
[0029] In a second aspect, the present application further provides a face recognition device. The device comprises:
[0030] an image acquisition module, configured to acquire a face image to be recognized and at least one adjacent image; the adjacent image is an image frame adjacent to the face image to be recognized;
[0031] a quality evaluation module, configured to determine a quality evaluation result of the face image to be recognized based on image information parameters of the face image to be recognized and the adjacent image, and an initial weight of the image information parameters of the face image to be recognized; the image information parameters comprise at least two of a strong light parameter, a face occlusion parameter, a face sharpness parameter, a face position parameter and a face angle parameter of the image;
[0032] and a face recognition module, configured to determine a false-proof strategy corresponding to the quality evaluation result of the face image to be recognized based on the quality evaluation result of the face image to be recognized, and perform face recognition on the face image to be recognized based on the determined false-proof strategy.
[0033] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the face recognition method of the first aspect when executing the computer program.
[0034] The face recognition method, device and computer device described above acquire the face image to be recognized and the adjacent image, determine the quality evaluation result of the face image to be recognized according to the image information parameters of the face image to be recognized and the multiple image information parameters of the adjacent image, select the false-proof strategy corresponding to the quality evaluation result of the face image to be recognized from the false-proof strategy library based on the quality evaluation result, and perform face recognition on the face image to be recognized. The quality evaluation result of the face image to be recognized is calculated by the image information parameters of the image adjacent to the face image to be recognized together with the multiple image information parameters of the face image to be recognized, which can make the quality evaluation result more accurate. The false-proof strategy matched with the quality evaluation result of the face image to be recognized is selected according to the quality evaluation result, which can select the appropriate false-proof strategy according to the specific situation and ensure the accuracy of the false-proof detection result in the face recognition process. The problem that the fixed false-proof mode and parameters of the existing face recognition method are difficult to apply to all application scenarios and the false-proof detection result in the face recognition process is inaccurate in some cases is solved.
[0035] Details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS
[0036] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0037] Figure 1 The hardware structure block diagram of the terminal for the face recognition method provided by an embodiment of the application is shown in FIG. 1.
[0038] Figure 2 The flow chart of the face recognition method provided by an embodiment of the application is shown in FIG. 2.
[0039] Figure 3 The flow chart of the face recognition method provided by a preferred embodiment of the application is shown in FIG. 3.
[0040] Figure 4 The structure block diagram of the face recognition device provided by an embodiment of the application is shown in FIG. 4. DETAILED DESCRIPTION
[0041] In order to more clearly understand the purpose, technical solutions and advantages of the application, the application is described and explained in detail below with reference to the drawings and embodiments.
[0042] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the same meaning as understood by one of ordinary skill in the art to which the present application belongs. In the present application, "one", "a", "an", "the", "these" and similar words do not represent a quantitative limitation, but can be singular or plural. In the present application, the terms "include", "contain", "have" and any variants thereof are intended to cover non-exclusive inclusion; for example, a process, method and system, product or device containing a series of steps or modules (units) are not limited to the listed steps or modules (units), but can include steps or modules (units) not listed, or can include other steps or modules (units) inherent to the process, method, product or device. In the present application, the terms "connected", "connected", "coupled" and similar words do not limit to physical or mechanical connection, but can include electrical connection, whether direct or indirect. In the present application, "multiple" means two or more. The association between the associated objects is described by the term "and / or", which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. In general, the character " / " represents an "or" relationship between the associated objects. In the present application, the terms "first", "second", "third" and the like are only used to distinguish similar objects, and do not represent a specific order of the objects.
[0043] The method embodiments provided in the present embodiment can be executed in a terminal, a computer or a similar computing device. For example, the method embodiments are executed on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the face recognition method of the present embodiment. As shown in Figure 1 , the terminal can include one or more (only one is shown in Figure 1 ) processors 102 and a memory 104 for storing data, wherein the processor 102 can include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The terminal can further include a transmission device 106 for communication function and an input / output device 108. Those skilled in the art can understand that Figure 1 the structure shown is only schematic, which does not limit the structure of the terminal. For example, the terminal can further include more or less components than those shown in Figure 1 , or have a different configuration from that shown in Figure 1 .
[0044] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as the computer program corresponding to the face recognition method in the present embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the terminal through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0045] The transmission device 106 is used to receive or send data via a network. The network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, RF) module which is used to communicate with the Internet in a wireless manner.
[0046] In the present embodiment, a face recognition method is provided, Figure 2 is a flowchart of the face recognition method of the present embodiment, as shown in Figure 2 , the flowchart includes the following steps:
[0047] Step S210, obtaining a to-be-identified face image and at least one adjacent image; the adjacent image is an image frame adjacent to the to-be-identified face image.
[0048] The above obtaining the to-be-identified face image and the at least one adjacent image can be capturing the face image in the capturing area by using a capturing system of the face recognition device. The above capturing system can be one or more of a visible light camera (such as an RGB camera, a wide dynamic camera, etc.), an active optical sensing device (such as an infrared camera, a 3D structured light module, etc.), a multi-modal fusion system, etc. Among them, the above to-be-identified face image must be a face image with an image definition that meets a certain preset condition. If the definition is too low, other image frames adjacent to the to-be-identified image frame are selected. If the definition of the image that meets the preset condition cannot be collected for several times in succession, the parameters related to the definition of the camera are adjusted to obtain the to-be-identified face image that meets the definition requirement. The above preset condition can be that the definition is greater than or equal to a preset minimum definition threshold. The above minimum definition threshold can be set according to specific needs, which is not limited in the embodiment. The above at least one adjacent image can be one image frame adjacent to the to-be-identified face image, or can be multiple image frames adjacent to the to-be-identified face image. Because the image collection is collected at a certain frequency, if the definition of the image frame before or after the to-be-identified face image does not meet the preset condition, the image frame that meets the requirement and is farther away from the to-be-identified face image can be selected as the adjacent image of the to-be-identified face image. It should be noted that when selecting the adjacent image, the sampling time interval between the adjacent image and the to-be-identified face image should not be too long, and the face photographed by the adjacent image and the to-be-identified face image should be consistent.
[0049] Step S220, determining a quality evaluation result of the to-be-identified face image based on the image information parameters of the to-be-identified face image and the adjacent image, and the initial weight of the image information parameters of the to-be-identified face image; the image information parameters include at least two of the light parameter, the face occlusion parameter, the face definition parameter, the face position parameter and the face angle parameter.
[0050] The initial weight of the image information parameter of the to-be-identified face image can be the weight of each image information parameter corresponding to the current anti-fraud strategy of the face recognition device, that is, the weight of each image information parameter corresponding to the anti-fraud strategy when the face recognition device captures the to-be-identified face image. It should be noted that the initial weight of each image information parameter can be pre-set by a user or a default value according to historical experience. For example, the image information parameters include a strong light parameter, a face occlusion parameter, a face sharpness parameter, a face position parameter, and a face angle parameter. The initial weight of the strong light parameter is 0.1, the initial weight of the face occlusion parameter is 0.2, the initial weight of the face sharpness parameter is 0.3, the initial weight of the face position parameter is 0.2, and the initial weight of the face angle parameter is 0.2.
[0051] Further, the quality evaluation result of the to-be-identified face image can be an evaluation index for evaluating the capturing effect of the current face recognition device, and can be a score. Specifically, the larger the quality evaluation score of the to-be-identified face image, the worse the matching between the current capturing environment and the current anti-fraud strategy, and the anti-fraud strategy needs to be adjusted to adapt to the current capturing environment. The smaller the quality evaluation result of the to-be-identified face image, the better the matching between the current capturing environment and the current anti-fraud strategy, and the current anti-fraud strategy can not be adjusted.
[0052] In this step, the strong light parameter of the image can be an evaluation index of strong light reflection (such as screen reflection, glass reflection, etc.) in the image. Generally, to determine the strong light parameter of the image, a value range of the strong light parameter of the image can be pre-set, and the strong light parameter of the image is determined in the value range of the strong light parameter based on whether there is strong light reflection in the image, the strength of the strong light reflection. For example, the value range of the strong light parameter of the image is pre-set as [0, 1], where 0 represents no strong light reflection, and 1 represents that the strong light reflection is greater than or equal to a pre-set strong light reflection threshold. The pre-set strong light reflection threshold can be set according to specific conditions. Generally, when the strong light reflection in the image is greater than or equal to the strong light reflection threshold, the strong light reflection is obvious at this time.
[0053] The face occlusion parameter can be an evaluation index of the degree of occlusion of the face in the image (such as being occluded by a mask, glasses, hands, and the like). Generally, to determine the face occlusion parameter of the image, a value range of the face occlusion parameter of the image can be pre-set, and the face occlusion parameter of the image is determined in the value range of the face occlusion parameter based on whether there is occlusion in the face of the image, the degree of occlusion. For example, the value range of the face occlusion parameter of the image is pre-set as [0, 1], where 0 represents no occlusion, and 1 represents that the face is completely occluded.
[0054] In addition, the face sharpness parameter can be an evaluation index of the sharpness of the face in the image. Generally, the face sharpness parameter of the image can be determined by pre-setting a value range of the face sharpness parameter of the image, and determining the face sharpness parameter of the image in the value range of the face sharpness parameter based on the face sharpness of the image. For example, the value range of the face sharpness parameter of the image is pre-set as [0, 1], wherein 0 represents that the face sharpness is greater than or equal to a pre-set first sharpness threshold, and 1 represents that the face sharpness is less than or equal to a pre-set second sharpness threshold. The pre-set first sharpness threshold and the pre-set second sharpness threshold can be specifically set according to specific conditions, as long as the face is clear when the face sharpness is greater than or equal to the pre-set first sharpness threshold, and the face is blurred when the face sharpness is less than or equal to the pre-set second sharpness threshold. The specific values of the pre-set first sharpness threshold and the pre-set second sharpness threshold are not limited in the embodiment.
[0055] The face position parameter can be an evaluation index of whether the position of the face in the image is reasonable. Generally, the face position parameter of the image can be determined by pre-setting a value range of the face position parameter of the image, and determining the face position parameter of the image in the value range of the face position parameter based on the position of the face in the image. For example, the value range of the face position parameter of the image is pre-set as [0, 1], wherein 0 represents that the face position is reasonable and located in the middle of the image, and 1 represents that the face position is unreasonable and close to the edge of the image, or the distance between the center point of the face image and the center point of the image is greater than or equal to a pre-set distance threshold. The pre-set distance threshold can be specifically set according to specific conditions, which is not limited in the embodiment.
[0056] The face angle parameter can be an evaluation index of whether the pitch angle or shooting angle of the face in the image is reasonable. Generally, the face angle parameter of the image can be determined by pre-setting a value range of the face angle parameter of the image, and determining the face angle parameter of the image in the value range of the face angle parameter based on the shooting angle of the image. For example, the value range of the face angle parameter of the image is pre-set as [0, 1], wherein 0 represents that the pitch angle of the face is greater than or equal to a pre-set first angle threshold, and 1 represents that the pitch angle of the face is less than or equal to a pre-set second angle threshold. The pre-set first angle threshold and the pre-set second angle threshold can be specifically set according to specific conditions, as long as the face shooting angle is unreasonable when the pitch angle of the face is greater than or equal to the pre-set first angle threshold, and the face shooting angle is reasonable when the pitch angle of the face is less than or equal to the pre-set second angle threshold. The specific values of the pre-set first angle threshold and the pre-set second angle threshold are not limited in the embodiment.
[0057] In step S230, a fraud prevention strategy corresponding to the quality evaluation result of the to-be-identified face image is determined based on the quality evaluation result of the to-be-identified face image, and face recognition is performed on the to-be-identified face image based on the determined fraud prevention strategy.
[0058] In this step, the fraud prevention strategy corresponding to the quality evaluation result of the to-be-identified face image can be selected from a pre-set fraud prevention strategy library based on the quality evaluation result of the to-be-identified face image by pre-setting the fraud prevention strategy library.
[0059] In steps S210 to S230, the quality evaluation result of the to-be-identified face image is determined by acquiring the to-be-identified face image and the adjacent image and according to the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image, and the fraud prevention strategy corresponding to the quality evaluation result of the to-be-identified face image is selected from the fraud prevention strategy library based on the quality evaluation result, and face recognition is performed on the to-be-identified face image. The quality evaluation result of the to-be-identified face image is calculated by the image information parameters of the image adjacent to the to-be-identified face image together with the various image information parameters of the to-be-identified image, which can make the quality evaluation result more accurate, and the fraud prevention strategy matched with the quality evaluation result of the to-be-identified face image is selected according to the quality evaluation result, which can select the appropriate fraud prevention strategy according to the actual situation of the specific application scene to ensure the accuracy of the fraud detection result in the face recognition process. The problem that the fixed fraud prevention mode and parameters of the existing face recognition method are difficult to apply to all application scenes and the fraud detection result in the face recognition process is inaccurate in some cases is solved.
[0060] In one embodiment, step S220 includes the following steps before step S220:
[0061] In step S218, the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image are determined based on the to-be-identified face image and the adjacent image.
[0062] The aforementioned determination of the image information parameters of the facial image to be identified and the image information parameters of the adjacent images can be performed by performing the same image recognition on the facial image to be identified and the adjacent images, obtaining an image recognition result for the facial image to be identified and an image recognition result for the adjacent images, and then determining the image information parameters of the facial image to be identified and the image information parameters of the adjacent images based on the image recognition result for the facial image to be identified and the image recognition results for the adjacent images. It should be noted that the category of the image information parameters of the facial image to be identified and the adjacent images determined by the category of the image information parameters of the facial image to be identified and the image information parameters of the adjacent images. For example, if the facial image to be identified and the adjacent images are respectively subjected to strong light reflection recognition and face occlusion recognition, the strong light reflection recognition result and face occlusion recognition result of the facial image to be identified, as well as the strong light reflection recognition result and face occlusion recognition result of the adjacent images, are obtained. Then, based on the strong light reflection recognition result and face occlusion recognition result of the facial image to be identified and the adjacent images, the image information parameters are determined as the strong light parameter and face occlusion parameter of the facial image to be identified, as well as the strong light parameter and face occlusion parameter of the adjacent images.
[0063] The following illustrates the process of determining the image information parameters of a face image to be identified by taking the process of obtaining the face occlusion parameters of the face image to be identified as an example. After performing face occlusion recognition on the face image to be identified, a face occlusion recognition result of the face image to be identified is obtained. This occlusion recognition result can be an occlusion rate or an occlusion ratio. Based on this occlusion ratio and the value range of the face occlusion parameter of the pre-set image, the face occlusion parameter of the face image to be identified is determined. If the value range of the face occlusion parameter of the pre-set image is [0, 1], where 0 represents no occlusion and 1 represents that the face is completely occluded, and the face occlusion recognition result of the face image to be identified is an occlusion rate of 50%, which is half of 100%, then the face occlusion parameter of the face image to be identified can be determined to be 0.5, which is between 0 and 1, and is the value in the middle. Specifically, the value range of the face occlusion parameter can be specifically set according to specific needs. The conversion relationship between the face occlusion recognition result of the face image to be identified and the value range of the face occlusion parameter of the pre-set image can also be specifically set according to needs. This embodiment does not make specific limitations here. As long as the value range of the face occlusion parameter of the image can be pre-set based on the face occlusion recognition result of the face image to be identified, the face occlusion parameter of the face image to be identified can be determined, and the determined face occlusion parameter can correctly feedback the face occlusion situation of the face image to be identified. The process of obtaining image information parameters of other categories is similar to the process of obtaining face occlusion parameters of the face image to be identified. This embodiment will not list them here. As long as the obtained image information parameters are reasonable, it will be fine.
[0064] Specifically, in one embodiment, step S218, based on the to-be-identified face image and the adjacent image, determining the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image, comprises:
[0065] Step S2182, respectively performing the same image recognition on the to-be-identified face image and the adjacent image to obtain the image recognition result of the to-be-identified face image and the image recognition result of the adjacent image; the image recognition comprises at least two of strong light reflection recognition, face occlusion recognition, face sharpness recognition, face position recognition, and angle recognition between the face and the camera.
[0066] The same image recognition above, that is, the types of image recognition performed on the to-be-identified face image and the types of image recognition performed on the adjacent image are consistent. For example, if the face sharpness recognition and the face position recognition are performed on the to-be-identified face image, the image recognition performed on the adjacent image must be the face sharpness recognition and the face position recognition.
[0067] Step S2184, based on the image recognition result of the to-be-identified face image and the image recognition result of the adjacent image, determining the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image.
[0068] The above steps S2182 to S2184, by respectively performing the same image recognition on the to-be-identified face image and the adjacent image to obtain the image recognition result of the to-be-identified face image and the image recognition result of the adjacent image, and then using the image recognition result of the to-be-identified face image and the image recognition result of the adjacent image to determine the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image, through the determination of the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image, it is convenient for subsequent use of the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image to determine the quality evaluation result of the to-be-identified face image.
[0069] In addition, in one embodiment, step S220, based on the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image, and the initial weight of the image information parameters of the to-be-identified face image, determining the quality evaluation result of the to-be-identified face image, comprises:
[0070] Step S222, based on the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image, performing nonlinear mapping and fault-tolerant smoothing processing on the image information parameters of the to-be-identified face image to obtain the processed image information parameters of the to-be-identified face image.
[0071] The image information parameters of the to-be-identified face image are nonlinearly mapped and fault-tolerant smoothed based on the image information parameters of the to-be-identified face image and the image information parameters of the adjacent image, to obtain the processed image information parameters of the to-be-identified face image. The image information parameters of the to-be-identified face image can be nonlinearly mapped to obtain mapped image information parameters, and then the mapped image information parameters are fault-tolerant smoothed using the image information parameters of the adjacent image to obtain the processed image information parameters of the to-be-identified face image.
[0072] Because the change amount of the image information parameters may have a nonlinear influence on the quality evaluation result of the to-be-identified face image, for example, the influence of the face occlusion parameter from 0.8 to 1 may be much greater than that from 0 to 0.2. Therefore, a nonlinear mapping manner can be used to alleviate the problem that the high value change of the image information parameters has too great an influence on the quality evaluation result of the image. The ln(1+x) function is a concave function that is monotonically increasing in the interval [0, 1], that is, the size order of the parameters will not change after mapping. Therefore, the above nonlinear mapping manner can be a natural logarithm mapping manner. The specific transformation process can be represented as:
[0073] ;
[0074] wherein, is the i-th image information parameter after nonlinear mapping, x i is the i-th image information parameter before nonlinear mapping. Wherein, i is a positive integer less than or equal to 5, and 0.000≤x i ≤1.000. x1 is the strong light parameter in the image information parameters before nonlinear mapping, x2 is the face occlusion parameter in the image information parameters before nonlinear mapping, x3 is the face sharpness parameter in the image information parameters before nonlinear mapping, x4 is the face position parameter in the image information parameters before nonlinear mapping, and x5 is the face angle parameter in the image information parameters before nonlinear mapping.
[0075] The embodiment analyzes the effect through the example shown in Table 1:
[0076] Table 1
[0077]
[0078] As shown in Table 1, the image information parameters include X1, X2, X3 and X4. Through nonlinear mapping, the larger values in the image information parameters can be compressed, and the smaller values in the image information parameters are less affected.
[0079] In addition, because some image information parameters of the to-be-identified face image can have abnormal values (such as extreme light or complete occlusion, such as X3 definition fluctuation caused by rainwater encountered by the camera), it is necessary to avoid the excessive influence of abnormal values on the quality evaluation result of the to-be-identified face image. Therefore, it is necessary to perform fault-tolerant smoothing processing on the mapped image information parameters. Specifically, a smoothing function is introduced to limit the influence of abnormal values.
[0080] In step S224, based on the processed image information parameters of the to-be-identified face image and the initial weights of the image information parameters of the to-be-identified face image, the quality evaluation result of the to-be-identified face image is determined.
[0081] Because the importance of different image information parameters is different in different scenes, for example, in a strong light environment, the weight of the strong light parameter should be increased. Specifically, the weight of the strong light parameter can be dynamically adjusted according to the environment or the value of the strong light parameter. Based on this, the above-mentioned determination of the quality evaluation result of the to-be-identified face image based on the processed image information parameters of the to-be-identified face image and the initial weights of the image information parameters of the to-be-identified face image can be based on the difference between the processed image information parameters of the to-be-identified face image and the adjustment threshold of the image information parameters of the to-be-identified face image, adjusting the initial weights of the image information parameters of the to-be-identified face image, to obtain the adjusted weights of the processed image information parameters of the to-be-identified face image.
[0082] According to the dynamic adjustment of the initial weights of the image information parameters of the to-be-identified face image based on the processed image information parameters of the to-be-identified face image, the following principles need to be followed:
[0083] First, the weight adjustment principle: when the value of a certain image information parameter is high, the weight corresponding to this image information parameter is increased; otherwise, the weight is kept or reduced.
[0084] Second, the weight adjustment range: according to the comparison result of the image information parameter and the adjustment threshold of the image information parameter of the face image, the weight is linearly or nonlinearly adjusted.
[0085] Third, weight normalization: the adjusted weight needs to be normalized again to ensure that the sum of the adjusted weights of all image information parameters of the to-be-identified face image is 1.
[0086] The above-mentioned adjustment threshold of the image information parameter can be the minimum value that needs to adjust the initial weight of the image information parameter, that is, when the image information parameter is greater than the adjustment threshold of the image information parameter, the initial weight of the image information parameter needs to be adjusted based on the image information parameter.
[0087] The step S222 to the step S224 are used for performing nonlinear mapping and fault-tolerant smoothing processing on the image information parameter of the to-be-identified face image to obtain a processed image information parameter of the to-be-identified face image, and determining the quality evaluation result of the to-be-identified face image based on the processed image information parameter of the to-be-identified face image and the initial weight of the image information parameter of the to-be-identified face image. The nonlinear mapping, fault-tolerant processing and dynamic weight adjustment on the image information parameter of the to-be-identified face image make the quality evaluation result of the to-be-identified face image more accurate.
[0088] In one embodiment, the step S222 is used for performing nonlinear mapping and fault-tolerant smoothing processing on the image information parameter of the to-be-identified face image based on the image information parameter of the to-be-identified face image and the image information parameter of the adjacent image to obtain a processed image information parameter of the to-be-identified face image, including:
[0089] The step S2222 is used for performing nonlinear mapping on the image information parameter of the to-be-identified face image to obtain a mapped image information parameter.
[0090] The step S2224 is used for performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image to obtain a processed image information parameter of the to-be-identified face image.
[0091] Specifically, the process of performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image to obtain a processed image information parameter of the to-be-identified face image is as follows: a sliding average method is used to reduce the influence of the sudden change value of the image information parameter relative to the adjacent frame.
[0092] The step S2222 to the step S2224 are used for performing nonlinear mapping on the image information parameter of the to-be-identified face image to obtain a mapped image information parameter, and then performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image to obtain a processed image information parameter of the to-be-identified face image. The nonlinear mapping and fault-tolerant smoothing processing on the image information parameter of the to-be-identified face image can avoid the influence of the high value change of the image information parameter on the quality evaluation result of the image being too large, and avoid the influence of the sudden change of the image information parameter of the adjacent frame on the quality evaluation result of the image, thereby improving the robustness of the face recognition device.
[0093] In addition, in one embodiment, the step S2224 is used for performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image to obtain a processed image information parameter of the to-be-identified face image, including:
[0094] In step S1, the image information parameters of the adjacent images are used to perform fault-tolerant smoothing processing on the mapped image information parameters in a sliding average manner, to obtain the processed image information parameters of the face image to be recognized.
[0095] The specific calculation process of the sliding average is as follows:
[0096]
[0097] wherein a is a smoothing coefficient (the smoothing coefficient can be specifically set according to specific conditions and requirements, and is not specifically limited in the embodiment, for example, a = 0.3), Xi represents the i-th image information parameter of the adjacent images, i represents the index of the image information parameter, and Xi represents the i-th image information parameter of the face image to be recognized. i Xi represents the i-th image information parameter of the adjacent images, i represents the index of the image information parameter, and Xi represents the i-th image information parameter of the face image to be recognized.
[0098] For example, the face sharpness parameter of the mapped face image is 0.9, the face sharpness parameter of the adjacent image is 0.6, and a = 0.3. After the fault-tolerant smoothing processing, the processed face sharpness parameter X3'' of the face image to be recognized is:
[0099]
[0100] The face sharpness parameter of the face image to be recognized is adjusted by the face sharpness parameter of the adjacent image, so as to avoid the sudden change of the face sharpness parameter of the front and rear image frames, and make the system more stable.
[0101] If the adjacent image is multiple frames, the average value of the image information parameters of the multiple adjacent images can be first calculated, the average value of the image information parameters of the multiple adjacent images is taken as the image information parameter of the adjacent image of the face image to be recognized, the fault-tolerant smoothing processing is performed on the mapped image information parameters, and the processed image information parameters of the face image to be recognized are obtained.
[0102] Further, in an embodiment, in step S224, a quality evaluation result of the face image to be recognized is determined based on the processed image information parameters of the face image to be recognized and the initial weights of the image information parameters of the face image to be recognized, and the quality evaluation result includes:
[0103] In step S2242, the initial weights of the image information parameters of the face image to be recognized are adjusted based on the differences between the processed image information parameters of the face image to be recognized and the adjustment thresholds of the image information parameters of the face image to be recognized, to obtain the adjusted weights of the processed image information parameters of the face image to be recognized.
[0104] The difference between the processed image information parameter of the face image to be identified and the parameter adjustment threshold of the image information parameter of the face image to be identified (which can be referred to as a parameter adjustment threshold) adjusts the initial weight of each image information parameter of the face image to be identified.
[0105] ;
[0106] Where Δwi is the weight increase of the i-th image information parameter of the face image to be identified after processing, Xi is the i-th image information parameter of the face image to be identified after processing, Ti is the parameter adjustment threshold of the i-th image information parameter of the face image to be identified, and β is an adjustment coefficient. Generally, to avoid excessive weight changes, β is in the range of The value of β can be set according to specific needs or specific circumstances, as long as the set value is reasonable. The present embodiment does not make specific limitations, for example, β = 0.1.
[0107] The adjusted weight wi' of the i-th image information parameter of the face image to be identified after processing is:
[0108] ;
[0109] Wi is the initial weight of the i-th image information parameter of the face image to be identified after processing.
[0110] It should be noted that when the weight of a certain image information parameter of the face image to be identified after processing is increased, the weights of other image information parameters need to be reduced in proportion to ensure that the sum of the weights of all image information parameters of the face image to be identified after processing is 1.
[0111] For example, set the parameter adjustment threshold T1 of the strong light parameter to 0.8, the parameter adjustment threshold T2 of the face occlusion parameter to 0.7, the parameter adjustment threshold T3 of the face sharpness parameter to 0.6, the parameter adjustment threshold T4 of the face position parameter to 0.5, and the adjustment coefficient β to 0.1.
[0112] The dynamic weight calculation process can be illustrated by the following example:
[0113] If the strong light parameter X1 of the face image to be identified after processing is 0.9, the initial weight w1 of the strong light parameter is 0.2, the initial weight w2 of the face occlusion parameter is 0.3, the initial weight w3 of the face sharpness parameter is 0.3, and the initial weight w4 of the face position parameter is 0.2.
[0114] Check adjustment:
[0115] Because X1 > T1, the weight increase of the strong light parameter is:
[0116] .
[0117] Other variables are not adjusted.
[0118] The weight of the glare parameter after adjustment is: w1'=0.2+0.01=0.21.
[0119] The other weights are reduced proportionally:
[0120] The sum of the remaining weights needs to be 1−0.21=0.79.
[0121] The sum of the original other weights is: 0.3+0.3+0.2=0.8.
[0122] The scaling factor is: 0.79÷0.8=0.9875.
[0123] The weight of the face occlusion parameter after adjustment is: w2'=0.3×0.9875=0.29625.
[0124] The weight of the face sharpness parameter after adjustment is: w3'=0.3×0.9875=0.29625.
[0125] The weight of the face position parameter after adjustment is: w4'=0.2×0.9875=0.1975.
[0126] In another example, if the processed glare parameter X1 of the face image to be identified is 0.9, and the processed face sharpness parameter X3 of the face image to be identified is 0.7,
[0127] Initial weights: w1=0.2, w2=0.3, w3=0.3, w4=0.2.
[0128] Check adjustment:
[0129] Because X1>T1, the weight of the glare parameter is increased by: Δw1=0.1×(0.9−0.8)=0.01.
[0130] Because X3>T3, the weight of the face sharpness parameter is increased by:
[0131] .
[0132] Adjusted weights:
[0133] The weight of the glare parameter after adjustment is: w1'=0.2+0.01=0.21.
[0134] The weight of the face sharpness parameter after adjustment is: w3'=0.3+0.01=0.31.
[0135] The other weights are reduced proportionally:
[0136] The sum of the remaining weights should be: 1-0.21-0.31=0.48.
[0137] The sum of the original other weights is: 0.3+0.2=0.5.
[0138] The scaling factor is: 0.48÷0.5=0.96.
[0139] The adjusted weight of the face occlusion parameter is: w2'=0.3x0.96=0.288.
[0140] The adjusted weight of the face position parameter is: w4'=0.2x0.96=0.192.
[0141] In step S2244, the processed image information parameters of the face image to be identified are weighted and summed with the adjusted weights of the processed image information parameters of the face image to be identified, to obtain a quality evaluation result of the face image to be identified.
[0142] The calculation process of the quality evaluation result Score of the face image to be identified obtained by weighting and summing the processed image information parameters of the face image to be identified with the adjusted weights of the processed image information parameters of the face image to be identified is as follows:
[0143] ;
[0144] After simplification, it is:
[0145] ;
[0146] The steps S2242 to S2244 adjust the initial weights of the image information parameters of the face image to be identified, obtain the adjusted weights of the processed image information parameters of the face image to be identified, and weight and sum the processed image information parameters of the face image to be identified with the adjusted weights of the processed image information parameters of the face image to be identified, to obtain a quality evaluation result of the face image to be identified. Through the nonlinear mapping and fault-tolerant processing of the image information parameters of the face image to be identified, the processed image information parameters are obtained. Then, based on the processed image information parameters, the initial weights of the image information parameters of the face image to be identified are dynamically adjusted, so that the quality evaluation result of the face image to be identified is more robust.
[0147] In one embodiment, step S230, based on the quality evaluation result of the face image to be identified, determine the anti-fraud strategy corresponding to the quality evaluation result of the face image to be identified, and based on the determined anti-fraud strategy, perform face recognition on the face image to be identified, including:
[0148] Step S232, based on the quality evaluation result of the face image to be identified, select the anti-fraud strategy corresponding to the quality evaluation result of the face image to be identified from the pre-set anti-fraud strategy library.
[0149] The above-mentioned pre-set anti-fraud strategy library can be a pre-set anti-fraud strategy including multiple anti-fraud strategy parameters corresponding to different quality evaluation results. Specifically, the anti-fraud strategy can be divided into different gears, and the different gears of the anti-fraud strategy are mapped to different value intervals of the quality evaluation result based on the value range of the quality evaluation result, forming a mapping table. Therefore, after obtaining the quality evaluation result, the anti-fraud strategy corresponding to the quality evaluation result of the face image to be identified can be directly determined through the mapping table.
[0150] Step S234, using the anti-fraud strategy parameters corresponding to the selected anti-fraud strategy to perform face recognition on the face image to be identified.
[0151] The above-mentioned anti-fraud strategy parameters can include two or more parameters in face confidence score (algorithm confidence in face quality), continuous live frame ratio (minimum continuous frame ratio through live detection), model network depth (model complexity), face texture integrity (texture clarity requirement), dynamic verification frequency (random action verification (such as blinking, turning head) frequency), and multi-modal verification weight (weight of combining voiceprint, fingerprint and other biological characteristics). It should be noted that different anti-fraud strategies correspond to different anti-fraud strategy parameters. The higher the quality evaluation result, the lower the anti-fraud requirement of the anti-fraud strategy corresponding to the quality evaluation result, and the lower the anti-fraud requirement, the more relaxed the face confidence requirement, the lower the continuous live frame ratio requirement, the lower the model network depth requirement, the lower the face texture integrity requirement, the lower the dynamic challenge frequency verification frequency, and the lower the multi-modal verification weight dependence.
[0152] The steps S232 to S234 select, from the preset anti-fraud strategy library, an anti-fraud strategy corresponding to the quality evaluation result of the to-be-identified face image, determine the anti-fraud strategy parameter corresponding to the anti-fraud strategy after the anti-fraud strategy is determined, update the anti-fraud strategy parameter, and perform face recognition on the to-be-identified face image by using the new anti-fraud strategy. The matching between the current anti-fraud strategy and the current shooting environment is fed back through the quality evaluation result of the to-be-identified face image. When the current anti-fraud strategy does not match the current shooting environment, that is, when the quality evaluation result of the to-be-identified face image is large, an anti-fraud strategy corresponding to the current shooting environment is selected from the preset anti-fraud strategy library, and face recognition is performed on the to-be-identified face image by using the new anti-fraud strategy.
[0153] The present embodiment is described and explained below by preferred embodiments.
[0154] Figure 3 is a flowchart of a face recognition method provided by a preferred embodiment of the present application. As shown in Figure 3 the face recognition method includes the following steps:
[0155] Step S301: acquiring a to-be-identified face image and at least one adjacent image; the adjacent image is an image frame adjacent to the to-be-identified face image;
[0156] Step S302: performing the same image recognition on the to-be-identified face image and the adjacent image respectively to obtain an image recognition result of the to-be-identified face image and an image recognition result of the adjacent image; the image recognition includes at least two of strong light reflection recognition, face occlusion recognition, face sharpness recognition, face position recognition, and angle recognition between the face and the camera;
[0157] Step S303: determining an image information parameter of the to-be-identified face image and an image information parameter of the adjacent image based on the image recognition result of the to-be-identified face image and the image recognition result of the adjacent image; the image information parameter includes at least two of a strong light parameter, a face occlusion parameter, a face sharpness parameter, a face position parameter, and a face angle parameter of the image;
[0158] Step S304: performing nonlinear mapping on the image information parameter of the to-be-identified face image to obtain a mapped image information parameter;
[0159] Step S305: performing fault-tolerant smoothing processing on the mapped image information parameter by using the image information parameter of the adjacent image in a sliding average manner to obtain a processed image information parameter of the to-be-identified face image;
[0160] Step S306, based on the difference between the processed image information parameters of the face image to be identified and the parameterized threshold of the image information parameters of the face image to be identified, adjusting the initial weight of each image information parameter of the face image to be identified, to obtain the adjusted weight of each processed image information parameter of the face image to be identified;
[0161] Step S307, weighting and summing the processed image information parameters of the face image to be identified and the adjusted weight of the processed image information parameters of the face image to be identified, to obtain the quality evaluation result of the face image to be identified;
[0162] Step S308, based on the quality evaluation result of the face image to be identified, determining the anti-fraud strategy corresponding to the face image to be identified, and performing face recognition on the face image to be identified based on the determined anti-fraud strategy.
[0163] The steps S301 to S308 above, by obtaining the face image to be identified and the adjacent image, and according to the image information parameters of the face image to be identified and the multiple image information parameters of the adjacent image, determining the quality evaluation result of the face image to be identified, and based on the quality evaluation result, selecting the anti-fraud strategy corresponding to the quality of the current face image to be identified from the anti-fraud strategy library, and performing face recognition on the face image to be identified. By using the image information parameters of the image adjacent to the face image to be identified together with the multiple image information parameters of the face image to be identified, the quality evaluation result of the face image to be identified is calculated, which can make the quality evaluation result more accurate, and according to the quality evaluation result, the anti-fraud strategy matched with the face image to be identified is selected, which can select the appropriate anti-fraud strategy according to the specific situation, and ensure the accuracy of the anti-fraud detection result in the face recognition process. The fixed anti-fraud mode and parameters of the existing face recognition method are difficult to apply to all application scenarios, and there is a problem that the anti-fraud detection result in the face recognition process is not accurate in some cases.
[0164] The process of steps S301 to S308 above will be introduced through a specific example as follows:
[0165] Table 2 introduces the image information parameters and initial weights, as shown in Table 2:
[0166] Table 2
[0167]
[0168] The first step is to perform logarithmic compression on the image information parameters before nonlinear mapping:
[0169] ;
[0170] The mapped image information parameters are:
[0171] X1'=0.667; X2'=0.559; X3'=0.615; X4'=0.470.
[0172] The second step is a fault-tolerant smoothing process, which is:
[0173] The fault-tolerant coefficient is 0.3. Based on the mapped image information parameters X1', X2', X3', and X4', and the image information parameters of the respective adjacent images, the process for obtaining the processed image information parameters is:
[0174] X1''=0.3×0.667+(1-0.3)×0.70=0.63007;
[0175] X2''=0.3×0.559+(1-0.3)×0.62=0.53797;
[0176] X3''=0.3×0.615+(1-0.3)×0.55=0.63007;
[0177] X4''=0.3×0.470+(1-0.3)×0.35=0.48647;
[0178] The third step is a process for adjusting the initial weights of the respective image information parameters based on the difference between the processed image information parameters and the adjusted threshold values of the image information parameters, to obtain the adjusted weights of the processed image information parameters.
[0179] The weighting coefficient is 0.1.
[0180] The initial weights are:
[0181] w1=0.2, w2=0.3, w3=0.3, w4=0.2. T1=0.8, T2=0.7, T3=0.6, T4=0.5.
[0182] Calculate the adjustment amount:
[0183] X1>T1, then Δw1=0.1×(0.95−0.8)=0.010.
[0184] X2>T2, then Δw2=0.1×(0.85−0.7)=0.015.
[0185] X3>T3, then Δw3=0.1×(0.75−0.6)=0.015.
[0186] X4<T4, then normalize (scaling factor or remaining amount) to adjust.
[0187] Adjusted weights:
[0188] w1' = 0.2 + 0.010 = 0.21.
[0189] w2' = 0.3 + 0.015 = 0.315.
[0190] w3' = 0.3 + 0.015 = 0.315.
[0191] Other weights are reduced proportionally.
[0192] The sum of the remaining weights should be: 1 - 0.21 - 0.315 - 0.315 = 0.160.
[0193] Therefore, w4' = 0.0160.
[0194] Finally, the calculation process of the quality evaluation result Score is:
[0195]
[0196] It should be understood that, although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless explicitly stated herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0197] Based on the same inventive concept, in the present embodiment, a face recognition device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. The terms "module", "unit", "sub-unit" and the like used below can be a combination of software and / or hardware that can implement a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.
[0198] In one embodiment, Figure 4 is a structural block diagram of a face recognition device provided by an embodiment of the present application, as Figure 4 shown, the face recognition device comprises:
[0199] The image acquisition module 42 is configured to acquire a face image to be identified and at least one adjacent image; the adjacent image is an image frame adjacent to the face image to be identified.
[0200] The quality evaluation module 44 is configured to determine a quality evaluation result of the face image to be identified based on image information parameters of the face image to be identified and the adjacent image, and an initial weight of the image information parameters of the face image to be identified; the image information parameters include at least two of a strong light parameter, a face occlusion parameter, a face sharpness parameter, a face position parameter and a face angle parameter of the image.
[0201] The face recognition module 46 is configured to determine a fraud prevention strategy corresponding to the face image to be identified based on the quality evaluation result of the face image to be identified, and perform face recognition on the face image to be identified based on the determined fraud prevention strategy.
[0202] The face recognition device described above determines the quality evaluation result of the face image to be identified by acquiring the face image to be identified and the adjacent image, and according to the image information parameters of the face image to be identified and the adjacent image, and selects the fraud prevention strategy corresponding to the quality of the current face image to be identified from the fraud prevention strategy library based on the quality evaluation result, and performs face recognition on the face image to be identified. The quality evaluation result of the face image to be identified is calculated by the image information parameters of the adjacent image of the face image to be identified together with the various image information parameters of the face image to be identified, which can make the quality evaluation result more accurate, and the fraud prevention strategy matched with the face image to be identified is selected according to the quality evaluation result, which can select the appropriate fraud prevention strategy according to the specific situation, and ensure the accuracy of the fraud detection result in the face recognition process. The fixed fraud prevention mode and parameters of the existing face recognition method cannot be applied to all application scenarios, and the fraud detection result in the face recognition process is not accurate in some cases.
[0203] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented by software or hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can be located in different processors in any combination.
[0204] In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement any one of the face recognition methods in the above embodiments.
[0205] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0206] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0207] The technical features of the above embodiments can be combined in any way. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0208] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A face recognition method, characterized in that: The method comprises: Acquire a facial image to be recognized and at least one adjacent image frame; the adjacent image is an image frame adjacent to the facial image to be recognized; Determining a quality evaluation result of the facial image to be identified based on image information parameters of the facial image to be identified and image information parameters of the adjacent images, as well as initial weights of the image information parameters of the facial image to be identified; the image information parameters include at least two parameters of the image's highlight parameter, face occlusion parameter, face clarity parameter, face position parameter, and face angle parameter; Based on the quality evaluation result of the face image to be identified, an anti-counterfeiting strategy corresponding to the quality evaluation result of the face image to be identified is determined, and based on the determined anti-counterfeiting strategy, face recognition is performed on the face image to be identified.
2. The face recognition method according to claim 1, characterized in that Before determining a quality evaluation result of the face image to be recognized based on the image information parameters of the face image to be recognized, the image information parameters of the adjacent images, and the initial weights of the image information parameters of the face image to be recognized, the method includes: Based on the facial image to be recognized and the adjacent images, image information parameters of the facial image to be recognized and image information parameters of the adjacent images are determined.
3. The face recognition method according to claim 2, characterized in that The determining, based on the facial image to be identified and the adjacent images, image information parameters of the facial image to be identified and image information parameters of the adjacent images includes: Performing the same image recognition on the facial image to be identified and the adjacent image, respectively, to obtain image recognition results of the facial image to be identified and image recognition results of the adjacent image; the image recognition includes at least two of strong light reflection recognition, facial occlusion recognition, facial clarity recognition, facial position recognition, and recognition of the angle between the face and the camera; Based on the image recognition result of the facial image to be recognized and the image recognition results of the adjacent images, image information parameters of the facial image to be recognized and image information parameters of the adjacent images are determined.
4. The face recognition method according to claim 1, characterized in that The determining of a quality evaluation result of the face image to be identified based on the image information parameters of the face image to be identified, the image information parameters of the adjacent images, and the initial weights of the image information parameters of the face image to be identified includes: performing nonlinear mapping and fault-tolerant smoothing processing on the image information parameters of the face image to be identified based on the image information parameters of the face image to be identified and the image information parameters of the adjacent images to obtain processed image information parameters of the face image to be identified; A quality evaluation result of the face image to be recognized is determined based on the processed image information parameters of the face image to be recognized and the initial weights of the image information parameters of the face image to be recognized.
5. The face recognition method according to claim 4, characterized in that: The step of performing nonlinear mapping and fault-tolerant smoothing on the image information parameters of the face image to be identified based on the image information parameters of the face image to be identified and the image information parameters of the adjacent images to obtain processed image information parameters of the face image to be identified includes: Performing nonlinear mapping on the image information parameters of the face image to be recognized to obtain mapped image information parameters; The image information parameters of the adjacent images are used to perform fault-tolerant smoothing processing on the mapped image information parameters to obtain processed image information parameters of the face image to be recognized.
6. The face recognition method according to claim 5, characterized in that: The method of performing fault-tolerant smoothing processing on the mapped image information parameters using the image information parameters of adjacent images to obtain the processed image information parameters of the face image to be recognized includes: The image information parameters of the adjacent images are used to perform fault-tolerant smoothing processing on the mapped image information parameters in a sliding average manner to obtain processed image information parameters of the face image to be recognized.
7. The face recognition method according to claim 4, characterized in that: Determining a quality evaluation result of the face image to be identified based on the processed image information parameters of the face image to be identified and the initial weights of the image information parameters of the face image to be identified includes: Adjusting the initial weights of the image information parameters of the facial image to be recognized based on the difference between the processed image information parameters of the facial image to be recognized and the parameter adjustment thresholds of the image information parameters of the facial image to be recognized, to obtain adjusted weights of the processed image information parameters of the facial image to be recognized; A weighted sum is performed on each processed image information parameter of the face image to be recognized and the adjusted weights of each processed image information parameter of the face image to be recognized to obtain a quality evaluation result of the face image to be recognized.
8. The face recognition method according to any one of claims 1 to 7, characterized in that: The step of determining an anti-counterfeiting strategy corresponding to the quality evaluation result of the face image to be identified based on the quality evaluation result of the face image to be identified, and performing face recognition on the face image to be identified based on the determined anti-counterfeiting strategy, includes: Based on the quality evaluation result of the face image to be identified, selecting an anti-counterfeiting strategy corresponding to the quality evaluation result of the face image to be identified from a preset anti-counterfeiting strategy library; The face recognition is performed on the face image to be recognized using the selected anti-counterfeiting strategy parameters corresponding to the anti-counterfeiting strategy.
9. A face recognition device, characterized in that: The device comprises: An image acquisition module is configured to acquire a face image to be identified and at least one adjacent image frame; the adjacent image frame is an image frame adjacent to the face image to be identified; a quality evaluation module, configured to determine a quality evaluation result of the facial image to be identified based on image information parameters of the facial image to be identified and image information parameters of the adjacent images, as well as initial weights of the image information parameters of the facial image to be identified; the image information parameters including at least two parameters of an image highlight parameter, a facial occlusion parameter, a facial clarity parameter, a facial position parameter, and a facial angle parameter; And a face recognition module, which is used to determine the anti-counterfeiting strategy corresponding to the quality evaluation result of the face image to be identified based on the quality evaluation result of the face image to be identified, and perform face recognition on the face image to be identified based on the determined anti-counterfeiting strategy.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the face recognition method according to any one of claims 1 to 8 are implemented.