WO2020258121A1 - 一种人脸识别的方法、装置和电子设备 - Google Patents

一种人脸识别的方法、装置和电子设备 Download PDF

Info

Publication number
WO2020258121A1
WO2020258121A1 PCT/CN2019/093163 CN2019093163W WO2020258121A1 WO 2020258121 A1 WO2020258121 A1 WO 2020258121A1 CN 2019093163 W CN2019093163 W CN 2019093163W WO 2020258121 A1 WO2020258121 A1 WO 2020258121A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
image
target
feature
frequency characteristic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/093163
Other languages
English (en)
French (fr)
Inventor
潘雷雷
吴勇辉
范文文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to PCT/CN2019/093163 priority Critical patent/WO2020258121A1/zh
Priority to CN201980001106.4A priority patent/CN110462633B/zh
Publication of WO2020258121A1 publication Critical patent/WO2020258121A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive

Definitions

  • This application relates to the field of biometric recognition technology, and more specifically, to a method, device and electronic device for face recognition.
  • Face recognition is a kind of biometric recognition technology based on human facial feature information. Use a camera or camera to collect images or video streams containing human faces, and automatically detect and track human faces in the images, and then perform facial image preprocessing, image feature extraction, and matching and recognition of the detected human faces. Related technology is usually called face recognition or facial recognition. With the rapid development of computer and network technology, face recognition technology has been widely used in many industries and fields such as smart access control, mobile terminals, public safety, entertainment, and military.
  • face recognition generally uses two-dimensional (Two Dimensional, 2D) image recognition based on the face, to determine whether the 2D image is a specific user face, and does not determine whether the 2D image is from a living human face.
  • 2D face recognition based on 2D images has no anti-counterfeiting function and poor security performance.
  • the embodiments of the present application provide a face recognition method, device, and electronic equipment, which can recognize the authenticity of a human face, thereby improving the security of face recognition.
  • a face recognition method including:
  • the face recognition result is output according to the living body judgment result and the matching result.
  • This application provides a face recognition solution with anti-counterfeiting function.
  • the frequency characteristic image is obtained by processing the acquired target image, and the face anti-counterfeiting is performed based on the frequency characteristic image.
  • the feature template is matched according to the target image whether it is the user, thereby greatly improving the security of the face recognition device and electronic equipment.
  • the outputting the face recognition result according to the living body judgment result and the matching result includes:
  • the matching result When the matching result is successful, output the face recognition result according to the living body judgment result; or, when the living body judgment result is a living body, output the face recognition result according to the matching result; or, in the matching When the result is failure or the living body judgment result is non-living body, the face recognition result is output.
  • the performing feature template matching according to the first target image and outputting the matching result includes:
  • the first target image is a two-dimensional infrared image.
  • the first frequency characteristic image includes a first fast Fourier FFT spectrogram and/or a first high frequency characteristic image
  • the first target image is processed to obtain a first Frequency characteristic image, including:
  • the first FFT spectrogram obtained by performing fast Fourier FFT transformation on the first target image; and/or,
  • High-frequency feature extraction is performed on the first target image to obtain the first high-frequency feature map.
  • the performing high-frequency feature extraction on the first target image to obtain the first high-frequency feature map includes:
  • the first high-frequency feature map is obtained by performing convolution calculation on the first target image and a high-frequency convolution kernel.
  • the determining whether the first recognition target is a living human face based on the first frequency characteristic image includes:
  • the first frequency characteristic image is reduced to obtain a first target frequency characteristic image, and based on the first target frequency characteristic image, it is determined whether the first recognition target is a living human face.
  • the determining whether the first recognition target is a living human face based on the first target frequency characteristic image includes:
  • the first target frequency characteristic image is classified by a convolutional neural network to determine whether the first recognition target is a living human face.
  • the first frequency characteristic image includes a first fast Fourier FFT spectrogram and/or a first high frequency characteristic image, and the first frequency characteristic image is reduced to obtain a first frequency characteristic image.
  • a target frequency characteristic image including:
  • the first high-frequency feature map is reduced to obtain a first target high-frequency feature map.
  • the size of the first target FFT spectrum graph and the first target high-frequency characteristic graph are the same.
  • the convolutional neural network includes: at least one convolutional layer, at least one excitation layer, and at least one fully connected layer.
  • the first target frequency characteristic image includes: the first target FFT spectrum graph or the first target high frequency characteristic graph;
  • the at least one convolutional layer includes: at least one first convolutional layer, the at least one excitation layer includes: at least one second convolutional layer, and the at least one fully connected layer includes at least one first fully connected layer;
  • the multiple sparse feature maps are fully connected to obtain multiple feature constants; and a classification function is used to classify the multiple feature constants.
  • the number of the first convolutional layer, the first excitation layer, and the first fully connected layer are all 1.
  • the first target frequency characteristic image includes: the first target FFT spectrogram and the first target high frequency characteristic image;
  • the at least one convolutional layer includes at least one second convolutional layer, at least one third convolutional layer, and at least one fourth convolutional layer
  • the at least one excitation layer includes at least one second excitation layer, and at least one third convolutional layer.
  • the multiple sparse total feature maps are fully connected to obtain multiple feature constants; and a classification function is used to classify the multiple feature constants.
  • the second convolutional layer, the third convolutional layer, the fourth convolutional layer, the second excitation layer, the third excitation layer, and the first The numbers of the four excitation layers and the second fully connected layer are all 1.
  • the size of the convolution kernel in the at least one convolution layer is a 3*3 matrix
  • the excitation function in the at least one excitation layer is a parameterized modified linear unit PReLU function
  • the classification function in the at least one fully connected layer is a Sigmoid function.
  • the method further includes:
  • a face anti-counterfeiting judgment is performed based on the second frequency characteristic image to determine whether the second recognition target is a living human face, wherein the result of the face anti-counterfeiting judgment is used to establish a face feature template.
  • the second target image is a second infrared image.
  • the method further includes:
  • the method further includes:
  • the establishment of a facial feature template based on the second target image includes:
  • the face image is cut on the second target image to form a second face infrared image, and the face feature template is established based on the second face infrared image.
  • the establishing the facial feature template based on the second facial infrared image includes:
  • the second facial infrared image belongs to the facial feature template library
  • the second facial infrared image is matched with multiple facial feature templates in the facial feature template library.
  • the face anti-counterfeiting judgment is performed based on the second frequency feature image, and when it is determined that the second recognition target is a living face, all The second infrared image of the face is established as a face feature template.
  • the matching the second infrared image of the face with multiple facial feature templates in the facial feature template library includes:
  • the second infrared image of the human face is established as a facial feature template.
  • performing face anti-counterfeiting judgment based on the second frequency characteristic image includes:
  • the second frequency characteristic image includes a second fast Fourier FFT spectrogram and/or a second high frequency characteristic image
  • the second target image is processed to obtain a second Frequency characteristic image, including:
  • the second FFT spectrogram obtained by performing fast Fourier FFT transformation on the second target image; and/or,
  • High-frequency feature extraction is performed on the second target image to obtain the second high-frequency feature map.
  • the performing high-frequency feature extraction on the second target image to obtain the second high-frequency feature map includes:
  • the second target image and the high-frequency convolution kernel are subjected to convolution calculation to obtain the second high-frequency feature map.
  • the anti-counterfeiting judgment of the face based on the second frequency characteristic image includes:
  • the second frequency characteristic image is reduced to obtain a second target frequency characteristic image, and the face anti-counterfeiting judgment is performed based on the second target frequency characteristic image.
  • the anti-counterfeiting judgment of the face based on the second target frequency characteristic image includes:
  • the second target frequency characteristic image is classified by a convolutional neural network to determine whether the second recognition target is a living human face.
  • the second frequency characteristic image includes a second fast Fourier FFT spectrogram and/or a second high frequency characteristic image, and the second frequency characteristic image is reduced to obtain the first Two target frequency characteristic images, including:
  • the second high-frequency feature map is reduced to obtain a second target high-frequency feature map.
  • the size of the second target FFT spectrum graph and the second target high-frequency characteristic graph are the same.
  • a face recognition device including a processor, configured to execute the face recognition method in the first aspect or any possible implementation of the first aspect.
  • an electronic device including the face recognition device in the second aspect or any possible implementation of the second aspect.
  • a chip in a fourth aspect, includes an input and output interface, at least one processor, at least one memory, and a bus.
  • the at least one memory is used to store instructions
  • the at least one processor is used to call Instructions to execute the method in the first aspect or any possible implementation of the first aspect.
  • a computer-readable medium for storing a computer program, and the computer program includes instructions for executing the above-mentioned first aspect or any possible implementation of the first aspect.
  • a computer program product including instructions is provided.
  • the computer runs the instructions of the computer program product, the computer executes the first aspect or any of the possible implementations of the first aspect. Methods of face recognition.
  • the computer program product can run on the electronic device of the third aspect.
  • Fig. 1(a) is a schematic block diagram of a face recognition device according to an embodiment of the present application.
  • Figure 1(b) is a schematic flowchart of a face recognition method according to an embodiment of the present application.
  • Fig. 1(c) is a schematic block diagram of a convolutional neural network according to an embodiment of the present application.
  • Fig. 2 is a schematic flowchart of another method for face recognition according to an embodiment of the present application.
  • Fig. 3 is a schematic flowchart of another method for face recognition according to an embodiment of the present application.
  • Fig. 4 is a schematic flowchart of another method for face recognition according to an embodiment of the present application.
  • Fig. 5 is a schematic flowchart of another face recognition method according to an embodiment of the present application.
  • Fig. 6 is a schematic flowchart of another face recognition method according to an embodiment of the present application.
  • Figure 7(a) is an infrared image of a face photo according to an embodiment of the present application.
  • FIG. 7 is an FFT spectrum diagram corresponding to (a) in FIG. 7.
  • Figure 8 (a) is an FFT spectrum diagram of multiple face photos according to an embodiment of the present application.
  • Figure 8 (b) is an FFT spectrum diagram of multiple live human faces according to an embodiment of the present application.
  • FIG. 9 is an infrared image matrix of N*N pixels according to an embodiment of the present application.
  • Diagram (b) in FIG. 9 is a 3*3 two-dimensional filter matrix according to an embodiment of the present application.
  • Figure 9 (c) is based on the infrared image matrix in Figure 9 (a), after passing through the 3*3 two-dimensional filter matrix convolution in Figure 9 (b), the high-frequency characteristics are obtained Image matrix.
  • (A) in FIG. 10 is a high-frequency feature map of multiple face photos according to an embodiment of the present application.
  • (B) in FIG. 10 is a high-frequency feature diagram of multiple live human faces according to an embodiment of the present application.
  • Fig. 11 is a schematic flow chart of a method for anti-counterfeiting discrimination in a face recognition method according to an embodiment of the present application.
  • Fig. 12 is a schematic flow chart of another method for anti-counterfeiting discrimination in a face recognition method according to an embodiment of the present application.
  • Fig. 13 is a schematic block diagram of a convolutional neural network according to an embodiment of the present application.
  • Fig. 14 is a schematic diagram of a fully connected layer according to an embodiment of the present application.
  • Fig. 15 is a schematic flow chart of another method for anti-counterfeiting discrimination in a face recognition method according to an embodiment of the present application.
  • Fig. 16 is a schematic flow chart of another method for anti-counterfeiting discrimination in a face recognition method according to an embodiment of the present application.
  • Fig. 17 is a schematic block diagram of another convolutional neural network according to an embodiment of the present application.
  • Fig. 18 is a schematic flowchart of a face registration method in a face recognition method according to an embodiment of the present application.
  • Fig. 19 is a schematic flowchart of another face registration method in a face recognition method according to an embodiment of the present application.
  • FIG. 20 is a schematic flowchart of another face registration method in the face recognition method according to an embodiment of the present application.
  • Fig. 21 is a schematic block diagram of a face recognition device according to an embodiment of the present application.
  • Fig. 22 is a schematic block diagram of an electronic device according to an embodiment of the present application.
  • the embodiments of the present application may be applicable to optical face recognition systems, including but not limited to products based on optical face imaging.
  • the optical face recognition system can be applied to various electronic devices with image acquisition devices (such as cameras).
  • the electronic devices can be mobile phones, tablet computers, smart wearable devices, smart door locks, etc.
  • the embodiments of the present disclosure have this Not limited.
  • the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the face recognition device 10 includes an infrared light emitting module 110, an infrared image acquisition module 120 and a processor 130.
  • the infrared light emitting module 110 is used to emit infrared light signals, which may be an infrared light emitting diode (Light Emitting Diode, LED), or may also be a vertical cavity surface emitting laser (Vertical Cavity Surface Emitting Laser, VCSEL), etc.
  • the infrared light emitting light source is not limited in the embodiment of the present application.
  • the infrared image acquisition module 120 may be an infrared camera, which includes an infrared image sensor, which is used to receive infrared light signals and convert the received infrared light signals into corresponding electrical signals, thereby generating infrared images.
  • the processor 130 may be a microprocessor unit (MPU), which may control the infrared light emitting module 110 and the infrared image acquisition module 120 to collect facial images and perform facial image recognition.
  • MPU microprocessor unit
  • S110 Collect 2D infrared images of the identified target.
  • the infrared light emitting module 110 emits infrared light, and the infrared light is irradiated on a recognition target.
  • the recognition target may be a user's face, a photo, a three-dimensional (3D) model, or any other object.
  • the infrared reflected light reflected by the surface of the identified target is received by the infrared image sensor 120 and converted into a 2D infrared image, and the infrared image sensor 120 transmits the 2D infrared image to the processor 130.
  • S120 face detection (face detection). That is, it receives 2D infrared images and detects whether there are human faces on the 2D infrared images.
  • a single convolutional neural network Convolutional Neural Networks, CNN
  • CNN convolutional Neural Networks
  • the convolutional neural network mainly includes a convolutional layer 101 (convolutional layer), an activation layer 102 (activation layer), a pooling layer 103 (pooling layer), and a fully connected layer 104 ( fully-connected layer).
  • each convolutional layer in the convolutional neural network is composed of several convolutional kernels, and the parameters of each convolutional kernel are optimized through the back propagation algorithm.
  • the purpose of the convolution operation is to extract different features of the input. Different convolution kernels extract different feature maps. More layers of convolutional networks can iteratively extract more complex features from low-level features such as edge features and line features. feature.
  • the activation layer uses activation functions to introduce nonlinearity to the convolutional neural network. Commonly used activation functions include sigmoid, tanh, and ReLU functions. Usually after the convolutional layer, a feature with a large dimension is obtained. The pooling layer cuts the feature into several regions, and takes the maximum value (max pooling) or average value (average pooling) to obtain new features with smaller dimensions Figure. The fully connected layer combines all local features into global features, which are used to calculate the final score of each category to determine the category of the input data.
  • S121 If there is a face on the 2D infrared image, perform face cut on the 2D infrared image. Specifically, the fully connected layer of the above-mentioned face detection convolutional neural network is changed to a convolutional layer, so that the network becomes a fully convolutional network, and the 2D infrared image passes through the fully convolutional network to obtain a feature map.
  • Each feature map The "point" corresponds to the probability that the location mapped to the original image area belongs to the face, and the face whose probability is greater than the set threshold is regarded as the face candidate frame. Cut the image in the face candidate frame in the 2D infrared image to form a new face 2D infrared image.
  • the face detection fails. In other words, the recognition target is not the user, and the matching fails.
  • face detection can also be performed by cascading CNN, Dlib, OpenCV and other methods, and a new 2D infrared image of the face can be obtained by cutting. This is not limited in the embodiments of this application.
  • S130 2D face recognition (face recognition). That is, the 2D infrared image of the human face formed in S131 is recognized, and it is determined whether the 2D infrared image of the human face is the user's face. For example, using a convolutional neural network method for face recognition, specifically, first train a face recognition convolutional neural network to determine whether it is a user's face.
  • the face recognition convolutional neural network is based on the facial feature template library Classification of multiple face feature templates. Input the data of the 2D infrared image of the face into the face recognition convolutional neural network. After the features of the 2D infrared image of the face are extracted through steps such as convolution calculation, the classification and judgment are performed to determine the 2D infrared image of the face Whether it matches with multiple face feature templates in the face feature template library.
  • S140 Determine whether the restart parameter is less than the first threshold.
  • the face recognition device 10 performs face recognition by collecting 2D infrared images of the face, and determining whether the 2D image of the face matches the characteristic face in the face feature template library, thereby performing face recognition on the electronic device Unlock with an application (APP) on the electronic device. Since during the unlocking process, the face recognition device 10 only performs face recognition based on the two-dimensional features on the 2D image, it cannot identify whether the collected 2D infrared image is derived from a living human face or other photos, videos, and other non-living human faces. Objects, in other words, the face recognition device 10 does not have an anti-counterfeiting function. It can unlock electronic equipment and applications by stealing photos, videos and other information with the user’s face, so the face recognition device and electronic equipment are safe Performance has been greatly affected.
  • APP application
  • the embodiment of the present application provides a face recognition solution with anti-counterfeiting function.
  • the frequency characteristic image is obtained by processing the collected infrared image, and the face anti-counterfeiting is performed based on the frequency characteristic image, and the frequency of the collection is determined Whether the characteristic image comes from the user's live face, thereby greatly improving the security of the face recognition device and electronic equipment.
  • FIG. 2 is a face recognition method 200 provided by an embodiment of this application, including:
  • S220 Process the target image to obtain a frequency characteristic image
  • the recognition target is also called the first recognition target, the second recognition target, etc., which can be used to distinguish different target objects.
  • the target image and the eye image of the recognition target can also be called the first recognition target.
  • the recognition target includes, but is not limited to, any objects such as human faces, photos, videos, and three-dimensional models.
  • the recognition target may be a user's face, other people's faces, a user's photo, a curved surface model with photos, etc.
  • the target image may be a color image generated by visible light, or an infrared image generated by infrared light or other images, which is not limited in the embodiment of the present application.
  • the frequency characteristic image obtained by processing the target image is an image that reflects frequency information in the target image, for example, reflects high-frequency component information in a color image or an infrared image.
  • the target image is an infrared image.
  • the following takes the target image as an infrared image as an example for detailed description.
  • the infrared (Infrared Radation, IR) image is expressed as a gray scale (Gray Scale) image, and the appearance shape of the recognition target is expressed by the gray scale of the image pixels.
  • the infrared image of the recognition target may be acquired through an infrared image acquisition device, and the infrared image acquisition device may include an infrared photoelectric sensor, wherein the infrared photoelectric sensor includes a plurality of pixel units, each Each pixel unit is used to collect the reflected infrared light signal after the infrared light is reflected on the surface of the identification target, and convert the reflected infrared light signal into a pixel electrical signal corresponding to its light intensity.
  • the value of the electrical signal of each pixel corresponds to a pixel of the infrared image, and its size is expressed as the gray value of the infrared image.
  • an infrared image formed by a pixel matrix composed of multiple pixel units can also be expressed as a numerical matrix composed of gray values of multiple pixel points.
  • the gray value range of each pixel is between 0 and 255, the gray value 0 represents black, and the gray value 255 represents white.
  • the frequency characteristic image obtained by processing the infrared image is an image that reflects the frequency information in the infrared image, where the frequency of the infrared image is an index that characterizes the severity of grayscale changes in the image, and the grayscale is in a plane space.
  • Gradient For example: an area in the image where the gray level changes slowly, the corresponding frequency value is very low; while an area in the image where the gray level changes sharply, such as the edge area of the graph, the corresponding frequency value is higher.
  • the frequency characteristic image includes but is not limited to: an FFT spectrogram obtained by performing Fast Fourier Transform (FFT) on an infrared image, or extracting high-frequency features in an infrared image The high-frequency feature map.
  • FFT Fast Fourier Transform
  • the frequency characteristic image can present different texture information in the infrared images of different recognition targets, and can be used to distinguish between living human faces and non-living human faces, in other words, the frequency obtained by processing the infrared image of the living human face
  • the feature image is different from the frequency feature image obtained by processing the infrared image of the non-living human face, and the difference is large.
  • the embodiment of the present application may use any frequency feature map that can distinguish between the living human face and the non-living human face. Make specific restrictions.
  • the non-living human face includes but is not limited to: user face photos, user face videos, user face photos placed on a three-dimensional curved surface, user face models, and so on.
  • the frequency feature image of the recognition target is obtained, since the feature components of the texture information of the recognition target are different in the frequency feature map, a face anti-counterfeiting judgment is performed based on the frequency feature image to determine whether the texture of the recognition target is a living human face Therefore, it is determined whether the recognition target is a living human face, and the effect of anti-counterfeiting of the human face is achieved.
  • the recognition target is a living body face
  • the feature template matching is to match the target image with the feature template of at least one user, and it can be determined whether the target image belongs to the user's image.
  • the feature template is feature data of multiple faces or partial face images of the user under different conditions such as different angles and different environments.
  • the feature template is stored in a face recognition device, in particular, it can be stored in a memory in the device.
  • Combining face anti-counterfeiting judgment and feature template matching judgment can enhance the reliability of the face recognition process and improve safety performance.
  • the face recognition device and face recognition method in Figure 1(a) and Figure 1(b) cannot determine whether the collected 2D image is from a photo or a real face, so it does not have the anti-counterfeiting function and cannot reach the face anti-counterfeiting level in Table 1. Level 1.
  • the texture information of the human face can be obtained through the frequency characteristic image, the living human face and the non-living human face can be identified, so that the face anti-counterfeiting level 5 can be reached, and the security performance of anti-counterfeiting and recognition can be obtained. A substantial increase.
  • the feature template matching of 2D recognition can be performed based on the acquired 2D target image of the recognition target, and the face recognition can be performed and output based on the feature template matching result of 2D recognition and the result of face anti-counterfeiting judgment. Face recognition result.
  • feature template matching is a main step and implementation in 2D recognition.
  • 2D recognition can also be understood as feature template matching in 2D recognition.
  • 2D recognition may be performed first, and on the basis of 2D recognition, face anti-counterfeiting is performed again based on the frequency characteristic image based on the result of 2D recognition, so that the recognition process is more secure and effective.
  • another face recognition method 300 provided in an embodiment of the present application includes:
  • the 2D recognition is successful, indicating that the target image includes the user's face image.
  • the 2D recognition fails, which means that the target image does not include the user's face image.
  • the 2D recognition may be the same or similar to the 2D recognition process in FIG. 1(b).
  • the first face recognition result may include, but is not limited to, specific information such as failures and non-authenticated users.
  • S360 Perform face anti-counterfeiting judgment based on the frequency characteristic image to determine whether the recognition target is a living human face;
  • the second face recognition result may include, but is not limited to, specific information such as success and biometric authentication of the user.
  • the third face recognition result may include, but is not limited to, specific information such as failures and non-living authenticated users.
  • the target image may be an infrared image, a visible light image or other images.
  • face anti-counterfeiting can be performed first, and on the basis of face anti-counterfeiting, 2D recognition can be performed according to the result of face anti-counterfeiting, which can exclude non-living human faces in advance and improve the efficiency of recognition.
  • another face recognition method 400 provided by an embodiment of the present application includes:
  • S430 Perform face anti-counterfeiting judgment based on the frequency characteristic image to determine whether the recognition target is a living human face;
  • the 2D recognition in this step may be the same as step S340 in FIG. 4, and the specific implementation manner may refer to the foregoing solution, which will not be repeated here.
  • the fourth face recognition result may include, but is not limited to, specific information such as failure and non-living body.
  • the fifth face recognition result may include, but is not limited to, specific information such as success and biometric authentication of the user.
  • the sixth face recognition result may include, but is not limited to, specific information such as failure and a living non-authenticated user.
  • an infrared light emitting module emits infrared light to the identification target
  • the image acquisition module receives the infrared light signal of the infrared light reflected by the identification target, and converts the reflected infrared light signal to obtain infrared image.
  • the infrared image of the identified target may be acquired through the image acquisition module.
  • the image acquisition module may be the infrared image acquisition module 120 in FIG. 1(a).
  • step S351 may specifically include: 3D face reconstruction. That is, when the 2D recognition is successful, the 3D data of the recognition target is collected to perform 3D face reconstruction. If the 3D face reconstruction is successful, the infrared image is processed to obtain a frequency characteristic image, and the face is performed based on the frequency characteristic image Anti-counterfeiting judgment, if the 3D face reconstruction fails, no face anti-counterfeiting judgment is performed. Specifically, the reconstructed face image reflects the feature information of the face from the three-dimensional space, and on the basis of the success of the 3D face, the face anti-counterfeiting judgment is performed.
  • the face recognition method 300 further includes:
  • S320 face detection, specifically, face detection based on the infrared image
  • S331 There is a human face, that is, when a human face is detected on the infrared image, the infrared image is cut from the face to obtain the human face infrared image;
  • the face recognition method 400 further includes:
  • step S450 face detection; specifically, perform face detection based on the infrared image;
  • S451 There is a human face, that is, when a human face is detected on the infrared image, the infrared image is cut to obtain the human face infrared image;
  • S445 2D recognition, specifically, 2D recognition is performed based on the infrared image of the human face.
  • steps S320 to S332 and the steps S450 to S452 may be the same as the steps S120 to S122 in FIG. 1(b), and will not be repeated here.
  • the method further includes: judging the magnitude of the restart parameter, and when the restart parameter is less than the second threshold, enter S310 or enter S410; when the restart parameter is greater than or equal to At the second threshold, it is determined that the recognition fails.
  • the following describes in detail the process of performing face anti-counterfeiting judgment based on the frequency characteristic image in S360 and S430 with reference to FIGS. 7 to 17 to determine whether the recognition target is a living face, that is, the detailed process of face anti-counterfeiting.
  • the frequency characteristic image may be a fast Fourier transform FFT spectrogram, specifically, an FFT spectrogram obtained by performing a fast Fourier transform on an infrared image.
  • the Fast Fourier Transform is an efficient calculation method for quickly calculating the Discrete Fourier Transform (DFT).
  • DFT Discrete Fourier Transform
  • Both FFT and DFT belong to different transform forms of Fourier Transform (FT).
  • FT Fourier transforms an image from the spatial domain to the frequency domain
  • IFFT Fourier Transform
  • its inverse transform transforms the image from the frequency domain to the spatial domain.
  • the physical meaning of Fourier transform is to transform the gray-scale distribution function of the image into the frequency distribution function of the image.
  • the inverse Fourier transform transforms the frequency distribution function of the image into the gray distribution function.
  • Figure 7 (a) is an infrared image
  • Figure 7 (b) is the corresponding FFT spectrum of the infrared image
  • FFT spectrum There are multiple bright and dark bright spots on the picture, which means the difference between a point on the image and the neighboring point, that is, the size of the gradient, that is, the size of the frequency of the point.
  • the gradient is large, the brightness of the point is strong, otherwise the brightness of the point is weak.
  • the FFT-transformed spectrogram also called the power map
  • the points close to the center are low-frequency signals, that is, a large area of the original infrared image, and the points far away from the center are high-frequency signals, that is, the edge area in the original infrared image.
  • the FFT spectrogram obtained by performing FFT transformation on the infrared two-dimensional image can be calculated by a computer language program, such as a matlab language computer program, a C/C++ language computer program, etc., which is not limited in the embodiment of the present application.
  • the infrared image of the photo collected from the face photo is compared with the infrared image of the face taken from the living face.
  • the contour texture is few and clear, which is manifested as the edge area of the image with gray changes.
  • the skin area is large and the gray level is balanced.
  • the infrared image of the photo it is affected by environmental interference and other effects, and the gray texture in the photo is more and fuzzy.
  • the texture of the image corresponds to the area far from the center in the FFT spectrogram. Therefore, the FFT spectrum of the photo infrared image has more bright spots far away from the center area and low brightness, while the FFT spectrum of the face infrared image has fewer bright spots far away from the center area. And the brightness is high.
  • FIG. 8 shows FFT spectrograms of multiple face photos
  • FIG. 8 shows FFT spectrograms of multiple live human faces. Comparing the picture (a) in Fig. 8 with the picture (b) in Fig. 8, it can be seen that the FFT spectrum of the face of the photo in picture (a) in Fig. 8 has more bright spots and fewer dark spots, and There are many bright spots far away from the central area, indicating that there are many textures and high-frequency interference information in the image.
  • the FFT spectrum can distinguish between infrared images of facial photos and infrared images of live human faces. It can also distinguish three-dimensional surface models, three-dimensional face models, three-dimensional face models with certain textures, and even faces of other users.
  • the frequency characteristic image may also be a high frequency characteristic image.
  • the high-frequency feature map is obtained by extracting the high-frequency features in the infrared image.
  • the high-frequency feature extraction process is to extract the edge features in the infrared image, and the edge features are enhanced to be displayed in the infrared image to form the high-frequency feature map.
  • Frequency characteristics map Specifically, when the recognition target is a human face, the facial texture feature in the infrared image of the human face is extracted, and the texture feature is displayed and enhanced to be displayed as a high-frequency feature map of the human face.
  • the edge feature in the image is a high-frequency signal
  • the infrared image can be filtered, and the low-frequency signal can be filtered through the high-frequency signal.
  • the infrared image is subjected to high-pass filtering through a two-dimensional filter matrix, which is also called a convolution kernel (kernel) or a convolution template.
  • kernel convolution kernel
  • the filter matrix and the two-dimensional image are subjected to convolution calculation, that is, for each pixel of the infrared image, the product of its neighborhood pixel and the corresponding element of the filter matrix is calculated, and then added together as the pixel The value of the location. This completes the filtering process and obtains a high-frequency feature map.
  • the two-dimensional filter matrix can be a 3*3 matrix, a 5*5 matrix or other odd-sized matrixes.
  • (a) in Fig. 9 is an infrared image matrix of N*N pixels, where a 1,1 to an , n are the gray values of pixels in the infrared image matrix.
  • the diagram (b) in FIG. 9 is a 3*3 two-dimensional filter matrix, including 9 values from x 1 to x 9 .
  • Figure (c) in Figure 9 is a high-frequency feature image matrix obtained after the infrared image matrix is convolved with a 3*3 two-dimensional filter matrix. Taking the first pixel value b 1,1 as an example, the calculation formula is as follows:
  • b 1,1 x 1 a 1,1 + x 2 a 1,2 + x 3 a 1,3 + x 4 a 2,1 + x 5 a 2,2 + x 6 a 2,3 + x 7 a 3,1 +x 8 a 3,1 +x 9 a 3,3
  • Figure 10 (a) shows the high frequency feature maps of multiple face photos
  • Figure 10 (b) shows the high frequency features of multiple live human faces.
  • the values in the two-dimensional filter matrix can be changed to obtain different filtering effects, that is, the two-dimensional filter matrix determines the characteristics of the high-frequency feature map after convolution.
  • the high-frequency feature map obtained by convolution of the two-dimensional filter matrix highlights the edge feature or texture feature in the infrared image.
  • the two-dimensional filter matrix may be an image sharpness filter (Sharpness Filter) or an edge detection filter (Edge Detection).
  • the high-frequency feature map obtained by convolving the infrared image and the two-dimensional filter matrix
  • other high-frequency feature extraction methods can also be used to obtain the high-frequency feature map, for example, the Fourier spectrum of the infrared image High-pass filtering is performed on the image to obtain a high-frequency Fourier spectrogram, which is a high-frequency characteristic map; or the spatial image obtained by inverse Fourier transform of the high-frequency Fourier spectrum can also be a high-frequency characteristic map. Therefore, the high-frequency feature map is any image that can reflect the edge characteristics of the infrared image, which is not limited in the embodiment of the present application.
  • a deep learning network is used to classify the preprocessed frequency feature image to determine whether the recognition target is a living person face.
  • the deep learning network includes, but is not limited to, convolutional neural networks, and may also be other deep learning networks, which are not limited in the embodiments of this application.
  • the following takes convolutional neural networks as an example to illustrate the implementation of this application The classification processing method in the example.
  • the face anti-counterfeiting discrimination method 500 includes:
  • S520 Perform classification processing on the target frequency feature image through a convolutional neural network to determine whether the recognition target is a living human face.
  • the face anti-counterfeiting discrimination method 501 includes:
  • S521 Classify the target FFT spectrogram through the convolutional neural network to determine whether the recognition target is a living human face.
  • image scaling is performed on the FFT spectrogram to obtain the target FFT spectrogram.
  • Scaling means to enlarge or reduce the FFT spectrum image according to the target size.
  • the FFT spectrogram is reduced to obtain the target FFT spectrogram to speed up the data processing and reduce the response time in the face recognition process.
  • the nearest neighbor difference method or bilinear difference method is used to scale down the FFT spectrogram.
  • the size of the original FFT spectrogram is M*M pixels
  • the size of the reduced target image is A*A pixels
  • the side length ratio of the two images is M/A.
  • the (i, j)th pixel of the target image corresponds to the coordinates in the original FFT spectrogram (i*M/A, j*M/A), and the coordinates are usually not integers.
  • the calculated coordinates in the original FFT spectrogram are (i*M/A, j*M/A) directly rounded to obtain the coordinates of the point closest to it, for example, 0.75, 0.25) are rounded to get the coordinate (1,0), and the pixel value corresponding to the coordinate is the value of the corresponding pixel on the target image.
  • f(i+u,j+v) (1-u)(1-v)f(i,j)+v(1-u)f(i,j+1)+u(1-v)f (i+1,j)+uvf(i+1,j+1)
  • the target FFT spectrum image is input into the convolutional neural network for classification processing.
  • a convolutional neural network structure For example, a two-layer convolutional neural network or a multi-layer network structure can be used.
  • the structure of each layer of the convolutional network structure can also be adjusted according to the face information to be extracted. This is not limited.
  • the initial training parameters may be randomly generated, or obtained according to empirical values, or may be a pre-trained convolutional neural network model based on a large amount of true and false face data Parameters, this embodiment of the application does not limit this.
  • the convolutional neural network can process the aforementioned FFT spectrum images based on the initial training parameters, and determine that each FFT spectrum image Further, according to the judgment result, adjust the structure of the convolutional neural network and/or the training parameters of each layer until the judgment result meets the convergence condition.
  • the convergence condition may include at least one of the following:
  • the probability of determining the FFT spectrum image of a living human face as an FFT spectrum image of a living human face is greater than the first probability, for example, 98%;
  • the probability of judging the FFT spectrum image of the non-living human face as the FFT spectrum image of the non-living human face is greater than the second probability, such as 95%;
  • the probability of determining the FFT spectrum image of a living human face as an FFT spectrum image of a non-living human face is less than the third probability, for example, 2%;
  • the probability of determining the FFT spectrum image of the non-living human face as the FFT spectrum image of the living human face is less than the fourth probability, for example, 3%.
  • the processed FFT spectrum image of the current recognition target is input into the convolutional neural network, so that the convolutional neural network
  • the trained parameters can be used to process the FFT spectrum image of the recognition target to determine whether the recognition target is a living human face.
  • the convolutional neural network 50 includes a convolutional layer 510, an excitation layer 520 and a fully connected layer 530.
  • the convolution layer 510 is used to perform at least one convolution calculation on the input target FFT spectrum image, and extract features from the target FFT spectrum image.
  • the convolution layer 510 includes n different convolution kernels, and n is a positive integer.
  • the matrix obtained by sliding the convolution kernel on the image and doing the dot multiplication calculation is called a convolved feature map, also called an activation map or a feature map.
  • convolution kernels with different values will generate different feature maps.
  • By modifying the value of the convolution kernel different features can be detected from the graph.
  • the convolution calculation process of the target FFT spectrum image and a convolution kernel can be the same as the convolution calculation process in Figure 5, using one pixel value to slide each time on the target FFT spectrum image (step size is 1) Calculate with the convolution kernel. It is also possible to slide x pixel values (step size x) and the convolution kernel each time on the target FFT spectrogram, which is not limited in this embodiment of the application.
  • the convolution kernel may be a matrix of other sizes such as 3*3, 5*5, or 7*7, which is not limited in the embodiment of the present application.
  • a 3*3 convolution kernel and a convolution calculation method with a step size of 1 are used. After calculating the target FFT spectrogram with n different convolution kernels, n different features are obtained In the figure, n different feature maps extract different feature information in the target FFT spectrogram respectively, and the n different feature maps are also called n channels output by the convolutional layer 510.
  • the excitation layer 520 contains an excitation function, which is used to perform non-linearization processing on each pixel value in the feature map obtained by convolution.
  • the activation function includes, but is not limited to, a modified linear unit (Rectified Linear Unit, ReLU) function, an exponential linear unit (ELU) function, and several variants of the ReLU function, such as: linear with leak correction Unit (LeakyReLU, LReLU), parametric correction linear unit (ParametricReLU, PReLU), random correction linear unit (Randomized ReLU, RReLU), etc.
  • the excitation function used is the parameterized modified linear unit PReLU function.
  • the formula of the PReLU function is as follows:
  • i represents the i-th channel
  • a i represents the parameter of the i-th channel
  • the parameters of different channels may be the same or different.
  • 0 ⁇ i ⁇ n, and n channels that is, n feature maps are respectively activated using the above-mentioned PReLU function.
  • the pixel values less than or equal to 0 become a i x i , and the pixel values greater than 0 remain unchanged, making the pixel values in the feature map sparse.
  • PReLU realizes the sparseness
  • the neural network structure can better mine relevant features and fit training data.
  • n different feature maps are processed by the non-linearization of the PReLU function to obtain n sparse feature maps, and then the n sparse feature maps are input to the fully connected layer 530 for full connection and classification processing.
  • each node in the fully connected layer 530 is connected to each node in the upper layer, and is used to synthesize the features extracted from the previous neural network, and act as a "classifier" in the entire convolutional neural network.
  • f1 ⁇ fn are the output nodes of the previous layer
  • the fully connected layer 330 includes m fully connected nodes C in total, and m constants or matrices y1 to ym are output, which is convenient for m constants or Matrix classification is again fully connected or judgment classification.
  • each of the m fully connected nodes includes multiple parameters obtained by the above training convergence, and is used for weighted connection of f1 to fn, and finally a constant or matrix result y is obtained.
  • f1 to fn are n sparse feature maps as an example, and the full connection process of the fully connected layer is described as an example.
  • n sparse feature maps f1 ⁇ fn is A*A
  • each fully connected layer node includes n A*A convolution kernels. Therefore, m fully connected nodes include m*n A* A size convolution kernel. For each fully connected layer node, multiply n A*A size convolution kernels and n sparse feature maps to obtain a feature constant. Therefore, for m fully connected nodes, a total of m constants are obtained.
  • the fully connected layer 530 also includes a classification function Sigmoid to classify and determine the characteristic constants output by the fully connected layer.
  • Sigmoid a classification function to classify and determine the characteristic constants output by the fully connected layer.
  • the function when the input tends to positive or negative infinity, the function approaches a smooth state. Because the output range of the Sigmoid function is from 0 to 1, this function is often used for the probability of two classifications. The multiple probability values obtained by the Sigmoid function processing are judged to obtain the final face anti-counterfeiting judgment result to determine whether the recognition target is a living face.
  • the convolutional neural network 50 may further include: multiple convolutional layers 510, multiple excitation layers 520, and/or multiple fully connected layers 530.
  • multiple convolutional layers 510 For example: a structure of convolutional layer-excited layer-convolutional layer-excited layer-fully connected layer, or a structure of convolutional layer-excited layer-fully connected layer-fully connected layer, which is not limited in this embodiment of the application.
  • the convolution parameters in the multiple convolution layers 510 may be different, the activation functions adopted by the multiple excitation layers 520 may be different, and the fully connected parameters in the multiple fully connected layers 530 may also be different.
  • the embodiment of the present application does not limit this.
  • the convolutional neural network in the deep learning algorithm is used to classify the FFT spectrum of the recognition target to determine whether the recognition target is a living human face.
  • a similar face anti-counterfeiting method 502 may be used to perform face anti-counterfeiting based on high-frequency feature maps.
  • the face anti-counterfeiting method 502 includes:
  • S522 Perform classification processing on the target high-frequency feature map through the convolutional neural network to determine whether the recognition target is a living human face.
  • a convolutional neural network or other deep learning algorithm can be used to classify the high-frequency feature map of the recognition target to determine whether the recognition target is a living human face.
  • Specific implementation manners can refer to the above-mentioned processing method for the FFT spectrogram, and use the convolutional neural network 50 to classify the high-frequency feature maps, which will not be repeated here.
  • a deep learning algorithm is used to comprehensively convolve the FFT spectrogram and high-frequency feature map of the identified target, Perform classification processing together to determine whether the recognition target is a living human face.
  • the face texture features in the FFT spectrogram and the face texture features in the high-frequency feature map can be integrated, and relevant texture features can be extracted from both the frequency domain and the space domain, and the face anti-counterfeiting judgment can be performed, which can improve the anti-counterfeiting judgment Accuracy.
  • a face anti-counterfeiting method 600 includes:
  • S620 Perform classification processing on the target FFT spectrogram and the target high-frequency feature image through the convolutional neural network to determine whether the recognition target is a living human face.
  • the reduced target high-frequency feature map has the same size as the target FFT spectrum.
  • the target FFT spectrogram and the target high-frequency feature image are classified through the convolutional neural network 60 to determine whether the recognition target is a living human face.
  • the convolutional neural network 60 includes a first network 610, a second network 620, a third network 630, and a fully connected layer 640.
  • the first network 610 includes: a second convolution layer 611 and a second excitation layer 612, which are used to perform convolution calculation and non-linearization processing on the input target FFT spectrum graph, and output multiple sparse FFT spectrum feature graphs.
  • the second network 620 includes a third convolution layer 621 and a third excitation layer 622, which are used to perform convolution calculation and non-linearization processing on the input target high-frequency feature map, and output multiple sparse high-frequency excitation feature maps.
  • the third network 630 includes: a fourth convolutional layer 631 and a fourth excitation layer 632, which are used to perform convolution calculations on multiple sparse FFT spectral feature maps and multiple sparse high-frequency excitation feature maps together and perform non-linear processing to obtain multiple Sparse total feature map. For example, if the first network 610 outputs 10 sparse FFT spectral feature maps, and the second network 620 outputs 10 sparse high-frequency feature maps, then the 10 sparse FFT spectral feature maps and 10 sparse high-frequency feature maps are combined with a total of 20 images. Enter the third network 630 for convolution and excitation processing.
  • the size of the convolution kernel, the step size of the convolution, and the excitation function in the first network, the second network, and the third network may be the same or different, which is not limited in the embodiment of the present application.
  • a 3*3 convolution kernel can be used in the first network, the second network, and the third network, the convolution step size is 1 for convolution calculation, and the PReLU excitation function is used for non-linearization processing.
  • the fully connected layer 640 may be the same as the above fully connected layer 330, and output one or more feature matrices or feature constants after performing weighted full connection on multiple sparse total feature maps output by the third network.
  • the fully connected layer 640 may also use a Sigmoid function to perform classification judgment.
  • the convolutional neural network 60 may further include: multiple first networks 610, and/or multiple second networks 620, and/or multiple third networks 630, and/or multiple A fully connected layer 640.
  • the embodiments of this application do not limit this.
  • the convolution parameters in multiple networks may be different, the excitation functions used may be different, and the fully connected parameters in multiple fully connected layers may also be different.
  • the embodiment of the present application does not limit this.
  • the network structure of the convolutional neural network 30 and the convolutional neural network 60 is simple, and the running speed is fast, and can be run on an Advanced RISC Machine (ARM).
  • ARM Advanced RISC Machine
  • the face anti-counterfeiting judgment is performed based on the frequency feature image to determine whether the recognition target is a living human face, wherein the result of the face anti-counterfeiting judgment is used for face recognition.
  • the result of the face anti-counterfeiting discrimination can also be used for face registration, that is, to generate a face feature template in the 2D face recognition process.
  • face anti-counterfeiting is added in the face registration process to prevent photos collected based on face photos or other non-living face models from being used as templates for face recognition matching, which can improve the accuracy of 2D recognition.
  • the face registration method 700 includes:
  • S710 Acquire a target image of the recognition target.
  • S730 Perform face anti-counterfeiting judgment based on the frequency feature image to determine whether the recognition target is a living human face, wherein the result of the face anti-counterfeiting judgment is used to establish a face feature template.
  • the process of the face registration method in this embodiment of the application and the process of the aforementioned face recognition method are two independent stages, and only the face feature template established in the process of the registration method is used for the judgment of 2D recognition in the face recognition process .
  • face recognition is performed through the above-mentioned face recognition method and face anti-counterfeiting discrimination method.
  • the recognition target in the embodiment of the present application may be the same as or different from the recognition target in the above-mentioned face recognition process.
  • it may be both the user's live face, and the user's live face is registered and recognized; or
  • the recognition target in the registration process is the user's live face, but the recognition target in the recognition process is other non-living faces.
  • the embodiments of this application do not limit this.
  • the step S710 may be the same as the above step S210, and the target image of the recognition target is acquired through the image acquisition device.
  • the target image is an infrared image or a visible light color image.
  • the step S720 may be the same as the above step S220.
  • the frequency characteristic image is an image that reflects frequency information in the image, such as an FFT spectrogram, or a high frequency characteristic image. Specifically, for the method of processing the target image to obtain the corresponding FFT spectrogram and high-frequency characteristic diagram, reference may be made to the description of the above-mentioned application embodiment, which will not be repeated here.
  • the face anti-counterfeiting judgment is performed based on the frequency characteristic image to determine whether the recognition target is a living human face, and the aforementioned face recognition anti-counterfeiting judgment method 500 and face recognition anti-counterfeiting judgment method 501.
  • Any one of the face recognition anti-counterfeiting discrimination method 502 and the face recognition anti-counterfeiting discrimination method 600 performs discrimination.
  • the face registration method further includes: specifically establishing a face feature template according to the target image.
  • the target image is an infrared image
  • the infrared image of the identified target is acquired first, the template matching is performed based on the infrared image, and anti-counterfeiting is performed on the basis of successful matching.
  • FIG. 19 shows a face registration method 800, which includes:
  • S850 Perform template matching based on the infrared image
  • S860 Perform face anti-counterfeiting judgment based on the frequency characteristic image to determine whether the recognition target is a living human face;
  • step S810 may be the same as step S310.
  • Step S851 may be the same as step S351.
  • Step S860 may be the same as step S360.
  • step S850 may be similar to step S340 for 2D recognition based on infrared images.
  • the infrared image is matched with multiple facial feature templates in the facial feature template library. If the matching is successful, the facial infrared image is the user. If the matching fails, the infrared face image is not the user’s face image.
  • step S871 when the recognition target is a living human face, the data of the infrared image is stored in the storage unit as a new face feature template in the face feature template library.
  • the storage unit may be the execution person.
  • the storage unit in the processor of the face registration method may also be the memory in the electronic device that executes the face registration method.
  • the face registration method 800 may further include:
  • step S820 to step S822 may be the same as step S320 to step S332.
  • the reflected structured light or reflected light pulses carrying the information of the recognition target surface are received, so as to obtain the 3D data of the recognition target.
  • the 3D data contains the recognition target.
  • the depth information can indicate the surface shape of the recognition target.
  • the 3D data can be expressed in various forms such as a depth image (Depth Image), a 3D point cloud (Point Cloud), and a geometric model.
  • 3D face reconstruction can be performed based on the 3D data, that is, a 3D shape image representing the recognition target can be obtained.
  • the 3D data is stored in the storage unit, for example, the 3D point cloud data is stored in the storage unit as a 3D point cloud data template to form a 3D point cloud data template library.
  • S840 Determine whether the infrared image of the face cut in step S821 belongs to the face feature template library.
  • ID user identification
  • S842 the person The facial infrared image belongs to the facial feature template library.
  • S841 the facial infrared image does not belong to the facial feature template library.
  • step S8411 When the infrared facial image does not belong to the facial feature template library, process the infrared image to obtain a frequency feature image, and then proceed to step S860.
  • a new user facial feature template library can be established based on the user ID information of the acquired infrared image.
  • step S8501 When the infrared facial image belongs to the facial feature template library, perform template matching based on the infrared facial image cut in step S821.
  • the specific matching method may be the same as step S850.
  • step S851 When the template matching is successful, the infrared image is processed to obtain the frequency characteristic image, and step S860 is performed.
  • S860 Perform face anti-counterfeiting judgment based on the frequency characteristic image to determine whether the recognition target is a living face.
  • S8711 When the recognition target is a living human face, go to S8712: Determine whether it is a valid point cloud.
  • the 3D point cloud data collected by face reconstruction in S830 is matched with multiple 3D point cloud data templates in the 3D point cloud data template library to determine whether it is a valid point cloud.
  • point cloud matching is used to determine whether the face angle of the recognized target in the collected 3D point cloud data is the same as the face angle in the 3D point cloud data template.
  • the matching is successful, indicating that there is a template library
  • the 3D point cloud data with the same face angle is an invalid point cloud; when the angles are different, the matching fails, which means that there is no 3D point cloud data with the same face angle in the template library, and it is a valid point cloud.
  • multiple pieces of 3D point cloud data of the recognized target can be collected, and point cloud splicing and point cloud fusion can be performed to form 3D data and 3D images of the face in all directions and angles, according to the 3D image Can perform 3D face recognition.
  • S8713 When determining that the 3D point cloud data is a valid point cloud, store the infrared image of the face as a face feature template. Specifically, the data of the facial infrared image is stored in the storage unit as a new facial feature template in the facial feature template library.
  • the face feature templates in the face feature template library are full.
  • the face feature template library it is determined whether the number of face feature templates in the face feature template library is equal to a preset value. If it is equal to the preset value, the face feature template is full, and no new face feature template is stored.
  • the preset value is 8, when the number of face feature templates in the face feature template library is 8, no more face feature templates are added.
  • the infrared image of the face is stored as the face feature template.
  • the data of the facial infrared image is stored in the storage unit as a new facial feature template in the facial feature template library.
  • the face registration method 800 further includes:
  • FIG. 21 is a schematic block diagram of a face recognition device 20 according to an embodiment of the present application, including:
  • the image acquisition module 210 is used to acquire the first target image of the first recognition target
  • the processor 220 is configured to process the first target image to obtain a first frequency characteristic image; and perform face anti-counterfeiting judgment based on the first frequency characteristic image to determine whether the first recognition target is a living human face , Among them, the result of face anti-counterfeiting discrimination is used for face recognition.
  • the first target image is a two-dimensional infrared image.
  • the image capture module 210 may be any device that captures images, such as a camera, a camera, and so on.
  • the image acquisition module may be an infrared camera for acquiring infrared depth images.
  • the image acquisition module 210 includes a filter 211 and a light detection array 212.
  • the filter 211 is used to transmit light signals of a target wavelength and filter light signals of non-target wavelengths.
  • the light detection array 212 is based on the The target wavelength is optically detected, and the detected optical signal is converted into an electrical signal.
  • the light detection array 212 includes a plurality of pixel units, and one pixel unit is used to convert a light signal to form a pixel value in an identification target image.
  • the pixel unit may use a photodiode (photodiode), a metal oxide semiconductor field effect transistor (Metal Oxide Semiconductor Field Effect Transistor, MOSFET) and other devices.
  • the pixel unit has a higher optical sensitivity and a higher quantum efficiency for the light of the target wavelength, so as to facilitate the detection of the optical signal of the corresponding wavelength.
  • the target wavelength belongs to the infrared light band.
  • the filter 211 is used to transmit infrared light signals of 940 nm, and block visible light and other infrared light with wavelengths other than 940 nm.
  • the light detection array 212 is an infrared light detection array, which detects 940 nm infrared light and forms a depth image corresponding to the recognition target.
  • the processor 220 may be a processor of the face recognition device 20, or a processor of an electronic device including the face recognition device 20, which is not limited in the embodiment of the present application.
  • the processor 220 is further configured to: perform two-dimensional recognition based on the first target image;
  • the processor 220 is specifically configured to process the first target image to obtain the first frequency characteristic image
  • the processor 220 is further configured to: when the first recognition target is a living face, determine that the face recognition is successful; or, when the first recognition target is a non-living face, determine that the face recognition fails.
  • processor 220 is further configured to:
  • the first recognition target is a living human face, performing two-dimensional recognition based on the first target image;
  • the first recognition target is a non-living face
  • the processor 220 is specifically configured to: cut the first target image to obtain a face image; and match the face image with multiple feature templates, and when the matching is successful, two-dimensional recognition Success, or, when the matching fails, the two-dimensional recognition fails.
  • the first frequency characteristic image includes a first fast Fourier FFT spectrogram and/or a first high frequency characteristic image
  • the processor 220 is specifically configured to:
  • the first FFT spectrogram obtained by performing fast Fourier FFT transformation on the first target image; and/or,
  • High-frequency feature extraction is performed on the first target image to obtain the first high-frequency feature map.
  • the processor 220 is specifically configured to:
  • the first high-frequency feature map is obtained by performing convolution calculation on the first target image and a high-frequency convolution kernel.
  • the processor 220 is specifically configured to:
  • the first frequency characteristic image is reduced to obtain a first target frequency characteristic image, and the face anti-counterfeiting judgment is performed based on the first target frequency characteristic image.
  • the processor 220 is specifically configured to:
  • the first target frequency characteristic image is classified by a convolutional neural network to determine whether the first recognition target is a living human face.
  • the first frequency characteristic image includes a first fast Fourier FFT spectrogram and/or a first high frequency characteristic image
  • the processor 220 is specifically configured to:
  • the first high-frequency feature map is reduced to obtain a first target high-frequency feature map.
  • the size of the first target FFT spectrum graph and the first target high-frequency characteristic graph are the same.
  • the convolutional neural network includes: at least one convolutional layer, at least one excitation layer, and at least one fully connected layer.
  • the first target frequency characteristic image includes: the first target FFT spectrum graph or the first target high frequency characteristic graph;
  • the at least one convolutional layer includes: at least one first convolutional layer, the at least one excitation layer includes: at least one second convolutional layer, and the at least one fully connected layer includes at least one first fully connected layer;
  • the processor 220 is specifically configured to:
  • the multiple sparse feature maps are fully connected to obtain multiple feature constants; and a classification function is used to classify the multiple feature constants.
  • the number of the first convolutional layer, the first excitation layer, and the first fully connected layer are all 1.
  • the first target frequency characteristic image includes: the first target FFT spectrum graph and the first target high frequency characteristic graph;
  • the at least one convolutional layer includes at least one second convolutional layer, at least one third convolutional layer, and at least one fourth convolutional layer
  • the at least one excitation layer includes at least one second excitation layer, and at least one third convolutional layer.
  • the processor 220 is specifically configured to:
  • the multiple sparse total feature maps are fully connected to obtain multiple feature constants; and a classification function is used to classify the multiple feature constants.
  • the second convolutional layer, the third convolutional layer, the fourth convolutional layer, the second excitation layer, the third excitation layer, the fourth excitation layer, and The number of the second fully connected layers is all 1.
  • the size of the convolution kernel in the at least one convolution layer is a matrix of 3*3, and/or the excitation function in the at least one excitation layer is a parameterized modified linear unit PReLU function, and/or
  • the classification function in at least one fully connected layer is a Sigmoid function.
  • the image acquisition module 210 is further configured to: acquire a second target image of the second recognition target;
  • the processor 220 is also used to:
  • a face anti-counterfeiting judgment is performed based on the second frequency characteristic image to determine whether the second recognition target is a living human face, wherein the result of the face anti-counterfeiting judgment is used to establish a face feature template.
  • the second target image is a second infrared image.
  • the processor 220 is further configured to: establish the facial feature template based on the second target image.
  • the processor 220 is further configured to: perform face detection based on the second target image;
  • the establishment of a facial feature template based on the second target image includes:
  • the face image is cut on the second target image to form a second face infrared image, and the face feature template is established based on the second face infrared image.
  • the processor 220 is specifically configured to:
  • the second facial infrared image belongs to the facial feature template library
  • the second facial infrared image is matched with multiple facial feature templates in the facial feature template library.
  • the face anti-counterfeiting judgment is performed based on the second frequency feature image, and when it is determined that the second recognition target is a living face, all The second infrared image of the face is established as a face feature template.
  • the processor 220 is specifically configured to: when the matching is successful, perform face anti-counterfeiting judgment based on the second frequency characteristic image;
  • the second infrared image of the human face is established as a facial feature template.
  • the processor 220 is specifically configured to: when the matching is successful, obtain 3D point cloud data of the second recognition target;
  • the second frequency characteristic image includes a second fast Fourier FFT spectrogram and/or a second high frequency characteristic image
  • the processor 220 is specifically configured to: perform a fast Fourier calculation on the second target image.
  • the second FFT spectrogram obtained by the inner FFT transform; and/or,
  • High-frequency feature extraction is performed on the second target image to obtain the second high-frequency feature map.
  • the processor 220 is specifically configured to perform convolution calculation on the second target image and a high frequency convolution kernel to obtain the second high frequency feature map.
  • the processor 220 is specifically configured to: reduce the second frequency characteristic image to obtain a second target frequency characteristic image, and perform face anti-counterfeiting judgment based on the second target frequency characteristic image.
  • the processor 220 is specifically configured to: perform classification processing on the second target frequency characteristic image through a convolutional neural network to determine whether the second recognition target is a living human face.
  • the second frequency characteristic image includes a second fast Fourier FFT spectrogram and/or a second high frequency characteristic image
  • the processor 220 is specifically configured to:
  • the second high-frequency feature map is reduced to obtain a second target high-frequency feature map.
  • the size of the second target FFT spectrum graph and the second target high frequency characteristic graph are the same.
  • an embodiment of the present application further provides an electronic device 2, which may include the face recognition apparatus 20 of the foregoing application embodiment.
  • the electronic device 2 is a smart door lock, a mobile phone, a computer, an access control system and other devices that need to apply face recognition.
  • the face recognition device 20 includes software and hardware devices for face recognition in the electronic device 2.
  • the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capability.
  • the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the aforementioned processor may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC application specific integrated circuit
  • FPGA ready-made programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the face recognition in the embodiments of the present application may further include a memory
  • the memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDR SDRAM
  • ESDRAM enhanced synchronous dynamic random access memory
  • Synchlink DRAM SLDRAM
  • DR RAM Direct Rambus RAM
  • the embodiment of the present application also proposes a computer-readable storage medium that stores one or more programs, and the one or more programs include instructions.
  • the instructions When the instructions are included in a portable electronic device that includes multiple application programs When executed, the portable electronic device can be made to execute the method of the embodiment shown in FIGS. 1-20.
  • the embodiment of the present application also proposes a computer program, the computer program includes instructions, when the computer program is executed by the computer, the computer can execute the method of the embodiment shown in FIGS. 1-20.
  • An embodiment of the present application also provides a chip that includes an input and output interface, at least one processor, at least one memory, and a bus.
  • the at least one memory is used to store instructions, and the at least one processor is used to call the at least one memory. To execute the method of the embodiment shown in Figures 1-20.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

一种人脸识别方法、装置和电子设备,能够识别人脸的真假,从而能够提升人脸识别的安全性。该人脸识别方法包括:获取第一识别目标的第一目标图像;对所述第一目标图像进行处理得到第一频率特征图像;基于所述第一频率特征图像确定所述第一识别目标是否为活体人脸,并输出活体判断结果;根据所述第一目标图像进行特征模板匹配,并输出匹配结果;根据所述活体判断结果和所述匹配结果输出人脸识别结果。

Description

一种人脸识别的方法、装置和电子设备 技术领域
本申请涉及生物特征识别技术领域,并且更具体地,涉及一种人脸识别的方法、装置和电子设备。
背景技术
人脸识别,是基于人的脸部特征信息进行身份识别的一种生物识别技术。用摄像机或摄像头采集含有人脸的图像或视频流,并自动在图像中检测和跟踪人脸,进而对检测到的人脸进行脸部的图像预处理、图像特征提取以及匹配与识别等一系列相关技术,通常也叫做人像识别或面部识别。随着计算机和网络技术的飞速发展,人脸识别技术已广泛地应用于智能门禁、移动终端、公共安全、娱乐、军事等诸多行业及领域。
当前人脸识别普遍使用的是基于人脸的二维(Two Dimensional,2D)图像进行识别,判断该2D图像是否为特定用户人脸,而不判断该2D图像是否来自活体人脸,换言之,现有技术中,基于2D图像的2D人脸识别没有防伪功能,安全性能差。
发明内容
本申请实施例提供了一种人脸识别方法、装置和电子设备,能够识别人脸的真假,从而能够提升人脸识别的安全性。
第一方面,提供了一种人脸识别方法,包括:
获取第一识别目标的第一目标图像;
对所述第一目标图像进行处理得到第一频率特征图像;
基于所述第一频率特征图像确定所述第一识别目标是否为活体人脸,并输出活体判断结果;
根据所述第一目标图像进行特征模板匹配,并输出匹配结果;
根据所述活体判断结果和所述匹配结果输出人脸识别结果。
本申请提供一种带有防伪功能的人脸识别方案,通过对获取的目标图像进行处理,得到频率特征图像,并基于该频率特征图像进行人脸防伪,在判断该频率特征图像是否来自活体人脸的基础上,根据目标图像进行特征模板 匹配是否为用户,从而大大提高人脸识别装置及电子设备的安全性。
在一种可能的实现方式中,所述根据所述活体判断结果和所述匹配结果输出人脸识别结果,包括:
在所述匹配结果为成功时,根据所述活体判断结果输出人脸识别结果;或者,在所述活体判断结果为活体时,根据所述匹配结果输出人脸识别结果;或者,在所述匹配结果为失败或所述活体判断结果为非活体时,输出人脸识别结果。
在一种可能的实现方式中,所述根据所述第一目标图像进行特征模板匹配,并输出匹配结果,包括:
基于所述第一目标图像进行人脸检测;
当人脸检测成功时,基于所述第一目标图像获取第一人脸图像;
将所述第一人脸图像与预存的多个特征模板进行匹配;
当所述第一人脸图像与所述多个特征模板中任意一个特征模板匹配成功时,输出匹配结果为成功;或者,
当所述第一人脸图像与所述多个特征模板匹配失败时,输出匹配结果为失败;
或者,当人脸检测失败时,输出匹配结果为失败。
在一种可能的实现方式中,所述第一目标图像为二维红外图像。
在一种可能的实现方式中,所述第一频率特征图像包括第一快速傅里叶FFT频谱图和/或第一高频特征图,所述对所述第一目标图像进行处理得到第一频率特征图像,包括:
对所述第一目标图像进行快速傅里叶FFT变换得到的所述第一FFT频谱图;和/或,
对所述第一目标图像进行高频特征提取得到所述第一高频特征图。
在一种可能的实现方式中,所述对所述第一目标图像进行高频特征提取得到所述第一高频特征图,包括:
将所述第一目标图像与高频卷积核进行卷积计算得到所述第一高频特征图。
在一种可能的实现方式中,所述基于所述第一频率特征图像确定所述第一识别目标是否为活体人脸,包括:
对所述第一频率特征图像进行缩小得到第一目标频率特征图像,基于所 述第一目标频率特征图像确定所述第一识别目标是否为活体人脸。
在一种可能的实现方式中,所述基于所述第一目标频率特征图像确定所述第一识别目标是否为活体人脸,包括:
通过卷积神经网络对所述第一目标频率特征图像进行分类处理,以确定所述第一识别目标是否为活体人脸。
在一种可能的实现方式中,所述第一频率特征图像包括第一快速傅里叶FFT频谱图和/或第一高频特征图,所述对所述第一频率特征图像进行缩小得到第一目标频率特征图像,包括:
对所述第一FFT频谱图进行缩小得到第一目标FFT频谱图;和/或
对所述第一高频特征图进行缩小得到第一目标高频特征图。
在一种可能的实现方式中,所述第一目标FFT频谱图和所述第一目标高频特征图的大小相同。
在一种可能的实现方式中,所述卷积神经网络包括:至少一个卷积层,至少一个激励层以及至少一个全连接层。
在一种可能的实现方式中,所述第一目标频率特征图像包括:所述第一目标FFT频谱图或所述第一目标高频特征图;
所述至少一个卷积层包括:至少一个第一卷积层,所述至少一个激励层包括:至少一个第二卷积层,所述至少一个全连接层包括至少一个第一全连接层;
所述通过卷积神经网络对所述第一目标频率特征图像进行分类处理,包括:
通过所述至少一个第一卷积层,对所述第一目标FFT频谱图或所述第一目标高频特征图进行卷积计算得到多个特征图;
通过所述至少一个第一激励层,对所述多个特征图进行非线性化处理得到多个稀疏特征图;
通过所述至少一个第一全连接层,对所述多个稀疏特征图进行全连接得到多个特征常数;并采用分类函数对所述多个特征常数进行分类处理。
在一种可能的实现方式中,所述第一卷积层,所述第一激励层,以及所述第一全连接层的个数均为1。
在一种可能的实现方式中,所述第一目标频率特征图像包括:所述第一目标FFT频谱图和所述第一目标高频特征图;
所述至少一个卷积层包括至少一个第二卷积层,至少一个第三卷积层和至少一个第四卷积层,所述至少一个激励层包括至少一个第二激励层,至少一个第三激励层和至少一个第四激励层,所述至少一个全连接层包括至少一个第二全连接层;
所述通过卷积神经网络对所述第一目标频率特征图像进行分类处理,包括:
通过所述至少一个第二卷积层和所述至少一个第二激励层对所述第一目标FFT频谱图进行处理得到多个稀疏FFT频谱特征图;
通过所述至少一个第三卷积层和所述至少一个第三激励层对所述第一目标高频特征图进行处理得到多个稀疏高频激励特征图;
通过所述至少一个第四卷积层和所述至少一个第四激励层对所述多个稀疏FFT频谱特征图和所述多个稀疏高频激励特征图进行处理得到多个稀疏总特征图;
通过所述至少一个第二全连接层,对所述多个稀疏总特征图进行全连接得到多个特征常数;并采用分类函数对所述多个特征常数进行分类处理。
在一种可能的实现方式中,所述第二卷积层,所述第三卷积层、所述第四卷积层、所述第二激励层、所述第三激励层、所述第四激励层、以及所述第二全连接层的个数均为1。
在一种可能的实现方式中,所述至少一个卷积层中的卷积核大小为3*3的矩阵,和/或所述至少一个激励层中的激励函数为参数化修正线性单元PReLU函数,和/或所述至少一个全连接层中的分类函数为Sigmoid函数。
在一种可能的实现方式中,所述方法还包括:
获取第二识别目标的第二目标图像;
对所述第二目标图像进行处理得到第二频率特征图像;
基于所述第二频率特征图像进行人脸防伪判别,以确定所述第二识别目标是否为活体人脸,其中,人脸防伪判别的结果用于建立人脸特征模板。
在一种可能的实现方式中,所述第二目标图像为第二红外图像。
在一种可能的实现方式中,所述方法还包括:
基于所述第二目标图像建立所述人脸特征模板。
在一种可能的实现方式中,所述方法还包括:
基于所述第二目标图像进行人脸检测;
其中,所述基于所述第二目标图像建立人脸特征模板包括:
在人脸检测成功时,对所述第二目标图像进行人脸图像剪切形成第二人脸红外图像,基于所述第二人脸红外图像建立所述人脸特征模板。
在一种可能的实现方式中,所述基于所述第二人脸红外图像建立所述人脸特征模板,包括:
判断所述第二人脸红外图像是否属于人脸特征模板库;
当所述第二人脸红外图像属于所述人脸特征模板库时,将所述第二人脸红外图像与所述人脸特征模板库中的多个人脸特征模板进行匹配。
当所述第二人脸红外图像不属于所述人脸特征模板库时,基于所述第二频率特征图像进行人脸防伪判别,当确定所述第二识别目标为活体人脸时,将所述第二人脸红外图像建立为人脸特征模板。
在一种可能的实现方式中,所述将所述第二人脸红外图像与所述人脸特征模板库中的多个人脸特征模板进行匹配,包括:
当匹配成功时,基于所述第二频率特征图像进行人脸防伪判别;
当确定所述第二识别目标为活体人脸时,将所述第二人脸红外图像建立为人脸特征模板。
在一种可能的实现方式中,所述当匹配成功时,基于所述第二频率特征图像进行人脸防伪判别,包括:
当匹配成功时,获取所述第二识别目标的3D点云数据;
当所述3D点云数据为有效点云时,基于所述第二频率特征图像进行人脸防伪判别。
在一种可能的实现方式中,所述第二频率特征图像包括第二快速傅里叶FFT频谱图和/或第二高频特征图,所述对所述第二目标图像进行处理得到第二频率特征图像,包括:
对所述第二目标图像进行快速傅里叶FFT变换得到的所述第二FFT频谱图;和/或,
对所述第二目标图像进行高频特征提取得到所述第二高频特征图。
在一种可能的实现方式中,所述对所述第二目标图像进行高频特征提取得到所述第二高频特征图,包括:
将所述第二目标图像与高频卷积核进行卷积计算得到所述第二高频特征图。
在一种可能的实现方式中,其特征在于,所述基于所述第二频率特征图像进行人脸防伪判别包括:
对所述第二频率特征图像进行缩小得到第二目标频率特征图像,基于所述第二目标频率特征图像进行人脸防伪判别。
在一种可能的实现方式中,所述基于所述第二目标频率特征图像进行人脸防伪判别,包括:
通过卷积神经网络对所述第二目标频率特征图像进行分类处理,以确定所述第二识别目标是否为活体人脸。
在一种可能的实现方式中,所述第二频率特征图像包括第二快速傅里叶FFT频谱图和/或第二高频特征图,所述对所述第二频率特征图像进行缩小得到第二目标频率特征图像,包括:
对所述第二FFT频谱图进行缩小得到第二目标FFT频谱图;和/或
对所述第二高频特征图进行缩小得到第二目标高频特征图。
在一种可能的实现方式中,所述第二目标FFT频谱图和所述第二目标高频特征图的大小相同。
第二方面,提供了一种人脸识别的装置,包括处理器,用于执行如第一方面或第一方面的任一可能的实现方式中的人脸识别方法。
第三方面,提供了一种电子设备,包括如第二方面或第二方面的任一可能的实现方式中的人脸识别装置。
第四方面,提供了一种芯片,该芯片包括输入输出接口、至少一个处理器、至少一个存储器和总线,该至少一个存储器用于存储指令,该至少一个处理器用于调用该至少一个存储器中的指令,以执行第一方面或第一方面的任一可能的实现方式中的方法。
第五方面,提供了一种计算机可读介质,用于存储计算机程序,所述计算机程序包括用于执行上述第一方面或第一方面的任一可能的实现方式中的指令。
第六方面,提供了一种包括指令的计算机程序产品,当计算机运行所述计算机程序产品的所述指时,所述计算机执行上述第一方面或第一方面的任一可能的实现方式中的人脸识别的方法。
具体地,该计算机程序产品可以运行于上述第三方面的电子设备上。
附图说明
图1(a)图是根据本申请实施例的一种人脸识别装置的示意性框图。
图1(b)图是根据本申请实施例的一种人脸识别方法的示意性流程图。
图1(c)图是根据本申请实施例的一种卷积神经网络的示意性框图。
图2是根据本申请实施例的另一种人脸识别方法的示意性流程图。
图3是根据本申请实施例的另一种人脸识别方法的示意性流程图。
图4是根据本申请实施例的另一种人脸识别方法的示意性流程图。
图5是根据本申请实施例的另一种人脸识别方法的示意性流程图。
图6是根据本申请实施例的另一种人脸识别方法的示意性流程图。
图7中的(a)图是根据本申请实施例的人脸照片的红外图像。
图7中的(b)图是对应图7中的(a)图的FFT频谱图。
图8中的(a)图是根据本申请实施例的多张人脸照片的FFT频谱图。
图8中的(b)图是根据本申请实施例的多张活体人脸的FFT频谱图。
图9中的(a)图是根据本申请实施例的N*N像素的红外图像矩阵。
图9中的(b)图是根据本申请实施例的3*3的二维滤波器矩阵。
图9中的(c)图是根据图9中的(a)图中的红外图像矩阵经过图9中的(b)图中的3*3二维滤波器矩阵卷积后得到的高频特征图像矩阵。
图10中的(a)图是根据本申请实施例的多张人脸照片的高频特征图。
图10中的(b)图是根据本申请实施例的多张活体人脸的高频特征图。
图11是根据本申请实施例的人脸识别方法中一种人脸防伪判别方法的示意性流程图。
图12是根据本申请实施例的人脸识别方法中另一种人脸防伪判别方法的示意性流程图。
图13是根据本申请实施例的一种卷积神经网络的示意性框图。
图14是根据本申请实施例的一种全连接层示意图。
图15是根据本申请实施例的人脸识别方法中另一种人脸防伪判别方法的示意性流程图。
图16是根据本申请实施例的人脸识别方法中另一种人脸防伪判别方法的示意性流程图。
图17是根据本申请实施例的另一种卷积神经网络的示意性框图。
图18是根据本申请实施例的人脸识别方法中一种人脸注册方法的示意 性流程图。
图19是根据本申请实施例的人脸识别方法中另一种人脸注册方法的示意性流程图。
图20是根据本申请实施例的人脸识别方法中另一种人脸注册方法的示意性流程图。
图21是根据本申请实施例的一种人脸识别装置的示意性框图。
图22根据本申请实施例的电子设备的示意性框图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
本申请实施例可适用于光学人脸识别系统,包括但不限于基于光学人脸成像的产品。该光学人脸识别系统可以应用于具有图像采集装置(如摄像头)的各种电子设备,该电子设备可以为手机,平板电脑,智能可穿戴装置、智能门锁等,本公开的实施例对此不做限定。
应理解,本文中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。
还应理解,本申请实施例中的公式只是一种示例,而非限制本申请实施例的范围,各公式可以进行变形,这些变形也应属于本申请保护的范围。
还应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解,本说明书中描述的各种实施方式,既可以单独实施,也可以组合实施,本申请实施例对此并不限定。
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。本申请所使用的术语“和/或”包括一个或多个相关的所列项的任意的和所有的组合。
为了便于理解,先结合图1(a)、图1(b)和图1(c),对基于2D图像的人脸识别进行电子设备的解锁过程进行简单介绍。
如图1(a)所示,人脸识别装置10包括红外发光模组110、红外图像采集模组120和处理器130。其中,所述红外光发光模组110用于发出红外 光信号,其可以为红外光发光二极管(Light Emitting Diode,LED),或者也可以为垂直腔面发射激光器(VerticalCavity SurfaceEmitting Laser,VCSEL)等其它红外光发光光源,本申请实施例对此不做限定。所述红外图像采集模组120可以为红外摄像头,其中包括红外图像传感器,该红外图像传感器用于接收红外光信号,并将接收的红外光信号转换为对应的电信号,从而生成红外图像。所述处理器130可以为一种微处理器(Microprocessor Unit,MPU),可以控制所述红外发光模组110和所述红外图像采集模组120进行人脸图像采集,并且进行人脸图像识别。
具体地,如图1(b)所示,当需要进行人脸识别时,具体2D识别流程如下:
S110:采集识别目标的2D红外图像。具体地,所述红外发光模组110发出红外光,该红外光照射在识别目标上,该识别目标可以为用户人脸,也可以为照片,三维(Three Dimensional,3D)模型或者任意其它物体。经过识别目标表面反射的红外反射光被红外图像传感器120接收并转换为2D红外图像,所述红外图像传感器120将2D红外图像传输给处理器130。
S120:人脸检测(face detection)。即接收2D红外图像,检测2D红外图像上是否存在人脸。例如,采用单个卷积神经网络(Convolutional Neural Networks,CNN)对2D红外图像进行人脸检测。首先训练一个判断人脸非人脸的人脸检测卷积神经网络,将2D红外图像的数据输入至人脸检测卷积神经网络中,通过卷积计算等步骤,将2D红外图像的数据的特征提取后,进行分类判别,从而判断该2D红外图像上是否存在人脸。
具体地,如图1(c)所示,卷积神经网络主要包括卷积层101(convolutional layer)、激励层102(activation layer),池化层103(pooling layer)、以及全连接层104(fully-connected layer)。其中,卷积神经网路中每层卷积层由若干卷积核(convolutional kernel)组成,每个卷积核的参数都是通过反向传播算法优化得到的。卷积运算的目的是提取输入的不同特征,不同的卷积核提取不同的特征图(feature map),更多层的卷积网络能从边缘特征、线条特征等低级特征中迭代提取更复杂的特征。激励层使用激励函数(activation function)给卷积神经网络引入了非线性,常用的激励函数有sigmoid、tanh、ReLU函数等。通常在卷积层之后会得到维度很大的特征,池化层将特征切成几个区域,取其最大值(max pooling)或平均值(average pooling),得到 新的、维度较小的特征图。全连接层把所有局部特征结合变成全局特征,用来计算最后每一类的得分,从而判断输入的数据的类别。
S121:若2D红外图像上存在人脸,则对2D红外图像进行人脸剪切。具体地,将上述人脸检测卷积神经网络的全连接层改为卷积层,这样网络变成了全卷积网络,2D红外图像经过全卷积网络将得到特征图,特征图上每一个“点”对应该位置映射到原图区域属于人脸的概率,将属于人脸概率大于设定阈值的视为人脸候选框。将2D红外图像中人脸候选框中的图像剪切形成新的人脸2D红外图像。
S122:若2D红外图像上不存在人脸,则将重启参数加1。
若2D红外图像上不存在人脸,则人脸检测失败,换言之,该识别目标不为用户,匹配失败。
可选地,还可以通过级联CNN,Dlib,OpenCV等方法进行人脸检测,并剪切得到新的人脸2D红外图像。本申请实施例中对此不做限定。
S130:2D人脸识别(face recognition)。即对S131形成的人脸2D红外图像进行识别,判断该人脸2D红外图像是否为用户的人脸。例如,采用卷积神经网络的方法进行人脸识别,具体地,首先训练一个判断是否为用户人脸的人脸识别卷积神经网络,该人脸识别卷积神经网络按照人脸特征模板库中的多个人脸特征模板分类。将人脸2D红外图像的数据输入至人脸识别卷积神经网络中,通过卷积计算等步骤,将人脸2D红外图像的数据的特征提取后,进行分类判别,判断该人脸2D红外图像是否与人脸特征模板库中多个人脸特征模板匹配。
S131:若匹配成功,则该人脸2D红外图像为用户的人脸图像,2D识别成功。进一步的,可以解锁人脸识别装置10所在的电子设备,也可以解锁电子设备上应用程序。
S132:若匹配失败,则该人脸2D红外图像不为用户的人脸图像,则2D识别失败,将重启参数加1。
S140:判断重启参数是否小于第一阈值。
S141:若重启参数小于第一阈值,则进入S110;
S142:若重启参数大于等于第一阈值,则识别失败。
在图1(b)中,人脸识别装置10通过采集人脸的2D红外图像,判断人脸的2D图像是否符合人脸特征模板库中的特征人脸来进行人脸识别,从 而对电子设备和电子设备上的应用程序(application,APP)进行解锁。由于在解锁过程中,人脸识别装置10仅仅依据2D图像上的二维特征进行人脸识别,无法识别采集的2D红外图像是否来源自活人人脸或者其他照片、视频等其他非活人人脸物体,换言之,该人脸识别装置10不具有防伪功能,可以通过盗取带有用户人脸的照片、视频等信息,对电子设备以及应用程序进行解锁,因而人脸识别装置及电子设备的安全性能受到了极大的影响。
为解决上述问题,本申请实施例提供一种带有防伪功能的人脸识别方案,通过对采集的红外图像进行处理,获取频率特征图像,基于该频率特征图像进行人脸防伪,判断采集的频率特征图像是否来自用户的活体人脸,从而大大提高人脸识别装置及电子设备的安全性。
下面,结合图2至图20,对本申请实施例提供的人脸识别方法进行详细介绍。
图2为本申请实施例提供的一种人脸识别的方法200,包括:
S210:获取识别目标的目标图像;
S220:对所述目标图像进行处理得到频率特征图像;
S230:基于所述频率特征图像确定所述识别目标是否为活体人脸,并输出活体判断结果;
S240:根据所述目标图像进行特征模板匹配,并输出匹配结果;
S250:根据所述活体判断结果和所述匹配结果输出人脸识别结果。
应理解,所述识别目标也称为第一识别目标、第二识别目标等,可以用于区分不同的目标物体,相应的,所述识别目标的目标图像及眼部图像也可以称为第一目标图像或第二目标图像,第一眼部图像或第二眼部图像等等。所述识别目标包括但不限于人脸、照片、视频、三维模型等任意物体。例如,所述识别目标可以为用户人脸、其他人的人脸、用户照片、贴有照片的曲面模型等等。
可选地,所述目标图像可以为可见光生成的彩色图像,也可以为红外光生成的红外图像或者其它图像,本申请实施例对此不做限定。对所述目标图像进行处理得到频率特征图像为体现目标图像中频率信息的图像,例如体现彩色图像或者红外图像中的高频成分信息等。
优选地,在本申请实施例中,所述目标图像为红外图像,下文以目标图像为红外图像为例进行详细说明。具体地,所述红外(Infrared Radiation,IR) 图像表现为灰度(Gray Scale)图像,通过图像像素点的灰度表现识别目标的外观形状。
可选地,在本申请实施例中,可以通过红外图像采集装置获取识别目标的红外图像,所述红外图像采集装置中可以包括红外光电传感器,其中,红外光电传感器中包括多个像素单元,每个像素单元用于采集红外光经过识别目标表面反射后的反射红外光信号,并将该反射红外光信号转换为对应其光强的像素电信号。每一个像素电信号的值对应于红外图像的一个像素点,其大小表现为红外图像的灰度值。因此,多个像素单元组成的像素矩阵形成的红外图像也可以表示为多个像素点的灰度值组成的数值矩阵。可选地,每一个像素点的灰度值范围为0~255之间,灰度值0表现为黑色,灰度值255表现为白色。
具体地,对所述红外图像进行处理得到的频率特征图像为体现红外图像中频率信息的图像,其中,红外图像的频率是表征图像中灰度变化剧烈程度的指标,是灰度在平面空间上的梯度。例如:图像中一片灰度变化缓慢的区域,对应的频率值很低;而图像中一片灰度变化剧烈的区域,例如图形的边缘区域,对应的频率值较高。在本申请实施例中,所述频率特征图像包括但不限于:对红外图像进行快速傅里叶变换(Fast Fourier Transform,FFT)得到的FFT频谱图,或者将红外图像中的高频特征提取得到的高频特征图。
应理解,所述频率特征图像可以呈现不同的识别目标的红外图像中不同的纹理信息,可以用于区分活体人脸以及非活体人脸,换言之,对活体人脸的红外图像进行处理得到的频率特征图像与对非活体人脸的红外图像进行处理得到的频率特征图像不同,并且差异较大,本申请实施例可以采用任意可以区分活体人脸以及非活体人脸的频率特征图,在此不做具体限定。其中,所述非活体人脸包括但不限于:用户人脸照片,用户人脸视频,放置于三维曲面上的用户人脸照片,用户人脸模型等等。
获得所述识别目标的频率特征图像之后,由于频率特征图中表示识别目标纹理信息的特征分量不同,基于该频率特征图像进行人脸防伪判别,以确定所述识别目标的纹理是否为活体人脸的纹理,从而判断所述识别目标是否为活体人脸,达到人脸防伪的效果。
具体地,在人脸识别的过程中,除了判断识别目标是否为活体人脸,还需要进行特征模板匹配,结合特征模板匹配以及活体判断结果进行人脸识别。 所述特征模板匹配为将目标图像与至少一个用户的特征模板进行匹配,可以判断该目标图像是否属于用户的图像。可选地,该特征模板为用户在不同角度,不同环境等不同条件下的多个人脸或局部人脸图像的特征数据。所述特征模板存储在人脸识别的装置中,特别的,可以存储在装置中的存储器中。
结合人脸防伪判断以及特征模板匹配判断,能够增强人脸识别过程的可靠性,提升安全性能。
目前,人脸防伪有不同的安全等级,如下表1所示,不同的等级代表不同的人脸防伪要求。即例如:防伪等级为等级1时,能识别出2D打印静态平面人脸。
表1
Figure PCTCN2019093163-appb-000001
图1(a)和图1(b)中的人脸识别装置以及人脸识别方法无法判断采集的2D图像来源自照片还是真人脸,因而不具有防伪功能,无法达到表1中人脸防伪等级的等级1。但在本申请实施例中,由于可以通过频率特征图像得到人脸的纹理信息,因而可以识别出活体人脸与非活体人脸,从而可以达到人脸防伪等级5,防伪和识别的安全性能得到大幅提高。
具体地,在本申请实施例中,可以基于获取的识别目标的2D目标图像进行2D识别的特征模板匹配,并基于2D识别的特征模板匹配结果以及人脸防伪判断的结果进行人脸识别并输出人脸识别结果。
在本申请实施例中,当特征模板为2D图像时,特征模板匹配为2D识别中的一个主要步骤和实施方式,下文中,2D识别也可以理解为2D识别中的特征模板匹配。
可选地,可以先进行2D识别,在2D识别的基础上,根据2D识别的结 果基于所述频率特征图像再次进行人脸防伪,使识别过程更加安全有效。例如,如图3所示,本申请实施例提供的另一种人脸识别的方法300,包括:
S310:获取所述识别目标的红外图像;
S340:基于所述红外图像进行2D识别;
当目标图像与多个特征模板中的任意一个特征模板匹配成功时,则2D识别成功,表示该目标图像包括用户人脸图像。当目标图像与多个特征模板均匹配失败时,则2D识别失败,表示该目标图像不包括用户人脸图像。
可选地,在本申请实施例中,所述2D识别可以与图1(b)中的2D识别过程相同或近似。
S351:在2D识别成功时,对所述红外图像进行处理得到频率特征图像;
S352:在2D识别失败时,确定人脸识别失败,输出第一人脸识别结果;
可选地,所述第一人脸识别结果可以包括但不限于失败、非认证用户等具体信息。
S360:基于所述频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸;
S371:在所述识别目标为活体人脸时,确定人脸识别成功,输出第二人脸识别结果;
可选地,所述第二人脸识别结果可以包括但不限于成功、活体认证用户等具体信息。
S372:在所述识别目标不为活体人脸时,确定人脸识别失败,输出第三人脸识别结果。
可选地,所述第三人脸识别结果可以包括但不限于失败、非活体认证用户等具体信息。
可选地,所述目标图像可以为红外图像、可见光图像或者其他图像。
可选地,还可以先进行人脸防伪,在人脸防伪的基础上,根据人脸防伪的结果再进行2D识别,可以提前排除非活体人脸的情况,提高识别的效率。例如,如图4所示,本申请实施例提供的另一种人脸识别的方法400,包括:
S410:获取识别目标的红外图像;
S420:对所述红外图像进行处理得到频率特征图像;
S430:基于所述频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸;
S441:在所述识别目标为活体人脸时,基于所述红外图像进行2D识别;
可选地,该步骤中的2D识别可以与图4中步骤S340相同,具体实施方式可以参考前述方案,此处不再赘述。
S442:在所述识别目标为非活体人脸时,确定人脸识别失败,输出第四人脸识别结果;
可选地,所述第四人脸识别结果可以包括但不限于失败、非活体等具体信息。
S471:在2D识别成功时,确定人脸识别成功,输出第五人脸识别结果。
可选地,所述第五人脸识别结果可以包括但不限于成功、活体认证用户等具体信息。
S472:在2D识别失败时,确定人脸识别失败,输出第六人脸识别结果。
可选地,所述第六人脸识别结果可以包括但不限于失败、活体非认证用户等具体信息。
可选地,在一种可能的实施方式中,通过发射红外光至所述识别目标,接收所述红外光经所述识别目标反射后的反射红外光信号,并将所述反射红外光信号转换得到所述红外图像。例如,一种红外光发射模组发射红外光至所述识别目标,图像采集模组接收所述红外光经所述识别目标反射后的红外光信号,并将所述反射红外光信号转换得到红外图像。
可选地,在步骤S310以及步骤S410中,可以通过图像采集模组获取识别目标的红外图像。该图像采集模组可以为图1(a)中的红外图像采集模组120。
可选地,在步骤S351具体还可以包括:3D人脸重建。即当2D识别成功,采集识别目标的3D数据,以进行3D人脸重建,若3D人脸重建成功,则对所述红外图像进行处理得到频率特征图像,并基于所述频率特征图像进行人脸防伪判别,若3D人脸重建失败,则不进行人脸防伪判别。具体地,重建后的人脸图形从三维空间上反映人脸的特征信息,在3D人脸成功的基础上,进行人脸防伪判别。
可选地,如图5所示,所述人脸识别方法300还包括:
S320:人脸检测,具体地,基于所述红外图像进行人脸检测;
S331:存在人脸,即在红外图像上检测到人脸时,对红外图像进行人脸剪切得到人脸红外图像;
S332:不存在人脸,即人脸检测失败时,重启参数加1;
S352:2D识别失败,确定人脸识别失败,重启参数加1;
S373:在所述识别目标不为活体人脸时,重启参数加1;
可选地,如图6所示,所述人脸识别方法400还包括:
S444:在所述识别目标为非活体人脸时,重启参数加1;
S443:当所述识别目标为活体人脸时,进行步骤S450:人脸检测;具体地,基于所述红外图像进行人脸检测;
S451:存在人脸,即当在红外图像上检测到人脸时,对红外图像进行人脸剪切得到人脸红外图像;
S452:不存在人脸,即人脸检测失败时,重启参数加1;
S445:2D识别,具体地,基于所述人脸红外图像进行2D识别。
S473:在2D识别失败时,重启参数加1;
可选地,所述步骤S320~S332和步骤S450~S452可以与图1(b)中步骤S120~步骤S122相同,此处不再赘述。
可选地,在图5和图6的实施例中,方法还包括:对所述重启参数的大小进行判断,当重启参数小于第二阈值时,则进入S310或者进入S410;当重启参数大于等于第二阈值时,则确定识别失败。
下面结合图7至图17详细介绍S360以及S430中基于所述频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸的过程,即人脸防伪的详细过程。
可选地,所述频率特征图像可以为快速傅里叶变换FFT频谱图,具体地,可以对红外图像进行快速傅里叶变换变换得到的FFT频谱图。其中,快速傅里叶变换是一种快速计算离散傅里叶变换(Discrete Fourier Transform,DFT)的高效计算方法,FFT和DFT均属于傅里叶变换(Fourier transform,FT)的不同变换形式。具体地,傅里叶变换是将图像从空间域转换到频率域,其逆变换是将图像从频率域转换到空间域。换句话说,傅里叶变换的物理意义是将图像的灰度分布函数变换为图像的频率分布函数。傅里叶逆变换是将图像的频率分布函数变换为灰度分布函数。
如图7所示,图7中的(a)图为红外图像,图7中的(b)图为红外图像对应的FFT频谱图,从图7中的(b)图可以看出:FFT频谱图上具有多个明暗不一的亮点,其意义是指图像上某一点与邻域点差异的强弱,即梯度 的大小,也即该点的频率的大小。一般来讲,梯度大则该点的亮度强,否则该点亮度弱。这样通过观察FFT变换后的频谱图,也叫功率图,可以直观地看出图像的能量分布:如果频谱图中暗的点数更多,那么实际图像是比较柔和的;反之,如果频谱图中亮的点数多,那么实际图像一定是尖锐的、边界分明且边界两边像素差异较大的。在频谱图中,距离中心近的点为低频信号,即原始红外图像中的大片相同区域,距离中心远的点为高频信号,即原始红外图像中边缘区域。
具体地,对红外二维图像进行FFT变换得到FFT频谱图可以通过计算机语言程序进行计算得到,例如matlab语言计算机程序,C/C++语言计算机程序等等,本申请实施例对此不做限定。
由于人脸照片为二维平面结构,活体人脸为三维立体结构,对人脸照片采集得到的照片红外图像与对活体人脸拍摄得到的人脸红外图像相比,人脸红外图像中人脸轮廓纹理少而清晰,表现为图像中的灰度变化的边缘区域,皮肤区域面积大且灰度均衡,而照片红外图像中,受到环境干扰等其它影响,照片中灰度纹理较多且模糊。其中,图像的纹理对应于FFT频谱图中远离中心的区域,因此,照片红外图像的FFT频谱在远离中心区域的亮点多而亮度低,而人脸红外图像的FFT频谱在远离中心区域的亮点少而亮度高。
例如,如图8所示,图8中的(a)图示出了多张人脸照片的FFT频谱图,图8中的(b)图示出了多张活体人脸的FFT频谱图。将图8中的(a)图与图8中的(b)图进行比较,可以看出,图8中的(a)图的照片人脸的FFT频谱中亮点数多,暗点数少,且远离中心区域处的亮点多,说明图像中的纹理多,高频干扰信息多。而图8中的(b)图的活体人脸照片的FFT频谱中亮点数少,暗点数多,说明图像柔和,皮肤区域特征明显,且远离中心区域处的亮点少但亮度值大,说明图像中的轮廓纹理明了清晰。
应理解,由于用户活体人脸具有其特有的纹理特征,大多数情况下,可以认为是独一无二的人脸纹理特征,因此,FFT频谱除了可以区别人脸照片红外图像以及活体人脸红外图像外,还可以区别三维曲面模型,三维人脸模型,具有一定纹理的三维人脸模型,乃至于其它用户人脸。
可选地,所述频率特征图像还可以为高频特征图。具体地,将红外图像中的高频特征提取得到所述高频特征图,该高频特征提取过程即为提取出红外图像中边缘特征,对边缘特征进行增强以显示在红外图像中以形成高频特 征图。具体地,当识别目标为人脸时,该人脸的红外图像中的人脸纹理特征提取出来,对纹理特征进行显示增强以显示为人脸高频特征图。
可选地,由于图像中的边缘特征为高频信号,可以对红外图像进行滤波,通过高频信号,滤除低频信号。可选地,将红外图像通过一个二维滤波器矩阵进行高通滤波,该二维滤波器矩阵也称为卷积核(kernel),或者卷积模板。具体地,将该滤波器矩阵与二维图像进行卷积计算,即对于红外图像的每一个像素点,计算它的邻域像素和滤波器矩阵的对应元素的乘积,然后加起来,作为该像素位置的值。这样就完成了滤波过程,得到高频特征图。
可选地,二维滤波器矩阵可以为3*3矩阵,5*5矩阵或者其它奇数大小的矩阵。例如,图9中的(a)图为N*N像素的红外图像矩阵,其中a 1,1~a n,n为红外图像矩阵中的像素灰度值。图9中的(b)图为3*3的二维滤波器矩阵,包括x 1至x 9这9个数值。图9中的(c)图为红外图像矩阵经过3*3二维滤波器矩阵卷积后得到的高频特征图像矩阵。以其中第一个像素值b 1,1为例,其计算公式如下所示:
b 1,1=x 1a 1,1+x 2a 1,2+x 3a 1,3+x 4a 2,1+x 5a 2,2+x 6a 2,3+x 7a 3,1+x 8a 3,1+x 9a 3,3
b 11计算完成后,将红外像素矩阵中选取的3*3区域向右滑动一步或多步,按照此方法,与二维滤波器矩阵中的对应位置的数值相乘后相加,即得到b 12的值。依次类推,计算得到完整高频特征图像矩阵中每一个像素值。
例如,如图10所示,图10中的(a)图示出了多张人脸照片的高频特征图,图10中的(b)图示出了多张活体人脸的高频特征图。将图10中的(a)图与图10中的(b)图进行比较,可以看出,图10中的(a)图的照片人脸的高频特征图中高频干扰纹理较多,导致人脸纹理轮廓不清晰。而图10中的(b)图的活体人脸照片的高频人脸纹理轮廓清楚,高频干扰纹理少。
应理解,可以改变二维滤波器矩阵中的数值得到不同的滤波效果,即二维滤波矩阵决定了卷积过后高频特征图的特点。在本申请实施例中,通过二维滤波器矩阵卷积得到的高频特征图突出了红外图像中的边缘特点,或者纹理特性。例如,该二维滤波器矩阵可以为图像锐化滤波器(Sharpness Filter)或者边缘检测滤波器(Edge Detection)等。
还应理解,除了对红外图像与二维滤波矩阵进行卷积计算得到高频特征图外,还可以通过其它高频特征提取的方法得到高频特征图,例如,对红外 图像的傅里叶频谱图进行高通滤波,得到高频傅里叶频谱图即为高频特征图;或者对高频傅里叶频谱再经过傅里叶反变换得到的空间图像也可以为高频特征图。因此,所述高频特征图为任意可以体现红外图像边缘特性的图像,本申请实施例在此不做限定。
可选地,在一种可能的实施方式中,对所述频率特征图像进行预处理后,采用深度学习网络对预处理后的频率特征图像进行分类处理,以确定所述识别目标是否为活体人脸。在本申请实施例中,深度学习网络包括但不限于卷积神经网络,还可以为其它深度学习网络,本申请实施例对此不做限定,以下以卷积神经网络为例,说明本申请实施例中的分类处理方法。
例如,如图11所示,所述人脸防伪判别方法500包括:
S510:对频率特征图像进行缩小得到目标频率特征图像;
S520:通过卷积神经网络对目标频率特征图像进行分类处理,以确定所述识别目标是否为活体人脸。
可选地,当所述频率特征图像为FFT频谱图时,如图12所示,所述人脸防伪判别方法501包括:
S511:对FFT频谱图进行缩小得到目标FFT频谱图;
S521:通过卷积神经网络对目标FFT频谱图进行分类处理,以确定所述识别目标是否为活体人脸。
具体地,将FFT频谱图进行图像缩放(Resize)得到目标FFT频谱图。缩放即:将FFT频谱图像按照目标尺寸放大或者缩小。在本申请实施例S511中,将FFT频谱图进行缩小得到目标FFT频谱图以加快数据处理的速度,减小人脸识别过程中的响应时间。
可选地,采用最邻近差值法或者双线性差值法等方法对FFT频谱图按比例缩小。例如:原FFT频谱图大小为M*M像素,缩小后的目标图像大小为A*A像素,两幅图像的边长比为M/A。目标图像的第(i,j)个像素点对应原FFT频谱图中的坐标为(i*M/A,j*M/A),而该坐标通常不是整数。
若采用最近邻插值法进行缩小处理,则对计算得到的原FFT频谱图中的坐标为(i*M/A,j*M/A)直接四舍五入得到距离它最近的点的坐标,例如对(0.75,0.25)四舍五入得到坐标(1,0),该坐标对应的像素值就是目标图像上对应的像素点的值。
若采用双线性插值进行缩小处理,假设目标图像第(i,j)个像素点映 射到原FFT频谱图中的坐标为(i+u,j+v),其中u和v为i+u和j+v的小数部分。则目标图像第(i,j)个像素点的像素值f(i,j)即对应于原FFT频谱图中的坐标为(i+u,j+v)的像素值f(i+u,j+v),其计算方法如下公式所示:
f(i+u,j+v)=(1-u)(1-v)f(i,j)+v(1-u)f(i,j+1)+u(1-v)f(i+1,j)+uvf(i+1,j+1)
可选地,通过上述最邻近差值法或者双线性差值法将FFT频谱图像按照比例缩小为目标FFT频谱图像后,将目标FFT频谱图输入卷积神经网络中进行分类处理。
首先,构建卷积神经网络结构,例如可以采用二层卷积神经网络或更多层网络结构,每层卷积网络结构的构成也可以根据待提取的人脸信息进行调整,本申请实施例对此不作限定。
其次,设置该卷积神经网络的初始训练参数和收敛条件。
可选地,在本申请实施例中,该初始训练参数可以是随机生成的,或根据经验值获取的,或者也可以是根据大量的真假人脸数据预训练好的卷积神经网络模型的参数,本申请实施例对此不作限定。
然后,向该卷积神经网络输入大量的用户活体人脸和非活体人脸的FFT频谱图像,该卷积神经网络可以基于初始训练参数对上述FFT频谱图像进行处理,确定对每个FFT频谱图像的判定结果,进一步地,根据该判定结果,调整卷积神经网络的结构和/或各层的训练参数,直至判定结果满足收敛条件。
可选地,在本申请实施例中,该收敛条件可以包括以下中的至少一项:
1、将活体人脸的FFT频谱图像判定为活体人脸的FFT频谱图像的概率大于第一概率,例如,98%;
2、将非活体人脸的FFT频谱图像判定为非活体人脸的FFT频谱图像的概率大于第二概率,例如95%;
3、将活体人脸的FFT频谱图像判定为非活体人脸的FFT频谱图像的概率小于第三概率,例如,2%;
4、将非活体人脸的FFT频谱图像判定为活体人脸的FFT频谱图像的概率小于第四概率,例如3%。
完成判断是否为活体人脸的卷积神经网络的训练之后,在人脸识别的过程中,将处理得到的当前识别目标的FFT频谱图像输入到该卷积神经网络中, 从而该卷积神经网络可以使用训练好的参数对识别目标的FFT频谱图像进行处理,确定该识别目标是否为活体人脸。
可选地,在一种可能的实施方式中,如图13所示,所述卷积神经网络50包括卷积层510,激励层520以及全连接层530。所述卷积层510用于对输入的目标FFT频谱图像进行至少一次卷积计算,从目标FFT频谱图像中提取特征。
其中,卷积层510包括n个不同的卷积核,n为正整数。通过在图像上滑动卷积核并点乘计算得到矩阵叫做卷积特征(convolved feature)图,也称为激活图(activation map)或者特征图(feature map)。对于同样的输入图像,不同值的卷积核将会生成不同的特征图。通过修改卷积核的数值,可以从图中检测到不同的特征。
可选地,将目标FFT频谱图像与一个卷积核的卷积计算过程可以和图5中的卷积计算过程相同,采用在目标FFT频谱图上每一次滑动一个像素值(步长为1)与卷积核进行计算。也可以在目标FFT频谱图上每一次滑动x个像素值(步长为x)与卷积核进行计算,本申请实施例对此不做限定。
可选地,在本申请实施例中,卷积核可以为3*3、5*5或者7*7等其他大小的矩阵,本申请实施例对此也不做限定。
在一种优选的实施方式中,采用3*3的卷积核,步长为1的卷积计算方式,将目标FFT频谱图与n个不同的卷积核计算后,得到n张不同的特征图,其中,n张不同的特征图分别提取了目标FFT频谱图中的不同的特征信息,该n张不同的特征图也称为卷积层510输出的n个通道。
激励层520中包含激励函数,用于对卷积得到的特征图中的每个像素值进行非线性化处理。可选地,激励函数包括但不限于修正线性单元(Rectified Linear Unit,ReLU)函数、指数线性单元(exponential linear unit,ELU)函数,以及ReLU函数的几种变体形式,例如:带泄露修正线性单元(LeakyReLU,LReLU),参数化修正线性单元(ParametricReLU,PReLU),随机纠正线性单元(Randomized ReLU,RReLU)等。
优选地,在本申请实施例中,采用的激励函数为参数化修正线性单元PReLU函数,具体地,PReLU函数的公式如下所示:
Figure PCTCN2019093163-appb-000002
其中,i表示第i个通道,a i表示第i个通道的参数,不同通道的参数可以相同或者不同。
在本申请实施例中,0<i≤n,n个通道即n张特征图分别采用上述PReLU函数进行激活。经过PReLU处理后的第i张特征图中,小于等于0的像素值变为a ix i,大于0的像素值保持不变,使得特征图中的像素值具有稀疏性,PReLU实现稀疏后的神经网络结构能够更好地挖掘相关特征,拟合训练数据。具体地,n张不同的特征图经过PReLU函数非线性化处理后,得到n张稀疏特征图,然后,n张稀疏特征图输入全连接层530进行全连接并分类处理。
具体地,所述全连接层530中每个结点均与上层每个结点相连,用于将之前神经网络中提取出来的特征进行综合,在整个卷积神经网络中起到“分类器”的作用。例如,如图14所示,f1~fn为上一层输出的结点,全连接层330共包括m个全连接结点C,输出m个常数或者矩阵y1~ym,便于对m个常数或者矩阵分类进行再次全连接或者判断分类。具体地,m个全连接结点中的每一个结点均包括上述训练收敛得到的多个参数,用于将f1~fn进行加权连接,最终得到一个常数或者矩阵结果y。
下面,以本申请实施例中,f1~fn为n张稀疏特征图为例,对全连接层全连接过程为例进行说明。
n张稀疏特征图f1~fn的大小为A*A,每个全连接层结点包括n个A*A大小的卷积核,因此,m个全连接结点共包括m*n个A*A大小的卷积核。对于每一个全连接层结点,将n个A*A大小的卷积核与n张稀疏特征图进行相乘后相加得到一个特征常数。因此,对于m个全连接结点,共得到m个常数。
可选地,当m个全连接结点中的卷积核小于A*A时,对于m个全连接结点,共得到m个矩阵。
可选地,全连接层530中还包括分类函数Sigmoid,对全连接层输出的特征常数进行分类判别。
其中,Sigmoid函数的公式如下所示:
Figure PCTCN2019093163-appb-000003
在Sigmoid函数中,在输入趋于正无穷或负无穷时,函数趋近平滑状态,Sigmoid函数因为输出范围为0至1,所以二分类的概率常常用这个函数。 对Sigmoid函数处理得到的多个概率值进行判断,从而得到最终人脸防伪判别的结果,以确定所述识别目标是否为活体人脸。
应理解,在本申请实施例中,卷积神经网络50还可以包括:多个卷积层510、多个激励层520和/或多个全连接层530。例如:卷积层-激励层-卷积层-激励层-全连接层的结构,或者卷积层-激励层-全连接层-全连接层的结构,本申请实施例对此不做限定。
还应理解,多个卷积层510中的卷积参数可以不同,多个激励层520采用的激励函数可以不同,且多个全连接层530中全连接参数也可以不同。本申请实施例对此也不做限定。
上述实施例为对FFT频谱图进行缩放后,采用深度学习算法中的卷积神经网络对识别目标的FFT频谱进行分类处理,确定所述识别目标是否为活体人脸。
可选地,在另一种可能的实施方式中,如图15所示,可以采用类似的人脸防伪方法502基于高频特征图进行人脸防伪。该人脸防伪判别方法502包括:
S512:对高频特征图进行缩小得到目标高频特征图;
S522:通过卷积神经网络对目标高频特征图进行分类处理,以确定所述识别目标是否为活体人脸。
具体地,可以对高频特征图进行缩放后,采用卷积神经网络或者其它深度学习算法对识别目标的高频特征图进行分类处理,以确定所述识别目标是否为活体人脸。具体的实施方式可以参照上述对FFT频谱图的处理方法,采用卷积神经网络50对高频特征图进行分类处理,此处不再赘述。
优选地,在第三种可能的实施方式中,对FFT频谱图和高频特征图进行缩小后,采用深度学习算法,对所述识别目标的FFT频谱图以及高频特征图综合卷积计算,一起进行分类处理,以确定所述识别目标是否为活体人脸。采用该方法可以综合FFT频谱图中的人脸纹理特征以及高频特征图中的人脸纹理特征,从频域和空间域中均提取出相关纹理特征并进行人脸防伪判断,能够提高防伪判断的准确性。
具体地,如图16所示,一种人脸防伪判别方法600包括:
S611:对FFT频谱图进行缩小得到目标FFT频谱图;
S612:对高频特征图进行缩小得到目标高频特征图;
S620:通过卷积神经网络对目标FFT频谱图和目标高频特征图像进行分类处理,以确定所述识别目标是否为活体人脸。
可选地,其中,缩小后的目标高频特征图与目标FFT频谱的大小相同。
可选地,在本申请实施例中,通过卷积神经网络60对目标FFT频谱图和目标高频特征图像进行分类处理,以确定所述识别目标是否为活体人脸。
具体地,如图17所示,所述卷积神经网络60包括第一网络610、第二网络620、第三网络630以及全连接层640。其中第一网络610包括:第二卷积层611和第二激励层612,用于对输入的目标FFT频谱图进行卷积计算并非线性化处理,输出得到多个稀疏FFT频谱特征图。第二网络620包括:第三卷积层621和第三激励层622,用于对输入的目标高频特征图进行卷积计算并非线性化处理,输出得到多个稀疏高频激励特征图。
第三网络630包括:第四卷积层631和第四激励层632,用于对多个稀疏FFT频谱特征图和多个稀疏高频激励特征图一起进行卷积计算并非线性化处理得到多个稀疏总特征图。例如,第一网络610输出10张稀疏FFT频谱特征图,第二网络620输出10张稀疏高频特征图,则将10张稀疏FFT频谱特征图和10张稀疏高频特征图共20张图像一起输入第三网络630,进行卷积和激励处理。
应理解,所述第一网络、第二网络以及第三网络中的卷积核大小、卷积步长,以及激励函数可以相同或者不同,本申请实施例对此不做限定。
优选地,所述第一网络、第二网络以及第三网络中均可以采用3*3的卷积核,卷积步长为1进行卷积计算,以及采用PReLU激励函数进行非线性化处理。
可选地,所述全连接层640可以与上述全连接层330相同,在对第三网络输出的多个稀疏总特征图进行加权全连接后输出一个或多个特征矩阵或者特征常数。可选地,所述全连接层640也可以采用Sigmoid函数进行分类判断。
应理解,在本申请实施例中,卷积神经网络60还可以包括:多个第一网络610,和/或多个第二网络620,和/或多个第三网络630,和/或多个全连接层640。本申请实施例对此不做限定。
还应理解,多个网络中的卷积参数可以不同,采用的激励函数可以不同,且多个全连接层中全连接参数也可以不同。本申请实施例对此也不做限定。
在本申请实施例中,卷积神经网络30和卷积神经网络60的网络结构简单,运行速度快,可以运行在高级精简指令集机器(Advanced RISC Machine,ARM)上。
在上述申请实施例中,基于所述频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸,其中,人脸防伪判别的结果用于人脸识别。
可选地,所述人脸防伪判别的结果还可以用于人脸注册,即生成2D人脸识别过程中人脸特征模板。具体地,在人脸注册的过程中加入人脸防伪,防止将根据人脸照片或者其它非活体人脸的模型采集到的照片作为模板进行人脸识别匹配,可以提高2D识别的准确性。
具体地,如图18所示,所述人脸注册方法700包括:
S710:获取识别目标的目标图像。
S720:对所述目标图像进行处理得到频率特征图像;
S730:基于所述频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸,其中,人脸防伪判别的结果用于建立人脸特征模板。
应理解,本申请实施例中人脸注册方法过程和上述人脸识别方法过程为两个独立的阶段,仅是注册方法过程中建立的人脸特征模板用于人脸识别过程中2D识别的判断。在通过人脸注册方法建立人脸特征模板之后,通过上述人脸识别方法以及人脸防伪判别方法进行人脸识别。
还应理解,本申请实施例中的识别目标可以与上述人脸识别过程中的识别目标相同或者不同,例如,可以均为用户活体人脸,对用户活体人脸进行注册和识别;也可以为注册过程中的识别目标为用户活体人脸,但识别过程中的识别目标为其它非活体人脸。本申请实施例对此不做限定。
可选地,所述步骤S710可以与上述步骤S210相同,通过图像采集装置获取识别目标的目标图像。可选地,所述目标图像为红外图像或者可见光彩色图像。
可选地,所述步骤S720可以与上述步骤S220相同。可选地,所述频率特征图像为体现图像中频率信息的图像,例如:FFT频谱图,或者高频特征图。具体地,对目标图像处理得到对应的FFT频谱图和高频特征图的方法可以参见上述申请实施例的描述,此处不再赘述。
可选地,所述步骤S730中基于所述频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸,可以采用上述人脸识别防伪判别方法 500、人脸识别防伪判别方法501、人脸识别防伪判别方法502、人脸识别防伪判别方法600中的任意一种进行判别,具体描述可以参照上述申请实施例,此处不再赘述。
可选地,在本申请实施例中,人脸注册方法还包括:具体根据所述目标图像建立人脸特征模板。
在一种可能的实施方式中,当目标图像为红外图像时,先获取识别目标的红外图像,基于所述红外图像进行模板匹配,在匹配成功的基础上进行防伪。
例如,图19示出了一种人脸注册方法800,包括:
S810:获取识别目标的红外图像;
S850:基于所述红外图像进行模板匹配;
S851:在模板匹配成功时,对所述红外图像进行处理得到频率特征图像;
S852:当模板匹配失败时,不建立人脸特征模板;
S860:基于所述频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸;
S871:在所述识别目标为活体人脸时,存储红外图像为人脸特征模板;
S872:在所述识别目标不为活体人脸时,不存储红外图像为人脸特征模板。
其中,可选地,步骤S810可以与步骤S310相同。步骤S851可以与步骤S351相同。步骤S860可以与步骤S360相同。
可选地,步骤S850可以与步骤S340基于红外图像进行2D识别类似,将该红外图像与人脸特征模板库中的多个人脸特征模板进行匹配,若匹配成功,则该人脸红外图像为用户的人脸图像,若匹配失败,则该人脸红外图像不为用户的人脸图像。
可选地,步骤S871中,当识别目标为活体人脸时,将红外图像的数据存储于存储单元中,作为人脸特征模板库中一个新的人脸特征模板,该存储单元可以为执行人脸注册方法的处理器中的存储单元,也可以为执行人脸注册方法的电子设备中的存储器。
可选地,如图20所示,人脸注册方法800还可以包括:
S820:人脸检测;
S821:当人脸检测到所述红外图像上存在人脸时,对红外图像进行人脸 剪切得到人脸红外图像;
S822:当人脸检测到所述红外图像上不存在人脸时,重启参数加1;
可选地,步骤S820至步骤S822可以与步骤S320至步骤S332相同。
S830:3D人脸重建;
具体地,可以通过发射结构光或者光脉冲,经过识别目标表面反射后,接收到携带识别目标表面信息的反射结构光或者反射光脉冲,从而获取识别目标的3D数据,该3D数据包含了识别目标的深度信息,能够表示识别目标的表面形状。所述3D数据可以表示为深度图(Depth Image)、3D点云(Point Cloud)、几何模型等多种不同形式。在本申请实施例中,可以根据该3D数据进行3D人脸重建,即得到表示识别目标的3D形态图像。
S831:当3D人脸重建成功时,即根据3D数据获取到识别目标的3D形态图像时,进入S840。
可选地,当3D人脸重建成功时,将该3D数据存储至存储单元中,例如,将3D点云数据作为一个3D点云数据模板存储至存储单元中,形成3D点云数据模板库。
S832:当3D人脸重建失败时,即根据该3D数据不能获取到识别目标的3D形态图像时,重启参数加1。
S840:判断S821步骤中剪切得到的人脸红外图像是否属于人脸特征模板库。可选地,通过获取红外图像的用户身份(Identification,ID)信息,判断是否存在该用户ID的人脸特征模板库,当存在该用户ID的人脸特征模板库时,进入S842:所述人脸红外图像属于人脸特征模板库。当不存在该用户ID的人脸特征模板库时,进入S841:所述人脸红外图像不属于人脸特征模板库。
S8411:当所述人脸红外图像不属于人脸特征模板库时,对红外图像进行处理得到频率特征图像,进入步骤S860。
可选地,还可以根据获取的红外图像的用户ID信息,建立新的用户人脸特征模板库。
S8501:当所述人脸红外图像属于人脸特征模板库时,基于S821步骤中剪切得到的人脸红外图像进行模板匹配。具体的匹配方法可以与步骤S850相同。
S851:当模板匹配成功时,对红外图像进行处理得到频率特征图像,进 入步骤S860。
S852:当模板匹配失败时,不建立人脸特征模板,重启参数加1。
S860:基于频率特征图像进行人脸防伪判别,以确定所述识别目标是否为活体人脸。
S8711:当所述识别目标为活体人脸时,进入S8712:判断是否为有效点云。
可选地,将S830中人脸重建采集到的3D点云数据与3D点云数据模板库中多个3D点云数据模板进行匹配,判断是否为有效点云。当匹配成功时,则为无效点云,当匹配失败时,则为有效点云。具体地,点云匹配用于判断采集的3D点云数据中识别目标的人脸角度是否与3D点云数据模板中的人脸角度相同,当角度相同时,匹配成功,则说明模板库中存在相同人脸角度的3D点云数据,则为无效点云;当角度不同时,匹配失败,则说明模板库中不存在相同人脸角度的3D点云数据,则为有效点云。
可选地,还可以在此过程中,采集多张识别目标的3D点云数据,进行点云拼接和点云融合,以形成人脸全方位全角度的3D数据和3D图像,根据该3D图像可以进行3D人脸识别。
S8713:当判断3D点云数据为有效点云时,存储人脸红外图像为人脸特征模板。具体地,将人脸红外图像的数据存储于存储单元中,作为人脸特征模板库中一个新的人脸特征模板。
S8714:当判断3D点云数据为无效点云时,重启参数加1。
可选地,在判断所述3D点云数据为有效点云后,还可以判断人脸特征模板库中的人脸特征模板是否已满。
具体地,判断所述人脸特征模板库中的人脸特征模板数量是否等于预设值,若等于预设值,则人脸特征模板已满,则不再新增存储人脸特征模板。
例如,所述预设值为8,则当人脸特征模板库中的人脸特征模板数量为8时,则不再新增人脸特征模板。
当人脸特征模板未满时,存储人脸红外图像为人脸特征模板。具体地,将人脸红外图像的数据存储于存储单元中,作为人脸特征模板库中一个新的人脸特征模板。
可选地,所述人脸注册方法800还包括:
判断重启参数是否小于第二阈值。若重启参数小于第二阈值,则进入 S810;若重启参数大于等于第二阈值,则识别失败。
上文结合图2至图20,详细描述了本申请的人脸识别方法实施例,下文结合图21,详细描述本申请的人脸识别装置实施例,应理解,装置实施例与方法实施例相互对应,类似的描述可以参照方法实施例。
图21是根据本申请实施例的人脸识别装置20的示意性框图,包括:
图像采集模组210,用于获取第一识别目标的第一目标图像;
处理器220,用于对所述第一目标图像进行处理得到第一频率特征图像;并基于所述第一频率特征图像进行人脸防伪判别,以确定所述第一识别目标是否为活体人脸,其中,人脸防伪判别的结果用于人脸识别。
可选地,所述第一目标图像为二维红外图像。
可选地,图像采集模组210可以为任意采集图像的装置,例如摄像头、相机等等。可选地,在本申请实施例中,图像采集模组可以为红外摄像头,用于采集红外的深度图像。可选地,图像采集模组210中包括滤波片211和光检测阵列212,所述滤波片211用于透过目标波长的光信号,滤除非目标波长的光信号,所述光检测阵列212基于所述目标波长进行光检测,并将检测到的光信号转换为电信号。可选地,该光检测阵列212包括多个像素单元,一个像素单元用于转换光信号形成一个识别目标图像中的一个像素值。可选地,所述像素单元可以采用光电二极管(photo diode)、金属氧化物半导体场效应管(Metal Oxide Semiconductor Field Effect Transistor,MOSFET)等器件。可选地,所述像素单元对于目标波长光具有较高的光灵敏度和较高的量子效率,以便于检测相应波长的光信号。
具体地,在本申请实施例中,所述目标波长属于红外光波段,例如,目标波长为940nm,则滤波片211用于透过940nm的红外光信号,阻挡可见光,非940nm波长的其他红外光通过,光检测阵列212为红外光检测阵列,对940nm的红外光进行检测并形成对应于识别目标的深度图像。
可选地,所述处理器220可以为所述人脸识别装置20的处理器,也可以为包括人脸识别装置20的电子设备的处理器,本申请实施例不做限定。
可选地,所述处理器220还用于:基于所述第一目标图像进行二维识别;
在二维识别成功时,所述处理器220具体用于对所述第一目标图像进行处理得到所述第一频率特征图像;
所述处理器220还用于:在所述第一识别目标为活体人脸时,确定人脸 识别成功;或者,在所述第一识别目标为非活体人脸时,确定人脸识别失败。
可选地,所述处理器220还用于:
在所述第一识别目标为活体人脸时,基于所述第一目标图像进行二维识别;
在二维识别成功时,确定人脸识别成功,或者,在二维识别失败时,确定人脸识别失败;
或者,在所述第一识别目标为非活体人脸时,确定人脸识别失败。
可选地,所述处理器220具体用于:对所述第一目标图像剪切得到人脸图像;并将所述人脸图像与多个特征模板进行匹配,当匹配成功时,二维识别成功,或者,当匹配失败时,二维识别失败。
可选地,所述第一频率特征图像包括第一快速傅里叶FFT频谱图和/或第一高频特征图,所述处理器220具体用于:
对所述第一目标图像进行快速傅里叶FFT变换得到的所述第一FFT频谱图;和/或,
对所述第一目标图像进行高频特征提取得到所述第一高频特征图。
可选地,所述处理器220具体用于:
将所述第一目标图像与高频卷积核进行卷积计算得到所述第一高频特征图。
可选地,所述处理器220具体用于:
对所述第一频率特征图像进行缩小得到第一目标频率特征图像,基于所述第一目标频率特征图像进行人脸防伪判别。
可选地,所述处理器220具体用于:
通过卷积神经网络对所述第一目标频率特征图像进行分类处理,以确定所述第一识别目标是否为活体人脸。
可选地,所述第一频率特征图像包括第一快速傅里叶FFT频谱图和/或第一高频特征图,所述处理器220具体用于:
对所述第一FFT频谱图进行缩小得到第一目标FFT频谱图;和/或
对所述第一高频特征图进行缩小得到第一目标高频特征图。
可选地,所述第一目标FFT频谱图和所述第一目标高频特征图的大小相同。
可选地,所述卷积神经网络包括:至少一个卷积层,至少一个激励层以 及至少一个全连接层。
可选地,所述第一目标频率特征图像包括:所述第一目标FFT频谱图或所述第一目标高频特征图;
所述至少一个卷积层包括:至少一个第一卷积层,所述至少一个激励层包括:至少一个第二卷积层,所述至少一个全连接层包括至少一个第一全连接层;
所述处理器220具体用于:
通过所述至少一个第一卷积层,对所述第一目标FFT频谱图或所述第一目标高频特征图进行卷积计算得到多个特征图;
通过所述至少一个第一激励层,对所述多个特征图进行非线性化处理得到多个稀疏特征图;
通过所述至少一个第一全连接层,对所述多个稀疏特征图进行全连接得到多个特征常数;并采用分类函数对所述多个特征常数进行分类处理。
可选地,所述第一卷积层,所述第一激励层,以及所述第一全连接层的个数均为1。
可选地,所述第一目标频率特征图像包括:所述第一目标FFT频谱图和所述第一目标高频特征图;
所述至少一个卷积层包括至少一个第二卷积层,至少一个第三卷积层和至少一个第四卷积层,所述至少一个激励层包括至少一个第二激励层,至少一个第三激励层和至少一个第四激励层,所述至少一个全连接层包括至少一个第二全连接层;
所述处理器220具体用于:
通过所述至少一个第二卷积层和所述至少一个第二激励层对所述第一目标FFT频谱图进行处理得到多个稀疏FFT频谱特征图;
通过所述至少一个第三卷积层和所述至少一个第三激励层对所述第一目标高频特征图进行处理得到多个稀疏高频激励特征图;
通过所述至少一个第四卷积层和所述至少一个第四激励层对所述多个稀疏FFT频谱特征图和所述多个稀疏高频激励特征图进行处理得到多个稀疏总特征图;
通过所述至少一个第二全连接层,对所述多个稀疏总特征图进行全连接得到多个特征常数;并采用分类函数对所述多个特征常数进行分类处理。
可选地,所述第二卷积层,所述第三卷积层、所述第四卷积层、所述第二激励层、所述第三激励层、所述第四激励层、以及所述第二全连接层的个数均为1。
可选地,所述至少一个卷积层中的卷积核大小为3*3的矩阵,和/或所述至少一个激励层中的激励函数为参数化修正线性单元PReLU函数,和/或所述至少一个全连接层中的分类函数为Sigmoid函数。
可选地,所述图像采集模组210还用于:获取第二识别目标的第二目标图像;
可选地,所述处理器220除了用于进行人脸防伪判别以及人脸二维识别,所述处理器220还用于:
对所述第二目标图像进行处理得到第二频率特征图像;
基于所述第二频率特征图像进行人脸防伪判别,以确定所述第二识别目标是否为活体人脸,其中,人脸防伪判别的结果用于建立人脸特征模板。
可选地,所述第二目标图像为第二红外图像。
可选地,所述处理器220还用于:基于所述第二目标图像建立所述人脸特征模板。
可选地,所述处理器220还用于:基于所述第二目标图像进行人脸检测;
其中,所述基于所述第二目标图像建立人脸特征模板包括:
在人脸检测成功时,对所述第二目标图像进行人脸图像剪切形成第二人脸红外图像,基于所述第二人脸红外图像建立所述人脸特征模板。
可选地,所述处理器220具体用于:
判断所述第二人脸红外图像是否属于人脸特征模板库;
当所述第二人脸红外图像属于所述人脸特征模板库时,将所述第二人脸红外图像与所述人脸特征模板库中的多个人脸特征模板进行匹配。
当所述第二人脸红外图像不属于所述人脸特征模板库时,基于所述第二频率特征图像进行人脸防伪判别,当确定所述第二识别目标为活体人脸时,将所述第二人脸红外图像建立为人脸特征模板。
可选地,所述处理器220具体用于:当匹配成功时,基于所述第二频率特征图像进行人脸防伪判别;
当确定所述第二识别目标为活体人脸时,将所述第二人脸红外图像建立为人脸特征模板。
可选地,所述处理器220具体用于:所述当匹配成功时,获取所述第二识别目标的3D点云数据;
当所述3D点云数据为有效点云时,基于所述第二频率特征图像进行人脸防伪判别。
可选地,所述第二频率特征图像包括第二快速傅里叶FFT频谱图和/或第二高频特征图,所述处理器220具体用于:对所述第二目标图像进行快速傅里叶FFT变换得到的所述第二FFT频谱图;和/或,
对所述第二目标图像进行高频特征提取得到所述第二高频特征图。
可选地,所述处理器220具体用于:将所述第二目标图像与高频卷积核进行卷积计算得到所述第二高频特征图。
可选地,所述处理器220具体用于:对所述第二频率特征图像进行缩小得到第二目标频率特征图像,基于所述第二目标频率特征图像进行人脸防伪判别。
可选地,所述处理器220具体用于:通过卷积神经网络对所述第二目标频率特征图像进行分类处理,以确定所述第二识别目标是否为活体人脸。
可选地,所述第二频率特征图像包括第二快速傅里叶FFT频谱图和/或第二高频特征图,所述处理器220具体用于:
对所述第二FFT频谱图进行缩小得到第二目标FFT频谱图;和/或
对所述第二高频特征图进行缩小得到第二目标高频特征图。
可选地,所述第二目标FFT频谱图和所述第二目标高频特征图的大小相同。
如图22所示,本申请实施例还提供了一种电子设备2,该电子设备2可以包括上述申请实施例的人脸识别装置20。
例如,电子设备2为智能门锁、手机、电脑、门禁系统等等需要应用人脸识别的设备。所述人脸识别装置20包括电子设备2中用于人脸识别的软件以及硬件装置。
应理解,本申请实施例的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field  Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例的人脸识别还可以包括存储器,存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例还提出了一种计算机可读存储介质,该计算机可读存储介质存储一个或多个程序,该一个或多个程序包括指令,该指令当被包括多个应用程序的便携式电子设备执行时,能够使该便携式电子设备执行图1-20所示实施例的方法。
本申请实施例还提出了一种计算机程序,该计算机程序包括指令,当该计算机程序被计算机执行时,使得计算机可以执行图1-20所示实施例的方法。
本申请实施例还提供了一种芯片,该芯片包括输入输出接口、至少一个处理器、至少一个存储器和总线,该至少一个存储器用于存储指令,该至少一个处理器用于调用该至少一个存储器中的指令,以执行图1-20所示实施例的方法。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应所述理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者所述技术方案的部分可以以软件产品的形式体现出来,所述计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务 器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。

Claims (34)

  1. 一种人脸识别的方法,其特征在于,包括:
    获取第一识别目标的第一目标图像;
    对所述第一目标图像进行处理得到第一频率特征图像;
    基于所述第一频率特征图像确定所述第一识别目标是否为活体人脸,并输出活体判断结果;
    根据所述第一目标图像进行特征模板匹配,并输出匹配结果;
    根据所述活体判断结果和所述匹配结果输出人脸识别结果。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述活体判断结果和所述匹配结果输出人脸识别结果,包括:
    在所述匹配结果为成功时,根据所述活体判断结果输出人脸识别结果;或者,在所述活体判断结果为活体时,根据所述匹配结果输出人脸识别结果;或者,在所述匹配结果为失败或所述活体判断结果为非活体时,输出人脸识别结果。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述第一目标图像进行特征模板匹配,并输出匹配结果,包括:
    基于所述第一目标图像进行人脸检测;
    当人脸检测成功时,基于所述第一目标图像获取第一人脸图像;
    将所述第一人脸图像与预存的多个特征模板进行匹配;
    当所述第一人脸图像与所述多个特征模板中任意一个特征模板匹配成功时,输出匹配结果为成功;或者,
    当所述第一人脸图像与所述多个特征模板匹配失败时,输出匹配结果为失败;
    或者,当人脸检测失败时,输出匹配结果为失败。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一目标图像为二维红外图像。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一频率特征图像包括第一快速傅里叶FFT频谱图和/或第一高频特征图,所述对所述第一目标图像进行处理得到第一频率特征图像,包括:
    对所述第一目标图像进行快速傅里叶变换得到的所述第一FFT频谱图;和/或,
    对所述第一目标图像进行高频特征提取得到所述第一高频特征图。
  6. 根据权利要求5所述的方法,其特征在于,所述对所述第一目标图像进行高频特征提取得到所述第一高频特征图,包括:
    将所述第一目标图像与高频卷积核进行卷积计算得到所述第一高频特征图。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述基于所述第一频率特征图像确定所述第一识别目标是否为活体人脸,包括:
    对所述第一频率特征图像进行缩小得到第一目标频率特征图像,基于所述第一目标频率特征图像确定所述第一识别目标是否为活体人脸。
  8. 根据权利要求7所述的方法,其特征在于,所述基于所述第一目标频率特征图像确定所述第一识别目标是否为活体人脸,包括:
    通过卷积神经网络对所述第一目标频率特征图像进行分类处理,以确定所述第一识别目标是否为活体人脸。
  9. 根据权利要求7或8所述的方法,其特征在于,所述第一频率特征图像包括第一快速傅里叶FFT频谱图和/或第一高频特征图,所述对所述第一频率特征图像进行缩小得到第一目标频率特征图像,包括:
    对所述第一FFT频谱图进行缩小得到第一目标FFT频谱图;和/或
    对所述第一高频特征图进行缩小得到第一目标高频特征图。
  10. 根据权利要求9所述的方法,其特征在于,所述第一目标FFT频谱图和所述第一目标高频特征图的大小相同。
  11. 根据权利要求9或10所述的方法,其特征在于,所述卷积神经网络包括:至少一个卷积层,至少一个激励层以及至少一个全连接层。
  12. 根据权利要求11所述的方法,其特征在于,所述第一目标频率特征图像包括:所述第一目标FFT频谱图或所述第一目标高频特征图;
    所述至少一个卷积层包括:至少一个第一卷积层,所述至少一个激励层包括:至少一个第一激励层,所述至少一个全连接层包括至少一个第一全连接层。
  13. 根据权利要求12所述的方法,其特征在于,所述通过卷积神经网络对所述第一目标频率特征图像进行分类处理,包括:
    通过所述至少一个第一卷积层,对所述第一目标FFT频谱图或所述第一目标高频特征图进行卷积计算得到多个特征图;
    通过所述至少一个第一激励层,对所述多个特征图进行非线性化处理得到多个稀疏特征图;
    通过所述至少一个第一全连接层,对所述多个稀疏特征图进行全连接得到多个特征常数;并采用分类函数对所述多个特征常数进行分类处理。
  14. 根据权利要求12或13所述的方法,其特征在于,所述卷积神经网络包括:一个所述第一卷积层,一个所述第一激励层,以及一个所述第一全连接层。
  15. 根据权利要求11所述的方法,其特征在于,所述第一目标频率特征图像包括:所述第一目标FFT频谱图和所述第一目标高频特征图;
    所述至少一个卷积层包括至少一个第二卷积层,至少一个第三卷积层和至少一个第四卷积层,所述至少一个激励层包括至少一个第二激励层,至少一个第三激励层和至少一个第四激励层,所述至少一个全连接层包括至少一个第二全连接层。
  16. 根据权利要求15所述的方法,其特征在于,所述通过卷积神经网络对所述第一目标频率特征图像进行分类处理,包括:
    通过所述至少一个第二卷积层和所述至少一个第二激励层对所述第一目标FFT频谱图进行处理得到多个稀疏FFT频谱特征图;
    通过所述至少一个第三卷积层和所述至少一个第三激励层对所述第一目标高频特征图进行处理得到多个稀疏高频激励特征图;
    通过所述至少一个第四卷积层和所述至少一个第四激励层对所述多个稀疏FFT频谱特征图和所述多个稀疏高频激励特征图进行处理得到多个稀疏总特征图;
    通过所述至少一个第二全连接层,对所述多个稀疏总特征图进行全连接得到多个特征常数;并采用分类函数对所述多个特征常数进行分类处理。
  17. 根据权利要求15或16所述的方法,其特征在于,所述卷积神经网络包括:一个所述第二卷积层,一个所述第三卷积层、一个所述第四卷积层、一个所述第二激励层、一个所述第三激励层、一个所述第四激励层、以及一个所述第二全连接层。
  18. 根据权利要求11-17中任一项所述的方法,其特征在于,所述至少一个卷积层中的卷积核为3*3的矩阵;和/或,
    所述至少一个激励层中的激励函数为参数化修正线性单元PReLU函数; 和/或,
    所述至少一个全连接层中的分类函数为Sigmoid函数。
  19. 根据权利要求1-18中任一项所述的方法,其特征在于,所述方法还包括:
    获取第二识别目标的第二目标图像;
    对所述第二目标图像进行处理得到第二频率特征图像;
    基于所述第二频率特征图像进行人脸防伪判别,以确定所述第二识别目标是否为活体人脸,其中,人脸防伪判别的结果用于建立人脸特征模板。
  20. 根据权利要求19所述的方法,其特征在于,所述第二目标图像为第二红外图像。
  21. 根据权利要求19或20所述的方法,其特征在于,所述方法还包括:
    基于所述第二目标图像建立所述人脸特征模板。
  22. 根据权利要求21所述的方法,其特征在于,所述方法还包括:
    基于所述第二目标图像进行人脸检测;
    其中,所述基于所述第二目标图像建立人脸特征模板包括:
    在人脸检测成功时,对所述第二目标图像进行人脸图像剪切形成第二人脸图像,基于所述第二人脸图像建立所述人脸特征模板。
  23. 根据权利要求22所述的方法,其特征在于,所述基于所述第二人脸图像建立所述人脸特征模板,包括:
    判断所述第二人脸图像是否属于人脸特征模板库;
    当所述第二人脸图像属于所述人脸特征模板库时,将所述第二人脸图像与所述人脸特征模板库中的多个人脸特征模板进行匹配;
    当所述第二人脸图像不属于所述人脸特征模板库时,基于所述第二频率特征图像进行人脸防伪判别,当确定所述第二识别目标为活体人脸时,将所述第二人脸图像建立为人脸特征模板。
  24. 根据权利要求23所述的方法,其特征在于,所述将所述第二人脸图像与所述人脸特征模板库中的多个人脸特征模板进行匹配,包括:
    当匹配成功时,基于所述第二频率特征图像进行人脸防伪判别;
    当确定所述第二识别目标为活体人脸时,将所述第二人脸图像建立为人脸特征模板。
  25. 根据权利要求24所述的方法,其特征在于,所述当匹配成功时, 基于所述第二频率特征图像进行人脸防伪判别,包括:
    当匹配成功时,获取所述第二识别目标的3D点云数据;
    当所述3D点云数据为有效点云时,基于所述第二频率特征图像进行人脸防伪判别。
  26. 根据权利要求19-25中任一项所述的方法,所述第二频率特征图像包括第二快速傅里叶FFT频谱图和/或第二高频特征图,所述对所述第二目标图像进行处理得到第二频率特征图像,包括:
    对所述第二目标图像进行快速傅里叶FFT变换得到的所述第二FFT频谱图;和/或,
    对所述第二目标图像进行高频特征提取得到所述第二高频特征图。
  27. 根据权利要求26所述的方法,其特征在于,所述对所述第二目标图像进行高频特征提取得到所述第二高频特征图,包括:
    将所述第二目标图像与高频卷积核进行卷积计算得到所述第二高频特征图。
  28. 根据权利要求19-27中任一项所述的方法,其特征在于,所述基于所述第二频率特征图像进行人脸防伪判别包括:
    对所述第二频率特征图像进行缩小得到第二目标频率特征图像,基于所述第二目标频率特征图像进行人脸防伪判别。
  29. 根据权利要求28所述的方法,其特征在于,所述基于所述第二目标频率特征图像进行人脸防伪判别,包括:
    通过卷积神经网络对所述第二目标频率特征图像进行分类处理,以确定所述第二识别目标是否为活体人脸。
  30. 根据权利要求28或29所述的方法,其特征在于,所述第二频率特征图像包括第二快速傅里叶FFT频谱图和/或第二高频特征图,所述对所述第二频率特征图像进行缩小得到第二目标频率特征图像,包括:
    对所述第二FFT频谱图进行缩小得到第二目标FFT频谱图;和/或
    对所述第二高频特征图进行缩小得到第二目标高频特征图。
  31. 根据权利要求30所述的方法,其特征在于,所述第二目标FFT频谱图和所述第二目标高频特征图的大小相同。
  32. 根据权利要求30或31所述的方法,其特征在于,所述通过卷积神经网络对所述第二目标频率特征图像进行分类处理包括:
    通过卷积神经网络对所述第二目标FFT频谱图和/或所述第二目标高频特征图进行分类处理。
  33. 一种人脸识别的装置,其特征在于,包括:处理器;
    所述处理器用于执行:如权利要求1至32中任一项所述的人脸识别的方法。
  34. 一种电子设备,其特征在于,包括:
    如权利要求33所述的人脸识别的装置。
PCT/CN2019/093163 2019-06-27 2019-06-27 一种人脸识别的方法、装置和电子设备 Ceased WO2020258121A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/093163 WO2020258121A1 (zh) 2019-06-27 2019-06-27 一种人脸识别的方法、装置和电子设备
CN201980001106.4A CN110462633B (zh) 2019-06-27 2019-06-27 一种人脸识别的方法、装置和电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/093163 WO2020258121A1 (zh) 2019-06-27 2019-06-27 一种人脸识别的方法、装置和电子设备

Publications (1)

Publication Number Publication Date
WO2020258121A1 true WO2020258121A1 (zh) 2020-12-30

Family

ID=68492782

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093163 Ceased WO2020258121A1 (zh) 2019-06-27 2019-06-27 一种人脸识别的方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN110462633B (zh)
WO (1) WO2020258121A1 (zh)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113053395A (zh) * 2021-03-05 2021-06-29 深圳市声希科技有限公司 发音纠错学习方法、装置、存储介质及电子设备
CN113378715A (zh) * 2021-06-10 2021-09-10 北京华捷艾米科技有限公司 一种基于彩色人脸图像的活体检测方法及相关设备
CN113516089A (zh) * 2021-07-27 2021-10-19 中国平安人寿保险股份有限公司 人脸图像识别方法、装置、设备及可读存储介质
CN113673465A (zh) * 2021-08-27 2021-11-19 中国信息安全测评中心 图像检测方法、装置、设备及可读存储介质
CN114780939A (zh) * 2022-06-21 2022-07-22 北京奥康达体育产业股份有限公司 一种室外健身车登录控制系统
CN115130082A (zh) * 2022-08-26 2022-09-30 中电长城圣非凡信息系统有限公司 一种用于加固计算机的智能感知与安全控制方法
CN115310977A (zh) * 2021-05-06 2022-11-08 腾讯科技(深圳)有限公司 基于支付电子系统的支付方法、系统、设备和存储介质
CN115661725A (zh) * 2022-12-26 2023-01-31 浙江鹏信信息科技股份有限公司 Deepfake视频检测方法、系统及可读存储介质
CN118968188A (zh) * 2024-08-28 2024-11-15 厦门熵基科技有限公司 一种支持多种图像类型的防伪识别系统、方法及相关装置
CN119087145A (zh) * 2024-08-05 2024-12-06 广东电网有限责任公司茂名供电局 局部放电检测方法、装置、电子设备及计算机程序产品

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178137B (zh) * 2019-12-04 2023-05-26 百度在线网络技术(北京)有限公司 检测真实人脸方法、装置、电子设备以及计算机可读存储介质
US11402273B2 (en) * 2020-03-27 2022-08-02 Ecb Consulting Llc Systems and approaches for improving accuracy of temperature measurements using thermal imaging
CN111538968A (zh) * 2020-05-27 2020-08-14 支付宝(杭州)信息技术有限公司 基于隐私保护的身份核验方法、装置及设备
CN111723714B (zh) * 2020-06-10 2023-11-03 上海商汤智能科技有限公司 识别人脸图像真伪的方法、装置及介质
CN112200056B (zh) * 2020-09-30 2023-04-18 汉王科技股份有限公司 人脸活体检测方法、装置、电子设备及存储介质
CN114694264A (zh) * 2020-12-30 2022-07-01 北京眼神智能科技有限公司 人脸静默活体检测方法、装置、可读存储介质及设备
CN112528973A (zh) * 2021-02-08 2021-03-19 上海齐感电子信息科技有限公司 人脸活体识别方法
CN113762060B (zh) * 2021-05-26 2025-07-18 腾讯科技(深圳)有限公司 人脸图像检测方法、装置、可读介质及电子设备
CN114973358B (zh) * 2022-05-07 2025-11-04 哈尔滨工业大学(深圳) 一种基于人脸识别的变电站管理识别方法及系统
CN115439906A (zh) * 2022-08-29 2022-12-06 厦门信息技术应用创新研究院有限公司 一种单模态静默活体检测方法及系统
CN117274860B (zh) * 2023-09-11 2025-11-28 达闼机器人股份有限公司 端云协同的图像处理方法、系统、移动机器人及云端
CN118537791B (zh) * 2024-05-20 2024-12-03 山东业达智慧城市运营科技有限公司 基于人脸识别的智能安防监控系统及方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100158319A1 (en) * 2008-12-22 2010-06-24 Electronics And Telecommunications Research Institute Method and apparatus for fake-face detection using range information
CN101999900A (zh) * 2009-08-28 2011-04-06 南京壹进制信息技术有限公司 一种应用于人脸识别的活体检测方法及系统
CN107247949A (zh) * 2017-08-02 2017-10-13 北京智慧眼科技股份有限公司 基于深度学习的人脸识别方法、装置和电子设备
CN108805024A (zh) * 2018-04-28 2018-11-13 Oppo广东移动通信有限公司 图像处理方法、装置、计算机可读存储介质和电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019050808A1 (en) * 2017-09-08 2019-03-14 Pinscreen, Inc. SCANNING AVATAR FROM A SINGLE IMAGE FOR REAL TIME REALIZATION
CN107818313B (zh) * 2017-11-20 2019-05-14 腾讯科技(深圳)有限公司 活体识别方法、装置和存储介质
CN107958235B (zh) * 2017-12-28 2021-10-26 泰康保险集团股份有限公司 一种人脸图像检测方法、装置、介质和电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100158319A1 (en) * 2008-12-22 2010-06-24 Electronics And Telecommunications Research Institute Method and apparatus for fake-face detection using range information
CN101999900A (zh) * 2009-08-28 2011-04-06 南京壹进制信息技术有限公司 一种应用于人脸识别的活体检测方法及系统
CN107247949A (zh) * 2017-08-02 2017-10-13 北京智慧眼科技股份有限公司 基于深度学习的人脸识别方法、装置和电子设备
CN108805024A (zh) * 2018-04-28 2018-11-13 Oppo广东移动通信有限公司 图像处理方法、装置、计算机可读存储介质和电子设备

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113053395B (zh) * 2021-03-05 2023-11-17 深圳市声希科技有限公司 发音纠错学习方法、装置、存储介质及电子设备
CN113053395A (zh) * 2021-03-05 2021-06-29 深圳市声希科技有限公司 发音纠错学习方法、装置、存储介质及电子设备
CN115310977A (zh) * 2021-05-06 2022-11-08 腾讯科技(深圳)有限公司 基于支付电子系统的支付方法、系统、设备和存储介质
CN113378715A (zh) * 2021-06-10 2021-09-10 北京华捷艾米科技有限公司 一种基于彩色人脸图像的活体检测方法及相关设备
CN113378715B (zh) * 2021-06-10 2024-01-05 北京华捷艾米科技有限公司 一种基于彩色人脸图像的活体检测方法及相关设备
CN113516089A (zh) * 2021-07-27 2021-10-19 中国平安人寿保险股份有限公司 人脸图像识别方法、装置、设备及可读存储介质
CN113516089B (zh) * 2021-07-27 2024-04-12 中国平安人寿保险股份有限公司 人脸图像识别方法、装置、设备及可读存储介质
CN113673465A (zh) * 2021-08-27 2021-11-19 中国信息安全测评中心 图像检测方法、装置、设备及可读存储介质
CN114780939A (zh) * 2022-06-21 2022-07-22 北京奥康达体育产业股份有限公司 一种室外健身车登录控制系统
CN114780939B (zh) * 2022-06-21 2022-09-13 北京奥康达体育产业股份有限公司 一种室外健身车登录控制系统
CN115130082A (zh) * 2022-08-26 2022-09-30 中电长城圣非凡信息系统有限公司 一种用于加固计算机的智能感知与安全控制方法
CN115130082B (zh) * 2022-08-26 2022-11-04 中电长城圣非凡信息系统有限公司 一种用于加固计算机的智能感知与安全控制方法
CN115661725A (zh) * 2022-12-26 2023-01-31 浙江鹏信信息科技股份有限公司 Deepfake视频检测方法、系统及可读存储介质
CN119087145A (zh) * 2024-08-05 2024-12-06 广东电网有限责任公司茂名供电局 局部放电检测方法、装置、电子设备及计算机程序产品
CN118968188A (zh) * 2024-08-28 2024-11-15 厦门熵基科技有限公司 一种支持多种图像类型的防伪识别系统、方法及相关装置

Also Published As

Publication number Publication date
CN110462633A (zh) 2019-11-15
CN110462633B (zh) 2023-05-26

Similar Documents

Publication Publication Date Title
CN110462633B (zh) 一种人脸识别的方法、装置和电子设备
CN110383288B (zh) 人脸识别的方法、装置和电子设备
WO2020258120A1 (zh) 人脸识别的方法、装置和电子设备
US11625954B2 (en) Method and apparatus with liveness testing
US11869255B2 (en) Anti-counterfeiting face detection method, device and multi-lens camera
CN112232155B (zh) 非接触指纹识别的方法、装置、终端及存储介质
WO2020258119A1 (zh) 人脸识别的方法、装置和电子设备
CN110008813B (zh) 基于活体检测技术的人脸识别方法和系统
US12272173B2 (en) Method and apparatus with liveness test and/or biometric authentication
EP2883190B1 (en) Texture features for biometric authentication
CN110705392A (zh) 一种人脸图像检测方法及装置、存储介质
CN105335722A (zh) 一种基于深度图像信息的检测系统及方法
KR20170050465A (ko) 얼굴 인식 장치 및 방법
CN112016525A (zh) 非接触式指纹采集方法和装置
CN110383289A (zh) 人脸识别的装置、方法和电子设备
CN112232163B (zh) 指纹采集方法及装置、指纹比对方法及装置、设备
WO2020243968A1 (zh) 人脸识别的装置、方法和电子设备
CN107169479A (zh) 基于指纹验证的智能移动设备敏感数据防护方法
WO2022068931A1 (zh) 非接触指纹识别方法、装置、终端及存储介质
CN110287918A (zh) 活体识别方法及相关产品
CN111339897A (zh) 活体识别方法、装置、计算机设备和存储介质
CN112232159A (zh) 指纹识别的方法、装置、终端及存储介质
KR101174103B1 (ko) 근골격 구조에 기초한 수학적 패턴 분석의 얼굴인식 방법
Raza et al. MMGANGUARD: a robust approach for detecting fake images generated by GANS using multi-model techniques
CN112232152A (zh) 非接触式指纹识别方法、装置、终端和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19934687

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19934687

Country of ref document: EP

Kind code of ref document: A1