HK1246921A1 - Face shielding detection method, device and storage medium - Google Patents
Face shielding detection method, device and storage mediumInfo
- Publication number
- HK1246921A1 HK1246921A1 HK18106241.4A HK18106241A HK1246921A1 HK 1246921 A1 HK1246921 A1 HK 1246921A1 HK 18106241 A HK18106241 A HK 18106241A HK 1246921 A1 HK1246921 A1 HK 1246921A1
- Authority
- HK
- Hong Kong
- Prior art keywords
- face
- lip
- eye
- image
- real
- Prior art date
Links
Abstract
The present invention discloses a method for detecting facial occlusion,The method includes: obtaining real-time images captured by a camera device,Extract a real-time facial image from the real-time image;Inputting the real-time facial image into the facial averaging model,Identify t facial feature points from the real-time facial image;Determine the eye and lip regions based on the position information of the t facial feature points,Input the eye area and lip area into a pre trained facial eye classification modelFacial lip classification model,Determine the authenticity of the eye and lip regions,And based on the judgment result, determine whether the face in the real-time image is occluded.The present invention can quickly determine whether the face in the facial image is occluded.The present invention also discloses an electronic device and a computer-readable storage medium.
Description
Technical Field
The invention relates to the technical field of computer vision processing, in particular to a face occlusion detection method and device and a computer readable storage medium.
Background
Face recognition is a biometric technique for performing identity authentication based on facial feature information of a person. The detected face is matched and identified by collecting the image or video stream containing the face and detecting and tracking the face in the image. At present, the application field of face recognition is very wide, the face recognition plays an important role in numerous fields such as financial payment, entrance guard attendance, identity recognition and the like, and great convenience is brought to the life of people. However, it is important to ensure that the human face is not occluded, so it is necessary to detect whether the human face in the image is occluded before performing the face recognition.
The general products in the industry judge the face shielding situation by means of deep learning training, but the judging method has high requirements on sample size, and if the deep learning method is adopted to predict the shielding, the calculation amount is large and the speed is slow.
Disclosure of Invention
The invention provides a method and a device for detecting face occlusion and a computer readable storage medium, and mainly aims to quickly detect the face occlusion condition in a real-time face image.
To achieve the above object, the present invention provides an electronic device, comprising: the device comprises a memory, a processor and a camera device, wherein the memory comprises a face shielding detection program, and the face shielding detection program realizes the following steps when being executed by the processor:
an image acquisition step: acquiring a real-time image shot by a camera device, and extracting a real-time face image from the real-time image by using a face recognition algorithm;
a characteristic point identification step: inputting the real-time face image into a pre-trained face average model, and identifying t face feature points from the real-time face image by using the face average model; and
a characteristic region judging step: determining an eye region and a lip region according to the position information of the t face feature points, inputting the eye region and the lip region into a pre-trained eye classification model of the face and a lip classification model of the face, judging the authenticity of the eye region and the lip region, and judging whether the face in the real-time image is shielded according to a judgment result.
Optionally, when the face occlusion detection program is executed by the processor, the following steps are further implemented:
a judging step: and judging whether the eye region and lip region judgment results of the eye classification model of the human face and the lip classification model of the human face are real or not.
Optionally, when the face occlusion detection program is executed by the processor, the following steps are further implemented:
when the eye classification model of the human face and the lip classification model of the human face judge the eye region and the lip region in real time, judging that the human face in the real-time face image is not shielded; and
and when the eye classification model of the human face and the lip classification model of the human face do not really judge the eye region and the lip region, prompting the human face in the real-time face image to be shielded.
In addition, to achieve the above object, the present invention further provides a face occlusion detection method, including:
an image acquisition step: acquiring a real-time image shot by a camera device, and extracting a real-time face image from the real-time image by using a face recognition algorithm;
a characteristic point identification step: inputting the real-time face image into a pre-trained face average model, and identifying t face feature points from the real-time face image by using the face average model; and
a characteristic region judging step: determining an eye region and a lip region according to the position information of the t face feature points, inputting the eye region and the lip region into a pre-trained eye classification model of the face and a lip classification model of the face, judging the authenticity of the eye region and the lip region, and judging whether the face in the real-time image is shielded according to a judgment result.
Optionally, the method further comprises:
a judging step: and judging whether the eye region and lip region judgment results of the eye classification model of the human face and the lip classification model of the human face are real or not.
Optionally, the method further comprises:
when the eye classification model of the human face and the lip classification model of the human face judge the eye region and the lip region in real time, judging that the human face in the real-time face image is not shielded; and
and when the eye classification model of the human face and the lip classification model of the human face do not really judge the eye region and the lip region, prompting the human face in the real-time face image to be shielded.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a face occlusion detection program, and when the face occlusion detection program is executed by a processor, the face occlusion detection program implements any step of the face occlusion detection method as described above.
The invention provides a face occlusion detection method, an electronic device and a computer readable storage medium, which are characterized in that a real-time face image is input into a face average model to identify face characteristic points in the real-time face image, authenticity of an eye region and a lip region determined by the face characteristic points is judged by using an eye classification model of a face and a lip classification model of the face, and whether occlusion occurs to the face in the real-time face image is judged according to the authenticity of the eye region and the lip region.
Drawings
FIG. 1 is a schematic diagram of an application environment of a face occlusion detection method according to a preferred embodiment of the present invention;
FIG. 2 is a functional block diagram of the face occlusion detection process of FIG. 1;
FIG. 3 is a flowchart illustrating a face occlusion detection method according to a preferred embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a face shielding detection method which is applied to an electronic device 1. Fig. 1 is a schematic diagram of an application environment of a face occlusion detection method according to a preferred embodiment of the present invention.
In the present embodiment, the electronic device 1 may be a terminal device having an arithmetic function, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
The electronic device 1 includes: a processor 12, a memory 11, an imaging device 13, a network interface 14, and a communication bus 15. The camera device 13 is installed in a specific location, such as an office or a monitoring area, and captures a real-time image of a target entering the specific location in real time, and transmits the captured real-time image to the processor 12 through a network. The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The communication bus 15 is used to realize connection communication between these components.
The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic apparatus 1, such as a hard disk of the electronic apparatus 1. In other embodiments, the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1.
In the present embodiment, the readable storage medium of the memory 11 is generally used for storing a face occlusion detection program 10 installed in the electronic device 1, a face image sample library, a human eye sample library, a human lip sample library, a facial average model of constructed and trained facial feature points, an eye classification model, a lip classification model of a human face, and the like. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), a microprocessor or other data Processing chip in some embodiments, and is used for executing the program codes stored in the memory 11 or Processing data, such as executing the face occlusion detection program 10.
Fig. 1 only shows the electronic device 1 with components 11-15, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
Optionally, the electronic device 1 may further include a user interface, the user interface may include an input unit such as a Keyboard (Keyboard), a voice input device such as a microphone (microphone) or other equipment with a voice recognition function, a voice output device such as a sound box, a headset, etc., and optionally the user interface may further include a standard wired interface, a wireless interface.
Optionally, the electronic device 1 may further comprise a display, which may also be appropriately referred to as a display screen or display unit. In some embodiments, the display device may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface.
Optionally, the electronic device 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform touch operation is called a touch area. Further, the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like. The touch sensor may include not only a contact type touch sensor but also a proximity type touch sensor. Further, the touch sensor may be a single sensor, or may be a plurality of sensors arranged in an array, for example.
The area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display screen. The device detects touch operation triggered by a user based on the touch display screen.
Optionally, the electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described herein again.
In the apparatus embodiment shown in fig. 1, a memory 11, which is a kind of computer storage medium, may include therein an operating system, and a face occlusion detection program 10; the processor 12, when executing the face occlusion detection program 10 stored in the memory 11, implements the following steps:
the real-time image shot by the camera device 13 is acquired, the processor 12 extracts a real-time face image from the real-time image by using a face recognition algorithm, calls a face average model, a face eye classification model and a face lip classification model from the memory 11, inputs the real-time face image into the face average model, identifies face feature points in the real-time face image, inputs eye regions and lip regions determined by the face feature points into the face eye classification model and the lip classification model of the face, and judges whether the face in the real-time face image is blocked or not by judging the authenticity of the eye regions and the lip regions.
In other embodiments, the face occlusion detection program 10 may also be divided into one or more modules, which are stored in the memory 11 and executed by the processor 12 to accomplish the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions.
Referring to fig. 2, a functional block diagram of the face occlusion detection program 10 in fig. 1 is shown.
The face occlusion detection program 10 may be segmented into: the device comprises an acquisition module 110, an identification module 120, a judgment module 130 and a prompt module 140.
The acquiring module 110 is configured to acquire a real-time image captured by the camera 13, and extract a real-time face image from the real-time image by using a face recognition algorithm. When the camera device 13 captures a real-time image, the camera device 13 sends the real-time image to the processor 12, and when the processor 12 receives the real-time image, the acquiring module 110 extracts a real-time face image by using a face recognition algorithm.
Specifically, the face recognition algorithm for extracting the real-time facial image from the real-time image may be a geometric feature-based method, a local feature analysis method, a eigenface method, an elastic model-based method, a neural network method, or the like.
And the recognition module 120 is configured to input the real-time facial image into a pre-trained face average model, and recognize t facial feature points from the real-time facial image by using the face average model. Assuming that t is 34, there are 12 orbital feature points, 2 eyeball feature points, and 20 lip feature points among the 27 facial feature points in the facial average model. After the obtaining module 110 extracts the real-time facial image, the identifying module 120 calls the facial average model of the trained facial feature points from the memory 11, aligns the real-time facial image with the facial average model, and then searches the real-time facial image for 12 eyesocket feature points, 2 eyeball feature points, and 20 lip feature points matching with the 27 facial feature points of the facial average model by using a feature extraction algorithm. The face average model of the face feature points is constructed in advance and trained, and a specific embodiment will be described in the following face occlusion detection method.
In this embodiment, the feature extraction algorithm is a SIFT (scale-innovative feature transform) algorithm. The SIFT algorithm extracts local features of each facial feature point from a facial average model of the facial feature points, such as 12 eye socket feature points, 2 eyeball feature points and 20 lip feature points, selects one eye feature point or lip feature point as a reference feature point, searches feature points which are the same as or similar to the local features of the reference feature point in a real-time facial image, for example, whether the difference value of the local features of the two feature points is within a preset range, if so, indicates that the feature point is the same as or similar to the local features of the reference feature point, and takes the feature point as one eye feature point or lip feature point. This principle is followed until all facial feature points are found in the real-time facial image. In other embodiments, the feature extraction algorithm may also be SURF (speedUp Robust Features) algorithm, LBP (Local Binary Patterns) algorithm, HOG (Histogram of organized Grids) algorithm, etc.
The determining module 130 is configured to determine an eye region and a lip region according to the position information of the t face feature points, input a pre-trained eye classification model of the face and a pre-trained lip classification model of the face into the eye region and the lip region, determine the authenticity of the eye region and the lip region, and determine whether the face in the real-time image is occluded according to a determination result. After the recognition module 120 recognizes 12 orbit feature points, 2 eyeball feature points, and 20 lip feature points from the real-time face image, an eye region may be determined according to the 12 orbit feature points and 2 eyeball feature points, a lip region may be determined according to the 20 lip feature points, then the determined eye region and lip region are input into the trained eye classification model of the human face and the lip classification model of the human face, and the authenticity of the determined eye region and lip region is determined according to the result obtained by the model, that is, the result output by the model may be either all false or true or both true and false. When the output results of the eye classification model of the human face and the lip classification model of the human face are both false, the eye region and the lip region are not the eye region and the lip region of the human; and when the output results of the eye classification model of the human face and the lip classification model of the human face are both true, indicating that the eye region and the lip region are the human eye region and the human lip region. The eye classification model of the face and the lip classification model of the face are constructed in advance and trained, and a specific implementation mode will be explained in the following face occlusion detection method.
Specifically, the determining module 130 is further configured to determine whether the eye region and the lip region of the eye classification model of the human face and the lip classification model of the human face are both true. And after the results are output by the eye classification model of the face and the lip classification model of the face, judging whether the results only contain true.
The determining module 130 is further configured to determine that the human face in the real-time face image is not occluded when the eye classification model of the human face and the determination result of the lip classification model of the human face on the eye region and the lip region are both true. That is, when the eye region and the lip region determined according to the facial feature points are both the eye region of a person or the lip region of a person, it is determined that the human face in the real-time facial image is not occluded.
The prompting module 140 is configured to prompt that the human face in the real-time face image is occluded when the eye region and the lip region of the human face are judged to be not true by the eye classification model and the lip classification model of the human face. When any one of the eye region and the lip region determined according to the facial feature points is not the eye region or the lip region of the person, it is determined that the face in the real-time facial image is occluded, and the prompt module 140 prompts the face in the real-time facial image to be occluded.
Further, when the output result of the eye classification model of the human face is false, the eye region in the image is considered to be shielded, and when the output result of the lip classification model of the human face is false, the lip region in the image is considered to be shielded, and a corresponding prompt is made.
In other embodiments, if subsequent face recognition is performed after detecting whether the face is blocked, when the face in the real-time face image is blocked, the prompting module 140 is further configured to prompt that the face in the current face image is blocked, and the obtaining module obtains the real-time image captured by the camera again, and performs subsequent steps.
The electronic device 1 according to this embodiment extracts a real-time facial image from a real-time image, identifies facial feature points in the real-time facial image by using a facial average model, analyzes an eye region and a lip region determined by the facial feature points by using an eye classification model of a human face and a lip classification model of the human face, and rapidly determines whether the human face in the current image is blocked according to the authenticity of the eye region and the lip region.
In addition, the invention also provides a face shielding detection method. Fig. 3 is a flowchart illustrating a first embodiment of the method for detecting face occlusion according to the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the face occlusion detection method includes:
step S10, a real-time image captured by the camera device is acquired, and a real-time facial image is extracted from the real-time image by using a face recognition algorithm. When the camera device shoots a real-time image, the camera device sends the real-time image to the processor, and after the processor receives the real-time image, the real-time face image is extracted by using a face recognition algorithm.
Specifically, the face recognition algorithm for extracting the real-time facial image from the real-time image may be a geometric feature-based method, a local feature analysis method, a eigenface method, an elastic model-based method, a neural network method, or the like.
In step S20, the real-time face image is input to a face average model trained in advance, and t face feature points are recognized from the real-time face image by using the face average model.
Establishing a first sample library with n face images, and marking t face feature points in each face image, wherein the t face feature points comprise t representing eye positions1Individual orbit feature point, t2Individual eyeball feature point and t representing lip position3A lip feature point. Manually marking t in each face image in the first sample library1Individual orbit feature point, t2Characteristic point of each eyeball and t3A lip feature point of the (t) in each face image1+t2+t3) And forming a shape feature vector S by the feature points to obtain n shape feature vectors S of the face.
And training a face feature recognition model by using the t face feature points to obtain a face average model. The human face feature recognition model is an Ensemble of Regression Tress (ERT) algorithm. The ERT algorithm is formulated as follows:
where t denotes the cascade number,. tau.t(-) represents the regressor at the current stage. Each regressor is composed of a number of regression trees (trees) that are trained to obtain.
Wherein S (t) is the shape estimate of the current model; each regressor taut(-) predict an increment from the input images I and S (t)This increment is added to the current shape estimate to improve the current model. Each stage of the regressor performs prediction according to the characteristic points. The training data set was: (I1, S1), (In, Sn) where I is the input sample image and S is the shape feature vector consisting of feature points In the sample image.
In the model training process, the number of face images in the first sample library is t, and each sample picture is assumed to have 34 feature points and feature vectorsx1~x12Abscissa, x, representing orbital feature point13~x14Means for indicating eyeballAbscissa of feature point, x15~x34The abscissa indicates the lip feature point. Training a first regression tree by taking partial feature points of all sample pictures (for example, randomly taking 25 feature points from 34 feature points of each sample picture), training a second tree by using a residual error between a predicted value of the first regression tree and a true value of the partial feature points (a weighted average value of the 25 feature points taken by each sample picture) until a predicted value of the nth tree and the true value of the partial feature points are close to 0, obtaining all regression trees of the ERT algorithm, obtaining a face average model (mean shape) according to the regression trees, and storing a model file and a sample library into a memory. Because the samples of the training model are labeled with 12 orbital feature points, 2 eyeball feature points and 20 lip feature points, the face average model of the trained human face can be used to identify 12 orbital feature points, 2 eyeball feature points and 20 lip feature points from the human face image.
After the real-time face image is obtained, the trained face average model is called from the memory, the real-time face image is aligned with the face average model, and 12 orbit feature points, 2 eyeball feature points and 20 lip feature points which are matched with the 12 orbit feature points, 2 eyeball feature points and 20 lip feature points of the face average model are searched in the real-time face image by utilizing a feature extraction algorithm. Wherein the 20 lip characteristic points are evenly distributed on the lip.
Step S30, determining an eye region and a lip region according to the position information of the t face feature points, inputting the eye region and the lip region into a pre-trained eye classification model of a human face and a lip classification model of the human face, judging the authenticity of the eye region and the lip region, and judging whether the human face in the real-time image is occluded according to the judgment result.
And collecting a first number of human eye positive sample images and a second number of human eye negative sample images, and extracting local characteristics of each human eye positive sample image and each human eye negative sample image. The human eye positive sample image is an eye sample containing human eyes, the two eye parts can be extracted from a human face image sample library to serve as the eye sample, the human eye negative eye sample image is an image with a defective eye area, and a plurality of human eye positive sample images and a plurality of human eye negative sample images form a second sample library.
And collecting a third number of lip positive sample images and a fourth number of lip negative sample images, and extracting local features of each lip positive sample image and each lip negative sample image. The lip positive sample image refers to an image containing human lips, and a lip part can be extracted from a face image sample library to be used as the lip positive sample image. The lip negative sample image is an image in which a human lip region is incomplete or the lips in the image are not human lips (such as animals), and a plurality of lip positive sample images and a plurality of lip negative sample images form a third sample library.
Specifically, the local feature is a Histogram of Oriented Gradient (HOG) feature, and is extracted from the human eye sample image and the lip sample image by a feature extraction algorithm. Since color information in a sample image has little effect, the color information is generally converted into a gray scale image, the whole image is normalized, gradients in the horizontal coordinate and vertical coordinate directions of the image are calculated, and a gradient direction value of each pixel position is calculated according to the gradients, so that contour, shadow and some texture information are captured, and the influence of illumination is further weakened. Then, the whole image is divided into Cell cells (8 × 8 pixels), a gradient direction histogram is constructed for each Cell, and local image gradient information is counted and quantified to obtain a feature description vector of a local image area. Then, the cell cells are combined into a large block (block), and the variation range of the gradient intensity is very large due to the variation of local illumination and the variation of foreground-background contrast, so that the gradient intensity needs to be normalized, and illumination, shadow and edges are further compressed. And finally, combining all the HOG descriptors of the block together to form a final HOG feature description vector.
And training a Support Vector Machine (SVM) by using the positive and negative sample images in the second sample library and the third sample library and the extracted HOG characteristics to obtain an eye classification model of the face and a lip classification model of the face.
After 12 orbit feature points, 2 eyeball feature points and 20 lip feature points are recognized from a real-time face image, an eye region can be determined according to the 12 orbit feature points and 2 eyeball feature points, a lip region is determined according to the 20 lip feature points, then the determined eye region and the lip region are input into a trained eye classification model of a human face and a lip classification model of the human face, and the authenticity of the determined eye region and the lip region is judged according to the result obtained by the model, namely, the result output by the model may be all false or true or both true and false. When the output results of the eye classification model of the human face and the lip classification model of the human face are both false, the eye region and the lip region are not the eye region and the lip region of the human; and when the output results of the eye classification model of the human face and the lip classification model of the human face are both true, indicating that the eye region and the lip region are the human eye region and the human lip region.
Step S40, determining whether the eye region and the lip region of the eye classification model of the face and the lip classification model of the face are both true. And after the results are output by the eye classification model of the face and the lip classification model of the face, judging whether the results only contain true.
And step S50, when the eye classification model of the human face and the lip classification model of the human face judge results of the eye region and the lip region are true, judging that the human face in the real-time face image is not shielded. That is, when the eye region and the lip region determined according to the facial feature points are both the eye region of a person or the lip region of a person, it is determined that the human face in the real-time facial image is not occluded.
And step S60, when the eye classification model of the human face and the lip classification model of the human face do not really judge the eye region and the lip region, prompting the human face in the real-time face image to be shielded. And when any one of the eye region and the lip region determined according to the facial feature points is not the eye region or the lip region of the person, determining that the human face in the real-time facial image is blocked, and prompting that the human face in the real-time facial image is blocked.
Further, when the output result of the eye classification model of the human face is false, the eye region in the image is considered to be shielded, and when the output result of the lip classification model of the human face is false, the lip region in the image is considered to be shielded, and a corresponding prompt is made.
In other embodiments, if subsequent face recognition is performed after detecting whether the face is occluded, when the face in the real-time face image is occluded, step S50 further includes:
and prompting that the face in the current face image is shielded, and the acquisition module acquires the real-time image shot by the camera again and carries out the subsequent steps.
The face occlusion detection method provided in this embodiment identifies key facial feature points in the real-time facial image by using a facial average model of the facial feature points, analyzes an eye region and a lip region determined by the feature points by using an eye classification model of a face and a lip classification model of the face, judges whether the face in the current image is occluded according to the authenticity of the eye region and the lip region, and rapidly detects the occlusion condition of the face in the real-time facial image.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a face occlusion detection program, and when executed by a processor, the face occlusion detection program implements the following operations:
an image acquisition step: acquiring a real-time image shot by a camera device, and extracting a real-time face image from the real-time image by using a face recognition algorithm;
a characteristic point identification step: inputting the real-time face image into a pre-trained face average model, and identifying t face feature points from the real-time face image by using the face average model; and
a characteristic region judging step: determining an eye region and a lip region according to the position information of the t face feature points, inputting the eye region and the lip region into a pre-trained eye classification model of the face and a lip classification model of the face, judging the authenticity of the eye region and the lip region, and judging whether the face in the real-time image is shielded according to a judgment result.
Optionally, when executed by the processor, the face occlusion detection program further implements the following operations:
a judging step: and judging whether the eye region and lip region judgment results of the eye classification model of the human face and the lip classification model of the human face are real or not.
Optionally, when executed by the processor, the face occlusion detection program further implements the following operations:
when the eye classification model of the human face and the lip classification model of the human face judge the eye region and the lip region in real time, judging that the human face in the real-time face image is not shielded; and
and when the eye classification model of the human face and the lip classification model of the human face do not really judge the eye region and the lip region, prompting the human face in the real-time face image to be shielded.
Optionally, the training step of the face average model comprises:
establishing a first sample library with n face images, and marking t face feature points in each face image, wherein the t face feature points comprise t representing eye positions1Individual orbit feature point, t2Individual eyeball feature point and t representing lip position3A lip feature point; and
training a face feature recognition model by using the t face feature points to obtain a face average model;
optionally, the training step of the eye classification model and the lip classification model of the human face includes:
collecting a first number of human eye positive sample images and a second number of human eye negative sample images, and extracting local characteristics of each human eye positive sample image and each human eye negative sample image;
training a support vector classifier (SVM) by using the human eye positive sample image, the human eye negative sample image and local characteristics thereof to obtain an eye classification model of the human face;
collecting a third number of lip positive sample images and a fourth number of lip negative sample images, and extracting local features of each lip positive sample image and each lip negative sample image; and
and training a support vector classifier (SVM) by using the lip positive sample image, the lip negative sample image and local features thereof to obtain a lip classification model of the face.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the above-mentioned human face occlusion detection method, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. An electronic device, the device comprising: the device comprises a memory, a processor and a camera device, wherein the memory comprises a face shielding detection program, and the face shielding detection program realizes the following steps when being executed by the processor:
an image acquisition step: acquiring a real-time image shot by a camera device, and extracting a real-time face image from the real-time image by using a face recognition algorithm;
a characteristic point identification step: inputting the real-time face image into a pre-trained face average model, and identifying t face feature points from the real-time face image by using the face average model; and
a characteristic region judging step: determining an eye region and a lip region according to the position information of the t face feature points, inputting the eye region and the lip region into a pre-trained eye classification model of the face and a lip classification model of the face, judging the authenticity of the eye region and the lip region, and judging whether the face in the real-time image is shielded according to a judgment result.
2. The electronic device of claim 1, wherein the face occlusion detection program, when executed by the processor, further performs the steps of:
a judging step: and judging whether the eye region and lip region judgment results of the eye classification model of the human face and the lip classification model of the human face are real or not.
3. The electronic device according to claim 1 or 2, wherein the face occlusion detection program, when executed by the processor, further performs the steps of:
when the eye classification model of the human face and the lip classification model of the human face judge the eye region and the lip region in real time, judging that the human face in the real-time face image is not shielded; and
and when the eye classification model of the human face and the lip classification model of the human face do not really judge the eye region and the lip region, prompting the human face in the real-time face image to be shielded.
4. The electronic device of claim 1, wherein the training of the face average model comprises:
establishing a first sample library with n face images, and marking t face feature points in each face image, wherein the t face feature points comprise t representing eye positions1Individual orbit characteristicsPoint, t2Individual eyeball feature point and t representing lip position3A lip feature point; and
and training a face feature recognition model by using the t face feature points to obtain a face average model.
5. The electronic device of claim 1, wherein the training step of the eye classification model and the lip classification model of the human face comprises:
collecting a first number of human eye positive sample images and a second number of human eye negative sample images, and extracting local characteristics of each human eye positive sample image and each human eye negative sample image;
training a support vector classifier (SVM) by using the human eye positive sample image, the human eye negative sample image and local characteristics thereof to obtain an eye classification model of the human face;
collecting a third number of lip positive sample images and a fourth number of lip negative sample images, and extracting local features of each lip positive sample image and each lip negative sample image; and
and training a support vector classifier (SVM) by using the lip positive sample image, the lip negative sample image and local features thereof to obtain a lip classification model of the face.
6. A face occlusion detection method, the method comprising:
an image acquisition step: acquiring a real-time image shot by a camera device, and extracting a real-time face image from the real-time image by using a face recognition algorithm;
a characteristic point identification step: inputting the real-time face image into a pre-trained face average model, and identifying t face feature points from the real-time face image by using the face average model; and
a characteristic region judging step: determining an eye region and a lip region according to the position information of the t face feature points, inputting the eye region and the lip region into a pre-trained eye classification model of the face and a lip classification model of the face, judging the authenticity of the eye region and the lip region, and judging whether the face in the real-time image is shielded according to a judgment result.
7. The method of claim 6, further comprising:
a judging step: and judging whether the eye region and lip region judgment results of the eye classification model of the human face and the lip classification model of the human face are real or not.
8. The method of claim 6 or 7, further comprising:
when the eye classification model of the human face and the lip classification model of the human face judge the eye region and the lip region in real time, judging that the human face in the real-time face image is not shielded; and
and when the eye classification model of the human face and the lip classification model of the human face do not really judge the eye region and the lip region, prompting the human face in the real-time face image to be shielded.
9. The method according to claim 6, wherein the training of the eye classification model and the lip classification model of the face comprises:
collecting a first number of human eye positive sample images and a second number of human eye negative sample images, and extracting local characteristics of each human eye positive sample image and each human eye negative sample image;
training a support vector classifier (SVM) by using the human eye positive sample image, the human eye negative sample image and local characteristics thereof to obtain an eye classification model of the human face;
collecting a third number of lip positive sample images and a fourth number of lip negative sample images, and extracting local features of each lip positive sample image and each lip negative sample image; and
and training a support vector classifier (SVM) by using the lip positive sample image, the lip negative sample image and local features thereof to obtain a lip classification model of the face.
10. A computer-readable storage medium, comprising a face occlusion detection program, which when executed by a processor implements the steps of the face occlusion detection method according to any of claims 6 to 9.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| HK18106241.4A HK1246921B (en) | 2018-05-14 | 2018-05-14 | Face shielding detection method, device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| HK18106241.4A HK1246921B (en) | 2018-05-14 | 2018-05-14 | Face shielding detection method, device and storage medium |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| HK1246921A1 true HK1246921A1 (en) | 2018-09-14 |
| HK1246921A HK1246921A (en) | 2018-09-14 |
| HK1246921B HK1246921B (en) | 2019-11-22 |
Family
ID=71144579
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK18106241.4A HK1246921B (en) | 2018-05-14 | 2018-05-14 | Face shielding detection method, device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| HK (1) | HK1246921B (en) |
-
2018
- 2018-05-14 HK HK18106241.4A patent/HK1246921B/en unknown
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10534957B2 (en) | Eyeball movement analysis method and device, and storage medium | |
| CN107633205B (en) | lip motion analysis method, device and storage medium | |
| US10445562B2 (en) | AU feature recognition method and device, and storage medium | |
| CN107633204B (en) | Face occlusion detection method, apparatus and storage medium | |
| CN107679449B (en) | Lip motion method for catching, device and storage medium | |
| CN105518709B (en) | Method, system and computer program product for face recognition | |
| US8792722B2 (en) | Hand gesture detection | |
| US8750573B2 (en) | Hand gesture detection | |
| US10650234B2 (en) | Eyeball movement capturing method and device, and storage medium | |
| US9489566B2 (en) | Image recognition apparatus and image recognition method for identifying object | |
| Lahiani et al. | Hand pose estimation system based on Viola-Jones algorithm for android devices | |
| CN109711287B (en) | Face acquisition method and related product | |
| HK1246921A (en) | Face shielding detection method, device and storage medium | |
| HK1246921A1 (en) | Face shielding detection method, device and storage medium | |
| HK1246926A1 (en) | Eyeball motion analysis method, device and storage medium | |
| HK1246926A (en) | Eyeball motion analysis method, device and storage medium | |
| US20190236357A1 (en) | Image processing method and system for iris recognition | |
| HK1246925A (en) | Lip motion analysis method, device and storage medium | |
| HK1246925A1 (en) | Lip motion analysis method, device and storage medium | |
| HK1246921B (en) | Face shielding detection method, device and storage medium | |
| HK1246923A1 (en) | Lip motion capturing method, device and storage medium | |
| HK1246923A (en) | Lip motion capturing method, device and storage medium | |
| CN108133221A (en) | Object shapes detection device and method, image processing apparatus and monitoring system | |
| HK1246923B (en) | Lip motion capturing method, device and storage medium | |
| HK1246909B (en) | Eye action capturing method, device and storage medium |