Artificial Intelligence-Based Face Recognition Method, Device, Electronic Device and Medium

By constructing three-dimensional face images and extracting target features, the problems of low face recognition accuracy and low efficiency in the prior art are solved, and efficient and accurate face recognition is achieved.

CN111783593BActive Publication Date: 2025-05-27CHINA PING AN LIFE INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010585000.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-23
Publication Date
2025-05-27
Estimated Expiration
2040-06-23

AI Technical Summary

Technical Problem

Under the influence of camera equipment and the relative position of faces, it is difficult for existing face recognition technology to acquire face images from multiple angles, resulting in low recognition accuracy and requires users to take photos from the same angle, affecting the recognition efficiency.

Method used

By receiving face recognition instructions, extracting the image to be recognized, determining the face area, constructing a three-dimensional face image, extracting multiple target features, calculating feature similarity, and determining the target user.

Benefits of technology

No need for multi-angle image acquisition, saves equipment resources, and improves facial recognition efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111783593B_ABST
    Figure CN111783593B_ABST
Patent Text Reader

Abstract

The present invention relates to artificial intelligence, and provides a face recognition method, device, electronic device and medium based on artificial intelligence. This method can extract the image to be recognized and determine the face area, extract face feature information points, construct a three-dimensional face image of the image to be recognized based on the face feature information points, extract multiple target features from the three-dimensional face image, calculate the similarity between the multiple target features and the configured features in the configuration library to obtain multiple target values, and determine the target user of the image to be recognized based on the multiple target values. The present invention does not need to obtain multiple face images at multiple angles through a camera device, and can determine the target user only through one face image, saving device resources. At the same time, it not only improves the efficiency of face recognition, but also can improve the accuracy of face recognition. In addition, the present invention also relates to blockchain technology, and the three-dimensional face image is stored in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular, to a face recognition method, device, electronic device and medium based on artificial intelligence. Background Art

[0002] Face recognition technology is a biometric technology for identity recognition based on human facial feature information. This technology actually uses a camera device to collect images or video streams containing human faces, automatically detects and tracks human faces in the images, and then performs facial recognition on the detected human faces.

[0003] Currently, affected by the relative positions of the camera device and the human face, multiple face images of the same user at different angles cannot be collected. Therefore, when comparing face features, the accuracy of face recognition is low. In addition, since the face features stored in the configuration library are from images taken from a relatively single shooting angle (for example, frontal shooting), when performing face recognition, users are required to take the to-be-recognized images at the same shooting angle, which will affect the efficiency of face recognition. Summary of the Invention

[0004] In view of the above, it is necessary to provide a face recognition method, device, electronic device and medium based on artificial intelligence, which can not only improve the efficiency of face recognition, but also improve the accuracy of face recognition.

[0005] A face recognition method based on artificial intelligence, the face recognition method based on artificial intelligence includes:

[0006] When receiving a face recognition instruction, extract the to-be-recognized image from the face recognition instruction, and determine the face area from the to-be-recognized image;

[0007] Extract face feature information points from the face area;

[0008] Construct a three-dimensional face image of the to-be-recognized image based on the face feature information points;

[0009] Extract multiple target features from the three-dimensional face image;

[0010] Calculate the similarity between the multiple target features and the configuration features in the configuration library to obtain multiple target values;

[0011] Determine the target user of the to-be-recognized image based on the multiple target values.

[0012] According to a preferred embodiment of the present invention, the determining the face area from the to-be-recognized image includes:

[0013] Determine multiple skin color areas from the to-be-recognized image;

[0014] Select the multiple skin-color regions from the image to be recognized by using a detection window, and obtain multiple regions to be determined;

[0015] Stitch the multiple regions to be determined to obtain a target image;

[0016] Detect the target image by using a pre-trained face detector to obtain the face region.

[0017] According to a preferred embodiment of the present invention, before detecting the target image by using a pre-trained face detector, the method further includes:

[0018] Obtain a data set, where the data set includes positive samples and negative samples, the positive samples are face images, and the negative samples are background images;

[0019] Divide the data set to obtain training samples and test samples;

[0020] Extract pixel-level differential features of the training samples, and construct a depth binary tree according to the pixel-level differential features;

[0021] Cascade the depth binary tree by using a bootstrap framework to generate a learner;

[0022] Test the learner by using the test samples;

[0023] When it is detected that the learner passes the test, determine the learner as the face detector.

[0024] According to a preferred embodiment of the present invention, extracting face feature information points from the face region includes:

[0025] Perform gray value processing on the face region to obtain multiple pixel points of the face region and the gray value corresponding to each pixel point;

[0026] When it is detected that any gray value is greater than a threshold, determine the pixel point corresponding to the any gray value as a pupil edge point;

[0027] Determine the pupil center of the face region as the face feature information point according to the pupil edge point, and detect the corners of the eyes, the corners of the mouth, and the eye edges in the face region as the face feature information points by using the SUSAN operator method.

[0028] According to a preferred embodiment of the present invention, the three-dimensional face image is stored in a blockchain, and constructing the three-dimensional face image of the image to be recognized based on the face feature information points includes:

[0029] Obtain a reference vector and an average face;

[0030] Construct a target human face based on the reference vector and the average face;

[0031] Determine the two-dimensional coordinates of the human face feature information points in the image to be recognized;

[0032] Perform mapping processing on the two-dimensional coordinates to obtain three-dimensional coordinates;

[0033] Adjust the target human face according to the three-dimensional coordinates to obtain the three-dimensional human face image.

[0034] According to a preferred embodiment of the present invention, calculating the similarity between the multiple target features and the configured features in the configuration library to obtain multiple target values includes:

[0035] For any feature among the multiple target features, determine the type to which the any feature belongs, and obtain multiple configured features corresponding to the type from the configuration library;

[0036] Adopt the cosine distance formula to calculate the similarity between the any feature and the multiple configured features to obtain multiple similarity distance values of the any feature;

[0037] Determine the similarity distance value with the largest numerical value among the multiple similarity distance values as the target value of the any feature;

[0038] Integrate the target values of the multiple any features to obtain the multiple target values corresponding to the multiple target features.

[0039] According to a preferred embodiment of the present invention, determining the target user of the image to be recognized based on the multiple target values includes:

[0040] Determine the configured features corresponding to the multiple target values, and determine the user corresponding to the configured features to obtain the users corresponding to the multiple target features;

[0041] Calculate the number of target features corresponding to the user, and determine the user with the largest number as the target user.

[0042] A face recognition device based on artificial intelligence, the face recognition device based on artificial intelligence includes:

[0043] A determination unit, configured to extract the image to be recognized from the face recognition instruction and determine the face area from the image to be recognized when receiving the face recognition instruction;

[0044] An extraction unit, configured to extract human face feature information points from the face area;

[0045] A construction unit, configured to construct a three-dimensional human face image of the image to be recognized based on the human face feature information points;

[0046] The extraction unit is further configured to extract a plurality of target features from the three-dimensional face image;

[0047] The calculation unit is configured to calculate the similarity between the plurality of target features and the configuration features in the configuration library to obtain a plurality of target values;

[0048] The determination unit is further configured to determine the target user of the image to be recognized based on the plurality of target values.

[0049] According to a preferred embodiment of the present invention, the determination unit determines the face area from the image to be recognized, including:

[0050] Determine a plurality of skin color areas from the image to be recognized;

[0051] Use a detection window to select the plurality of skin color areas from the image to be recognized to obtain a plurality of areas to be determined;

[0052] Stitch the plurality of areas to be determined to obtain a target image;

[0053] Use a pre-trained face detector to detect the target image to obtain the face area.

[0054] According to a preferred embodiment of the present invention, the apparatus further includes:

[0055] An acquisition unit, configured to acquire a data set before using a pre-trained face detector to detect the target image, where the data set includes positive samples and negative samples, the positive samples are face images, and the negative samples are background images;

[0056] A division unit, configured to divide the data set to obtain training samples and test samples;

[0057] The extraction unit is further configured to extract pixel-level differential features of the training samples and construct a depth binary tree according to the pixel-level differential features;

[0058] A generation unit, configured to cascade the depth binary tree using a bootstrap framework to generate a learner;

[0059] A test unit, configured to test the learner using the test samples;

[0060] The determination unit is further configured to, when it is detected that the learner passes the test, determine the learner as the face detector.

[0061] According to a preferred embodiment of the present invention, the extraction unit extracts face feature information points from the face area, including:

[0062] Perform grayscale value processing on the face region to obtain multiple pixel points in the face region and the grayscale value corresponding to each pixel point;

[0063] When it is detected that any grayscale value is greater than the threshold, determine the pixel point corresponding to the any grayscale value as the pupil edge point;

[0064] Determine the pupil center of the face region as the face feature information point according to the pupil edge point, and use the SUSAN operator method to detect the corners of the eyes, the corners of the mouth and the eye edges in the face region as the face feature information points.

[0065] According to a preferred embodiment of the present invention, the three-dimensional face image is stored in the blockchain, and the construction unit is specifically used for:

[0066] Obtain the reference vector and the average face;

[0067] Construct a target face according to the reference vector and the average face;

[0068] Determine the two-dimensional coordinates of the face feature information points in the image to be recognized;

[0069] Perform mapping processing on the two-dimensional coordinates to obtain three-dimensional coordinates;

[0070] Adjust the target face according to the three-dimensional coordinates to obtain the three-dimensional face image.

[0071] According to a preferred embodiment of the present invention, the calculation unit is specifically used for:

[0072] For any feature among the multiple target features, determine the type to which the any feature belongs, and obtain multiple configuration features corresponding to the type from the configuration library;

[0073] Use the cosine distance formula to calculate the similarity between the any feature and the multiple configuration features, and obtain multiple similarity distance values of the any feature;

[0074] Determine the similarity distance value with the largest numerical value among the multiple similarity distance values as the target value of the any feature;

[0075] Integrate the target values of multiple any features to obtain multiple target values corresponding to the multiple target features.

[0076] According to a preferred embodiment of the present invention, the determining unit determines the target user of the image to be recognized based on the multiple target values, including:

[0077] Determine the configuration feature corresponding to the multiple target values, and determine the user corresponding to the configuration feature to obtain the users corresponding to the multiple target features;

[0078] Calculate the number of target features corresponding to the user, and determine the user with the largest number as the target user.

[0079] An electronic device, the electronic device includes:

[0080] A memory that stores at least one instruction; and

[0081] A processor that executes the instructions stored in the memory to implement the artificial intelligence-based face recognition method.

[0082] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the artificial intelligence-based face recognition method.

[0083] As can be seen from the above technical solutions, the present invention does not need to obtain multiple face images at multiple angles through a camera device, and can accurately determine the target user from the configuration library only through one face image, saving device resources. In addition, since the calculation amount of constructing a three-dimensional face image by using one face image is small, therefore, the present invention can improve the efficiency of face recognition. At the same time, by constructing a three-dimensional face image and detecting multiple three-dimensional target features extracted, the accuracy of face recognition can be improved. Description of the Drawings

[0084] Figure 1 is a flowchart of a preferred embodiment of the artificial intelligence-based face recognition method of the present invention.

[0085] Figure 2 is a functional module diagram of a preferred embodiment of the artificial intelligence-based face recognition device of the present invention.

[0086] Figure 3 is a schematic structural diagram of an electronic device of a preferred embodiment for implementing the artificial intelligence-based face recognition method of the present invention. Detailed Embodiments

[0087] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in detail below with reference to the drawings and specific embodiments.

[0088] As Figure 1 shown, it is a flowchart of a preferred embodiment of the artificial intelligence-based face recognition method of the present invention. According to different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0089] The artificial intelligence-based face recognition method is applied to one or more electronic devices. The electronic device is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.

[0090] The electronic device can be any electronic product that can perform human-computer interaction with a user. For example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, etc.

[0091] The electronic device may further include a network device and / or a user device. Among them, the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.

[0092] The network where the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0093] In at least one embodiment of the present invention, the present invention is applied to the field of artificial intelligence.

[0094] S10. When a face recognition instruction is received, extract the image to be recognized from the face recognition instruction, and determine the face area from the image to be recognized.

[0095] In at least one embodiment of the present invention, the face recognition instruction can be automatically triggered within a preset time.

[0096] Further, the preset time can be a time period. For example, the time period can be 8 hours, etc.

[0097] In at least one embodiment of the present invention, the information carried in the face recognition instruction includes, but is not limited to: the image to be recognized.

[0098] In at least one embodiment of the present invention, the face region refers to the facial region of a person in the image to be recognized.

[0099] In at least one embodiment of the present invention, the electronic device determines the face region from the image to be recognized, including:

[0100] The electronic device determines a plurality of skin-color regions from the image to be recognized. Further, the electronic device selects the plurality of skin-color regions from the image to be recognized by using a detection window, obtains a plurality of regions to be determined, splices the plurality of regions to be determined to obtain a target image, and the electronic device uses a pre-trained face detector to detect the target image to obtain the face region.

[0101] Among them, the skin-color regions include the face region and the limb regions.

[0102] By determining the face region, the calculation of useless regions (for example, pixels corresponding to body parts) can be reduced, which helps to improve the recognition speed of face recognition. At the same time, the interference of pixels corresponding to body parts is removed, which helps to improve the recognition accuracy of the face shape.

[0103] Specifically, the electronic device determines a plurality of skin-color regions from the image to be recognized, including:

[0104] The electronic device determines the brightness value of each pixel in the image to be recognized, and detects whether each brightness value is within a preset interval. When the brightness value of any pixel is not within the preset interval, the region corresponding to the any pixel is determined as a non-skin-color region. Further, the electronic device removes the non-skin-color regions from the image to be recognized to obtain the plurality of skin-color regions.

[0105] Among them, the preset interval is determined according to the skin color of a person, and different skin colors correspond to different preset intervals. The present invention can set multiple preset intervals according to actual situations, and specific configuration values are not limited in the present invention.

[0106] In at least one embodiment of the present invention, before using the pre-trained face detector to detect the target image, the method further includes:

[0107] The electronic device obtains a data set, which includes positive samples and negative samples. The positive samples are face images, and the negative samples are background images. Further, the electronic device divides the data set to obtain training samples and test samples. The electronic device extracts pixel-level differential features of the training samples and constructs a depth binary tree based on the pixel-level differential features. The electronic device cascades the depth binary tree using a bootstrap framework to generate a learner. Further still, the electronic device uses the test samples to test the learner. When it is detected that the learner passes the test, the electronic device determines the learner as the face detector.

[0108] In at least one embodiment of the present invention, after the electronic device obtains the data set, the method further includes:

[0109] The electronic device calculates the number of images corresponding to the positive samples. Further, the electronic device detects whether the number of images is less than a preset number threshold. When the number of images is less than the preset number threshold, the electronic device increases the number of images of the positive samples corresponding to the number of images by a perturbation method.

[0110] If the number of images of the positive samples is less than the preset number threshold, the perturbation method can be used to perturb the images of the positive samples, so as to increase the number of images of the positive samples and avoid the poor generalization ability of the face detector trained due to the insufficient number of images of the positive samples. The perturbation method is a prior art, and the present invention will not elaborate on it here.

[0111] Specifically, the electronic device divides the data set to obtain training samples and test samples, including:

[0112] The electronic device randomly divides the data set into at least one data packet according to a preset ratio, determines any one of the at least one data packet as the test sample, and determines the remaining data packets as the training samples. Repeat the above steps until all the data packets are used as the test samples in turn.

[0113] Among them, the preset ratio can be customized and set by the present invention without limitation.

[0114] By dividing the data set, each data in the data set participates in training and testing, thereby improving the fitting degree of the face detector.

[0115] In other embodiments, when it is detected that the learner fails the test, the electronic device uses a hyperparameter grid search method to adjust the learner until the learner passes the test to obtain the face detector.

[0116] S11. Extract facial feature information points from the facial region.

[0117] In at least one embodiment of the present invention, the facial feature information points include the corners of the eyes, the corners of the mouth, the pupil centers, the center of the mouth, and the edges of the eyes.

[0118] In at least one embodiment of the present invention, the electronic device extracting facial feature information points from the facial region includes:

[0119] The electronic device performs grayscale value processing on the facial region to obtain multiple pixel points of the facial region and the grayscale value corresponding to each pixel point. When it detects that any grayscale value is greater than the threshold, the electronic device determines the pixel point corresponding to the any grayscale value as the pupil edge point. The electronic device determines the pupil center of the facial region as the facial feature information point according to the pupil edge point, and uses the SUSAN operator method to detect the corners of the eyes, the corners of the mouth, and the edges of the eyes in the facial region as the facial feature information points.

[0120] Among them, the SUSAN (Small univalue segment assimilating nucleus) operator is a method for obtaining feature points based on grayscale. The working principle of the SUSAN operator method is as follows: an approximately circular template is adopted, and the circular template is moved on the image. The grayscale value of each image pixel point inside the template is compared with the grayscale value of the template center pixel. If the difference between the grayscale of a certain pixel in the template and the grayscale of the template center pixel (kernel) is less than a certain value, then it is considered that this point has the same (or similar) grayscale as the kernel.

[0121] Through the above implementation manner, the facial feature information points can be accurately determined.

[0122] S12. Construct a three-dimensional facial image of the image to be recognized based on the facial feature information points.

[0123] It should be emphasized that to further ensure the privacy and security of the above three-dimensional facial image, the above three-dimensional facial image can also be stored in a node of a blockchain.

[0124] In at least one embodiment of the present invention, the reference vector includes the first feature vector of the 3D deformation model and the second feature vector of the 3D shape fusion model. Among them, the first feature vector refers to the parameters of the shape change of the face in different situations. Further, the second feature vector refers to the parameters of the expression change of the face in different situations.

[0125] In at least one embodiment of the present invention, the open-source 3DMM will come with an average face when it is released. Therefore, the electronic device can obtain the average face from an open-source website.

[0126] In at least one embodiment of the present invention, the electronic device constructs a three-dimensional face image of the image to be recognized based on the face feature information points, including:

[0127] The electronic device obtains a reference vector and an average face, constructs a target face according to the reference vector and the average face. Further, the electronic device determines the two-dimensional coordinates of the face feature information points in the image to be recognized, performs a mapping process on the two-dimensional coordinates to obtain three-dimensional coordinates. Still further, the electronic device adjusts the target face according to the three-dimensional coordinates to obtain the three-dimensional face image.

[0128] Through the reference vector and the average face, the target face can be quickly determined, and then the three-dimensional face image can be quickly determined.

[0129] Specifically, the electronic device uses a deep learning network to perform a mapping process on the two-dimensional coordinates to obtain three-dimensional coordinates.

[0130] S13. Extract multiple target features from the three-dimensional face image.

[0131] In at least one embodiment of the present invention, the multiple target features may include eyes, mouth, nose, etc.

[0132] In at least one embodiment of the present invention, the manner in which the electronic device extracts multiple target features from the three-dimensional face image may be the same as the manner in which the electronic device extracts face feature information points from the face region, and the present invention will not elaborate on this.

[0133] S14. Calculate the similarity between the multiple target features and the configuration features in the configuration library to obtain multiple target values.

[0134] In at least one embodiment of the present invention, the electronic device calculates the similarity between the multiple target features and the configuration features in the configuration library to obtain multiple target values, including:

[0135] For any feature among the multiple target features, the electronic device extracts the type to which the any feature belongs from the multiple target features extracted from the three-dimensional face image, obtains multiple configuration features corresponding to the type from the configuration library, the electronic device uses the cosine distance formula to calculate the similarity between the any feature and the multiple configuration features to obtain multiple similarity distance values of the any feature, the electronic device determines the similarity distance value with the largest numerical value among the multiple similarity distance values as the target value of the any feature, and the electronic device integrates the target values of the multiple any features to obtain the multiple target values corresponding to the multiple target features.

[0136] S15. Determine the target user of the image to be recognized based on the multiple target values.

[0137] In at least one embodiment of the present invention, the electronic device determines the target user of the image to be recognized based on the multiple target values, including:

[0138] The electronic device determines the configuration features corresponding to the multiple target values, and determines the user corresponding to the configuration features, obtaining the users corresponding to the multiple target features. Further, the electronic device calculates the number of target features corresponding to the user, and determines the user with the largest number as the target user.

[0139] Through the above implementation, the target user is determined according to the target values corresponding to the multiple target features, improving the recognition accuracy of face recognition.

[0140] It can be seen from the above technical solutions that the present invention does not need to obtain multiple face images at multiple angles through a camera device, and can accurately determine the target user from the configuration library only through one face image, saving device resources. In addition, since the amount of calculation for constructing a three-dimensional face image using one face image is small, the present invention can improve the efficiency of face recognition. At the same time, by constructing a three-dimensional face image and detecting the multiple three-dimensional target features extracted, the accuracy of face recognition can be improved.

[0141] As Figure 2 shown, it is a functional module diagram of a preferred embodiment of the face recognition device based on artificial intelligence of the present invention. The face recognition device 11 based on artificial intelligence includes a determination unit 110, an extraction unit 111, a construction unit 112, a calculation unit 113, an acquisition unit 114, a division unit 115, a generation unit 116, a test unit 117, a detection unit 118, a perturbation unit 119, and an adjustment unit 120. The module / unit referred to in the present invention means a series of computer program segments that can be executed by a processor 13 and can complete fixed functions, and are stored in a memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0142] When receiving a face recognition instruction, the determination unit 110 extracts the image to be recognized from the face recognition instruction, and determines the face area from the image to be recognized.

[0143] In at least one embodiment of the present invention, the face recognition instruction can be automatically triggered within a preset time.

[0144] Further, the preset time can be a time period, for example: the time period can be 8 hours, etc.

[0145] In at least one embodiment of the present invention, the information carried in the face recognition instruction includes, but is not limited to: the image to be recognized.

[0146] In at least one embodiment of the present invention, the face area refers to the facial area of the person in the image to be recognized.

[0147] In at least one embodiment of the present invention, the determining unit 110 determines the face area from the image to be recognized, including:

[0148] The determining unit 110 determines multiple skin-color areas from the image to be recognized. Further, the determining unit 110 selects the multiple skin-color areas from the image to be recognized by using a detection window, obtains multiple areas to be determined, the determining unit 110 splices the multiple areas to be determined to obtain a target image, and the determining unit 110 uses a pre-trained face detector to detect the target image to obtain the face area.

[0149] Among them, the skin-color areas include the face area and the limb areas.

[0150] By determining the face area, it is possible to reduce the calculation of useless areas (for example, pixels corresponding to body parts), which helps to improve the recognition speed of face recognition. At the same time, the interference of pixels corresponding to body parts is removed, which helps to improve the recognition accuracy of the face shape.

[0151] Specifically, the determining unit 110 determines multiple skin-color areas from the image to be recognized, including:

[0152] The determining unit 110 determines the brightness value of each pixel in the image to be recognized, and detects whether each brightness value is within a preset interval. When the brightness value of any pixel is not within the preset interval, the determining unit 110 determines the area corresponding to the any pixel as a non-skin-color area. Further, the determining unit 110 removes the non-skin-color areas from the image to be recognized to obtain the multiple skin-color areas.

[0153] Among them, the preset interval is determined according to the skin color of people. Different skin colors correspond to different preset intervals. The present invention can set multiple preset intervals according to the actual situation. For specific configuration values, the present invention does not limit this.

[0154] In at least one embodiment of the present invention, before detecting the target image using a pre-trained face detector, the acquisition unit 114 acquires a data set, the data set includes positive samples and negative samples, the positive samples are face images, and the negative samples are background images. Further, the partitioning unit 115 partitions the data set to obtain training samples and test samples. Still further, the extraction unit 111 extracts pixel-level differential features of the training samples, and constructs a depth binary tree based on the pixel-level differential features. The generation unit 116 cascades the depth binary tree using a bootstrap framework to generate a learner. Still further, the test unit 117 tests the learner using the test samples. When it is detected that the learner passes the test, the determination unit 110 determines the learner as the face detector.

[0155] In at least one embodiment of the present invention, after the acquisition unit 114 acquires the data set, the calculation unit 113 calculates the number of images corresponding to the positive samples. Further, the detection unit 118 detects whether the number of images is less than a preset number threshold. When the number of images is less than the preset number threshold, the perturbation unit 119 increases the number of images of the positive samples corresponding to the number of images by means of perturbation.

[0156] If the number of images of the positive samples is less than the preset number threshold, the images of the positive samples can be perturbed by means of perturbation to increase the number of images of the positive samples, so as to avoid poor generalization ability of the face detector obtained by training for face recognition due to insufficient number of images of the positive samples. The perturbation method is a prior art, and the present invention will not elaborate herein.

[0157] Specifically, the partitioning unit 115 partitions the data set to obtain training samples and test samples, including:

[0158] The partitioning unit 115 randomly partitions the data set into at least one data packet according to a preset ratio, and the partitioning unit 115 determines any one of the at least one data packets as the test sample, and the remaining data packets as the training samples. Repeat the above steps until all the data packets are used as the test sample in turn.

[0159] Among them, the preset ratio can be set customarily, and the present invention does not make any restrictions.

[0160] By partitioning the data set, each data in the data set participates in training and testing, thereby improving the fitting degree of the face detector.

[0161] In other embodiments, when it is detected that the learner fails the test, the adjustment unit 120 adjusts the learner by using a hyperparameter grid search method until the learner passes the test, and the face detector is obtained.

[0162] The extraction unit 111 extracts face feature information points from the face region.

[0163] In at least one embodiment of the present invention, the face feature information points include the corners of the eyes, the corners of the mouth, the pupil centers, the mouth center, and the edges of the eyes.

[0164] In at least one embodiment of the present invention, the extraction unit 111 extracting face feature information points from the face region includes:

[0165] The extraction unit 111 performs gray value processing on the face region to obtain multiple pixel points of the face region and the gray value corresponding to each pixel point. When it is detected that any gray value is greater than a threshold, the extraction unit 111 determines the pixel point corresponding to the any gray value as a pupil edge point. The extraction unit 111 determines the pupil center of the face region as the face feature information point according to the pupil edge point, and uses the SUSAN operator method to detect the corners of the eyes, the corners of the mouth, and the edges of the eyes in the face region as the face feature information points.

[0166] Among them, the SUSAN (Small univalue segment assimilating nucleus) operator is a method for obtaining feature points based on gray scale. The working principle of the SUSAN operator method is as follows: an approximately circular template is used, and the circular template is moved on the image. The gray value of each image pixel point inside the template is compared with the gray value of the template center pixel. If the difference between the gray value of a certain pixel in the template and the gray value of the template center pixel (kernel) is less than a certain value, it is considered that this point has the same (or similar) gray value as the kernel.

[0167] Through the above embodiments, the face feature information points can be accurately determined.

[0168] The construction unit 112 constructs a three-dimensional face image of the image to be recognized based on the face feature information points.

[0169] It should be emphasized that to further ensure the privacy and security of the above three-dimensional face image, the above three-dimensional face image can also be stored in a node of a blockchain.

[0170] In at least one embodiment of the present invention, the reference vector includes a first eigenvector of the 3D deformation model and a second eigenvector of the 3D shape fusion model. Wherein, the first eigenvector refers to the parameters of the shape change of the human face under different conditions. Further, the second eigenvector refers to the parameters of the expression change of the human face under different conditions.

[0171] In at least one embodiment of the present invention, the open-source 3DMM comes with an average face when it is released. Therefore, the electronic device can obtain the average face from an open-source website.

[0172] In at least one embodiment of the present invention, the building unit 112 constructs the three-dimensional face image of the image to be recognized based on the facial feature information points, including:

[0173] The building unit 112 obtains a reference vector and an average face. The building unit 112 constructs a target face according to the reference vector and the average face. Further, the building unit 112 determines the two-dimensional coordinates of the facial feature information points in the image to be recognized. The building unit 112 performs a mapping process on the two-dimensional coordinates to obtain three-dimensional coordinates. Further still, the building unit 112 adjusts the target face according to the three-dimensional coordinates to obtain the three-dimensional face image.

[0174] Through the reference vector and the average face, the target face can be quickly determined, and then the three-dimensional face image can be quickly determined.

[0175] Specifically, the building unit 112 uses a deep learning network to perform a mapping process on the two-dimensional coordinates to obtain three-dimensional coordinates.

[0176] The extraction unit 111 extracts a plurality of target features from the three-dimensional face image.

[0177] In at least one embodiment of the present invention, the plurality of target features may include: eyes, mouth, nose, etc.

[0178] In at least one embodiment of the present invention, the manner in which the extraction unit 111 extracts a plurality of target features from the three-dimensional face image may be the same as the manner in which the extraction unit 111 extracts facial feature information points from the facial region, and the present invention will not elaborate on this.

[0179] The calculation unit 113 calculates the similarity between the plurality of target features and the configuration features in the configuration library to obtain a plurality of target values.

[0180] In at least one embodiment of the present invention, the calculation unit 113 calculates the similarity between the plurality of target features and the configuration features in the configuration library to obtain a plurality of target values, including:

[0181] For any one of the multiple target features, the calculation unit 113 extracts multiple target features from the three-dimensional face image to determine the type to which the any feature belongs, obtains multiple configuration features corresponding to the type from the configuration library, the calculation unit 113 calculates the similarity between the any feature and the multiple configuration features using the cosine distance formula, obtains multiple similarity distance values of the any feature, the calculation unit 113 determines the similarity distance value with the largest numerical value among the multiple similarity distance values as the target value of the any feature, and the calculation unit 113 integrates the target values of the multiple any features to obtain multiple target values corresponding to the multiple target features.

[0182] The determination unit 110 determines the target user of the image to be recognized based on the multiple target values.

[0183] In at least one embodiment of the present invention, the determination unit 110 determining the target user of the image to be recognized based on the multiple target values includes:

[0184] The determination unit 110 determines the configuration features corresponding to the multiple target values, and determines the user corresponding to the configuration features, to obtain the users corresponding to the multiple target features. Further, the determination unit 110 calculates the number of target features corresponding to the user, and determines the user with the largest number as the target user.

[0185] Through the above implementation manner, determining the target user according to the target values corresponding to the multiple target features improves the recognition accuracy of face recognition.

[0186] It can be seen from the above technical solutions that the present invention does not need to obtain multiple face images at multiple angles through a camera device, and can accurately determine the target user from the configuration library only through one face image, saving device resources. In addition, since the amount of calculation for constructing a three-dimensional face image using one face image is small, therefore, the present invention can improve the efficiency of face recognition. At the same time, by constructing a three-dimensional face image and detecting multiple three-dimensional target features extracted, the accuracy of face recognition can be improved.

[0187] As Figure 3 shown, it is a schematic structural diagram of an electronic device according to a preferred embodiment of the method for face recognition based on artificial intelligence of the present invention.

[0188] In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and a computer program stored in the memory 12 and executable on the processor 13, such as a face recognition program based on artificial intelligence.

[0189] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1, and does not constitute a limitation on the electronic device 1. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device 1 may further include input / output devices, network access devices, buses, etc.

[0190] The processor 13 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor 13 is the operation core and control center of the electronic device 1, connecting various parts of the entire electronic device 1 through various interfaces and lines, and executing the operating system of the electronic device 1 and various installed application programs, program codes, etc.

[0191] The processor 13 executes the operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application programs to implement the steps in the above-mentioned embodiments of the face recognition method based on artificial intelligence, for example Figure 1 The steps shown.

[0192] Exemplarily, the computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into a determination unit 110, an extraction unit 111, a construction unit 112, a calculation unit 113, an acquisition unit 114, a division unit 115, a generation unit 116, a test unit 117, a detection unit 118, a perturbation unit 119, and an adjustment unit 120.

[0193] The memory 12 can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory 12, and by invoking the data stored in the memory 12, the processor 13 realizes various functions of the electronic device 1. The memory 12 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device. In addition, the memory 12 can include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0194] The memory 12 can be an external memory and / or an internal memory of the electronic device 1. Further, the memory 12 can be a memory in a physical form, such as a memory stick, a TF card (Trans-flash Card), etc.

[0195] If the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be realized.

[0196] Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory).

[0197] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a series of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer, etc.

[0198] Combined with Figure 1 , the memory 12 in the electronic device 1 stores a plurality of instructions to implement a face recognition method based on artificial intelligence. The processor 13 can execute the plurality of instructions to achieve: when receiving a face recognition instruction, extracting a to-be-recognized image from the face recognition instruction, and determining a face area from the to-be-recognized image; extracting face feature information points from the face area; constructing a three-dimensional face image of the to-be-recognized image based on the face feature information points; extracting a plurality of target features from the three-dimensional face image; calculating the similarity between the plurality of target features and the configured features in the configuration library to obtain a plurality of target values; and determining the target user of the to-be-recognized image based on the plurality of target values.

[0199] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 the description of the relevant steps in the corresponding embodiment, which will not be elaborated here.

[0200] In several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.

[0201] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0202] In addition, in each embodiment of the present invention, the various functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware, or in the form of hardware plus software functional modules.

[0203] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Thus, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced by the present invention. Any reference signs in the claims should not be construed as limiting the claims concerned.

[0204] In addition, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of elements or devices recited in the system claims can also be implemented by one element or device through software or hardware. The terms "first", "second", etc. are used to denote names and do not denote any particular order.

[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An artificial intelligence-based face recognition method, characterized in that, the artificial intelligence-based face recognition method includes: When a face recognition instruction is received, extract the image to be recognized from the face recognition instruction, and determine the face area from the image to be recognized; Extract face feature information points from the face area; Construct a three-dimensional face image of the image to be recognized based on the face feature information points, including: obtaining a reference vector and an average face; constructing a target face according to the reference vector and the average face; determining the two-dimensional coordinates of the face feature information points in the image to be recognized; performing mapping processing on the two-dimensional coordinates to obtain three-dimensional coordinates; adjusting the target face according to the three-dimensional coordinates to obtain the three-dimensional face image, where the reference vector includes the first feature vector of the 3D deformation model and the second feature vector of the 3D shape fusion model. The first feature vector refers to the parameters of the shape change of the face in different situations, and the second feature vector refers to the parameters of the expression change of the face in different situations; Extract multiple target features from the three-dimensional face image; Calculate the similarity between the multiple target features and the configuration features in the configuration library to obtain multiple target values; Determine the target user of the image to be recognized based on the multiple target values.

2. The artificial intelligence-based face recognition method according to claim 1, characterized in that, the determining the face area from the image to be recognized includes: Determine multiple skin color areas from the image to be recognized; Use a detection window to select the multiple skin color areas from the image to be recognized to obtain multiple areas to be determined; Stitch the multiple areas to be determined to obtain a target image; Use a pre-trained face detector to detect the target image to obtain the face area.

3. The artificial intelligence-based face recognition method according to claim 2, characterized in that, Before using the pre-trained face detector to detect the target image, the artificial intelligence-based face recognition method further includes: Obtain a data set, the data set includes positive samples and negative samples, the positive samples are face images, and the negative samples are background images; Divide the data set to obtain training samples and test samples; Extract the pixel-level differential features of the training samples, and construct a depth binary tree according to the pixel-level differential features; Use the bootstrap framework to cascade the depth binary tree to generate a learner; Use the test samples to test the learner; When it is detected that the learner passes the test, determine the learner as the face detector.

4. The artificial intelligence-based face recognition method according to claim 1, characterized in that, the extracting the face feature information points from the face area includes: Perform grayscale value processing on the face area to obtain multiple pixel points of the face area and the grayscale value corresponding to each pixel point; When it is detected that any grayscale value is greater than the threshold, determine the pixel point corresponding to the any grayscale value as the pupil edge point; Determine the pupil center of the face region based on the pupil edge points as the face feature information points, and use the SUSAN operator method to detect the eye corners, mouth corners, and eye edges in the face region as the face feature information points.

5. The artificial intelligence-based face recognition method according to claim 1, wherein, the three-dimensional face image is stored in the blockchain.

6. The artificial intelligence-based face recognition method according to claim 1, wherein, the calculating the similarity between the multiple target features and the configuration features in the configuration library to obtain multiple target values includes: For any feature among the multiple target features, determine the type to which the any feature belongs, and obtain multiple configuration features corresponding to the type from the configuration library; Adopt the cosine distance formula to calculate the similarity between the any feature and the multiple configuration features to obtain multiple similarity distance values of the any feature; Determine the similarity distance value with the largest numerical value among the multiple similarity distance values as the target value of the any feature; Integrate the target values of the multiple any features to obtain the multiple target values corresponding to the multiple target features.

7. The artificial intelligence-based face recognition method according to claim 1, wherein, the determining the target user of the to-be-recognized image based on the multiple target values includes: Determine the configuration features corresponding to the multiple target values, and determine the user corresponding to the configuration features to obtain the users corresponding to the multiple target features; Calculate the number of target features corresponding to the user, and determine the user with the largest number as the target user.

8. An artificial intelligence-based face recognition device, wherein, the artificial intelligence-based face recognition device includes: A determination unit, configured to, when receiving a face recognition instruction, extract a to-be-recognized image from the face recognition instruction, and determine a face region from the to-be-recognized image; An extraction unit, configured to extract face feature information points from the face region; A construction unit, configured to construct a three-dimensional face image of the to-be-recognized image based on the face feature information points, including: obtaining a reference vector and an average face; constructing a target face according to the reference vector and the average face; determining the two-dimensional coordinates of the face feature information points in the to-be-recognized image; performing mapping processing on the two-dimensional coordinates to obtain three-dimensional coordinates; adjusting the target face according to the three-dimensional coordinates to obtain the three-dimensional face image, where the reference vector includes a first feature vector of a 3D deformation model and a second feature vector of a 3D shape fusion model, the first feature vector refers to the parameters of the shape change of the face in different situations, and the second feature vector refers to the parameters of the expression change of the face in different situations; The extraction unit is further configured to extract multiple target features from the three-dimensional face image; A calculation unit, configured to calculate the similarity between the multiple target features and the configuration features in the configuration library to obtain multiple target values; The determination unit is further configured to determine the target user of the to-be-recognized image based on the multiple target values.

9. An electronic device, wherein, the electronic device includes: A memory that stores at least one instruction; and A processor that executes the instructions stored in the memory to implement the artificial intelligence-based face recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium characterized in that at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the artificial intelligence-based face recognition method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Face recognition quality education wisdom evaluation system

    CN109377429A