WO2020199475A1 - 人脸识别方法、装置、计算机设备及存储介质 - Google Patents
人脸识别方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2020199475A1 WO2020199475A1 PCT/CN2019/103136 CN2019103136W WO2020199475A1 WO 2020199475 A1 WO2020199475 A1 WO 2020199475A1 CN 2019103136 W CN2019103136 W CN 2019103136W WO 2020199475 A1 WO2020199475 A1 WO 2020199475A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- local binary
- binary mode
- histogram
- data set
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/467—Encoded features or binary features, e.g. local binary patterns [LBP]
Definitions
- This application relates to the field of face recognition technology, and in particular to a face recognition method, device, computer equipment and storage medium.
- face recognition technology is also constantly improving. For example, when making “face-swiping” online payment, it is necessary to recognize the face.
- the current face recognition technology can only identify the identity of the face image, and cannot accurately distinguish the authenticity of the input face. This makes face recognition present serious security risks, such as attackers may use photos and change faces.
- Masks, masks, electronic screens and other means to forge the faces of legitimate users to make illegal payments which will bring economic losses to legitimate users, and is not conducive to creating a safe payment environment.
- This application provides a face recognition method, device, computer equipment and storage medium to prevent spoofing attacks in face recognition and improve the security of user information.
- this application provides a face recognition method, which includes:
- the present application also provides a face recognition device, which includes:
- the image acquisition unit is used to acquire the image to be detected
- An image conversion unit configured to perform color space conversion on the image to be detected to obtain a target image corresponding to the image to be detected in a preset color space
- An image processing unit configured to extract a local binary mode feature value of the target image, and perform histogram statistics according to the local binary mode feature value to obtain a local binary mode histogram
- the classification detection unit is used to input the obtained local binary mode histogram into a pre-trained classification model for classification detection to obtain a classification result;
- the face recognition unit is used to perform face image recognition according to the classification result.
- the present application also provides a computer device, the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and execute the The computer program implements the above-mentioned face recognition method.
- the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor realizes the aforementioned face recognition method.
- This application discloses a face recognition method, device, equipment and storage medium, which obtain a target image in a preset color space by performing color space conversion on an acquired image to be detected; extracting a local binary pattern of the target image Feature value, performing histogram statistics according to the feature value of the local binary mode to obtain a local binary mode histogram; inputting the obtained local binary mode histogram into a pre-trained classification model for classification detection to obtain a classification result; Perform face image recognition according to the classification result.
- This method can improve the efficiency and accuracy of face recognition and prevent face recognition spoofing attacks.
- FIG. 1 is a schematic flowchart of a face recognition method provided by an embodiment of the present application
- FIG. 2 is a schematic flowchart of sub-steps of the face recognition method in FIG. 1;
- FIG. 3 is a schematic diagram of the effect of a face recognition method provided by an embodiment of the present application.
- FIG. 4 is a schematic flowchart of a face recognition method provided by an embodiment of the present application.
- FIG. 5 is a schematic block diagram of a face recognition device provided by an embodiment of the application.
- FIG. 6 is a schematic block diagram of another face recognition apparatus provided by an embodiment of the application.
- FIG. 7 is a schematic block diagram of the structure of a computer device provided by an embodiment of the application.
- the embodiments of the present application provide a face recognition method, face recognition device, computer equipment, and storage medium.
- the face recognition method can be applied to a terminal or a server to accurately identify the user's face verification information, prevent spoofing attacks in face recognition, and thereby improve the security of user information.
- the face recognition method can be used for unlock recognition, payment recognition, or information verification of mobile terminals, and can also be used for unlock recognition in access control, and of course can also be applied to other similar fields.
- the server can be an independent server or a server cluster.
- the terminal can be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
- FIG. 1 is a schematic flowchart of a face recognition method provided by an embodiment of the present application. As shown in Fig. 1, the face recognition method specifically includes steps S101 to S105.
- the image to be detected is an image used for face recognition, specifically an image that is collected in real time for face recognition, such as collecting a user's face image through the camera of a mobile phone, and performing face recognition on the image to be detected to achieve A certain function, such as unlocking the phone, opening an application, or making online payments.
- the collected image to be detected is an image in RGB space, of course, it can also be an image in other formats.
- S102 Perform color space conversion on the image to be detected to obtain a target image corresponding to the image to be detected in a preset color space.
- the preset color space includes HSV color space or YCbCr color space
- performing color space conversion refers to converting an image to be detected into an image in HSV color space or an image in YCbCr color space.
- the color space conversion of the image to be detected is performed by the conversion algorithm of the preset color space to obtain the target image of the preset color space (HSV or YCbCr color space).
- the conversion algorithm can be called for conversion, and of course, the corresponding image processing tool (MATLAB, PS, etc.) can also be used for color space conversion.
- the color parameters in the HSV space model are: H represents hue, S represents saturation, and V represents lightness.
- YCrCb, or YUV is mainly used to optimize the transmission of color video signals.
- Y represents the brightness (Luminance or Luma), which is the grayscale value; and
- U and “V” represent the chromaticity and density (Chrominance or Chroma) respectively, which are used to describe the color and saturation of the image.
- “Brightness” is established through the RGB input signal, which superimposes specific parts of the RGB signal together.
- Chroma defines two aspects of color-hue and saturation, which are represented by Cr and Cb respectively.
- Cr reflects the difference between the red part of the RGB input signal and the brightness value of the RGB signal.
- Cb reflects the difference between the blue part of the RGB input signal and the brightness value of the RGB signal.
- images are based on RGB space, but because the skin color of the face in RGB space is greatly affected by brightness, it is difficult to separate skin color points from non-skin color points, that is to say, after processing in RGB space, skin color points It is a discrete point with many non-skin color points embedded in the middle, which brings difficulties to the calibration of the skin color area (face calibration, eye calibration, etc.).
- the image in the RGB space is converted to the image in the HSV color space or YCrCb color space, so the effect of brightness can be ignored, because the effect of the brightness in the HSV space or YCrCb space is small, and the skin color will be very good. ⁇ class gathering.
- the three-dimensional YCrCb space can be reduced to two-dimensional CrCb, and the skin color points will form a certain shape. For example, if you have a human face, you will see an area of a human face. If you have an arm, you will see the shape of an arm. Recognition is very good.
- the point can be regarded as a skin color point, otherwise, the point is regarded as a non-skin color point. Therefore, the color space conversion of the image to be detected can easily remove the effect of skin color.
- the local binary pattern (Local Binary Pattern, LBP) algorithm is used to extract the local binary pattern feature value of the target image, and then histogram statistics are performed according to the local binary pattern feature value to obtain the local binary pattern Histogram.
- LBP Local Binary Pattern
- the image to be detected is converted from the RGB space to the image in the HSV color space or the target image in the YCrCb color space, and the skin color points in the image in the HSV color space or the target image in the YCrCb color space are extracted.
- the local binary mode feature value of the skin color point of the target image This can speed up face recognition.
- YCrCb space first determine that the pixel corresponding to the CrCb value in the preset CrCb range in the image to be detected is the skin color point, and then quickly extract the corresponding local binary pattern (Local Binary Pattern, LBP) feature value, and construct an N-point LBP histogram based on the LBP feature value, where N is 64/128 or 256.
- LBP Local Binary Pattern
- step S103 specifically includes the following content:
- S103a Extract the local binary mode feature values corresponding to multiple channels in the preset color space of the target image; S103b, perform histogram statistics on the local binary mode feature values of each channel to obtain the channel local binary mode Histogram; S103c. Combine a plurality of the channel local binary mode histograms to generate a local binary mode histogram.
- the converted target image includes multi-channel images.
- the target image converted into YCbCr color space will include three channel images, namely Y image, Cb image, and Cr image, so that the target can be extracted
- S104 Input the obtained local binary mode histogram into a pre-trained classification model for classification detection to obtain a classification result.
- the classification model includes a support vector machine two classifier (Support Vector Machine, SVM).
- SVM Support Vector Machine
- a deep learning model can also be used as a classifier.
- a convolutional neural network is used for model training to obtain a classification function.
- the neural network model is used as the classification model.
- the LBP histogram obtained in the above steps is input into a pre-trained classification model for classification recognition to obtain a classification result, and the classification result is a binary classification result.
- the classification result is a binary classification result.
- the output of the SVM is Real, it means that the image to be detected corresponds to a live image; if the output of the SVM is Fake, it means that the image to be detected corresponds to a non-living image, which may be a printing attack or Video attack.
- the classification result is a living body image
- image recognition is performed on the face image in the image to be detected; if the classification result is a non-living body image, the verification failure information is output, for example, the face verification failed.
- performing image recognition on the face image in the image to be detected includes: determining the face image in the target image; and comparing the face image with pre-collected facial features for recognition.
- the face recognition method disclosed in the above embodiment obtains a target image in a preset color space (HSV or YCbCr color space) by performing color space conversion on the image to be detected; extracts the local binary mode feature value of the target image, and compares the LBP feature Value histogram statistics to get the LBP histogram; input the obtained LBP histogram into the pre-trained classification model (SVM two classifier) for classification detection to obtain the classification result; according to the classification result output by the classification model, perform the face image Identify it.
- This method can effectively prevent spoofing attacks in face recognition, thereby improving the security of user information.
- FIG. 4 is a schematic flowchart of another face recognition method provided by an embodiment of the present application. As shown in FIG. 4, the face recognition method specifically includes steps S201 to S206.
- the image to be detected is an image used for face recognition, specifically an image that is collected in real time for face recognition, for example, a user's face image is collected through the camera of a mobile phone.
- the image to be detected is an image in RGB space. .
- S202 Perform color space conversion on the image to be detected to obtain a target image corresponding to the image to be detected in a preset color space.
- the preset color space includes HSV color space or YCbCr color space
- performing color space conversion refers to converting an image to be detected into an image in HSV color space or an image in YCbCr color space.
- S203 Extract a local binary mode feature value of the target image, and perform histogram statistics according to the local binary mode feature value to obtain a local binary mode histogram.
- S204 Calculate the chi-square distance between the target image and the image in a preset data set according to the local binary mode histogram, where the preset data set includes a living body data set and a non-living body data set.
- step S204 includes the following content: calculating the chi-square distance between the target image and the image in the preset data set according to the local binary mode histogram and using a preset chi-square distance formula.
- d(H x , H r , H f ) is the chi-square distance between the target image and the image in the preset data set; H x is the local binary mode feature value of the target image, H r and H f are the average chi-square distance of the live data set and the non-live data set, respectively.
- the method before calculating the chi-square distance between the target image and the image in the preset data set according to the LBP histogram, the method further includes: establishing a preset data set, the preset data set including living body data set and non-living body data set.
- non-living data set create a data set with only non-living face images (ie, non-living data set), and then calculate the LBP algorithm between each non-living face image and other non-living face images according to the chi-square distance calculation formula Then the chi-square distance of the histogram, and take the average distance of these chi-square distances as the distance threshold of the non-living data set.
- the live data set and the non-live data set can also be used to train the SVM two-classifier, which is used to classify and recognize the input image to identify whether it is a live image or a non-living image.
- H x (i) is the LBP feature value of the LBP histogram of the target image at point i
- H y (i) is the LBP feature value of the LBP histogram of the image in the living data set or non-living data set at point i
- N the number of points N of the LBP histogram
- d ⁇ (H x ,H y ) is the chi-square distance between two face images, which is used to represent the difference between two face images Similarity.
- the chi-square distance value of the live photo and the non-live photo can be obtained by using the preset data set, which is smaller than the value of the two live photos, so the accuracy of recognition can be improved.
- the color space can be converted and the LBP histogram and the chi-square distance corresponding to the multi-channel histogram can be used for identification and detection, which will have better robustness.
- the classification model includes a support vector machine two classifier (Support Vector Machine, SVM).
- SVM Support Vector Machine
- a deep learning model can also be used as a classifier.
- a convolutional neural network is used for model training to obtain a classification function.
- the neural network model is used as the classification model.
- the LBP histogram and chi-square distance obtained in the above steps are input into a pre-trained classification model for classification and recognition to obtain a classification result, which is a binary classification result.
- a classification result which is a binary classification result.
- the output of the SVM is real, it means that the image to be detected corresponds to a live image; if the output of the SVM is Fake, it means that the image to be detected corresponds to a non-living image, which may be a printing attack or Video attack.
- performing image recognition on the face image in the image to be detected includes: determining the face image in the target image; and comparing the face image with pre-collected facial features for recognition.
- the face recognition method disclosed in the above embodiment obtains a target image in a preset color space (HSV or YCbCr color space) by performing color space conversion on the image to be detected; extracts the local binary mode feature value of the target image, and compares the LBP feature Perform histogram statistics on the values to get the LBP histogram, and then calculate the chi-square distance between the histogram and the preset data set; input the obtained LBP histogram and chi-square distance into the pre-trained classification model (SVM two classifier) at the same time Perform classification detection to obtain classification results; perform facial image recognition according to the classification results output by the classification model.
- This method can effectively prevent spoofing attacks in face recognition through LBP histogram and chi-square distance, thereby improving the security of user information.
- FIG. 5 is a schematic block diagram of a face recognition device provided by an embodiment of the present application.
- the face recognition device may be configured in a terminal or a server to execute the aforementioned face recognition method.
- the face recognition device 400 includes: an image acquisition unit 401, an image conversion unit 402, an image processing unit 403, a classification detection unit 404, and a face recognition unit 405.
- the image acquisition unit 401 is used to acquire an image to be detected.
- the image conversion unit 402 is configured to perform color space conversion on the image to be detected to obtain a target image corresponding to the image to be detected in a preset color space.
- the image processing unit 403 is configured to extract a local binary mode feature value of the target image, and perform histogram statistics according to the local binary mode feature value to obtain a local binary mode histogram.
- the image processing unit 403 includes a feature value extraction subunit 4031, a histogram statistics subunit 4032, and a histogram merging subunit 4033.
- the feature value extraction subunit 4031 is configured to extract feature values of the local binary mode corresponding to multiple channels of the target image in the preset color space.
- the histogram statistics subunit 4032 is used to perform histogram statistics on the local binary mode feature value of each channel to obtain the channel local binary mode histogram.
- the histogram merging subunit 4033 is configured to merge a plurality of the channel local binary mode histograms to generate a local binary mode histogram.
- the classification detection unit 404 is configured to input the obtained local binary mode histogram into a pre-trained classification model for classification detection to obtain a classification result.
- the face recognition unit 405 is configured to perform face image recognition according to the classification result.
- FIG. 6 is a schematic block diagram of another face recognition device provided by an embodiment of the present application, and the face recognition device is used to execute the aforementioned face recognition method.
- the face recognition device can be configured in a server or a terminal.
- the face recognition device 500 includes:
- the image acquisition unit 501 is used to acquire an image to be detected.
- the image conversion unit 502 is configured to perform color space conversion on the image to be detected to obtain a target image corresponding to the image to be detected in a preset color space.
- the image processing unit 503 is configured to extract a local binary mode feature value of the target image, and perform histogram statistics according to the local binary mode feature value to obtain a local binary mode histogram.
- the distance calculation unit 504 is configured to calculate the chi-square distance between the target image and the image in a preset data set according to the local binary mode histogram.
- the preset data set includes a living body data set and a non-living body data set.
- the classification detection unit 505 is configured to input the obtained local binary mode histogram into a pre-trained classification model for classification detection to obtain a classification result.
- the face recognition unit 506 is configured to perform face image recognition according to the classification result.
- the above-mentioned apparatus may be implemented in the form of a computer program, and the computer program may run on the computer device as shown in FIG. 7.
- FIG. 7 is a schematic block diagram of the structure of a computer device provided by an embodiment of the present application.
- the computer equipment can be a server or a terminal.
- the computer device includes a processor, a memory, and a network interface connected through a system bus, where the memory may include a non-volatile storage medium and an internal memory.
- the non-volatile storage medium can store an operating system and a computer program.
- the computer program includes program instructions, and when the program instructions are executed, the processor can execute any face recognition method.
- the processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
- the internal memory provides an environment for the operation of the computer program in the non-volatile storage medium.
- the processor can execute any face recognition method.
- the network interface is used for network communication, such as sending assigned tasks.
- the network interface is used for network communication, such as sending assigned tasks.
- FIG. 7 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
- the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), and application specific integrated circuits (Application Specific Integrated Circuits). Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
- the processor is used to run a computer program stored in a memory to implement the following steps:
- the processor when the processor implements the extraction of the local binary mode feature value of the target image, and performs histogram statistics according to the local binary mode feature value to obtain a local binary mode histogram, Used to achieve:
- the processor is also used to implement the input of the obtained local binary mode histogram into the pre-trained classification model for classification detection to obtain the classification result:
- the preset data set including a living body data set and a non-living body data set.
- the processor implements the input of the obtained local binary mode histogram into the pre-trained classification model for classification detection to obtain the classification result, it is used to implement:
- the local binary mode histogram and the chi-square distance are input to a pre-trained classification model for classification detection to obtain a classification result.
- the processor when the processor implements the calculation of the chi-square distance between the target image and the image in a preset data set according to the local binary mode histogram, the processor is configured to implement:
- d(H x , H r , H f ) is the chi-square distance between the target image and the image in the preset data set;
- H x is the feature value of the local binary mode of the target image, H r and H f respectively Is the average chi-square distance between the live data set and the non-live data set.
- the processor when the processor implements the face image recognition according to the classification result, it is configured to implement:
- the classification result is a living body image
- the processor when the processor implements the image recognition of the face image in the image to be detected, it is configured to implement:
- the preset color space includes HSV color space or YCbCr color space; and the classification model includes a support vector machine two classifier.
- the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application Any face recognition method provided by the embodiment.
- the computer-readable storage medium may be the internal storage unit of the computer device described in the foregoing embodiment, such as the hard disk or memory of the computer device.
- the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMC), or a secure digital (Secure Digital, SD) equipped on the computer device. ) Card, Flash Card, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
Abstract
一种人脸识别方法、装置、计算机设备及存储介质,该方法包括:获取待检测图像;对待检测图像进行颜色空间转换得到目标图像;提取目标图像的局部二值模式特征值,根据局部二值模式特征值进行直方图统计以得到局部二值模式直方图;将局部二值模式直方图输入至预设的分类模型进行检测以得到分类结果并进行人脸图像识别。
Description
本申请要求于2019年4月3日提交中国专利局、申请号为201910268066.1、发明名称为“人脸识别方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及人脸识别技术领域,尤其涉及一种人脸识别方法、装置、计算机设备及存储介质。
目前,随着线上支付的不断普及,人脸识别技术也在不断进步,比如在进行“刷脸”线上支付时,就需要对人脸进行识别。但是,目前的人脸识别技术只能识别人脸图像的身份,无法准确辨别所输入人脸的真伪,这就使得人脸识别存在着严重的安全隐患,比如攻击者可能采用照片、换脸、面具、遮挡、电子屏等手段来伪造合法用户人脸进行非法支付,这样就给合法用户带来经济损失,同时也不利于营造安全的支付环境。
发明内容
本申请提供了一种人脸识别方法、装置、计算机设备及存储介质,以防止人脸识别中欺骗攻击,提高用户信息的安全性。
第一方面,本申请提供了一种人脸识别方法,所述方法包括:
获取待检测图像;
对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像;
提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;
将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;
根据所述分类结果进行人脸图像识别。
第二方面,本申请还提供了一种人脸识别装置,所述装置包括:
图像获取单元,用于获取待检测图像;
图像转换单元,用于对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像;
图像处理单元,用于提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;
分类检测单元,用于将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;
人脸识别单元,用于根据所述分类结果进行人脸图像识别。
第三方面,本申请还提供了一种计算机设备,所述计算机设备包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如上述的人脸识别方法。
第四方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上述的人脸识别方法。
本申请公开了一种人脸识别方法、装置、设备及存储介质,通过对获取的待检测图像进行颜色空间转换以获得预设颜色空间中的目标图像;提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;根据所述分类结果进行人脸图像识别。该方法可以提高人脸识别的效率和准确度,防止人脸识别欺骗攻击。
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请的实施例提供的一种人脸识别方法的示意流程图;
图2是图1中的人脸识别方法的子步骤示意流程图;
图3是本申请的实施例提供的一种人脸识别方法的效果示意图;
图4是本申请的实施例提供的一种人脸识别方法的示意流程图;
图5为本申请的实施例提供的一种人脸识别装置的示意性框图;
图6为本申请的实施例提供的另一种人脸识别装置的示意性框图;
图7为本申请的实施例提供的一种计算机设备的结构示意性框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
本申请的实施例提供了一种人脸识别方法、人脸识别装置、计算机设备及存储介质。其中,该人脸识别方法可以应用于终端或服务器中,以准确地识别用户的人脸验证信息,防止人脸识别中欺骗攻击,进而提高了用户信息的安全性。
比如,人脸识别方法可用于移动终端的解锁识别、支付识别或者信息验证等,还可以应用于门禁中的解锁识别,当然还可以应用其他类似的领域。
其中,服务器可以为独立的服务器,也可以为服务器集群。该终端可以是手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等电子设备。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
请参阅图1,图1是本申请的实施例提供的一种人脸识别方法的示意流程图。如图1所示,该人脸识别方法具体包括步骤S101至S105。
S101、获取待检测图像。
其中,待检测图像为用于人脸识别的图像,具体为实时采集的用于人脸识别的图像,比如通过手机的摄像头采集用户的人脸图像,对该待检测图像进行人脸识别以实现某种功能,比如用于解锁手机、开启某个应用或进行线上支付 等。其中,采集的待检测图像为RGB空间的图像,当然也可以为其他格式的图像。
S102、对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像。
在本实施例中,预设颜色空间包括HSV颜色空间或YCbCr颜色空间,进行颜色空间转换是指将待检测图像转换成HSV颜色空间的图像或者YCbCr颜色空间的图像。
具体地,通过预设颜色空间的转换算法对待检测图像进行颜色空间转换以获得预设颜色空间(HSV或YCbCr颜色空间)的目标图像。比如,待检测图像为RGB空间的图像,利用RGB-HSV的转换算法将待检测图像进行颜色空间转换以获得HSV颜色空间的目标图像。具体可以调用转换函数进行转换,当然也可以使用相应的图像处理工具(MATLAB、PS等)进行颜色空间转换。
其中,HSV空间的模型中颜色的参数分别是:H表示色调,S表示饱和度,V表示明度。而YCrCb即YUV,主要用于优化彩色视频信号的传输。其中“Y”表示明亮度(Luminance或Luma),也就是灰阶值;而“U”和“V”分别表示色度和浓度(Chrominance或Chroma),作用是描述影像色彩及饱和度,用于指定像素的颜色。“明亮度”是透过RGB输入信号来建立的,是将RGB信号的特定部分叠加到一起。“色度”则定义了颜色的两个方面─色调与饱和度,分别用Cr和Cb来表示。其中,Cr反映了RGB输入信号红色部分与RGB信号亮度值之间的差异。而Cb反映的是RGB输入信号蓝色部分与RGB信号亮度值之间的差异。
一般图像都是基于RGB空间的,但是由于在RGB空间里人脸的肤色受亮度影响相当大,所以肤色点很难从非肤色点中分离出来,也就是说在RGB空间经过处理后,肤色点是离散的点,中间嵌有很多非肤色点,这为肤色区域的标定(人脸的标定、眼睛的标定等)带来了难题。
在本实施例中,是将RGB空间的图像转为HSV颜色空间或者YCrCb颜色空间的图像,由此可以忽略亮度的影响,因为在HSV空间或YCrCb空间受亮度影响很小,肤色会产生很好的类聚。这样就可以把三维的YCrCb空间降为二维的CrCb,肤色点会形成一定得形状,如:人脸的话会看到一个人脸的区域,手臂的话会看到一条手臂的形态,对处理模式识别很有好处,若某点的CrCb值满足: 133≤Cr≤173,77≤Cb≤127,那么该点可以被认为是肤色点,否则,该点被认为是非肤色点。由此对所述待检测图像进行颜色空间转换,很容易去除肤色的影响。
S103、提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图。
具体地,利用局部二值模式(Local Binary Pattern,LBP)的算法提取所述目标图像的局部二值模式特征值,再根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图。
在一个实施例中,将待检测图像从RGB空间转换成HSV颜色空间的图像或者YCrCb颜色空间的目标图像,在确定在HSV颜色空间的图像或者YCrCb颜色空间中的目标图像中的肤色点,提取所述目标图像的肤色点的局部二值模式特征值。由此可以加快人脸识别的速度。
以YCrCb空间为例,先确定该待检测图像中位于预设CrCb范围内的CrCb值对应的像素点为肤色点,然后从YCrCb空间的图像中快速提取相应的局部二值模式(Local Binary Pattern,LBP)特征值,并根据该LBP特征值构建N点的LBP直方图,N为64/128或256等。
在一个实施例中,为了提高人脸识别的精度,如图2所示,步骤S103具体包括以下内容:
S103a、提取所述目标图像在所述预设颜色空间中多通道对应的局部二值模式特征值;S103b、对每个通道的局部二值模式特征值进行直方图统计以得到通道局部二值模式直方图;S103c、将多个所述通道局部二值模式直方图合并以生成局部二值模式直方图。
具体地,如图3所示,转换的目标图像包括多通道图像,比如转换成YCbCr颜色空间的目标图像会包括三个通道图像,分别为Y图像、Cb图像和Cr图像,由此可提取目标图像的三个通道图像(Y、Cb、Cr)对应的LBP特征值,并对多通道的LBP特征值进行直方图统计以得到多个通道LBP直方图;并将该三个通道LBP直方图进行结合以得到LBP直方图。在对颜色空间进行转换后并利用多通道做LBP直方图,会有更好的鲁棒性,在RGB色彩空间是很难区分的,但是如果转换到HSV或者YCbCr色彩空间上来看的,其纹理有着明显的差异,由此可以提高识别的在准确度。
S104、将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果。
在本实施例中,所述分类模型包括支持向量机二分类器(Support Vector Machine,SVM),当然也可以使用深度学习模型作为分类器,比如采用卷积神经网络进行模型训练,得到具有分类功能的神经网络模型作为分类模型。
具体地,是将上述步骤得到的LBP直方图输入至预先训练好的分类模型中进行分类识别以得到分类结果,该分类结果为二分类结果。比如,如图3所示,如果SVM输出的是Real,则表示待检测图像对应的为活体图像;如果SVM输出的是Fake,则表示待检测图像对应的为非活体图像,可能是打印攻击或视频攻击。
S105、根据所述分类结果进行人脸图像识别。
具体地,若所述分类结果为活体图像,对所述待检测图像中的人脸图像进行图像识别;若所述分类结果为非活体图像,输出验证失败信息,比如人脸验证未通过。
其中,对所述待检测图像中的人脸图像进行图像识别,包括:确定所述目标图像中的人脸图像;以及将所述人脸图像与预先采集的人脸特征进行比对识别。当然也可以对转换后的颜色空间的目标图像进行人脸特征比对识别,以得到识别结果,比如识别成功或识别失败,进而提高了人脸识别的准确度和速度,同时保证人脸识别的实时性。
上述实施例公开的人脸识别方法,通过对待检测图像进行颜色空间转换以获得预设颜色空间(HSV或YCbCr颜色空间)的目标图像;提取目标图像的局部二值模式特征值,并对LBP特征值进行直方图统计以得到LBP直方图;将得到的LBP直方图输入至预先训练好的分类模型(SVM二分类器)进行分类检测以得到分类结果;根据分类模型输出的分类结果进行人脸图像进行识别。该方法可以有效地防止人脸识别中欺骗攻击,进而提高用户信息的安全性。
请参阅图4,图4是本申请的实施例提供的另一种人脸识别方法的示意流程图。如图4所示,该人脸识别方法具体包括步骤S201至S206。
S201、获取待检测图像。
其中,待检测图像为用于人脸识别的图像,具体为实时采集的用于人脸识别的图像,比如通过手机的摄像头采集用户的人脸图像,一般采集的待检测图 像为RGB空间的图像。
S202、对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像。
其中,预设颜色空间包括HSV颜色空间或YCbCr颜色空间,进行颜色空间转换是指将待检测图像转换成HSV颜色空间的图像或者YCbCr颜色空间的图像。
S203、提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图。
S204、根据所述局部二值模式直方图计算所述目标图像与预设数据集中图像的卡方距离,所述预设数据集包括活体数据集和非活体数据集。
具体地,步骤S204包括以下内容:根据局部二值模式直方图,利用预设卡方距离公式计算目标图像与预设数据集中图像的卡方距离。
其中,所述预设卡方距离公式为:
d(H
x,H
r,H
f)=d
γ(H
x,H
r)-d
γ(H
x,H
f) (1)
在公式1至3中,d(H
x,H
r,H
f)为所述目标图像与预设数据集中图像的卡方距离;H
x为所述目标图像的局部二值模式特征值,H
r和H
f分别为活体数据集和非活体数据集的平均卡方距离。
在一个实施例中,在所述根据LBP直方图计算目标图像与预设数据集中图像的卡方距离之前,还包括:建立预设数据集,该预设数据集包括活体数据集和非活体数据集。
首先,建立一个只有真实活体人脸图像的数据集(即活体数据集),然后卡方距离计算公式计算每张活体人脸图像和其他活体人脸图像之间的经过LBP算法之后的直方图的卡方距离,然后取这些卡方距离的平均距离作为活体数据集的距离阈值。
然后,再建立一个只有非活体人脸图像的数据集(即非活体数据集),然后根据卡方距离计算公式计算每张非活体人脸图像和其他非活体人脸图像之间的经过LBP算法之后直方图的卡方距离,并取这些卡方距离的平均距离作为非 活体数据集的距离阈值。同时活体数据集和非活体数据集还可用于训练SVM二分类器,用于对输入图像进行分类识别,以识别出是活体图像还是非活体图像。
其中,该卡方距离计算公式具体表示为:
其中H
x(i)为目标图像的LBP直方图在点i上的LBP特征值,H
y(i)为活体数据集或非活体数据集中图像的LBP直方图在点i上的LBP特征值;通常LBP直方图的点数N取64或者128,最多取到256;d
γ(H
x,H
y)为两张人脸图像之间的卡方距离,用来表示两张人脸图像之间的相似度。
其中,利用预设数据集可得到活体照片与非活体照片的卡方距离值相较于两张活体照片的值来说要小一些,因此可以提高识别的准确度。
在一个实施例中,可对颜色空间进行转换并利用多通道做LBP直方图以及该多通道的直方图对应的卡方距离进行识别检测,会有更好的鲁棒性。
S205、将所述局部二值模式直方图和卡方距离输入至预先训练好的分类模型进行分类检测以得到分类结果。
在本实施例中,所述分类模型包括支持向量机二分类器(Support Vector Machine,SVM),当然也可以使用深度学习模型作为分类器,比如采用卷积神经网络进行模型训练,得到具有分类功能的神经网络模型作为分类模型。
具体地,是将上述步骤得到的LBP直方图和卡方距离输入至预先训练好的分类模型中进行分类识别以得到分类结果,该分类结果为二分类结果。比如,如图3所示,如果SVM输出的是real,则表示待检测图像对应的为活体图像;如果SVM输出的是Fake,则表示待检测图像对应的为非活体图像,可能是打印攻击或视频攻击。
S206、根据所述分类结果进行人脸图像识别。
其中,对所述待检测图像中的人脸图像进行图像识别,包括:确定所述目标图像中的人脸图像;以及将所述人脸图像与预先采集的人脸特征进行比对识别。
上述实施例公开的人脸识别方法,通过对待检测图像进行颜色空间转换以获得预设颜色空间(HSV或YCbCr颜色空间)的目标图像;提取目标图像的局部二值模式特征值,并对LBP特征值进行直方图统计以得到LBP直方图,再计算 直方图与预设数据集的卡方距离;将得到的LBP直方图和卡方距离同时输入至预先训练好的分类模型(SVM二分类器)进行分类检测以得到分类结果;根据分类模型输出的分类结果进行人脸图像进行识别。该方法通过LBP直方图和卡方距离可有效地防止人脸识别中欺骗攻击,进而提高用户信息的安全性。
请参阅图5,图5是本申请的实施例提供的一种人脸识别装置的示意性框图,该人脸识别装置可以配置于终端或服务器中,用于执行前述的人脸识别方法。
如图5所示,该人脸识别装置400,包括:图像获取单元401、图像转换单元402、图像处理单元403、分类检测单元404和人脸识别单元405。
图像获取单元401,用于获取待检测图像。
图像转换单元402,用于对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像。
图像处理单元403,用于提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图。
在一个实施例中,图像处理单元403包括:特征值提取子单元4031、直方图统计子单元4032和直方图合并子单元4033。
特征值提取子单元4031,用于提取所述目标图像在所述预设颜色空间中多通道对应的局部二值模式特征值。
直方图统计子单元4032,用于对每个通道的局部二值模式特征值进行直方图统计以得到通道局部二值模式直方图。
直方图合并子单元4033,用于将多个所述通道局部二值模式直方图合并以生成局部二值模式直方图。
分类检测单元404,用于将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果。
人脸识别单元405,用于根据所述分类结果进行人脸图像识别。
请参阅图6,图6是本申请的实施例还提供另一种人脸识别装置的示意性框图,该人脸识别装置用于执行前述的人脸识别方法。其中,该人脸识别装置可以配置于服务器或终端中。如图6所示,该人脸识别装置500,包括:
图像获取单元501,用于获取待检测图像。
图像转换单元502,用于对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像。
图像处理单元503,用于提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图。
距离计算单元504,用于根据所述局部二值模式直方图计算所述目标图像与预设数据集中图像的卡方距离,所述预设数据集包括活体数据集和非活体数据集。
分类检测单元505,用于将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果。
人脸识别单元506,用于根据所述分类结果进行人脸图像识别。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
上述的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图7所示的计算机设备上运行。
请参阅图7,图7是本申请的实施例提供的一种计算机设备的结构示意性框图。该计算机设备可以是服务器或终端。
参阅图7,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口,其中,存储器可以包括非易失性存储介质和内存储器。
非易失性存储介质可存储操作系统和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行任意一种人脸识别方法。
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种人脸识别方法。
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编 程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
其中,在一个实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:
获取待检测图像;对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像;提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;根据所述分类结果进行人脸图像识别。
在一个实施例中,所述处理器在实现所述提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图时,用于实现:
提取所述目标图像在所述预设颜色空间中多通道对应的局部二值模式特征值;对每个通道的局部二值模式特征值进行直方图统计以得到通道局部二值模式直方图;将多个所述通道局部二值模式直方图合并以生成局部二值模式直方图。
在一个实施例中,所述处理器在实现所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果之前,还用于实现:
根据所述局部二值模式直方图计算所述目标图像与预设数据集中图像的卡方距离,所述预设数据集包括活体数据集和非活体数据集。
相应地,所述处理器在实现所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果时,用于实现:
将所述局部二值模式直方图和卡方距离输入至预先训练好的分类模型进行分类检测以得到分类结果。
在一个实施例中,所述处理器在实现所述根据所述局部二值模式直方图计算所述目标图像与预设数据集中图像的卡方距离时,用于实现:
根据局部二值模式直方图,利用预设卡方距离公式计算目标图像与预设数据集中图像的卡方距离;
其中,所述预设卡方距离公式为:
d(H
x,H
r,H
f)=d
γ(H
x,H
r)-d
γ(H
x,H
f)
其中,d(H
x,H
r,H
f)为所述目标图像与预设数据集中图像的卡方距离;H
x为所述目标图像的局部二值模式特征值,H
r和H
f分别为活体数据集和非活体数据集的平均卡方距离。
在一个实施例中,所述处理器在实现所述根据所述分类结果进行人脸图像识别时,用于实现:
若所述分类结果为活体图像,对所述待检测图像中的人脸图像进行图像识别;若所述分类结果为非活体图像,输出验证失败信息。
在一个实施例中,所述处理器在实现所述对所述待检测图像中的人脸图像进行图像识别时,用于实现:
确定所述目标图像中的人脸图像;以及将所述人脸图像与预先采集的人脸特征进行比对识别。
在一个实施例中,所述预设颜色空间包括HSV颜色空间或YCbCr颜色空间;所述分类模型包括支持向量机二分类器。
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现本申请实施例提供的任一项人脸识别方法。
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (20)
- 一种人脸识别方法,包括:获取待检测图像;对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像;提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;根据所述分类结果进行人脸图像识别。
- 根据权利要求1所述的人脸识别方法,其中,所述提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图,包括:提取所述目标图像在所述预设颜色空间中多通道对应的局部二值模式特征值;对每个通道的局部二值模式特征值进行直方图统计以得到通道局部二值模式直方图;将多个所述通道局部二值模式直方图合并以生成局部二值模式直方图。
- 根据权利要求1或2所述的人脸识别方法,其中,所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果之前,还包括:根据所述局部二值模式直方图计算所述目标图像与预设数据集中图像的卡方距离,所述预设数据集包括活体数据集和非活体数据集;所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果,包括:将所述局部二值模式直方图和卡方距离输入至预先训练好的分类模型进行分类检测以得到分类结果。
- 根据权利要求1所述的人脸识别方法,其中,所述根据所述分类结果进行人脸图像识别,包括:若所述分类结果为活体图像,对所述待检测图像中的人脸图像进行图像识别;若所述分类结果为非活体图像,输出验证失败信息。
- 根据权利要求5所述的人脸识别方法,其中,所述对所述待检测图像中的人脸图像进行图像识别,包括:确定所述目标图像中的人脸图像;以及将所述人脸图像与预先采集的人脸特征进行比对识别。
- 根据权利要求1所述的人脸识别方法,其中,所述预设颜色空间包括HSV颜色空间或YCbCr颜色空间;所述分类模型包括支持向量机二分类器。
- 一种人脸识别装置,包括:图像获取单元,用于获取待检测图像;图像转换单元,用于对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像;图像处理单元,用于提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;分类检测单元,用于将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;人脸识别单元,用于根据所述分类结果进行人脸图像识别。
- 一种计算机设备,所述计算机设备包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:获取待检测图像;对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像;提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;根据所述分类结果进行人脸图像识别。
- 根据权利要求9所述的计算机设备,其中,所述处理器在实现所述提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图时,具体实现:提取所述目标图像在所述预设颜色空间中多通道对应的局部二值模式特征值;对每个通道的局部二值模式特征值进行直方图统计以得到通道局部二值模式直方图;将多个所述通道局部二值模式直方图合并以生成局部二值模式直方图。
- 根据权利要求9或10所述的计算机设备,其中,所述处理器在实现所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果之前,还实现:根据所述局部二值模式直方图计算所述目标图像与预设数据集中图像的卡方距离,所述预设数据集包括活体数据集和非活体数据集;所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果,包括:将所述局部二值模式直方图和卡方距离输入至预先训练好的分类模型进行分类检测以得到分类结果。
- 根据权利要求9所述的计算机设备,其中,所述处理器在实现所述根据所述分类结果进行人脸图像识别时,具体实现:若所述分类结果为活体图像,对所述待检测图像中的人脸图像进行图像识别;若所述分类结果为非活体图像,输出验证失败信息。
- 根据权利要求13所述的计算机设备,其中,所述处理器在实现所述对所述待检测图像中的人脸图像进行图像识别时,具体实现:确定所述目标图像中的人脸图像;以及将所述人脸图像与预先采集的人脸特征进行比对识别。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如如下步骤:获取待检测图像;对所述待检测图像进行颜色空间转换以获得所述待检测图像在预设颜色空间中对应的目标图像;提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图;将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果;根据所述分类结果进行人脸图像识别。
- 根据权利要求15所述的计算机可读存储介质,其中,所述处理器在实现所述提取所述目标图像的局部二值模式特征值,根据所述局部二值模式特征值进行直方图统计以得到局部二值模式直方图时,具体实现:提取所述目标图像在所述预设颜色空间中多通道对应的局部二值模式特征值;对每个通道的局部二值模式特征值进行直方图统计以得到通道局部二值模式直方图;将多个所述通道局部二值模式直方图合并以生成局部二值模式直方图。
- 根据权利要求15或16所述的计算机可读存储介质,其中,所述处理器在实现所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果之前,还实现:根据所述局部二值模式直方图计算所述目标图像与预设数据集中图像的卡方距离,所述预设数据集包括活体数据集和非活体数据集;所述将得到的局部二值模式直方图输入至预先训练好的分类模型进行分类检测以得到分类结果,包括:将所述局部二值模式直方图和卡方距离输入至预先训练好的分类模型进行分类检测以得到分类结果。
- 根据权利要求15所述的计算机可读存储介质,其中,所述处理器在实现所述根据所述分类结果进行人脸图像识别时,具体实现:若所述分类结果为活体图像,对所述待检测图像中的人脸图像进行图像识别;若所述分类结果为非活体图像,输出验证失败信息。
- 根据权利要求19所述的计算机可读存储介质,其中,所述处理器在实现所述对所述待检测图像中的人脸图像进行图像识别时,具体实现:确定所述目标图像中的人脸图像;以及将所述人脸图像与预先采集的人脸特征进行比对识别。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910268066.1A CN110084135B (zh) | 2019-04-03 | 2019-04-03 | 人脸识别方法、装置、计算机设备及存储介质 |
CN201910268066.1 | 2019-04-03 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020199475A1 true WO2020199475A1 (zh) | 2020-10-08 |
Family
ID=67414217
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/103136 WO2020199475A1 (zh) | 2019-04-03 | 2019-08-28 | 人脸识别方法、装置、计算机设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110084135B (zh) |
WO (1) | WO2020199475A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112200075A (zh) * | 2020-10-09 | 2021-01-08 | 西安西图之光智能科技有限公司 | 一种基于异常检测的人脸防伪方法 |
CN112560742A (zh) * | 2020-12-23 | 2021-03-26 | 杭州趣链科技有限公司 | 基于多尺度局部二值模式的人脸活体检测方法、装置及设备 |
CN113221695A (zh) * | 2021-04-29 | 2021-08-06 | 深圳数联天下智能科技有限公司 | 训练肤色识别模型的方法、识别肤色的方法及相关装置 |
CN113407968A (zh) * | 2021-06-29 | 2021-09-17 | 平安国际智慧城市科技股份有限公司 | 目标检测模型的加密方法、装置、设备及存储介质 |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110084135B (zh) * | 2019-04-03 | 2024-04-23 | 平安科技(深圳)有限公司 | 人脸识别方法、装置、计算机设备及存储介质 |
CN110427746A (zh) * | 2019-08-08 | 2019-11-08 | 腾讯科技(深圳)有限公司 | 滑块验证码验证方法、装置、存储介质和计算机设备 |
CN110598719A (zh) * | 2019-09-11 | 2019-12-20 | 南京师范大学 | 一种依据视觉属性描述自动生成人脸图像的方法 |
CN110717444A (zh) * | 2019-10-09 | 2020-01-21 | 北京明略软件系统有限公司 | 一种口红色号识别方法及装置 |
CN112883762A (zh) * | 2019-11-29 | 2021-06-01 | 广州慧睿思通科技股份有限公司 | 一种活体检测方法、装置、系统及存储介质 |
CN111696080B (zh) * | 2020-05-18 | 2022-12-30 | 江苏科技大学 | 一种基于静态纹理的人脸欺诈检测方法、系统及存储介质 |
CN111709312B (zh) * | 2020-05-26 | 2023-09-22 | 上海海事大学 | 一种基于联合主模式的局部特征人脸识别方法 |
CN112001785A (zh) * | 2020-07-21 | 2020-11-27 | 小花网络科技(深圳)有限公司 | 一种基于图像识别的网贷欺诈识别方法及系统 |
CN112200080A (zh) * | 2020-10-10 | 2021-01-08 | 平安国际智慧城市科技股份有限公司 | 一种人脸识别方法、装置、电子设备及存储介质 |
CN112465753B (zh) * | 2020-11-16 | 2024-05-28 | 北京工业大学 | 花粉颗粒检测方法、装置及电子设备 |
CN113283405A (zh) * | 2021-07-22 | 2021-08-20 | 第六镜科技(北京)有限公司 | 口罩检测方法、装置、计算机设备及存储介质 |
CN113591865B (zh) * | 2021-07-28 | 2024-03-26 | 深圳甲壳虫智能有限公司 | 一种回环检测方法、装置以及电子设备 |
CN113724091A (zh) * | 2021-08-13 | 2021-11-30 | 健医信息科技(上海)股份有限公司 | 一种保险理赔的方法以及装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140212044A1 (en) * | 2012-09-26 | 2014-07-31 | Carnegie Mellon University | Image Matching Using Subspace-Based Discrete Transform Encoded Local Binary Patterns |
CN105426816A (zh) * | 2015-10-29 | 2016-03-23 | 深圳怡化电脑股份有限公司 | 一种处理人脸图像的方法及装置 |
CN108875618A (zh) * | 2018-06-08 | 2018-11-23 | 高新兴科技集团股份有限公司 | 一种人脸活体检测方法、系统及装置 |
CN110084135A (zh) * | 2019-04-03 | 2019-08-02 | 平安科技(深圳)有限公司 | 人脸识别方法、装置、计算机设备及存储介质 |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102332086B (zh) * | 2011-06-15 | 2013-04-03 | 湖南领创智能科技有限公司 | 一种基于双阈值局部二进制模式的人脸识别方法 |
GB2516512B (en) * | 2013-10-23 | 2015-10-14 | Imagination Tech Ltd | Face detection |
KR101656373B1 (ko) * | 2014-10-15 | 2016-09-12 | 서울시립대학교 산학협력단 | 얼굴 식별 방법, 얼굴 식별 장치 및 이 방법을 실행시키는 컴퓨터 프로그램 |
CN106650669A (zh) * | 2016-12-27 | 2017-05-10 | 重庆邮电大学 | 一种鉴别仿冒照片欺骗的人脸识别方法 |
KR101993729B1 (ko) * | 2017-02-15 | 2019-06-27 | 동명대학교산학협력단 | 다중채널 가버 필터와 중심대칭지역 이진 패턴기반 얼굴인식기술 |
CN107423690B (zh) * | 2017-06-26 | 2020-11-13 | 广东工业大学 | 一种人脸识别方法及装置 |
CN107862299B (zh) * | 2017-11-28 | 2021-08-06 | 电子科技大学 | 一种基于近红外与可见光双目摄像头的活体人脸检测方法 |
CN108268859A (zh) * | 2018-02-08 | 2018-07-10 | 南京邮电大学 | 一种基于深度学习的人脸表情识别方法 |
CN108921041A (zh) * | 2018-06-06 | 2018-11-30 | 深圳神目信息技术有限公司 | 一种基于rgb和ir双目摄像头的活体检测方法及装置 |
CN109086718A (zh) * | 2018-08-02 | 2018-12-25 | 深圳市华付信息技术有限公司 | 活体检测方法、装置、计算机设备及存储介质 |
-
2019
- 2019-04-03 CN CN201910268066.1A patent/CN110084135B/zh active Active
- 2019-08-28 WO PCT/CN2019/103136 patent/WO2020199475A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140212044A1 (en) * | 2012-09-26 | 2014-07-31 | Carnegie Mellon University | Image Matching Using Subspace-Based Discrete Transform Encoded Local Binary Patterns |
CN105426816A (zh) * | 2015-10-29 | 2016-03-23 | 深圳怡化电脑股份有限公司 | 一种处理人脸图像的方法及装置 |
CN108875618A (zh) * | 2018-06-08 | 2018-11-23 | 高新兴科技集团股份有限公司 | 一种人脸活体检测方法、系统及装置 |
CN110084135A (zh) * | 2019-04-03 | 2019-08-02 | 平安科技(深圳)有限公司 | 人脸识别方法、装置、计算机设备及存储介质 |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112200075A (zh) * | 2020-10-09 | 2021-01-08 | 西安西图之光智能科技有限公司 | 一种基于异常检测的人脸防伪方法 |
CN112200075B (zh) * | 2020-10-09 | 2024-06-04 | 西安西图之光智能科技有限公司 | 一种基于异常检测的人脸防伪方法 |
CN112560742A (zh) * | 2020-12-23 | 2021-03-26 | 杭州趣链科技有限公司 | 基于多尺度局部二值模式的人脸活体检测方法、装置及设备 |
CN113221695A (zh) * | 2021-04-29 | 2021-08-06 | 深圳数联天下智能科技有限公司 | 训练肤色识别模型的方法、识别肤色的方法及相关装置 |
CN113221695B (zh) * | 2021-04-29 | 2023-12-12 | 深圳数联天下智能科技有限公司 | 训练肤色识别模型的方法、识别肤色的方法及相关装置 |
CN113407968A (zh) * | 2021-06-29 | 2021-09-17 | 平安国际智慧城市科技股份有限公司 | 目标检测模型的加密方法、装置、设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110084135A (zh) | 2019-08-02 |
CN110084135B (zh) | 2024-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020199475A1 (zh) | 人脸识别方法、装置、计算机设备及存储介质 | |
US11423701B2 (en) | Gesture recognition method and terminal device and computer readable storage medium using the same | |
Atoum et al. | Face anti-spoofing using patch and depth-based CNNs | |
Li et al. | Multi-angle head pose classification when wearing the mask for face recognition under the COVID-19 coronavirus epidemic | |
CN105893920B (zh) | 一种人脸活体检测方法和装置 | |
CN111488756B (zh) | 基于面部识别的活体检测的方法、电子设备和存储介质 | |
US11354917B2 (en) | Detection of fraudulently generated and photocopied credential documents | |
CN112381775B (zh) | 一种图像篡改检测方法、终端设备及存储介质 | |
WO2017190646A1 (zh) | 一种人脸图像处理方法和装置、存储介质 | |
Rattani et al. | A survey of mobile face biometrics | |
WO2020082577A1 (zh) | 印章防伪检验方法、装置及计算机可读存储介质 | |
US20140334736A1 (en) | Face recognition method and device | |
CN111652082B (zh) | 人脸活体检测方法和装置 | |
Ghazali et al. | An innovative face detection based on YCgCr color space | |
Ghazali et al. | An innovative face detection based on skin color segmentation | |
Choi et al. | A comparative study of preprocessing mismatch effects in color image based face recognition | |
CN111191521B (zh) | 人脸活体检测方法、装置、计算机设备及存储介质 | |
US11315360B2 (en) | Live facial recognition system and method | |
CN109948420B (zh) | 人脸比对方法、装置及终端设备 | |
Hajraoui et al. | Face detection algorithm based on skin detection, watershed method and gabor filters | |
Huang et al. | Learning-based Face Detection by Adaptive Switching of Skin Color Models and AdaBoost under Varying Illumination. | |
WO2020143165A1 (zh) | 一种翻拍图像的识别方法、系统及终端设备 | |
Yadav et al. | Fast face detection based on skin segmentation and facial features | |
CN112200075A (zh) | 一种基于异常检测的人脸防伪方法 | |
Rahman et al. | An automatic face detection and gender classification from color images using support vector machine |
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: 19923178 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: 19923178 Country of ref document: EP Kind code of ref document: A1 |