Face recognition method and device, computer device, and storage medium
By randomly determining facial organ and location area facial image acquisition parameters, multiple frames of facial images are acquired and verified, solving the problem of data tampering in traditional facial recognition methods and improving the accuracy and security of recognition.
Patent Information
- Application Number
- CN202311268166.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-09-27
AI Technical Summary
Traditional facial recognition methods cannot effectively detect whether facial data has been tampered with, resulting in low recognition accuracy and insufficient security.
By randomly determining the facial organs to be verified and the facial image acquisition parameters of the desired location area, multiple consecutive facial images are obtained, and facial recognition is performed when the location matches and the proportion reaches a set ratio, ensuring that the data has not been tampered with.
It improves the accuracy and security of facial recognition, prevents tampering, and ensures the authenticity of facial data and the reliability of recognition.
Smart Images

Figure CN117292422B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a face recognition method and device, computer equipment, a storage medium and a computer program product. BACKGROUND
[0002] In the face recognition method in the prior art, after the face data (video data or image data) of a user is collected at the client, the face data collected by the client is sent to the server, and the face recognition is performed by the server based on the received face data.
[0003] However, in this process, the server cannot effectively detect whether the received face data is the face data collected in real time by the camera of the client or the pre-prepared face data. If a person with fraudulent intent initiates face recognition and tampers the face data collected in real time by the camera of the client (this face data cannot pass the face recognition of the server) into the pre-prepared face data of a real user (this face data can pass the face recognition of the server), the server will mistakenly pass the face recognition of the person with fraudulent intent.
[0004] Therefore, in the face recognition mode in the prior art, the server cannot detect whether the face data used for face recognition is tampered, resulting in low accuracy of face recognition and affecting the security of face recognition. SUMMARY
[0005] Therefore, it is necessary to provide a face recognition method, device, computer equipment, computer readable storage medium and computer program product capable of improving the accuracy of face recognition and ensuring the security of face recognition.
[0006] In a first aspect, the present application provides a face recognition method. The method comprises:
[0007] receiving a face image collection parameter acquisition request sent by a client, randomly determining a face organ to be verified and an expected positioning area of the face organ to be verified in a framing frame of the client;
[0008] generating face image collection parameters representing the face organ to be verified and the expected positioning area, and sending the face image collection parameters to the client;
[0009] acquiring a plurality of continuous face images collected by the client according to the face image collection parameters;
[0010] determining an image positioning area of the expected positioning area in each face image based on coordinate information of the expected positioning area in the framing frame;
[0011] For each frame of face image, when the positioning position of the face organ to be verified in the face image matches the image positioning area in the face image, the face image is taken as an unaltered face image.
[0012] When the proportion of the unaltered face image in the face image reaches a set proportion, face recognition is performed based on the face image.
[0013] In a second aspect, the present application provides a face image acquisition method. The method comprises:
[0014] sending a face image acquisition parameter acquisition request to a server, and receiving face image acquisition parameters sent by the server; the face image acquisition parameters represent a face organ to be verified and an expected positioning area of the face organ to be verified in a framing frame of the client randomly determined by the server;
[0015] generating prompt information for moving the face organ to be verified to the expected positioning area in the framing frame based on the face image acquisition parameters;
[0016] acquiring multiple continuous face images of the object under the condition that the object is detected to move the face organ to be verified to the expected positioning area;
[0017] sending the multiple continuous face images to the server; the server is configured to perform face recognition based on the face images when the proportion of unaltered face images in the face images reaches a set proportion; when the positioning position of the face organ to be verified in the face image matches the image positioning area in the face image, the face image is an unaltered face image.
[0018] In a third aspect, the present application further provides a face recognition device. The device comprises:
[0019] a random information determination module configured to receive a face image acquisition parameter acquisition request sent by a client, and randomly determine a face organ to be verified and an expected positioning area of the face organ to be verified in a framing frame of the client;
[0020] an acquisition parameter sending module configured to generate face image acquisition parameters representing the face organ to be verified and the expected positioning area, and send the face image acquisition parameters to the client;
[0021] a face image acquisition module configured to acquire multiple continuous face images collected by the client according to the face image acquisition parameters;
[0022] an image positioning area determination module configured to determine an image positioning area of the expected positioning area in each frame of face image based on coordinate information of the expected positioning area in the framing frame;
[0023] An unaltered face image determination module is configured to, for each frame of face image, determine the face image as an unaltered face image when a positioning position of the face organ to be verified in the face image matches an image positioning area in the face image; and a face recognition module is configured to perform face recognition based on the face image when a proportion of the unaltered face image in the face image reaches a set proportion.
[0024] In a fourth aspect, the present application provides a face image acquisition device. The device comprises:
[0025] An acquisition parameter receiving module is configured to send a face image acquisition parameter obtaining request to a server and receive face image acquisition parameters sent by the server, wherein the face image acquisition parameters represent a face organ to be verified and an expected positioning area of the face organ to be verified in a framing frame of the client randomly determined by the server.
[0026] A prompt information generating module is configured to generate prompt information for moving the face organ to be verified to the expected positioning area in the framing frame based on the face image acquisition parameters.
[0027] A face image acquisition module is configured to acquire a plurality of continuous face images of the object when it is detected that the object moves the face organ to be verified to the expected positioning area.
[0028] A face image sending module is configured to send the plurality of continuous face images to the server, wherein the server is configured to perform face recognition based on the face images when a proportion of unaltered face images in the face images reaches a set proportion, and the face image is an unaltered face image when a positioning position of the face organ to be verified in the face image matches an image positioning area in the face image.
[0029] In a fifth aspect, the present application provides a computer device. The computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the face recognition method or the face image acquisition method when executing the computer program.
[0030] In a sixth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program implements the steps of the face recognition method or the face image acquisition method when executed by a processor.
[0031] In a seventh aspect, the present application provides a computer program product. The computer program product comprises a computer program, and the computer program implements the steps of the face recognition method or the face image acquisition method when executed by a processor.
[0032] The aforementioned facial recognition method, device, computer equipment, storage medium, and computer program product, by receiving a facial image acquisition parameter acquisition request sent by a client, randomly determines the facial organ to be verified and its desired location region within the client's viewfinder. This randomness of the facial organ and desired location region makes it difficult for individuals intending to deceive to interfere with facial recognition based on pre-prepared facial data. This facilitates subsequent effective detection of whether the received facial image has been tampered with, based on the randomly determined facial organ and desired location region. Furthermore, facial image acquisition parameters characterizing the facial organ and desired location region are generated and sent to [the client's viewfinder]. The client acquires facial images captured according to facial image acquisition parameters. Based on the coordinates of the desired location region within the viewfinder, it determines the image location region of the desired location region in each frame of the facial image. For each frame, when the location of the facial organ to be verified matches the image location region in the facial image, the facial image is considered unaltered. When the proportion of unaltered facial images in the facial image reaches a set percentage, the facial image is considered tamper-proof, and facial recognition is performed based on this image. This ensures that facial recognition is based on real-time, unaltered facial data acquired by the client, thereby improving the accuracy and security of facial recognition. Furthermore, by setting a percentage and reserving a certain error tolerance, occasional user movement deviations are allowed, preventing false alarms of facial recognition failure due to occasional user movement deviations, thus further improving the accuracy of facial recognition. Therefore, the entire process improves the accuracy of facial recognition and ensures its security. Attached Figure Description
[0033] Figure 1 This is an application environment diagram of a facial recognition method and a facial image acquisition method in one embodiment;
[0034] Figure 2 This is a flowchart illustrating a facial recognition method in one embodiment;
[0035] Figure 3 This is a schematic diagram of the desired positioning area in one embodiment;
[0036] Figure 4 This is a schematic diagram of the desired positioning area in another embodiment;
[0037] Figure 5 This is a schematic diagram of the facial positioning area in one embodiment;
[0038] Figure 6 This is a flowchart illustrating the steps for determining the desired location area in one embodiment;
[0039] Figure 7 Fig. 2 is a flowchart illustrating a process of sending face image collection parameters in an embodiment;
[0040] Figure 8 Fig. 3 is a flowchart illustrating a process of detecting a face organ positioning location to be verified in an embodiment;
[0041] Figure 9 Fig. 4 is a flowchart illustrating a process of detecting a face organ positioning location to be verified in another embodiment;
[0042] Figure 10 Fig. 5 is a flowchart illustrating a process of a face image collection method in an embodiment;
[0043] Figure 11 Fig. 6 is a flowchart illustrating a process of a decryption processing step in an embodiment;
[0044] Figure 12 Fig. 7 is a flowchart illustrating a process of a face image collection step in an embodiment;
[0045] Figure 13 Fig. 8 is a flowchart illustrating a process of a service handling step in an embodiment;
[0046] Figure 14 Fig. 9 is a flowchart illustrating a process of a face image collection and face recognition method in an embodiment;
[0047] Figure 15 Fig. 10 is a block diagram illustrating a structure of a face recognition device in an embodiment;
[0048] Figure 16 Fig. 11 is a block diagram illustrating a structure of a face image collection device in an embodiment;
[0049] Figure 17 Fig. 12 is a diagram illustrating an internal structure of a computer device in an embodiment. DETAILED DESCRIPTION
[0050] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0051] It should be noted that the user / object information, server information, client information (including but not limited to personal information of the user / object, device information of the user / object, server device information, client device information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc. such as face images and face videos) involved in the present application are all information and data authorized by each user or fully authorized by each party, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0052] The face recognition method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 The client 102 communicates with the server 104 through a network. A data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The server 104 can receive a face image acquisition parameter acquisition request sent by the client 102, randomly determine a to-be-verified face organ and an expected positioning area of the to-be-verified face organ in a framing frame of the client, and generate face image acquisition parameters representing the to-be-verified face organ and the expected positioning area. The face image acquisition parameters are sent to the client 102, so as to acquire a plurality of continuous face images collected by the client 102 according to the face image acquisition parameters. Then, based on coordinate information of the expected positioning area in the framing frame, an image positioning area of the expected positioning area in each face image is determined. For each face image, when a positioning position of the to-be-verified face organ in the face image matches the image positioning area in the face image, the server 104 can regard the face image as an unaltered face image. When a proportion of the unaltered face images in the face images reaches a set proportion, the server 104 can perform face recognition based on the face images. The client 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can be a server of a financial institution.
[0053] In one embodiment, as shown in Figure 2 A face recognition method is provided. The face recognition method is applied to a server in Figure 1 for example, and includes the following steps.
[0054] In step 202, a face image acquisition parameter acquisition request sent by a client is received, and a to-be-verified face organ and an expected positioning area of the to-be-verified face organ in a framing frame of the client are randomly determined.
[0055] The face image acquisition parameter can be a parameter representing a face organ to be verified, so that the client can determine which face organ to be identified, and a coordinate parameter representing a position of the expected positioning area in the viewfinder frame, so that the client can determine which area the user needs to move the face organ to be verified to during image acquisition. The viewfinder frame can be a screen of the client, and the image / video captured by the camera of the client can be displayed in the screen of the client. It can be understood that the viewfinder frame is the screen frame of the client, and the viewfinder frame can be understood as a view captured by the camera of the client, which can be displayed in the screen frame of the client. The face organ to be verified can be any of the face organs (eyebrows, eyes, nose, mouth, and ears).
[0056] Optionally, the server can receive a face image acquisition parameter acquisition request sent by the client, randomly determine a face organ to be verified from the face organs, and determine an expected positioning area of the face organ to be verified in the viewfinder frame of the client based on the area in which the face organ to be verified is located in the face, on the premise that the complete face can be captured in the viewfinder frame of the client when the face organ to be verified is in the expected positioning area.
[0057] Exemplarily, the shape of the expected positioning area randomly determined by the server includes but is not limited to a square, a circle, a diamond, and the like, and can make the outline of the face organ to be verified completely displayed in the expected positioning area.
[0058] Step 204: Generating face image acquisition parameters representing the face organ to be verified and the expected positioning area, and sending the face image acquisition parameters to the client.
[0059] Optionally, the server can generate face image acquisition parameters representing the face organ to be verified and the expected positioning area respectively, and send the face image acquisition parameters to the client, so that the client can send prompt information to the user to move the face organ to be verified to the expected positioning area according to the face image acquisition parameters.
[0060] Exemplarily, the data storage system of the server can store the outline identification information of each face organ. Further, after randomly determining the face organ to be verified, the server can generate face image acquisition parameters representing the face organ to be verified based on the outline identification information of the face organ to be verified, so that the client can determine the outline identification information corresponding to the face organ to be verified based on the received face image acquisition parameters, and then determine the outline of the face organ to be verified, so as to determine which one of the face organs the face organ to be verified is.
[0061] Step 206: Acquiring a plurality of continuous face images captured by the client according to the face image acquisition parameters.
[0062] The face image collected by the client can be one frame of face image, or multiple frames of discontinuous face images, or multiple frames of continuous face images, and the multiple frames of continuous face images can form a face video.
[0063] Optionally, after determining that the client has collected the face image by communicating with the client, the server can obtain the multiple frames of continuous face images collected by the client according to the face image collection parameters.
[0064] For example, if the client collects one frame of face image or multiple frames of discontinuous face images, the server receives the face image data sent by the client. If the client collects multiple frames of continuous face images, the server receives the face video data formed by the multiple frames of continuous face images.
[0065] In step 208, based on the coordinate information of the expected positioning area in the framing box, the image positioning area of the expected positioning area in each frame of face image is determined.
[0066] Optionally, after determining the expected positioning area, the server can take the center point of the framing box of the client as the coordinate origin, so as to construct the coordinate system in the framing box, and then determine the coordinate information of the expected positioning area in the framing box of the client.
[0067] Optionally, for each frame of face image, the server can construct the image coordinate system in the face image based on the image center point of the face image, and then convert the coordinate information of the expected positioning area in the framing box into the coordinate information of the expected positioning area in the image coordinate system based on the conversion relationship between the image coordinate system in the face image and the coordinate system in the framing box, so as to determine the image positioning area of the expected positioning area in the face image.
[0068] For example, as shown in Figure 3 , taking the face organ to be verified as the nose, and the shapes of the framing box and the expected positioning area as squares as an example, the server can take the center point of the framing box as the coordinate origin, construct the coordinate system in the framing box, generate the coordinates of the center point of the expected positioning area and the coordinates of the four vertices, so as to obtain the coordinate information corresponding to the expected positioning area.
[0069] For example, as shown in Figure 4 , taking the face organ to be verified as the nose, and the shape of the framing box as a square and the shape of the expected positioning area as a circle as an example, the server can take the center point of the framing box as the coordinate origin, construct the coordinate system in the framing box, generate the coordinates of the center point of the expected positioning area and the length of the radius, so as to obtain the coordinate information corresponding to the expected positioning area.
[0070] For example, on the basis of Figure 3 , as shown in Figure 5 ,Figure 5 The ellipse in the image can specifically represent the face ( Figure 5 The location of the midface in a facial image is for illustrative purposes only and is not intended to be limiting. After acquiring multiple consecutive frames of facial images captured by the client, for each frame, the server can use the center point of the facial image as a coordinate point to construct a coordinate system in the facial image. Based on the coordinate information of the desired location area, the server can determine the image location area of the desired location area in the facial image, so as to subsequently determine whether the organ to be verified can be detected in the image location area of the facial image.
[0071] For example, the length and width of the facial image can be proportionally reduced / enlarged to the length and width of the viewfinder in the client. Therefore, the coordinate information of the desired positioning area in the viewfinder can be proportionally reduced / enlarged to obtain the coordinate information of the desired positioning area in the image coordinate system.
[0072] For each frame of facial image, when the location of the facial organ to be verified in the facial image matches the image location region in the facial image, step 210 is executed to treat the facial image as an untampered facial image.
[0073] Optionally, for each frame of facial image, when the location of the facial organ to be verified in the facial image matches the image location area in the facial image, the server can determine that the frame of facial image is an image taken by the object / user according to the client prompt, that is, an image actually captured by the client, and thus the frame of facial image can be regarded as an untampered facial image.
[0074] Optionally, if the location of the facial organ to be verified in the facial image does not match the image location area in the facial image, then step 212 is executed to treat the facial image as a suspected tampered facial image.
[0075] When the proportion of the unaltered facial image in the facial image reaches the set ratio, step 214 is executed to perform facial recognition based on the facial image.
[0076] The set percentage can be selected according to actual needs. For example, a percentage greater than 98% ensures a sufficient proportion of tamper-proof facial images while also allowing for occasional pose shifts by the subject / user during facial image acquisition. Facial recognition, specifically face recognition, is a biometric technology that identifies individuals based on facial features.
[0077] Optionally, when the proportion of the un-tampered facial images in the facial images reaches the set proportion, the server can determine that the received multiple frames of continuous facial images are real facial images collected by the client in real time according to the image collection parameters, rather than pre-prepared facial images, so as to determine that the received facial images are not tampered with in the transmission process, and then perform facial recognition based on the received facial images.
[0078] Optionally, when the proportion of the un-tampered facial images in the facial images does not reach the set proportion, step 216 is performed to determine that the facial recognition fails.
[0079] For example, the server can implement facial recognition based on one or more of convolutional neural network (CNN), Eigenfaces, linear discriminant analysis (LDA), etc., and perform identity authentication on the user based on the facial recognition result.
[0080] In the above facial recognition method, by receiving the facial image collection parameter acquisition request sent by the client, the facial organ to be verified and the expected positioning area of the facial organ to be verified in the framing frame of the client are randomly determined, so that the facial organ to be verified and the expected positioning area have randomness, so that personnel with the purpose of cheating are difficult to interfere with facial recognition based on pre-prepared facial data, which is conducive to subsequent effective detection of whether the received facial images are tampered with according to the facial organ to be verified and the expected positioning area, and further, facial image collection parameters representing the facial organ to be verified and the expected positioning area are generated and sent to the client, the facial images collected by the client according to the facial image collection parameters are obtained, and then the image positioning area of the expected positioning area in each facial image is determined based on the coordinate information of the expected positioning area in the framing frame, for each facial image, when the positioning position of the facial organ to be verified in the facial image matches the image positioning area in the facial image, the facial image is regarded as an un-tampered facial image, when the proportion of the un-tampered facial images in the facial images reaches the set proportion, it is determined that the facial images are not tampered with, and then facial recognition is performed based on the facial images, which can ensure that facial recognition is performed based on real-time collected facial data that is not tampered with by the client, thereby improving the accuracy of facial recognition and ensuring the security of facial recognition. Further, by setting the proportion, a certain fault tolerance is reserved to allow occasional motion offset of the user, avoiding direct judgment that the facial images are tampered with due to occasional motion offset of the user, and false reporting of facial recognition failure, thereby further improving the accuracy of facial recognition. Therefore, the entire process can improve the accuracy of facial recognition and ensure the security of facial recognition.
[0081] In one embodiment, as shown in Figure 6 randomly determining the facial organ to be verified, and a desired positioning area of the facial organ to be verified in the framing of the client, comprises:
[0082] Step 602, randomly determining the facial organ to be verified.
[0083] Optionally, the server can first randomly determine the facial organ to be verified from the facial organs.
[0084] Step 604, selecting at least a part of the area in the framing of the client as the optional positioning area, with the selection condition that a complete facial image can be collected in the framing of the client.
[0085] Exemplarily, if the facial organ to be verified randomly determined is “eye” or “eyebrow”, with the selection condition that a complete facial image can be collected in the framing of the client, the server can select the upper middle area in the framing as the optional positioning area. If the facial organ to be verified randomly determined is “mouth”, with the selection condition that a complete facial image can be collected in the framing of the client, the server can select the lower middle area in the framing as the optional positioning area. If the facial organ to be verified randomly determined is “nose”, with the selection condition that a complete facial image can be collected in the framing of the client, the server can select the middle area in the framing as the optional positioning area.
[0086] Step 606, randomly determining the desired positioning area from the optional positioning area.
[0087] Optionally, after determining the optional positioning area, the server can randomly determine a region from the optional positioning area as the desired positioning area, with the premise that the facial organ to be verified can be completely displayed in the desired positioning area.
[0088] In this embodiment, randomly determining the facial organ to be verified can improve the randomness of the facial image collected in the facial recognition process, and randomly determining the desired positioning area from the optional positioning area can further increase the randomness of the facial recognition process, so that personnel with the purpose of cheating are difficult to interfere with the facial recognition based on the facial data prepared in advance, which is beneficial to improve the anti-tampering ability of the facial recognition, thereby improving the accuracy of the facial recognition and ensuring the security of the facial recognition.
[0089] In one embodiment, as shown in Figure 7 sending the facial image collection parameter to the client, comprises:
[0090] Step 702, performing encryption processing on the facial image collection parameter to obtain encrypted information.
[0091] Optionally, the server can send the private key to the client when receiving the face image acquisition parameter acquisition request sent by the client, and encrypt the face image acquisition parameter based on the public key held and paired with the private key to obtain encrypted information.
[0092] At step 704, the encrypted information is sent to the client; the client is configured to decrypt the encrypted information and collect the face image according to the face image acquisition parameter obtained by the decryption processing.
[0093] Optionally, the server can send the encrypted information to the client through communication with the client. The client can decrypt the received encrypted information based on the private key.
[0094] For example, the real user of the financial institution triggers the face image acquisition parameter through the client. The server can encrypt the generated face image acquisition parameter to avoid other personnel tampering with the face image acquisition parameter sent by the server to the client, so that the client sends the real user with an error mobile instruction, and then collects the face image with an incorrect posture, resulting in the failure of the real user's face recognition.
[0095] In this embodiment, the face image acquisition parameter sent to the client can be encrypted to avoid tampering of the face image acquisition parameter received by the client, that is, to avoid interference of the real user's face recognition process by other personnel, resulting in the server determining that the real user's face recognition is not passed and affecting the real user's business handling progress. Therefore, the embodiment can further improve the anti-tampering ability of face recognition and improve the face recognition accuracy.
[0096] In one embodiment, at step 206, after obtaining the plurality of continuous face images collected by the client according to the face image acquisition parameter, as shown in Figure 8 , the method comprises:
[0097] At step 802, for each face image, the contour area of the face organ to be verified in the face image is determined based on a contour recognition algorithm.
[0098] Optionally, for each face image, the server can determine the contour area of the face organ to be verified in the face image based on a contour recognition algorithm.
[0099] For example, the contour recognition algorithm includes but is not limited to Canny edge detection algorithm, which can use a multi-stage algorithm to detect various edges in the image, which can include steps such as Gaussian filtering, pixel gradient calculation, non-maximum suppression, lag threshold processing and isolated weak edge suppression.
[0100] Step 804, when the contour region is in the image positioning region in the face image, it is determined that the positioning position of the face organ to be verified in the face image matches the image positioning region in the face image.
[0101] Optionally, for each frame of face image, the server can detect the face image, if the contour regions of the face organs to be verified in the face image are all in the image positioning region, the server can determine that the positioning positions of the face organs to be verified in the face image all match the expected positioning region, so as to determine that the received face image is not tampered.
[0102] For example, if the face organs to be verified in the face image are not in the image positioning region, the server can re-determine the face organs to be verified and the corresponding expected positioning region, and send the new face image acquisition parameters representing the face organs to be verified and the expected positioning region to the client, so that the client re-acquires the face image.
[0103] For example, taking the server of a financial institution as an example, if the number of times of re-acquisition by the client exceeds a set threshold, and each time after multiple re-acquisitions, the face organs to be verified in the face image are not in the image positioning region, the server can determine the client as an abnormal client, and perform a login prohibition processing on the account requested by the client for authentication, and suspend the related business of the account, so as to ensure the security of the account, protect the resources of the users of the financial institution, and send a warning information to the staff of the financial institution.
[0104] In this embodiment, the coordinates of the expected positioning region in the viewfinder frame can be used to accurately determine whether the face organs to be verified in the multiple continuous face images are all in the corresponding image positioning region, so as to effectively identify whether the multiple continuous face images are all real-time and real acquired by the client according to the face image acquisition parameters, thereby effectively detecting whether the face images received by the server are tampered, improving the anti-tampering ability of the face recognition process, and further improving the accuracy and security of the face recognition.
[0105] In one embodiment, based on Figure 8 , as shown in Figure 9 , it further includes:
[0106] For each frame of face image, if at least part of the contour regions of the face organs to be verified are not in the image positioning region in the face image, step 902 is performed to determine the area size of the contour regions of the face organs to be verified which are not in the image positioning region.
[0107] Optionally, for each frame of face image, if at least a part of the contour area of the to-be-verified face organ is not in the image positioning area in the face image, the server can determine the area size of the contour area of the to-be-verified face organ not in the image positioning area based on an image contour area calculation algorithm. The image contour area calculation algorithm can be implemented based on an existing function for calculating the contour area.
[0108] In step 904, if the area size of the contour area is less than the set value, it is determined that the positioning position of the to-be-verified face organ in the face image matches the image positioning area in the face image.
[0109] The set values corresponding to different to-be-verified face organs are different, and can be flexibly configured according to actual application scenarios.
[0110] Optionally, if the area size of the contour area of the to-be-verified face organ not in the image positioning area is less than the set value corresponding to the to-be-verified face organ, the server can determine that the positioning position of the to-be-verified face organ in the face image matches the image positioning area in the face image.
[0111] Optionally, for each frame of face image, if the area size of the contour area of the to-be-verified face organ not in the image positioning area in the face image is greater than or equal to the set value, the server can execute step 906 to take the face image as a suspected tampered face image.
[0112] In this embodiment, the case that the posture of the object is slightly offset during the face image acquisition process can be considered. Since the slight posture offset can cause a small part of the to-be-verified face organ to be offset out of the image positioning area, by comparing the area size of the offset to-be-verified organ with the set value, the face recognition of the real user can be prevented from failing due to the slight posture offset, and the business of the real user can be prevented from being affected, which is beneficial to improve the accuracy of face recognition and improve the business efficiency.
[0113] The face image acquisition method provided in the embodiments of the present application can also be applied to, for example, Figure 1The application environment shown. Among them, the client 102 communicates with the server 104 through the network. The client 102 can send a face image acquisition parameter acquisition request to the server 104, and receive the face image acquisition parameter sent by the server 104, wherein the face image acquisition parameter represents the face organ to be verified randomly determined by the server 104, and the expected positioning area of the face organ to be verified in the framing frame of the client, so that the client 102 can generate prompt information for moving the face organ to be verified to the expected positioning area in the framing frame based on the face image acquisition parameter, and in the case that the object is detected to move the face organ to be verified to the expected positioning area, the client 102 can collect multiple continuous face images of the object, and send the collected multiple continuous face images to the server 104, and the server 104 is used for face recognition based on the face image when the proportion of unaltered face images in the face image reaches a set proportion, wherein when the positioning position of the face organ to be verified in the face image matches the image positioning area in the face image, the face image is an unaltered face image.
[0114] In one embodiment, as shown in Figure 10 , a face image acquisition method is provided, which is applied to the client in Figure 1 for example, including the following steps:
[0115] Step 1002, send a face image acquisition parameter acquisition request to the server, and receive the face image acquisition parameter sent by the server, wherein the face image acquisition parameter represents the face organ to be verified randomly determined by the server, and the expected positioning area of the face organ to be verified in the framing frame of the client.
[0116] Optionally, the client can send a face image acquisition parameter acquisition request to the server in response to the operation instruction of the object at the client.
[0117] Step 1004, generate prompt information for moving the face organ to be verified to the expected positioning area in the framing frame based on the face image acquisition parameter.
[0118] Optionally, the client can determine the coordinate information of the face organ to be verified and the expected positioning area in the framing frame based on the face image acquisition parameter, and display the identifier representing the expected positioning area in the screen of the client based on the coordinate information, so as to generate the prompt information for moving the face organ to be verified to the expected positioning area in the framing frame, and then execute step 1006 to display the prompt information.
[0119] Exemplarily, taking the nose as the face region to be verified and the rectangular frame as the shape of the expected positioning region as examples, the client can determine, based on the face image capturing parameters, that the face organ to be verified is the nose and the coordinate information of the expected positioning region in the viewfinder frame, so as to display the rectangular frame representing the expected positioning region in the screen of the client and pop up the prompt information of “please move the nose into the rectangular frame” in the screen of the client.
[0120] Exemplarily, if the object is not detected within the effective time, the client judges whether the number of times that the object fails to move the face organ to be verified into the expected positioning region reaches a threshold value. If yes, step 1008 is performed to determine that the face recognition fails. If not, step 1006 is returned to continue to display the prompt information to the object.
[0121] In the case where the object moves the face organ to be verified into the expected positioning region is detected, the server can perform step 1010 to capture multiple frames of continuous face images of the object.
[0122] Optionally, the client can detect whether the object moves the face organ to be verified into the expected positioning region by a contour recognition algorithm. If the object moves the face organ to be verified into the expected positioning region is detected, the face image of the object is captured, and the object is prompted to keep the face organ to be verified in the expected positioning region during the face image capturing process.
[0123] Step 1012, the multiple frames of continuous face images are sent to the server. The server is configured to perform face recognition based on the face images when the proportion of the face images that are not tampered with in the face images reaches a set proportion, and the face image is the face image that is not tampered with when the positioning position of the face organ to be verified in the face image matches the image positioning region in the face image.
[0124] Optionally, after the face image is captured, the client can send the captured face image to the server for face recognition.
[0125] The face image collection method can ensure the randomness of the face image collected according to the face image collection parameter, so that a person with the purpose of cheating is difficult to interfere with the face recognition based on the pre-prepared face data, further, based on the face image collection parameter, prompt information for moving the face organ to be verified to the expected positioning area in the framing frame is generated, in the case that the object moves the face organ to be verified to the expected positioning area, the face image collection parameter is collected, and the face image is sent to the server, wherein the server is used for detecting the positioning position of the face organ to be verified in the face image and the expected positioning area, and based on the plurality of continuous face images, face recognition is performed, so as to ensure that the server performs face recognition based on real-time and real face data, rather than based on tampered face data, so as to improve the accuracy of face recognition and ensure the security of face recognition.
[0126] In one embodiment, as shown in Figure 11 The face image collection parameter sent by the server is received, including:
[0127] Step 1102, receiving the encrypted information carrying the face image collection parameter sent by the server.
[0128] Optionally, through communication with the server, the client can receive the encrypted information carrying the face image collection parameter sent by the server.
[0129] Step 1104, decrypting the encrypted information to obtain the face image collection parameter sent by the server.
[0130] Optionally, after the client sends the face image collection parameter acquisition request to the server, the client can receive the private key sent by the server, and then decrypt the encrypted information carrying the face image collection parameter sent by the server based on the private key to obtain the face image collection parameter sent by the server.
[0131] In this embodiment, since the server encrypts the face image collection parameter sent to the client, the face image collection parameter received by the client can be prevented from being tampered, that is, other personnel can be prevented from interfering with the process of correctly collecting the face image by the client according to the face image collection parameter, the anti-tampering ability of the face recognition process can be improved, and the face recognition accuracy can be improved.
[0132] In one embodiment, as shown in Figure 12As shown, in the case where it is detected that the object moves the face organ to be verified to the expected positioning area, a face image of the object is collected, including:
[0133] Step 1202, in the case where it is detected that the object moves the face organ to be verified to the expected positioning area, live detection is performed on the object.
[0134] Optionally, the client can determine, in the case where it is detected that the object moves the face organ to be verified to the expected positioning area, that the object can perform the related moving operation according to the prompt information, has the ability to move the face organ to be verified to the expected positioning area, and then perform live detection on the object.
[0135] Exemplarily, the client can perform live detection on the object based on a real-time face image or a real-time face video of the object, and also can obtain a string of verification codes randomly issued by the server through communication with the server, and prompt the object to read the verification codes in sequence, and if the content read by the object is consistent with the verification codes issued by the server, it is determined that the object passes the live detection, so as to improve the randomness of the live detection process.
[0136] Optionally, if the object does not pass the live detection, the client performs step 1204 to determine that the face recognition fails.
[0137] Step 1206, if the object passes the live detection, a plurality of continuous face images of the object are collected; the face images are used for sending to the server for face recognition.
[0138] Optionally, if the object passes the live detection, a plurality of continuous face images of the object are collected; the face images are used for sending to the server for face recognition.
[0139] In this embodiment, it is ensured that the object can perform the action of moving the face organ to be verified to the expected positioning area, so that the face recognition process is more humanized, and the face recognition of the object is avoided to fail due to the action instruction that the object cannot perform due to its own reasons or other external reasons. In this embodiment, the face image of the object is collected only when it is ensured that the object passes the live detection, and pre-screening can be performed before face recognition, some cases of using images to interfere with face recognition can be screened out, which is beneficial to improve the efficiency and accuracy of the server in processing face recognition.
[0140] In one embodiment, step 1002, a face image collection parameter acquisition request is sent to the server, including: if the business handling request triggered by the object represents that the business handling request has a face recognition demand, step 1302 is performed to send a face image collection parameter acquisition request to the server. For example, Figure 13 As shown, after step 1302 is performed, it further includes:
[0141] Step 1304, if the object passes the face recognition of the service end, a feedback result indicating the consent to process the service request is received from the service end.
[0142] Optionally, if the object passes the face recognition of the service end, the client can communicate with the service end to receive the feedback result indicating the consent to process the service request sent by the service end.
[0143] Step 1306, in response to the feedback result, the service request carried with the data related to the to-be-handled service is identified to determine the to-be-handled service corresponding to the service request.
[0144] Optionally, the client can identify the service request carried with the data related to the to-be-handled service in response to the feedback result to determine the to-be-handled service corresponding to the object.
[0145] Step 1308, the service interface corresponding to the to-be-handled service is displayed to the object, and the operation instruction triggered by the object on the service interface is processed.
[0146] Optionally, the client can first determine the service interface corresponding to the to-be-handled service, then display the service interface to the object, and process the operation instruction triggered by the object on the service interface.
[0147] In the embodiment, when the object needs to handle the service with face recognition requirement, the face image acquisition parameter acquisition request is sent to the service end, and after the face image of the object is acquired by the client according to the face image acquisition parameter on the service end, the to-be-handled service of the object is automatically identified after the face recognition, and the object is assisted to handle the service on the service interface, which can improve the service processing efficiency and ensure the safety of the service processing process.
[0148] In one embodiment, as shown in Figure 14 , in combination with the service end and the client, a face image acquisition and face recognition method is provided, mainly including the following processes:
[0149] If the object triggers the service request on the client with face recognition requirement, the client can generate the face image acquisition parameter acquisition request, and the request is sent to the service end by the business server.
[0150] Further, the service end can respond to the face image acquisition parameter acquisition request, randomly generate the to-be-verified face organ and the expected positioning area of the to-be-verified face organ in the framing frame of the client, and encrypt the face image acquisition parameter representing the to-be-verified face organ and the expected positioning area, and return the encrypted information to the client through the business server.
[0151] The client can decrypt the encrypted information to obtain the face image collection, and generate prompt information based on the face image parameters to prompt the object to move the face organ to be verified into the expected positioning area. If the client does not detect that the object moves the face organ to be verified into the expected positioning area, the client can generate prompt information again, and if the number of times that the object does not move the face organ to be verified into the expected positioning area reaches a threshold, the client displays a face recognition failure result to the object. If the client can detect the face organ to be verified in the expected positioning area, the client starts to perform a liveness detection on the object. If the object passes the liveness detection, the client can further collect a face video of the object, and if the object does not pass the liveness detection, the client displays a face recognition failure result to the object.
[0152] Further, the client can upload the face video to the server through the business server, and the server can judge whether the face organ to be verified in the face video is always located at a position corresponding to the expected positioning area. If yes, it is determined that the position is correct, and the server performs face recognition based on the face video. Otherwise, the server returns a face recognition failure result to the client through the business server, and the client displays the face recognition failure result to the object.
[0153] Finally, if the object passes the face recognition, the server returns a face recognition pass result to the client through the business server, and the client displays the face recognition result to the object.
[0154] It should be understood that, although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages.
[0155] Based on the same inventive concept, the embodiments of the present application also provide a face recognition device for implementing the above-mentioned face recognition method, and a face image collection device for implementing the face image collection method. The problem-solving implementation scheme provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more face recognition device and face image collection device embodiments provided below can refer to the limitations of the face recognition method and the face image collection method described above, which will not be repeated here.
[0156] In one embodiment, as shown in Figure 15 A face recognition apparatus is provided, comprising: a random information determination module 1502, a collection parameter sending module 1504, a face image acquisition module 1506, an image positioning area determination module 1508, an untampered face image determination module 1510, and a face recognition module 1512, wherein:
[0157] The random information determination module is configured to receive a face image collection parameter acquisition request sent by a client, and randomly determine a face organ to be verified and an expected positioning area of the face organ to be verified in a viewfinder frame of the client.
[0158] The collection parameter sending module is configured to generate face image collection parameters representing the face organ to be verified and the expected positioning area, and send the face image collection parameters to the client.
[0159] The face image acquisition module is configured to acquire a plurality of continuous face images collected by the client according to the face image collection parameters.
[0160] The image positioning area determination module is configured to determine an image positioning area of the expected positioning area in each face image based on coordinate information of the expected positioning area in the viewfinder frame.
[0161] The untampered face image determination module is configured to, for each face image, when a positioning position of the face organ to be verified in the face image matches the image positioning area in the face image, take the face image as an untampered face image.
[0162] The face recognition module is configured to, when a proportion of the untampered face images in the face images reaches a set proportion, perform face recognition based on the face images.
[0163] In the face recognition device, a face image acquisition parameter acquisition request sent by the client is received, a face organ to be verified is randomly determined, and an expected positioning area of the face organ to be verified in a framing frame of the client is randomly determined, so that the face organ to be verified and the expected positioning area have randomness, so that a person with the purpose of cheating is difficult to interfere with face recognition based on pre-prepared face data, and subsequent effective detection of whether the received face image is tampered with based on the randomly determined face organ to be verified and the expected positioning area is facilitated. Further, face image acquisition parameters representing the face organ to be verified and the expected positioning area are generated, and the face image acquisition parameters are sent to the client. The face image acquisition parameters are used to acquire a face image collected by the client according to the face image acquisition parameters. Then, based on coordinate information of the expected positioning area in the framing frame, an image positioning area of the expected positioning area in each frame of the face image is determined. For each frame of the face image, when a positioning position of the face organ to be verified in the face image matches the image positioning area in the face image, the face image is taken as an untampered face image. When a proportion of the untampered face image in the face image reaches a set proportion, it is determined that the face image is not tampered with. Then, face recognition is performed based on the face image. It can be ensured that face recognition is performed based on real-time collected and untampered face data of the client, so as to improve the accuracy of face recognition and ensure the safety of face recognition. Further, by setting the proportion, a certain fault tolerance is reserved, occasional motion deviation of the user is allowed, and the face image is not directly determined to be tampered with due to occasional motion deviation of the user, so that false reporting of face recognition failure is avoided, and the accuracy of face recognition is further improved. Therefore, the entire process can improve the accuracy of face recognition and ensure the safety of face recognition.
[0164] In one of the embodiments, the random information determination module is further configured to: randomly determine the face organ to be verified; and select at least a part of an area in the framing frame of the client as a selectable positioning area, with the framing frame of the client collecting a complete face image as a selection condition; and randomly determine the expected positioning area from the selectable positioning area.
[0165] In one of the embodiments, the acquisition parameter sending module is further configured to: perform encryption processing on the face image acquisition parameters to obtain encrypted information; and send the encrypted information to the client; and the client is configured to perform decryption processing on the encrypted information, and collect the face image according to the face image acquisition parameters obtained through the decryption processing.
[0166] In one of the embodiments, the face recognition device further comprises: a contour area determination module configured to determine, for each frame of the face image, a contour area of the face organ to be verified in the face image based on a contour recognition algorithm; and a region matching module configured to determine that a positioning position of the face organ to be verified in the face image matches the image positioning area in the face image when the contour area is in the image positioning area in the face image.
[0167] In one embodiment, the facial recognition device further includes: an area size determination module, configured to, for each frame of facial image, determine the area size of the contour region of the facial organ to be verified that is not located within the image positioning area of the facial image if at least a portion of the contour region is not located within the image positioning area of the facial image; and an area comparison module, configured to determine that the positioning position of the facial organ to be verified in the facial image matches the image positioning area in the facial image if the area size of the contour region is less than a set value.
[0168] In one embodiment, such as Figure 16 As shown, a facial image acquisition device is provided, including: an acquisition parameter receiving module 1602, a prompt information generation module 1606, a facial image acquisition module 1608, and a facial image sending module 1610, wherein:
[0169] The parameter acquisition receiving module is used to send a facial image acquisition parameter acquisition request to the server and receive the facial image acquisition parameters sent by the server. The facial image acquisition parameters represent the facial organs to be verified randomly determined by the server, and the expected positioning area of the facial organs to be verified in the viewfinder of the client.
[0170] The prompt message generation module is used to generate prompt messages based on facial image acquisition parameters, which move the facial organ to be verified to the desired positioning area in the viewfinder;
[0171] The facial image acquisition module is used to acquire multiple consecutive frames of facial images of an object when it is detected that the object has moved the facial organ to be verified into the desired positioning area.
[0172] The facial image sending module is used to send multiple consecutive frames of facial images to the server. The server is used to perform facial recognition based on the facial images when the proportion of unaltered facial images in the facial images reaches a set ratio. When the location of the facial organ to be verified in the facial image matches the image location area in the facial image, the facial image is considered to be an unaltered facial image.
[0173] The face image acquisition device can ensure the randomness of the face image collected according to the face image acquisition parameter, so that a person with the purpose of cheating is difficult to interfere with face recognition based on pre-prepared face data. Further, based on the face image acquisition parameter, prompt information for moving the face organ to be verified to the expected positioning area in the framing frame is generated. In the case where it is detected that the object moves the face organ to be verified to the expected positioning area, the face image acquisition device acquires multiple continuous face images of the object and sends the multiple continuous face images to the server. The server is configured to perform face recognition based on the face image when it is detected that the positioning position of the face organ to be verified in the face image matches the expected positioning area, so as to ensure that the server performs face recognition based on real and true face data, instead of performing face recognition based on tampered face data, thereby improving the accuracy of face recognition and ensuring the security of face recognition.
[0174] In one of the embodiments, the acquisition parameter receiving module is further configured to receive the encrypted information carrying the face image acquisition parameter sent by the server, and decrypt the encrypted information to obtain the face image acquisition parameter sent by the server.
[0175] In one of the embodiments, the face image acquisition module is further configured to, in the case where it is detected that the object moves the face organ to be verified to the expected positioning area, perform live body detection on the object, and if the object passes the live body detection, acquire multiple continuous face images of the object. The face images are sent to the server for face recognition.
[0176] In one of the embodiments, the acquisition parameter receiving module is further configured to, if the service handling request triggered by the object indicates that the service handling request has a face recognition requirement, send a face image acquisition parameter obtaining request to the server. The face image acquisition device further includes a feedback result receiving module configured to, if the object passes the face recognition of the server, receive a feedback result sent by the server, the feedback result indicating that the service handling request is agreed to be processed. A to-be-handled service identifying module is configured to, in response to the feedback result, identify a to-be-handled service corresponding to the service handling request from the service handling request carrying to-be-handled service related data. A service interface display module is configured to display a service interface corresponding to the to-be-handled service to the object and process an operation instruction triggered by the object on the service interface.
[0177] The above face recognition device and each module in the face image collection device can be implemented by software, hardware and a combination thereof in whole or in part. The above modules can be embedded in or independent of a processor in a computer device in a hardware form, or can be stored in a memory in a computer device in a software form, so as to be called and executed by the processor to perform the operations corresponding to the above modules.
[0178] In one embodiment, a computer device, which can be a server, has an internal structure diagram as shown in Figure 17 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store face recognition and face image collection data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a face recognition method and a face image collection method.
[0179] Those skilled in the art can understand that Figure 17 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0180] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above method embodiments.
[0181] In one embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by the processor to implement the steps in the above method embodiments.
[0182] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by the processor to implement the steps in the above method embodiments.
[0183] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in 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 in 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 in 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.
[0184] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0185] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary 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 protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A face recognition method characterized by, The method comprises: receiving a face image acquisition parameter acquisition request sent by a client, randomly determining a to-be-verified face organ and an expected positioning area of the to-be-verified face organ in a framing frame of the client; generating face image acquisition parameters representing the to-be-verified face organ and the expected positioning area, and sending the face image acquisition parameters to the client; acquiring a plurality of frames of continuous face images collected by the client according to the face image acquisition parameters; based on coordinate information of the expected positioning area in the framing frame, taking a center point of the framing frame as a coordinate origin, constructing a coordinate system in the framing frame to determine coordinate information of the expected positioning area in the framing frame; for each frame of the face images, based on an image center point of the face image, constructing an image coordinate system in the face image; based on a conversion relationship between the image coordinate system and the coordinate system, converting the coordinate information into coordinate information of the expected positioning area in the image coordinate system to determine an image positioning area of the expected positioning area in the face image; when a positioning position of the to-be-verified face organ in the face image matches the image positioning area in the face image, taking the face image as an untampered face image; when a proportion of the untampered face image in the face image reaches a set proportion, performing face recognition based on the face image.
2. The method of claim 1, wherein, The random determination of the to-be-verified face organ and the expected positioning area of the to-be-verified face organ in the framing frame of the client comprises: randomly determining a to-be-verified face organ; selecting at least a part of an area in the framing frame of the client as a selectable positioning area as a selection condition for the client to collect a complete face image in the framing frame; randomly determining an expected positioning area from the selectable positioning area.
3. The method of claim 1, wherein, The sending of the face image acquisition parameters to the client comprises: encrypting the face image acquisition parameters to obtain encrypted information; sending the encrypted information to the client; the client is configured to decrypt the encrypted information and collect face images according to the face image acquisition parameters obtained by decryption.
4. The method of claim 1, wherein, The method further comprises: for each frame of the face images, determining a contour area of the to-be-verified face organ in the face image based on a contour recognition algorithm; when the contour area is in the image positioning area in the face image, determining that the positioning position of the to-be-verified face organ in the face image matches the image positioning area in the face image.
5. The method of claim 1, wherein, The method further comprises: for each frame of the face images, in the face image, if at least a part of the contour area of the to-be-verified face organ is not in the image positioning area of the face image, determining a contour area size of the to-be-verified face organ not in the image positioning area; if the contour area size is less than a set value, determining that the positioning position of the to-be-verified face organ in the face image matches the image positioning area in the face image.
6. A face image capturing method, comprising: The method comprises: sending a face image collection parameter acquisition request to a server, and receiving face image collection parameters sent by the server; the face image collection parameters represent a face organ to be verified determined randomly by the server and an expected positioning area of the face organ to be verified in a framing frame of a client; generating prompt information for moving the face organ to be verified to the expected positioning area in the framing frame based on the face image collection parameters; in a case where it is detected that an object moves the face organ to be verified to the expected positioning area, collecting multiple frames of continuous face images of the object; sending the multiple frames of continuous face images to the server; the server is configured to perform face recognition based on the face images when a proportion of unaltered face images in the face images reaches a set proportion; the face image is an unaltered face image when a positioning position of the face organ to be verified in the face image matches an image positioning area in the face image; the image positioning area of the expected positioning area in the face image is determined by taking a center point of the framing frame as a coordinate origin to construct a coordinate system in the framing frame, constructing an image coordinate system in the face image based on a center point of the face image, and converting coordinate information of the coordinate system into coordinate information of the expected positioning area in the image coordinate system based on a conversion relationship between the image coordinate system and the coordinate system.
7. The method of claim 6, wherein, The receiving of the face image collection parameters sent by the server comprises: receiving encrypted information carrying the face image collection parameters sent by the server; decrypting the encrypted information to obtain the face image collection parameters sent by the server.
8. The method of claim 6, wherein, The collecting of the face image of the object in the case where it is detected that the object moves the face organ to be verified to the expected positioning area comprises: in the case where it is detected that the object moves the face organ to be verified to the expected positioning area, performing a living body detection on the object; if the object passes the living body detection, collecting multiple frames of continuous face images of the object; the face images are used to be sent to the server for face recognition.
9. The method of claim 6, wherein, The sending of the face image collection parameter acquisition request to the server comprises: if a service handling request triggered by the object represents that the service handling request has a face recognition demand, sending a face image collection parameter acquisition request to the server. The method further comprises: if the object passes the face recognition of the server, receiving feedback results sent by the server, which represent an agreement to handle the service handling request; in response to the feedback results, identifying a service to be handled corresponding to the service handling request from the service handling request carrying service to be handled related data; displaying a service interface corresponding to the service to be handled to the object, and processing operation instructions triggered by the object in the service interface.
10. A face recognition apparatus characterized by comprising: The device comprises: The random information determination module is configured to receive a face image collection parameter acquisition request sent by a client, and randomly determine a face organ to be verified and an expected positioning area of the face organ to be verified in a framing frame of the client. The collection parameter sending module is configured to generate face image collection parameters representing the face organ to be verified and the expected positioning area, and send the face image collection parameters to the client. The face image acquisition module is configured to acquire a plurality of continuous face images collected by the client according to the face image collection parameters. The image positioning area determination module is configured to determine coordinate information of the expected positioning area in the framing frame based on coordinate information of the expected positioning area in the framing frame, take a center point of the framing frame as a coordinate origin, and construct a coordinate system in the framing frame to determine the coordinate information of the expected positioning area in the framing frame. For each of the face images, the image coordinate system in the face image is constructed based on an image center point of the face image. The coordinate information is converted into coordinate information of the expected positioning area in the image coordinate system based on a conversion relationship between the image coordinate system and the coordinate system, so as to determine an image positioning area of the expected positioning area in the face image. The un-tampered face image determination module is configured to, for each of the face images, when a positioning position of the face organ to be verified in the face image matches the image positioning area in the face image, determine the face image as an un-tampered face image. The face recognition module is configured to, when a proportion of the un-tampered face image in the face image reaches a set proportion, perform face recognition based on the face image.
11. The apparatus of claim 10, wherein, The random information determination module is further configured to randomly determine a face organ to be verified, and select at least a part of an area in a framing frame of the client as a selectable positioning area, with the selection being based on a condition that a complete face image is collected in the framing frame of the client. The expected positioning area is randomly determined from the selectable positioning area.
12. The apparatus of claim 10, wherein, The collection parameter sending module is further configured to perform encryption processing on the face image collection parameters to obtain encrypted information, and send the encrypted information to the client.
13. The apparatus of claim 10, wherein, The device further includes: The contour area determination module is configured to, for each of the face images, determine a contour area of the face organ to be verified in the face image based on a contour recognition algorithm. The area matching module is configured to, when the contour area is in the image positioning area in the face image, determine that a positioning position of the face organ to be verified in the face image matches the image positioning area in the face image.
14. The apparatus of claim 10, wherein, The device further includes: The area size determination module is configured to, for each of the face images, determine an area size of a contour area of the face organ to be verified that is not in the image positioning area in the face image, when at least a part of the contour area of the face organ to be verified is not in the image positioning area in the face image. The area comparison module is configured to determine that the positioning of the face organ to be verified in the face image matches an image positioning area in the face image if the size of the contour area is less than a set value.
15. A face image capturing apparatus, comprising: The device comprises: The acquisition parameter receiving module is configured to send a face image acquisition parameter obtaining request to a server, and receive face image acquisition parameters sent by the server. The face image acquisition parameters represent a face organ to be verified and an expected positioning area of the face organ to be verified in a framing frame of a client randomly determined by the server. The prompt information generating module is configured to generate prompt information for moving the face organ to be verified to the expected positioning area in the framing frame based on the face image acquisition parameters. The face image acquisition module is configured to acquire a plurality of continuous face images of an object if it is detected that the object moves the face organ to be verified to the expected positioning area. The face image sending module is configured to send the plurality of continuous face images to the server. The server is configured to perform face recognition based on the face images when a proportion of unaltered face images in the face images reaches a set proportion. The face image is an unaltered face image when the positioning of the face organ to be verified in the face image matches an image positioning area in the face image. The image positioning area of the expected positioning area in the face image is determined by taking a center point of the framing frame as a coordinate origin to construct a coordinate system in the framing frame, constructing an image coordinate system in the face image based on an image center point of the face image, and converting the coordinate information of the coordinate system into coordinate information of the expected positioning area in the image coordinate system based on a conversion relationship between the image coordinate system and the coordinate system.
16. The apparatus of claim 15, wherein, The acquisition parameter receiving module is further configured to receive encrypted information carrying the face image acquisition parameters sent by the server, and decrypt the encrypted information to obtain the face image acquisition parameters sent by the server.
17. The apparatus of claim 15, wherein, The face image acquisition module is further configured to perform a living body detection on the object if it is detected that the object moves the face organ to be verified to the expected positioning area. If the object passes the living body detection, the face image acquisition module acquires a plurality of continuous face images of the object. The face images are sent to the server for face recognition.
18. The apparatus of claim 15, wherein, The acquisition parameter receiving module is further configured to send a face image acquisition parameter obtaining request to the server if a service handling request triggered by the object represents that the service handling request has a face recognition demand. The device further comprises: The feedback result receiving module is configured to receive a feedback result sent by the server if the object passes the face recognition of the server, the feedback result representing that the service handling request is agreed to be handled. The to-be-handled service identifying module is configured to identify a to-be-handled service corresponding to the service handling request from the service handling request carrying to-be-handled service related data in response to the feedback result. A service interface display module is configured to display a service interface corresponding to the to-be-handled service to the object and process an operation instruction triggered by the object on the service interface. 19.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-18. The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 9.
20. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 9.
21. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 9. The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Face authentication device and face authentication method
CN105279479A
Human face living body detection method and device, computing equipment and computer storage medium
CN112307817A