Auxiliary method for face recognition, face recognition method and terminal device
By obtaining the face distribution in the face image and reminding the user to remove interference factors in abnormal situations, the accuracy and security problems caused by interference in face payment are solved, and higher selection accuracy and payment security are achieved. sex.
Patent Information
- Application Number
- CN202210068057.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-09-04
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2038-09-04
AI Technical Summary
Existing facial payment methods are susceptible to interference factors when scanning and/or shooting user's face pictures, resulting in poor accuracy and security of user selection.
By obtaining the face distribution in the face image and performing corresponding reminder operations based on the face distribution in the face image when the face distribution is abnormal, the user is guided to remove interference factors, thereby improving the accuracy of face image selection .
It effectively improves the accuracy and security of user's face image selection, ensuring the ease of use and security of the face payment process.
Smart Images

Figure CN114419713B_ABST
Abstract
Description
[0001] This patent application is a divisional application of the Chinese patent application with application number: 2018110274913, application date: September 4, 2018, and invention name: "A face recognition auxiliary method, face recognition method and terminal device". Technical Field
[0002] The embodiments of this specification relate to the field of face recognition technology, and in particular to a face recognition auxiliary method, a face recognition method and a terminal device. Background Art
[0003] With the rapid development of various payment technologies, facial payment has emerged to greatly simplify the payment process. Facial payment is a newly emerging electronic payment method, which consists of two parts: facial recognition to log in to the user's wallet account and deduct money from the wallet to complete the payment process. Among them, the process of facial recognition to log in to the user's wallet account is to scan and / or take a picture of the user's face, compare the face picture with the record picture in the user's wallet account, to complete the identification and verification of the user's identity, and thus complete the process of deducting money from the wallet to complete the payment. However, in the current facial payment method, there are many interference factors that affect the selection of the real user during the process of scanning and / or taking the user's face picture, thereby affecting the accuracy of the user's selection, and the security is poor. Summary of the invention
[0004] The embodiments of this specification provide a face recognition auxiliary method, a face recognition method and a terminal device, which are used to prompt and guide users to remove interference factors, thereby improving the accuracy of the user's face image selection.
[0005] The embodiments of this specification adopt the following technical solutions:
[0006] In a first aspect, a method for assisting face recognition is provided, comprising:
[0007] Obtain a face image to be recognized;
[0008] Obtaining distribution of faces in the face image;
[0009] When the face distribution is abnormal, a reminder operation corresponding to the face distribution is performed based on the face distribution in the face image.
[0010] In a second aspect, a face recognition method is provided, comprising:
[0011] capturing an image including a plurality of faces;
[0012] selecting at least one face image from the plurality of face images;
[0013] Based on the at least one facial image, a comparison is performed with a facial image of a target user;
[0014] Determine whether the recognition is successful based on the comparison result.
[0015] In a third aspect, a terminal device is provided, including:
[0016] A first acquisition module, used to acquire a face image to be recognized;
[0017] A second acquisition module, used to acquire the face distribution in the face image;
[0018] An execution module is used to execute a reminder operation corresponding to the face distribution based on the face distribution in the face image when the face distribution is abnormal.
[0019] In a fourth aspect, a terminal device is provided, including:
[0020] A collection module, used for collecting images including multiple faces;
[0021] A selection module, configured to select at least one face image from the plurality of face images;
[0022] A comparison module, configured to compare the at least one facial image with a facial image of a target user;
[0023] The determination module is used to determine whether the recognition is successful based on the comparison result.
[0024] In a fifth aspect, a terminal device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the following steps are implemented:
[0025] Obtain a face image to be recognized;
[0026] Obtaining distribution of faces in the face image;
[0027] When the face distribution is abnormal, a reminder operation corresponding to the face distribution is performed based on the face distribution in the face image.
[0028] In a sixth aspect, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented:
[0029] Obtain a face image to be recognized;
[0030] Obtaining distribution of faces in the face image;
[0031] When the face distribution is abnormal, a reminder operation corresponding to the face distribution is performed based on the face distribution in the face image.
[0032] In a seventh aspect, a terminal device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the following steps are implemented:
[0033] capturing an image including a plurality of faces;
[0034] selecting at least one face image from the plurality of face images;
[0035] Based on the at least one facial image, a comparison is performed with a facial image of a target user;
[0036] Determine whether the recognition is successful based on the comparison result.
[0037] In an eighth aspect, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented:
[0038] capturing an image including a plurality of faces;
[0039] selecting at least one face image from the plurality of face images;
[0040] Based on the at least one facial image, a comparison is performed with a facial image of a target user;
[0041] Determine whether the recognition is successful based on the comparison result.
[0042] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0043] The embodiment of the present application obtains the face distribution in the face image, and when the face distribution is abnormal, performs a reminder operation corresponding to the face distribution based on the face distribution in the face image, so that the user can make adjustments according to the reminder to remove interference factors, thereby improving the accuracy of the user's face image selection. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0045] Figure 1 A flowchart of an auxiliary method for face recognition provided for one embodiment of this specification;
[0046] Figure 2A schematic diagram of an actual application scenario of an auxiliary method for face recognition provided by an embodiment of this specification;
[0047] Figure 3 A system block diagram of an actual application scenario of an auxiliary method for face recognition provided by an embodiment of this specification;
[0048] Figure 4 A flow chart of a face recognition method provided for one embodiment of this specification;
[0049] Figure 5 One of the structural block diagrams of a terminal device provided in one embodiment of this specification;
[0050] Figure 6 A second structural block diagram of a terminal device provided for an embodiment of this specification;
[0051] Figure 7 A third structural block diagram of a terminal device provided for an embodiment of this specification;
[0052] Figure 8 This is a fourth structural block diagram of a terminal device provided for one embodiment of the present specification. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0054] The embodiment of the present application provides an auxiliary method for face recognition and a terminal device, which are used to prompt and guide users to remove interference factors, thereby improving the accuracy of the user's face image selection. The embodiment of the present application provides an auxiliary method for face recognition, and the execution subject of the method can be but is not limited to a terminal device or a device or system that can be configured to execute the method provided by the embodiment of the present application.
[0055] For ease of description, the following takes the method's execution subject as a terminal device capable of executing the method as an example to introduce the implementation of the method. It can be understood that the method's execution subject as a terminal device is only an exemplary description and should not be understood as a limitation on the method.
[0056] Figure 1 A flowchart of an auxiliary method for face recognition provided in an embodiment of the present application, Figure 1 The method may be executed by a terminal device, such as Figure 1As shown, the method may include:
[0057] Step 110: Obtain a face image to be recognized.
[0058] The method of acquiring the face image to be identified may be to acquire the face image to be identified by scanning, or to acquire the face image to be identified by photographing. This embodiment of the present application does not make any specific limitation.
[0059] Step 120: Obtain the distribution of faces in the face image.
[0060] The face distribution in the face image is obtained, and the specific implementation may be: detecting whether the obtained face image contains faces through a predetermined algorithm; if so, detecting the number of faces; in addition, detecting whether the obtained face image contains incomplete face images through a predetermined algorithm.
[0061] Step 130: When the face distribution is abnormal, based on the face distribution in the face image, perform a reminder operation corresponding to the face distribution.
[0062] The face distribution anomaly may include: there is no face in the face image, there are at least two faces in the face image, there are at least two largest faces in the face image, and feature information of the faces in the face image does not meet at least one of predetermined conditions.
[0063] The embodiment of the present application obtains the face distribution in the face image, and when the face distribution is abnormal, performs a reminder operation corresponding to the face distribution based on the face distribution in the face image, so that the user can make adjustments according to the reminder to remove interference factors, thereby improving the accuracy of the user's face image selection.
[0064] Optionally, as an embodiment, step 120 may be specifically implemented as follows:
[0065] Using the face image as input to a multi-face detection model to obtain an output face distribution;
[0066] The multi-face detection model is trained based on face image samples with abnormal face distribution.
[0067] The facial image samples with abnormal face distribution may include at least one of facial image samples without a face, facial image samples with at least two faces, and facial image samples with incomplete faces.
[0068] It is assumed that the face image samples with abnormal face distribution include face image samples without faces and face image samples with at least two faces, and the face image samples with normal face distribution include face image samples with one face.
[0069] In this step, the multi-face detection model can be obtained as follows: first, the training data generally includes three types of face image samples, namely, face image samples without faces, face image samples with at least two faces, and face image samples with one face, and one thousand images are selected from the same category; then, the multi-face detection model is obtained by training with one thousand face image samples of each of the three categories. Among them, how to obtain the multi-face detection model by training with one thousand face image samples of each of the three categories belongs to the prior art and will not be described in detail in the embodiments of this application.
[0070] In the embodiment of the present application, a multi-face detection model is obtained by training face image samples with abnormal face distribution, and the face images are then used as input of the multi-face detection model to obtain an output face distribution. According to whether the face distribution is abnormal, it is determined whether there are interference factors in the face image, thereby effectively avoiding the influence of interference factors in the collected face images, thereby ensuring the success rate of subsequent use of the face images for user authentication and face payment, and ensuring the ease of use and security of the face scanning payment process.
[0071] Optionally, as an embodiment, if the abnormal face distribution includes that there is no face in the face image, performing a reminder operation corresponding to the face distribution includes:
[0072] Based on the absence of a human face in the facial image, the user is reminded that he is in an image acquisition area of an image acquisition device of a terminal device.
[0073] It should be understood that after executing step 120, the auxiliary method for face recognition provided in the embodiment of the present application also includes: determining whether the face distribution is abnormal, that is, determining whether there is a face in the face image; if so, determining whether there are at least two faces in the face image; if not, the reminder operation is to remind the user to be located in the image acquisition area of the image acquisition device of the terminal device.
[0074] In an embodiment of the present application, if there is no face in the face image, a reminder operation corresponding to the face distribution is performed to remind the user that no face is detected and guide the user to adjust the standing position to accurately obtain the user's face image.
[0075] It should be understood that when there are multiple faces in the image acquisition area, it may or may not interfere with face recognition.
[0076] Optionally, as an embodiment, if the abnormal face distribution includes at least two faces in the face image, performing a reminder operation corresponding to the face distribution includes:
[0077] If there are at least two human faces in the facial image and the difference between the largest two human faces is smaller than a predetermined threshold, the user is reminded to ensure that there are no other users in the acquisition area of the image acquisition device of the terminal device.
[0078] It should be understood that after executing step 120, the auxiliary method for face recognition provided by the embodiment of the present application also includes: determining whether there are at least two faces in the face image; if so, determining whether the difference in size between the two largest faces in the face image is greater than a predetermined threshold. If it is determined that the difference in size between the two largest faces in the face image is greater than a predetermined threshold, the reminder operation is to remind the user to ensure that there are no other users in the acquisition area of the image acquisition device of the terminal device. For example, remind the user "In order to ensure payment security, please make sure that there are no other people around you when scanning your face."
[0079] Exemplarily, if a user stands side by side with other users (such as friends, relatives or strangers) in the image acquisition area of the image acquisition device of the terminal equipment, there are at least two faces of the largest size in the face images captured by the image acquisition device.
[0080] The embodiment of the present application ensures the accuracy of the acquired facial image and the security of face scanning payment by reminding the user that there are other users around him when it is determined that there are two largest faces of similar size in the facial image, and guiding the user to clear other users around him.
[0081] Optionally, as an embodiment, if the abnormal face distribution includes at least two faces in the face image, performing a reminder operation corresponding to the face distribution includes:
[0082] Selecting the largest face in the face image;
[0083] Determine whether the feature information of the largest face satisfies the face recognition comparison condition;
[0084] If not, the user is reminded to keep a predetermined distance from the image acquisition device of the terminal device.
[0085] For example, if a user and other users (such as friends, relatives or strangers) stand in front and behind each other in the image acquisition area of the image acquisition device of the terminal device, there are at least two faces in the face image captured by the image acquisition device. Due to the different distances from the image acquisition device, the sizes of the at least two faces are different. At this time, since the user is located closest to the image acquisition device in actual operation, the size of the user's face image is usually the largest.
[0086] The feature information of the face may refer to the size information of the face, the position information of the face on the terminal screen, etc. Accordingly, the face recognition comparison condition is used to characterize the conditions that meet the face recognition comparison, for example, the face recognition comparison condition is the size range of the face.
[0087] The face with the largest size is the face with the largest size after weighting, and the face with the largest size after weighting is obtained based on the size of the face detection frame and the distance from the center of the face detection frame to the center of the terminal device screen. It should be understood that the result of inverse weighting the distance from the center of the face detection frame to the center of the terminal device screen is based on the size of the face detection frame (that is, the smaller the distance from the center of the face detection frame to the center of the screen, the greater the weighting, and the larger the distance, the smaller the weighting), and its mathematical expression is: weighted face size = face detection frame size / distance from the center of the face detection frame to the center of the screen.
[0088] The embodiment of the present application selects the largest face in the face image; determines whether the feature information of the largest face satisfies the face recognition comparison conditions; if not, reminds the user to maintain a predetermined distance from the image acquisition device of the terminal device to remind the user that the selected face image does not meet the face recognition comparison conditions, and guides the user to adjust the position in the image acquisition area of the image acquisition device and the distance from the image acquisition device to encourage the user to be located at the designated position in the image acquisition area of the image acquisition device when scanning the face, so as to facilitate subsequent processing.
[0089] Optionally, as an embodiment, when the detection result of the specified detection operation is normal, the auxiliary method for face recognition provided by the embodiment of the present application may further include:
[0090] Determine whether there is a face in the face image; if so, determine whether the feature information of the face meets the face recognition comparison conditions; if not, remind the user to keep a predetermined distance from the image acquisition device of the terminal device; if so, send the face image to be recognized to the recognition terminal device.
[0091] It can be understood as determining whether the characteristic information of the face meets the face recognition comparison conditions; if so, the face image to be recognized is sent to the recognition terminal device. The recognition terminal device can compare the face image with the pre-stored face image. If the similarity value between the two is greater than a predetermined value, it is determined that the user identity authentication is passed and the payment operation is completed by deducting money from the wallet. Among them, the predetermined value needs to be set according to actual needs, and the embodiment of the present application does not make specific limitations.
[0092] Exemplarily, the recognition terminal device compares the face image with a pre-stored face image, which can be specifically implemented as follows: obtaining image information of the face area of the face image and image information of the face area of the pre-stored face image, comparing the two image information, and determining the similarity value between the face image and the pre-stored face image based on similar features in the two image information. The pre-stored face image can be a face image corresponding to the user's wallet account pre-stored in the recognition terminal device, or a face image obtained from the official website system based on the user's ID number corresponding to the user's wallet account.
[0093] In an embodiment of the present application, when the facial distribution of the facial image is normal, the facial image to be identified is sent to the identification terminal device, and the identification terminal device performs user identity authentication and facial payment based on the facial image to be identified, thereby ensuring the success rate of user identity authentication and facial payment using the facial image.
[0094] The method of the embodiment of the present application will be further described below in conjunction with specific embodiments.
[0095] Figure 2 A flowchart of the auxiliary method for face recognition provided by an embodiment of the present application in an actual application scenario is shown; Figure 3 A system block diagram of the auxiliary method for face recognition provided by an embodiment of the present application in an actual application scenario is shown;
[0096] For example, the user uses facial recognition to log in to the user's wallet account to make facial payment. Figure 2 and Figure 3 As shown:
[0097] At 200, the terminal device 1 prompts the user to enter the user's mobile phone number. After the user enters the mobile phone number on the terminal device 1, the terminal device 1 sends the user's mobile phone number to the identification terminal device.
[0098] At 210 , the identification terminal device 2 receives the user's mobile phone number and searches for the user's wallet account based on the user's mobile phone number. If found, execute step 230 ; otherwise, execute step 220 .
[0099] At 220 , the identification terminal device 2 prompts the user to register a new user.
[0100] At 230 , the terminal device 1 collects a facial image.
[0101] At 240 , the terminal device 1 obtains a facial image to be recognized.
[0102] At 250 , the terminal device 1 obtains the face distribution in the face image, and determines whether the face distribution in the face image is abnormal, illustratively, whether there is a face in the face image; if so, execute step 260 ; if not, execute step 251 .
[0103] Among them, the terminal device 1 obtains the face distribution in the face image and determines whether the face distribution in the face image is abnormal. For example, whether there is a face image in the face image. The specific implementation can refer to the relevant content in the above embodiment, and the embodiments of this application will not be repeated.
[0104] At 251, the terminal device 1 performs a reminder operation corresponding to the face distribution, illustratively, reminding the user that the user is located in the image acquisition area of the image acquisition device of the terminal device.
[0105] At 260 , the terminal device 1 obtains the face distribution in the face image, and determines whether the face distribution in the face image is abnormal, illustratively, whether there are at least two faces in the face image; if so, execute step 270 .
[0106] At 270 , the terminal device 1 obtains the face distribution in the face image and determines whether the face distribution in the face image is abnormal, illustratively, whether there are at least two faces of the largest size in the face image; if not, execute step 280 ; if yes, execute step 271 .
[0107] It should be understood that the existence of at least two largest faces in the facial image means that the sizes of at least two largest faces in the facial image are similar.
[0108] At 271 , the terminal device 1 performs a reminder operation corresponding to the face distribution, illustratively, reminding the user to ensure that there are no other users in the acquisition area of the image acquisition device of the terminal device.
[0109] At 280 , the terminal device 1 selects the largest face in the face image and determines whether the feature information of the largest face satisfies the face recognition comparison condition; if not, execute step 281 ; otherwise, execute step 290 .
[0110] At 281, the terminal device 1 performs a reminder operation corresponding to the face distribution, illustratively reminding the user to maintain a predetermined distance from the image acquisition device of the terminal device.
[0111] At 290, the facial image is compared with a pre-stored facial image;
[0112] At 291, the user identity is authenticated and the payment operation is completed by deducting money from the wallet.
[0113] The embodiment of the present application obtains the face distribution in the face image, and when the face distribution is abnormal, performs a reminder operation corresponding to the face distribution based on the face distribution in the face image, so that the user can make adjustments according to the reminder to remove interference factors, thereby improving the accuracy of the user's face image selection.
[0114] The embodiment of the present application provides a face recognition method and a terminal device, which are used to prompt and guide users to remove interference factors, thereby improving the accuracy of the user's face image selection. The embodiment of the present application provides a face recognition method, and the execution subject of the method can be but not limited to a terminal device or a device or system that can be configured to execute the method provided by the embodiment of the present application.
[0115] For ease of description, the following takes the method's execution subject as a terminal device capable of executing the method as an example to introduce the implementation of the method. It can be understood that the method's execution subject as a terminal device is only an exemplary description and should not be understood as a limitation on the method.
[0116] Figure 4 A flowchart of a face recognition method provided in an embodiment of the present application, Figure 4 The method may be executed by a terminal device, such as Figure 4 As shown, the method may include:
[0117] Step 410: Acquire an image including multiple faces.
[0118] The acquisition of the image including the multiple faces may be implemented by acquiring the image including the multiple faces by scanning, or acquiring the image including the multiple faces by photographing. This embodiment of the present application does not specifically limit this.
[0119] Step 420: Select at least one face image from the multiple face images.
[0120] The selection criterion for selecting at least one face image from a plurality of face images can be set according to actual needs, and is not specifically limited in the embodiments of the present application.
[0121] Step 430: Compare the at least one facial image with the facial image of the target user.
[0122] Step 440: Determine whether the recognition is successful based on the comparison result.
[0123] The embodiment of the present application collects images including multiple faces, selects at least one face image from the multiple face images, compares the at least one face image with the face image of the target user, and determines whether the recognition is successful based on the comparison result, so as to identify whether there is a face image that can be successfully recognized in the images including multiple faces, thereby ensuring the success rate of user identity authentication and face payment using face images, thereby ensuring that subsequent users can successfully complete the entire face payment process and improve the full link pass rate. At the same time, it is also a process to help users learn to use face payment, so that after users feel the intelligence of face payment, they will also be conducive to the popularization of face payment because of its unique user experience.
[0124] Optionally, as an embodiment, step 410 may be specifically implemented as follows:
[0125] A plurality of human faces are collected simultaneously to obtain an image including the plurality of human faces.
[0126] Exemplarily, when multiple users are located within the image acquisition area of the image acquisition device of the terminal equipment, faces of the multiple users are acquired simultaneously.
[0127] Optionally, as an embodiment, step 430 may be specifically implemented as follows:
[0128] The identification of the target user and the feature information of the at least one facial image are sent to the server, so that the facial feature information of the target user stored on the server is compared by the server.
[0129] It should be understood that the server compares the feature information of the at least one facial image with the facial feature information corresponding to the identifier of the target user.
[0130] Specifically, it can be implemented as follows: obtaining feature information of at least one facial image and pre-stored facial feature information of the target user, comparing the two information, and determining the similarity value between the at least one facial image and the pre-stored facial image of the target user based on similar features in the two information. The pre-stored facial image of the target user can be a facial image corresponding to the user's wallet account pre-stored in the identification terminal device, or a facial image obtained from the official website system based on the user ID number corresponding to the user's wallet account.
[0131] In the embodiment of the present application, the identification of the target user and the feature information of at least one facial image are sent to the server, and the facial feature information of the target user on the server is compared by the server. The identification terminal device performs user authentication and facial payment based on the feature information of at least one facial image, thereby ensuring the success rate of user authentication and facial payment using facial images.
[0132] Optionally, as an embodiment, step 420 may be specifically implemented as follows:
[0133] If there is a face with the largest size among the multiple face images, the face image with the largest size is selected.
[0134] For example, if a user and other users (such as friends, relatives or strangers) stand in front and behind each other in the image acquisition area of the image acquisition device of the terminal device, there are at least two faces in the face image captured by the image acquisition device. Due to the different distances from the image acquisition device, the sizes of the at least two faces are different. At this time, since the user is located closest to the image acquisition device in actual operation, the size of the user's face image is usually the largest.
[0135] The face with the largest size is the face with the largest size after weighting, and the face with the largest size after weighting is obtained based on the size of the face detection frame and the distance from the center of the face detection frame to the center of the terminal device screen. It should be understood that the result of inverse weighting the distance from the center of the face detection frame to the center of the terminal device screen is based on the size of the face detection frame (that is, the smaller the distance from the center of the face detection frame to the center of the screen, the greater the weighting, and the larger the distance, the smaller the weighting), and its mathematical expression is: weighted face size = face detection frame size / distance from the center of the face detection frame to the center of the screen.
[0136] The embodiment of the present application selects the largest face among the images of multiple faces to encourage the user to be located at a designated position in the image acquisition area of the image acquisition device when scanning the face, so as to facilitate subsequent processing.
[0137] Optionally, as an embodiment, before executing step 420, the face recognition method provided in the embodiment of the present application further includes:
[0138] If there are at least two face images among the multiple face images, and the size difference between the two largest face images among the at least two face images is less than a predetermined threshold, a reminder operation is performed.
[0139] Exemplarily, if a user stands side by side with other users (such as friends, relatives or strangers) in the image acquisition area of the image acquisition device of the terminal equipment, there are at least two faces in the face image captured by the image acquisition device, and the sizes of the two largest faces are close.
[0140] Exemplarily, the reminder operation may be an operation to remind the user to ensure that there are no other users in the acquisition area of the image acquisition device of the terminal device, such as reminding the user "To ensure payment security, please make sure that there are no other people around you when scanning your face."
[0141] The embodiment of the present application performs a reminder operation when it is determined that there are at least two face images in the face image and the sizes of the two largest faces are close to each other, so as to remind the user that there are other users around him and guide the user to clear other users around him, so as to ensure the accuracy of the acquired face image and the security of face scanning payment.
[0142] Above, combined Figures 1 to 3 The auxiliary method for face recognition in the embodiment of the present application is described in detail. Figure 5 , a detailed description of the terminal device of an embodiment of the present application is given.
[0143] Figure 5 The structure diagram of the terminal device provided in the embodiment of the present application is shown as follows: Figure 5 As shown, the terminal device 500 may include:
[0144] A first acquisition module 510, used to acquire a face image to be recognized;
[0145] A second acquisition module 520, used to acquire the face distribution in the face image;
[0146] The execution module 530 is used to execute a reminder operation corresponding to the face distribution based on the face distribution in the face image when the face distribution is abnormal.
[0147] In one embodiment, the second acquisition module 520 includes:
[0148] An input unit, used to use the face image as an input of a multi-face detection model to obtain an output face distribution;
[0149] The multi-face detection model is trained based on face image samples with abnormal face distribution.
[0150] In one embodiment, the face distribution anomaly includes: there is no face in the face image, there are at least two faces in the face image, there are at least two largest faces in the face image, and feature information of the faces in the face image does not satisfy at least one of predetermined conditions.
[0151] In one embodiment, if the abnormal face distribution includes that there is no face in the face image, the execution module 530 includes:
[0152] The first reminding unit is used to remind the user that the user is located in the image acquisition area of the image acquisition device of the terminal device based on the absence of the face in the face image.
[0153] In one embodiment, if the abnormal face distribution includes at least two faces in the face image, the execution module 530 includes:
[0154] A first determining unit, configured to determine whether there are at least two human faces in the facial image and the difference between the two largest human faces is less than a predetermined threshold;
[0155] The second reminder unit is used to remind the user to ensure that there are no other users in the collection area of the image collection device of the terminal equipment if the first determination unit determines that there are at least two human faces in the facial image and the difference in size between the two largest human faces is less than a predetermined threshold.
[0156] In one embodiment, if the abnormal face distribution includes at least two faces in the face image, the execution module 530 includes:
[0157] A selection unit, used for selecting the largest face in the face image;
[0158] A second determination unit, used to determine whether the feature information of the largest face satisfies a face recognition comparison condition;
[0159] The third reminding unit is used to remind the user to keep a predetermined distance from the image acquisition device of the terminal device if the second determining unit determines that the feature information of the face with the largest size does not meet the face recognition comparison condition.
[0160] In one embodiment, the face with the largest size is a face with the largest size after weighting, and the face with the largest size after weighting is obtained based on the size of the face detection frame and the distance from the center of the face detection frame to the center of the terminal device screen.
[0161] The embodiment of the present application obtains the face distribution in the face image, and when the face distribution is abnormal, performs a reminder operation corresponding to the face distribution based on the face distribution in the face image, so that the user can make adjustments according to the reminder to remove interference factors, thereby improving the accuracy of the user's face image selection.
[0162] Above, combined Figure 4 The face recognition method of the embodiment of the present application is described in detail. Figure 6 , a detailed description of the terminal device of an embodiment of the present application is given.
[0163] Figure 6 The structure diagram of the terminal device provided in the embodiment of the present application is shown as follows: Figure 6 As shown, the terminal device 600 may include:
[0164] A collection module 610 is used to collect images including multiple faces;
[0165] A selection module 620, configured to select at least one face image from the plurality of face images;
[0166] A comparison module 630, configured to compare the at least one facial image with a facial image of a target user;
[0167] The determination module 640 is used to determine whether the recognition is successful based on the comparison result.
[0168] The embodiment of the present application collects images including multiple faces, selects at least one face image from the multiple face images, compares the at least one face image with the face image of the target user, and determines whether the recognition is successful based on the comparison result, so as to identify whether there is a face image that can be successfully recognized in the images including multiple faces, thereby ensuring the success rate of user identity authentication and face payment using face images, thereby ensuring that subsequent users can successfully complete the entire face payment process, and improving the full-link pass rate.
[0169] The solution of the embodiment of the present application is also a process to help users learn to use facial payment. After users feel the intelligence of facial payment, their unique user experience will be conducive to the popularization of facial payment.
[0170] In one embodiment, the acquisition module 610 includes:
[0171] The acquisition unit is used to simultaneously acquire multiple faces to obtain an image including the multiple faces.
[0172] In one embodiment, the comparison module 630 includes:
[0173] The sending unit is used to send the identification of the target user and the feature information of the at least one face image to the server, so as to compare the face feature information of the target user stored on the server through the server.
[0174] In one embodiment, the selection module 620 includes:
[0175] The selection unit is configured to select the face image with the largest size if there is a face with the largest size among the multiple face images.
[0176] In one embodiment, the terminal device 600 further includes:
[0177] The execution module 650 is configured to execute a reminder operation if there are at least two face images among the plurality of face images, and the size difference between the two largest face images among the at least two face images is less than a predetermined threshold.
[0178] Figure 7 This is a schematic diagram of the structure of a terminal device provided by an embodiment of this specification. Figure 7At the hardware level, the terminal device includes a processor, and optionally an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the terminal device may also include hardware required for other services.
[0179] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0180] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0181] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an association device between the resource value-added object and the resource object at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0182] Obtain a face image to be recognized;
[0183] Obtaining distribution of faces in the face image;
[0184] When the face distribution is abnormal, a reminder operation corresponding to the face distribution is performed based on the face distribution in the face image.
[0185] The embodiment of the present application obtains the face distribution in the face image, and when the face distribution is abnormal, performs a reminder operation corresponding to the face distribution based on the face distribution in the face image, so that the user can make adjustments according to the reminder to remove interference factors, thereby improving the accuracy of the user's face image selection.
[0186] The above is as in this manual Figure 1The auxiliary method for face recognition disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in one or more embodiments of this specification can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in one or more embodiments of this specification can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0187] The terminal device can also perform Figure 7 The auxiliary method for face recognition performed by the auxiliary system for face recognition will not be described in detail in this specification.
[0188] Of course, in addition to software implementation, the terminal device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0189] Figure 8 This is a schematic diagram of the structure of a terminal device provided by an embodiment of this specification. Figure 8At the hardware level, the terminal device includes a processor, and optionally an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the terminal device may also include hardware required for other services.
[0190] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0191] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0192] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming an association device between the resource value-added object and the resource object at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0193] capturing an image including a plurality of faces;
[0194] selecting at least one face image from the plurality of face images;
[0195] Based on the at least one facial image, a comparison is performed with a facial image of a target user;
[0196] Determine whether the recognition is successful based on the comparison result.
[0197] The embodiment of the present application collects images including multiple faces, selects at least one face image from the multiple face images, compares the at least one face image with the face image of the target user, and determines whether the recognition is successful based on the comparison result, so as to identify whether there is a face image that can be successfully recognized in the images including multiple faces, thereby ensuring the success rate of user identity authentication and face payment using face images, thereby ensuring that subsequent users can successfully complete the entire face payment process and improve the full link pass rate. At the same time, it is also a process to help users learn to use face payment, so that after users feel the intelligence of face payment, they will also be conducive to the popularization of face payment because of its unique user experience.
[0198] The above is as in this manual Figure 4 The face recognition method disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in one or more embodiments of this specification can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in one or more embodiments of this specification can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0199] The terminal device can also perform Figure 8 The face recognition method performed by the face recognition system will not be described in detail in this manual.
[0200] Of course, in addition to software implementation, the terminal device of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0201] The embodiments of this specification also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0202] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0203] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.
[0204] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0205] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0206] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0207] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0208] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0209] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0210] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A face recognition auxiliary method, applied to a terminal device, the method comprising: Acquire a facial image to be recognized that includes multiple faces; Obtaining distribution of faces in the face image; When the face distribution is abnormal, a reminder operation corresponding to the face distribution is performed based on the face distribution in the face image, wherein the face distribution abnormality includes the presence of at least two faces of similar size in the face image, and the sizes of the at least two faces are the ratio of the corresponding face detection frame size to the distance from the center of the face detection frame to the center of the screen.
2. The method according to claim 1, obtaining the face distribution in the face image, comprising: Using the face image as input to a multi-face detection model to obtain an output face distribution; The multi-face detection model is trained based on face image samples with abnormal face distribution.
3. The method according to claim 1 or 2, The face distribution anomaly also includes: There is no face in the face image, there are at least two faces in the face image, and feature information of the face in the face image does not meet at least one of predetermined conditions.
4. The method according to claim 3, if the abnormal face distribution includes that there is no face in the face image, then executing a reminder operation corresponding to the face distribution, comprising: Based on the absence of a human face in the facial image, the user is reminded that he is in an image acquisition area of an image acquisition device of a terminal device.
5. The method according to claim 1, wherein if the abnormal face distribution includes at least two faces of similar size in the face image, performing a reminder operation corresponding to the face distribution comprises: If the difference between the two largest human faces among the at least two human faces is smaller than a predetermined threshold, the user is reminded to ensure that there are no other users in the acquisition area of the image acquisition device of the terminal device.
6. The method according to claim 3, if the abnormal face distribution includes at least two faces in the face image, executing a reminder operation corresponding to the face distribution, comprising: Selecting the largest face in the face image; Determine whether the feature information of the largest face satisfies face recognition comparison conditions; If not, the user is reminded to keep a predetermined distance from the image acquisition device of the terminal device.
7. A face recognition method, comprising: capturing an image including a plurality of faces; If there are at least two faces of similar size in the images of the multiple faces, a reminder operation is performed, wherein the size of the at least two faces is a ratio of the size of the corresponding face detection frame to the distance from the center of the face detection frame to the center of the screen; selecting at least one face image from the plurality of face images based on the size of each face in the image; Based on the at least one facial image, a comparison is performed with a facial image of a target user; Determine whether the recognition is successful based on the comparison result.
8. The method of claim 7, wherein collecting images including a plurality of faces comprises: A plurality of human faces are collected simultaneously to obtain an image including the plurality of human faces.
9. The method according to claim 7, wherein the step of comparing the at least one facial image with a facial image of a target user comprises: The identification of the target user and the feature information of the at least one facial image are sent to the server, so that the facial feature information of the target user stored on the server is compared by the server.
10. The method according to claim 7, wherein selecting at least one face image from the plurality of face images comprises: If there is a face with the largest size among the multiple face images, the face image with the largest size is selected.
11. The method according to claim 7, wherein if there are at least two faces of similar size in the plurality of face images, performing a reminder operation comprises: If there are at least two human faces of similar size in the images of the multiple human faces, and the difference in size between the two largest human faces among the at least two human faces is less than a predetermined threshold, a reminder operation is performed.
12. A terminal device, comprising: A first acquisition module, used to acquire a facial image to be recognized including multiple faces; A second acquisition module, used to acquire the face distribution in the face image; An execution module is used to execute a reminder operation corresponding to the face distribution based on the face distribution in the face image when the face distribution is abnormal, wherein the face distribution abnormality includes the presence of at least two faces of similar sizes in the face image, and the sizes of the at least two faces are the ratio of the corresponding face detection frame size to the distance from the center of the face detection frame to the center of the screen.
13. A terminal device, comprising: A collection module, used for collecting images including multiple faces; a reminder module, configured to perform a reminder operation if there are at least two faces of similar size in the images of the multiple faces, wherein the sizes of the at least two faces are the ratios of the sizes of the corresponding face detection frames to the distances from the center of the face detection frames to the center of the screen; A selection module, configured to select at least one face image from the plurality of face images based on the size of each face in the image; A comparison module, configured to compare the at least one facial image with a facial image of a target user; The determination module is used to determine whether the recognition is successful based on the comparison result.
14. A terminal device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the following steps when executed by the processor: Acquire a facial image to be recognized that includes multiple faces; Obtaining distribution of faces in the face image; When the face distribution is abnormal, a reminder operation corresponding to the face distribution is performed based on the face distribution in the face image, wherein the face distribution abnormality includes the presence of at least two faces of similar size in the face image, and the sizes of the at least two faces are the ratio of the corresponding face detection frame size to the distance from the center of the face detection frame to the center of the screen.
15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the following steps: Acquire a facial image to be recognized that includes multiple faces; Obtaining distribution of faces in the face image; When the face distribution is abnormal, based on the face distribution in the face image, a reminder operation corresponding to the face distribution is performed, wherein: The abnormal face distribution includes the presence of at least two faces of similar size in the face image, where the size of the at least two faces is the ratio of the corresponding face detection frame size to the distance from the center of the face detection frame to the center of the screen.
16. A terminal device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the following steps when executed by the processor: capturing an image including a plurality of faces; If there are at least two faces of similar size in the images of the multiple faces, a reminder operation is performed, wherein the size of the at least two faces is a ratio of the size of the corresponding face detection frame to the distance from the center of the face detection frame to the center of the screen; selecting at least one face image from the plurality of face images based on the size of each face in the image; Based on the at least one facial image, a comparison is performed with a facial image of a target user; Determine whether the recognition is successful based on the comparison result.
17. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the following steps: capturing an image including a plurality of faces; If there are at least two faces of similar size in the multiple face images, a reminder operation is performed, wherein: The at least two face sizes are the ratios of the corresponding face detection frame sizes to the distances from the center of the face detection frame to the center of the screen; selecting at least one face image from the plurality of face images based on the size of each face in the image; Based on the at least one facial image, a comparison is performed with a facial image of a target user; Determine whether the recognition is successful based on the comparison result.
Citation Information
Patent Citations
Prompting photographing method and mobile terminal
CN105827979A
Image capturing apparatus and method
CN107251096A