CN111582045B - Living body detection method and device and electronic equipment - Google Patents

Living body detection method and device and electronic equipment Download PDF

Info

Publication number
CN111582045B
CN111582045B CN202010295930.XA CN202010295930A CN111582045B CN 111582045 B CN111582045 B CN 111582045B CN 202010295930 A CN202010295930 A CN 202010295930A CN 111582045 B CN111582045 B CN 111582045B
Authority
CN
China
Prior art keywords
living body
identified
object image
color space
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010295930.XA
Other languages
Chinese (zh)
Other versions
CN111582045A (en
Inventor
盛鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Core Computing Integrated Shenzhen Technology Co ltd
Original Assignee
Core Computing Integrated Shenzhen Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Core Computing Integrated Shenzhen Technology Co ltd filed Critical Core Computing Integrated Shenzhen Technology Co ltd
Priority to CN202010295930.XA priority Critical patent/CN111582045B/en
Publication of CN111582045A publication Critical patent/CN111582045A/en
Application granted granted Critical
Publication of CN111582045B publication Critical patent/CN111582045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention relates to the technical field of detection, in particular to a living body detection method and device and electronic equipment. The method comprises the following steps: acquiring a first object image of an object to be identified, which is shot by a color camera, and a second object image of the object to be identified, which is shot by an infrared camera; identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network; and if the object to be identified is identified as a living body according to the color space of the first object image, and the object to be identified is identified as a living body according to the second object image, determining that the object to be identified is a living body. By the method, the living body can be detected and the attack of black and white non-living bodies can be resisted, and the printing attack of the infrared living body is black and white, so the method can resist the printing attack of the infrared living body.

Description

Living body detection method and device and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of detection, in particular to a living body detection method and device and electronic equipment.
Background
The living body detection is to search any given image by adopting a certain strategy to determine whether the image contains a human face or not, if so, returning to the position of the human face, scaling the human face to a fixed size, inputting the human face into a neural network model, and judging whether the image is a living body or not. The existing living body detection algorithm comprises a texture-based detection method, a motion information-based detection method, a multi-feature fusion-based detection method and a deep neural network-based detection method. Among them, detection methods based on deep neural networks are currently most widely used. In an infrared camera, since the pupil of a real person has a large near infrared light reflectance, there is a clear bright pupil effect, and a dummy does not have the effect. In addition, the fake face made of paper has trace of reflection of light, and the outline of the face is slightly blurred. Therefore, the method based on the deep neural network can accurately distinguish living bodies from non-living bodies.
The inventors of the present invention, in implementing embodiments of the present invention, found that: at present, the infrared living body judging method based on the deep neural network has a good prevention effect on common paper printing attacks, and is easy to break if facing the printing attacks of the infrared living bodies.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method and apparatus for detecting a living body, and an electronic device, which overcome or at least partially solve the above problems.
According to an aspect of an embodiment of the present invention, there is provided a method for detecting a living body, including: acquiring a first object image of an object to be identified, which is shot by a color camera, and a second object image of the object to be identified, which is shot by an infrared camera; identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network; if the object to be identified is identified as a living body according to the color space of the first object image, and the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network, determining that the object to be identified is a living body; otherwise, determining that the object to be identified is not a living body.
In an optional manner, the step of identifying whether the object to be identified is a living body according to the color space of the first object image further includes: converting an RGB color space of the first object image into an HSV color space; acquiring hue and saturation of an HSV color space of the first object image; judging whether the HSV color space of the first object image is positioned in a preset living body area or a preset non-living body area based on the hue and the saturation; if the object to be identified is located in the preset living body area, determining that the object to be identified is a living body; and if the object to be identified is positioned in the preset non-living body area, determining that the object to be identified is not a living body.
In an alternative manner, the preset living body region and the preset non-living body region are obtained by detecting a plurality of living body samples and non-living body samples.
In an optional manner, the step of identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network further includes: reducing the size of the second object image to a preset size; inputting the reduced second object image into a preset neural network for detection; and judging whether the object to be identified after the shrinkage is a living body or not according to the detection result.
In an alternative manner, the preset neural network is obtained by taking a network structure of MobilenetV as a base network and optimizing the number of cores of each layer of MobilenetV by adopting a model pruning algorithm, wherein the activation layer of MobilenetV3 is Relu layers.
According to one aspect of the embodiment of the invention, an acquisition module is provided, and is used for acquiring a first object image of an object to be identified, which is shot by a color camera, and a second object image of the object to be identified, which is shot by an infrared camera; the identification module is used for identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network; a first determining module, configured to determine that the object to be identified is a living body if the object to be identified is identified as a living body according to a color space of the first object image, and the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network; and the second determining module is used for determining that the object to be identified is not a living body.
In an alternative manner, the identification module includes: a conversion unit configured to convert an RGB color space of the first object image into an HSV color space; an acquisition unit configured to acquire hue and saturation of an HSV color space of the first object image; a first judging unit configured to judge whether an HSV color space of the first object image is located in a preset living area or a preset non-living area based on the hue and saturation; a first determining unit, configured to determine that the object to be identified is a living body if the HSV color space of the first object image is located in a preset living body area; and the second determining unit is used for determining that the object to be identified is not a living body if the HSV color space of the first object image is located in a preset non-living body area.
In an alternative manner, the preset living body region and the preset non-living body region are obtained by detecting a plurality of living body samples and non-living body samples.
In an alternative manner, the identification module includes: a reduction unit configured to reduce the size of the second object image to a preset size; the input unit is used for inputting the reduced second object image into a preset neural network for detection; and the second judging unit is used for judging whether the object to be identified after the shrinkage is a living body or not according to the detection result.
In an alternative manner, the preset neural network is obtained by taking a network structure of MobilenetV as a base network and optimizing the number of cores of each layer of MobilenetV by adopting a model pruning algorithm, wherein the activation layer of MobilenetV3 is Relu layers.
According to an aspect of an embodiment of the present invention, there is provided an electronic device including: at least one processor, and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to an aspect of an embodiment of the present invention, there is provided a non-transitory computer-readable storage medium storing computer-executable instructions which, when executed by an electronic device, cause the electronic device to perform a method as described above.
The embodiment of the invention has the beneficial effects that: different from the existing living body detection method, the embodiment of the invention obtains the first object image of the object to be identified, which is shot by the color camera, and the second object image of the object to be identified, which is shot by the infrared camera; identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network; if the object to be identified is identified as a living body according to the color space of the first object image, and the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network, determining that the object to be identified is a living body; otherwise, the method for determining that the object to be identified is not a living body can realize the detection of the living body and resist the attack of the black and white non-living body, and the printing attack of the infrared living body is black and white, so that the method can resist the printing attack of the infrared living body.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
Fig. 1 is a schematic flow chart of a method for detecting a living body according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of identifying whether an object to be identified is a living body according to a color space of a first object image according to an embodiment of the present invention;
FIG. 3 is a graph of hue and saturation of living and non-living bodies provided by an embodiment of the present invention;
fig. 4 is a schematic flow chart of identifying whether an object to be identified is a living body according to a second object image and in combination with a preset neural network according to an embodiment of the present invention;
Fig. 5 is a schematic view of a living body detection apparatus provided in an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of an electronic device for performing a detection method of a living body according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a living body detection method according to an embodiment of the invention, the method includes the following steps:
Step S101, a first object image of an object to be identified, which is shot by a color camera, and a second object image of the object to be identified, which is shot by an infrared camera, are acquired.
The color cameras, in some embodiments, are RGB cameras. In some embodiments, the color camera and the infrared camera simultaneously photograph the object to be identified.
Step S102, identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network.
The living body shot by the color camera is colored, the color space is RGB color space, and the black-white non-living body is black-white, which have obvious differences, so that the attack of the black-white non-living body can be resisted by judging whether the first object image is colored or black-white. Specifically, referring to fig. 2, step S102 includes:
Step S1021, converting the RGB color space of the first object image into an HSV color space.
Included in the HSV color space are hue, saturation, and brightness. In the HSV color space, the first object image of the living body and the black-and-white non-living body are significantly different in hue and saturation. The attack of the infrared living body can be resisted by comparing the first object image of the living body with the hue and saturation of the black-white non-living body. Since the first object image photographed by the color camera is an RGB color space, it is necessary to convert the RGB color space of the first object image into an HSV color space.
Step S1022 acquires hue and saturation of the HSV color space of the first object image.
Step S1023, based on the hue and saturation, determines whether the HSV color space of the first object image is located in a preset living area or a preset non-living area, if so, executes step S1024, and if so, executes step S1025.
The preset living body region and the preset non-living body region are obtained by detecting a plurality of living body samples and non-living body samples. Since the hue and saturation of the first object image of the living body and the black-and-white non-living body are significantly different, it is only necessary to collect the hues and the saturation in the HSV color spaces of the images of the first object of the living body and collect the hues and the saturation in the HSV color spaces of the black-and-white non-living body, and it can be determined whether the HSV color space of the first object image is located in a preset living body area or in a preset non-living body area by the areas of the hues and the saturation.
Here, for example, a large number of face image samples of a living body sample and a large number of face image samples of a black-and-white non-living body sample are collected, converted into HSV color space, hue and saturation are obtained, and a chart is made, see fig. 3. Real in fig. 3 is the living body, like is the non-living body, hue is the hue, and saturation is the saturation. As can be seen from fig. 3, the straight line L1 in fig. 3 divides the corresponding region of hue and saturation into a living region and a non-living region, the region where the point representing real is located is the living region, and the region where the point representing fake is located is the non-living region. When the first object image is a facial image, whether the object to be identified is a living body or a non-living body can be determined by judging whether the HSV color space of the first object image is located in the living body area in fig. 3 or the non-living body area in fig. 3. For example, if the hue of the HSV color space of the first object image is 120 and the saturation is 150, the object to be identified is determined to be a living body. For another example, if the hue of the HSV color space of the first object image is 120 and the saturation is 25, the object to be identified is determined to be a non-living body.
Step S1024, determining that the object to be identified is a living body.
Step S1025, determining that the object to be identified is not a living body.
Further, it is also required to identify whether the second object image photographed by the infrared camera is a living body. Specifically, referring to fig. 4, step S102 further includes:
step S1026, reducing the size of the second object image to a preset size.
When the living body detection method is applied to embedded equipment such as an access control device, an attendance machine and the like, if a good effect is to be achieved, the calculation amount is large, the equipment operation speed is low, the instantaneity is poor, and the user experience is affected. In order to increase the calculation speed, the size of the second object image can be reduced, so that the number of channels of each residual module is reduced, the calculation amount is reduced, and the speed of processing one image by a network is increased. In some embodiments, the second object image has a size 224x224 and the predetermined size 112x112.
Step S1027, inputting the reduced second object image into a preset neural network for detection.
The preset neural network is obtained by taking a network structure of MobilenetV as a basic network and adopting a model pruning algorithm to optimize the number of cores of each layer of MobilenetV, wherein an activation layer of MobilenetV is Relu layers. Relu layers are simple, and the operation efficiency can be improved on the premise of ensuring the detection accuracy.
Step 1028, determining whether the object to be identified after shrinking is a living body according to the detection result.
For example, when the face of the living body is subjected to infrared shooting, a non-living body except for the printing attack of the infrared living body has no bright pupil effect, so that whether the face of the object to be identified has the bright pupil effect or not can be judged through the preset neural network, and whether the object to be identified is a living body except for the printing attack of the infrared living body or not can be judged.
Step S103, if the object to be identified is identified as a living body according to the color space of the first object image, and if the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network, determining that the object to be identified is a living body, otherwise, executing step S104.
In general, only the second object image is required, and whether the object to be recognized is a living body can be recognized in combination with a predetermined neural network, but a print attack on an infrared living body is easily mistaken as a living body. Since the print attack of the infrared living body is black and white, the first object image is photographed by a color camera and is colored, and the two images are obviously different. And identifying the object to be identified as a living body through the first object image, identifying the object to be identified as the living body according to the second object image and combining a preset neural network, and determining that the object to be identified is the living body if the object to be identified is not the living body.
Step S104, determining that the object to be identified is not a living body.
In the embodiment of the invention, a first object image of an object to be identified, which is shot by a color camera, and a second object image of the object to be identified, which is shot by an infrared camera, are acquired; identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network; if the object to be identified is identified as a living body according to the color space of the first object image, and the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network, determining that the object to be identified is a living body; otherwise, the method for determining that the object to be identified is not a living body can realize the detection of the living body and resist the attack of the black and white non-living body, and the printing attack of the infrared living body is black and white, so that the method can resist the printing attack of the infrared living body.
Example two
Referring to fig. 5, fig. 5 is a schematic diagram of a living body detection apparatus according to an embodiment of the invention, the apparatus 400 includes: an acquisition module 401, an identification module 402, a first determination module 403 and a second determination module 404. The acquiring module 401 is configured to acquire a first object image of an object to be identified, which is captured by the color camera, and a second object image of the object to be identified, which is captured by the infrared camera; an identifying module 402, configured to identify, according to a color space of the first object image, whether the object to be identified is a living body, and identify, according to the second object image and in combination with a preset neural network, whether the object to be identified is a living body; a first determining module 403, configured to determine that the object to be identified is a living body if the object to be identified is identified as a living body according to the color space of the first object image, and the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network; a second determining module 404 is configured to determine that the object to be identified is not a living body.
In some embodiments, the identification module 402 includes: a conversion unit 4021, an acquisition unit 4022, a first judgment unit 4023, a first determination unit 4024, and a second determination unit 4025. Wherein the conversion unit 4021 is configured to convert an RGB color space of the first object image into an HSV color space; an acquisition unit 4022 configured to acquire hue and saturation of an HSV color space of the first object image; a first judging unit 4023 configured to judge whether an HSV color space of the first object image is located in a preset living area or a preset non-living area based on the hue and saturation; a first determining unit 4024 configured to determine that the object to be identified is a living body if the HSV color space of the first object image is located in a preset living body area; the second determining unit 4025 is configured to determine that the object to be identified is not a living body if the HSV color space of the first object image is located in a preset non-living body area.
In some embodiments, the predetermined living area and the predetermined non-living area are obtained by detecting a plurality of living samples and non-living samples.
Further, the identification module 402 includes: a reduction unit 4026, an input unit 4027, and a second determination unit 4028. A reducing unit 4026 configured to reduce the size of the second object image to a preset size; an input unit 4027 configured to input the reduced second object image into a preset neural network for detection; a second judging unit 4028 for judging whether the reduced object to be identified is a living body according to the detection result.
In some embodiments, the preset neural network is based on a network structure of MobilenetV, and the number of cores of each layer of MobilenetV is optimized by using a model pruning algorithm, wherein the activation layer of MobilenetV3 is Relu layers.
In the embodiment of the invention, a first object image of an object to be identified, which is shot by a color camera, and a second object image of the object to be identified, which is shot by an infrared camera, are acquired by an acquisition module; identifying whether the object to be identified is a living body or not according to the color space of the first object image through an identification module, and identifying whether the object to be identified is a living body or not according to the second object image and in combination with a preset neural network; if the object to be identified is identified as a living body according to the color space of the first object image, and the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network, determining that the object to be identified is a living body through a first determining module; otherwise, determining that the object to be identified is not a living body through a second determining module. By the device, the living body can be detected, and the attack of black and white non-living bodies can be resisted.
Example III
Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure of an electronic device for performing a method for detecting a living body according to an embodiment of the invention. As shown in fig. 6, the electronic device 500 includes: one or more processors 501 and a memory 502, one for example in fig. 6.
The processor 501 and the memory 502 may be connected by a bus or otherwise, which is illustrated in fig. 6 as a bus connection.
The memory 502 is a non-volatile computer readable storage medium, and may be used to store a non-volatile software program, a non-volatile computer executable program, and modules, such as program instructions/modules (e.g., the respective modules shown in fig. 5) corresponding to the living body detection method in the embodiment of the present invention. The processor 501 executes various functional applications and data processing of the living body detection apparatus by executing nonvolatile software programs, instructions, and modules stored in the memory 502, that is, implements the living body detection method of the above-described method embodiment.
Memory 502 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the detection device of the living body, or the like. In addition, memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 502 optionally includes memory remotely located relative to processor 501, which may be connected to the in-vivo detection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 502, and when executed by the one or more processors 501, perform the method of detecting a living body in any of the above-described method embodiments, for example, performing the method steps S101 to S104 in fig. 1, the method steps S1021 to S1025 in fig. 2, and the method steps S1026 to S1028 in fig. 4 described above, to implement the functions of the modules 401 to 404 and the modules 4021 to 4028 in fig. 5.
The product can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
An embodiment of the present invention provides a nonvolatile computer-readable storage medium storing computer-executable instructions that are executed by an electronic device to perform the method for detecting a living body in any of the above-described method embodiments, for example, perform the method steps S101 to S104 in fig. 1, the method steps S1021 to S1025 in fig. 2, and the method steps S1026 to S1028 in fig. 4, which implement the functions of the modules 401 to 404 and the modules 4021 to 4028 in fig. 5.
An embodiment of the present invention provides a computer program product including a computer program stored on a non-volatile computer readable storage medium, the computer program including program instructions which, when executed by a computer, cause the computer to perform the method for detecting a living body in any of the above-described method embodiments, for example, performing the method steps S101 to S104 in fig. 1, the method steps S1021 to S1025 in fig. 2, and the method steps S1026 to S1028 in fig. 4 described above, to implement the functions of the modules 401 to 404 and the modules 4021 to 4028 in fig. 5.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program may include processes implementing the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (5)

1. A method for detecting a living body, comprising:
acquiring a first object image of an object to be identified, which is shot by a color camera, and a second object image of the object to be identified, which is shot by an infrared camera;
Identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network;
the step of identifying whether the object to be identified is a living body according to the color space of the first object image, further includes:
Collecting a large number of face image samples of living body samples and a large number of face image samples of black and white non-living bodies, converting the face image samples into an HSV color space, obtaining hue and saturation, and making a chart, wherein the horizontal axis of the chart represents hue, the vertical axis of the chart represents saturation, and dividing corresponding areas of the hue and the saturation into living body areas and non-living body areas;
converting an RGB color space of the first object image into an HSV color space;
Acquiring hue and saturation of an HSV color space of the first object image;
Judging whether the HSV color space of the first object image is positioned in a preset living body area or a preset non-living body area based on the hue and the saturation;
if the object to be identified is located in the preset living body area, determining that the object to be identified is a living body;
If the object to be identified is positioned in the preset non-living body area, determining that the object to be identified is not a living body;
The step of identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network, further includes:
The size of the second object image is reduced to a preset size, and the size of the second object image is 224 224, The preset size is 112/>112;
Inputting the reduced second object image into a preset neural network for detection;
Judging whether the reduced object to be identified is a living body or not according to a detection result;
If the object to be identified is identified as a living body according to the color space of the first object image, and the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network, determining that the object to be identified is a living body;
Otherwise, determining that the object to be identified is not a living body.
2. The method for detecting a living body according to claim 1, wherein,
The preset neural network is obtained by taking a network structure of MobilenetV as a basic network and adopting a model pruning algorithm to optimize the number of cores of each layer of MobilenetV, wherein an activation layer of MobilenetV is Relu layers.
3. A living body detection device, characterized by comprising:
the acquisition module is used for acquiring a first object image of an object to be identified, which is shot by the color camera, and a second object image of the object to be identified, which is shot by the infrared camera;
the identification module is used for identifying whether the object to be identified is a living body according to the color space of the first object image, and identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network;
the step of identifying whether the object to be identified is a living body according to the color space of the first object image, further includes:
Collecting a large number of face image samples of living body samples and a large number of face image samples of black and white non-living bodies, converting the face image samples into an HSV color space, obtaining hue and saturation, and making a chart, wherein the horizontal axis of the chart represents hue, the vertical axis of the chart represents saturation, and dividing corresponding areas of the hue and the saturation into living body areas and non-living body areas;
the identification module comprises:
a conversion unit configured to convert an RGB color space of the first object image into an HSV color space;
an acquisition unit configured to acquire hue and saturation of an HSV color space of the first object image;
A judging unit configured to judge whether an HSV color space of the first object image is located in a preset living area or a preset non-living area based on the hue and saturation;
A first determining unit, configured to determine that the object to be identified is a living body if the HSV color space of the first object image is located in a preset living body area;
A second determining unit, configured to determine that the object to be identified is not a living body if the HSV color space of the first object image is located in a preset non-living body area;
The first determining module is configured to determine that the object to be identified is a living body if the object to be identified is identified as a living body according to the color space of the first object image, and if the object to be identified is identified as a living body according to the second object image and in combination with a preset neural network, wherein the step of identifying whether the object to be identified is a living body according to the second object image and in combination with a preset neural network further includes: the size of the second object image is reduced to a preset size, and the size of the second object image is 224 224, The preset size is 112/>112; Inputting the reduced second object image into a preset neural network for detection; judging whether the reduced object to be identified is a living body or not according to a detection result;
and the second determining module is used for determining that the object to be identified is not a living body.
4. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-2.
5. A non-transitory computer readable storage medium storing computer executable instructions which, when executed by an electronic device, cause the electronic device to perform the method of any one of claims 1-2.
CN202010295930.XA 2020-04-15 2020-04-15 Living body detection method and device and electronic equipment Active CN111582045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010295930.XA CN111582045B (en) 2020-04-15 2020-04-15 Living body detection method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010295930.XA CN111582045B (en) 2020-04-15 2020-04-15 Living body detection method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111582045A CN111582045A (en) 2020-08-25
CN111582045B true CN111582045B (en) 2024-05-10

Family

ID=72124380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010295930.XA Active CN111582045B (en) 2020-04-15 2020-04-15 Living body detection method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111582045B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112329612A (en) * 2020-11-03 2021-02-05 北京百度网讯科技有限公司 Living body detection method and device and electronic equipment
CN112270288A (en) * 2020-11-10 2021-01-26 深圳市商汤科技有限公司 Living body identification method, access control device control method, living body identification device, access control device and electronic device
CN112613470A (en) * 2020-12-30 2021-04-06 山东山大鸥玛软件股份有限公司 Face silence living body detection method, device, terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354554A (en) * 2015-11-12 2016-02-24 西安电子科技大学 Color and singular value feature-based face in-vivo detection method
CN108009534A (en) * 2017-11-20 2018-05-08 上海聚虹光电科技有限公司 Biopsy method based on pupil gray scale
CN108596082A (en) * 2018-04-20 2018-09-28 重庆邮电大学 Human face in-vivo detection method based on image diffusion velocity model and color character
CN108921041A (en) * 2018-06-06 2018-11-30 深圳神目信息技术有限公司 A kind of biopsy method and device based on RGB and IR binocular camera
CN110059607A (en) * 2019-04-11 2019-07-26 深圳市华付信息技术有限公司 Living body multiple detection method, device, computer equipment and storage medium
CN110163078A (en) * 2019-03-21 2019-08-23 腾讯科技(深圳)有限公司 The service system of biopsy method, device and application biopsy method
CN110520865A (en) * 2019-06-27 2019-11-29 深圳市汇顶科技股份有限公司 The method, apparatus and electronic equipment of recognition of face

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354554A (en) * 2015-11-12 2016-02-24 西安电子科技大学 Color and singular value feature-based face in-vivo detection method
CN108009534A (en) * 2017-11-20 2018-05-08 上海聚虹光电科技有限公司 Biopsy method based on pupil gray scale
CN108596082A (en) * 2018-04-20 2018-09-28 重庆邮电大学 Human face in-vivo detection method based on image diffusion velocity model and color character
CN108921041A (en) * 2018-06-06 2018-11-30 深圳神目信息技术有限公司 A kind of biopsy method and device based on RGB and IR binocular camera
CN110163078A (en) * 2019-03-21 2019-08-23 腾讯科技(深圳)有限公司 The service system of biopsy method, device and application biopsy method
CN110059607A (en) * 2019-04-11 2019-07-26 深圳市华付信息技术有限公司 Living body multiple detection method, device, computer equipment and storage medium
CN110520865A (en) * 2019-06-27 2019-11-29 深圳市汇顶科技股份有限公司 The method, apparatus and electronic equipment of recognition of face

Also Published As

Publication number Publication date
CN111582045A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111582045B (en) Living body detection method and device and electronic equipment
EP3757890A1 (en) Method and device for image processing, method and device for training object detection model
US11321963B2 (en) Face liveness detection based on neural network model
CN110084135B (en) Face recognition method, device, computer equipment and storage medium
CN108366203B (en) Composition method, composition device, electronic equipment and storage medium
TWI721786B (en) Face verification method, device, server and readable storage medium
US20150154471A1 (en) Image processing device and method, and computer readable medium
CN111191521B (en) Face living body detection method and device, computer equipment and storage medium
JP2021531571A (en) Certificate image extraction method and terminal equipment
CN109063598A (en) Face pore detection method, device, computer equipment and storage medium
KR101875891B1 (en) apparatus and method for face detection using multi detection
CN113111806A (en) Method and system for object recognition
CN112434546A (en) Face living body detection method and device, equipment and storage medium
CN110728201A (en) Image processing method and device for fingerprint identification
CN113781421A (en) Underwater-based target identification method, device and system
CN113128428A (en) Depth map prediction-based in vivo detection method and related equipment
CN111126191B (en) Iris image acquisition method, iris image acquisition device and storage medium
KR101336834B1 (en) Usb iris recognition device
CN106599889A (en) Method and apparatus for recognizing characters
CN112883762A (en) Living body detection method, device, system and storage medium
JP2001167273A5 (en)
US8538142B2 (en) Face-detection processing methods, image processing devices, and articles of manufacture
CN113920556A (en) Face anti-counterfeiting method and device, storage medium and electronic equipment
WO2017219562A1 (en) Method and apparatus for generating two-dimensional code
CN112699760A (en) Face target area detection method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240410

Address after: Building 9, Building 203B, Phase II, Nanshan Yungu Entrepreneurship Park, No. 2 Pingshan 1st Road, Pingshan Community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong Province, 518033

Applicant after: Core Computing Integrated (Shenzhen) Technology Co.,Ltd.

Country or region after: China

Address before: 518000 1001, building G3, TCL International e city, Shuguang community, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Aishen Yingtong Information Technology Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant