CN111291711A - Python-based deep learning face recognition method, equipment and readable storage medium - Google Patents

Python-based deep learning face recognition method, equipment and readable storage medium Download PDF

Info

Publication number
CN111291711A
CN111291711A CN202010116742.6A CN202010116742A CN111291711A CN 111291711 A CN111291711 A CN 111291711A CN 202010116742 A CN202010116742 A CN 202010116742A CN 111291711 A CN111291711 A CN 111291711A
Authority
CN
China
Prior art keywords
face
image
deep learning
recognition method
information
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.)
Pending
Application number
CN202010116742.6A
Other languages
Chinese (zh)
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.)
Shandong Chaoyue CNC Electronics Co Ltd
Original Assignee
Shandong Chaoyue CNC Electronics 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 Shandong Chaoyue CNC Electronics Co Ltd filed Critical Shandong Chaoyue CNC Electronics Co Ltd
Priority to CN202010116742.6A priority Critical patent/CN111291711A/en
Publication of CN111291711A publication Critical patent/CN111291711A/en
Pending legal-status Critical Current

Links

Images

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/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/757Matching configurations of points or features
    • 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/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Processing (AREA)
  • Evolutionary Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)

Abstract

The invention provides a deep learning face recognition method based on Python, equipment and a readable storage medium, the face recognition tracking method based on machine learning and realized by using Python programming language and a third-party OpenCv library can accurately recognize face information in image information, and each pixel point in the face region is subjected to binary matrix processing; and carrying out LPBH algorithm analysis on the face area, and carrying out definition processing on the face area. And then, the face image information is accurately extracted after the face area is subjected to image capture processing. And matching the extracted facial features with the existing facial features in the database to obtain the personnel identity information of the facial features. A series of modes of recognizing the face of the image information and extracting the features are realized, the recognition definition is ensured, and the error rate is reduced. The method can be applied to the fields of security protection, finance and the like which need higher safety factor.

Description

Python-based deep learning face recognition method, equipment and readable storage medium
Technical Field
The invention relates to the technical field of face recognition, in particular to a deep learning face recognition method based on Python, equipment and a readable storage medium.
Background
The process of recognizing a human face through biological features is called face recognition, and belongs to a research problem in the field of computer vision. The face recognition system designed by Bledsoe and Chen was the representative of the origin of face recognition research in the last 60 th century. Nowadays, the face recognition system is widely applied to various fields, such as a railway identity authentication system, face attendance and the like. Compared with other biological feature identification of iris, fingerprint and the like, the face identification technology has the advantages that information is beneficial to acquisition and verification and the like. As technology has matured, face recognition has been widely used in various fields.
How to improve the definition of face recognition is a technical problem to be solved urgently at present.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a Python-based deep learning face recognition method, which comprises the following steps:
s1, detecting a face range from the image information and determining a face area;
s2, performing definition processing on the face area;
s3, extracting facial features from the human face region;
and S4, matching the extracted facial features with the existing facial features in the database to obtain the personnel identity information of the facial features.
The invention also provides equipment for realizing the Python-based deep learning face recognition method, which comprises the following steps:
the memory is used for storing a computer program and a deep learning face recognition method based on Python;
and the processor is used for executing the computer program and the deep learning face recognition method based on Python so as to realize the steps of the deep learning face recognition method based on Python.
The invention also provides a readable storage medium with the deep learning face recognition method based on Python, wherein the readable storage medium is stored with a computer program, and the computer program is executed by a processor to realize the steps of the deep learning face recognition method based on Python.
According to the technical scheme, the invention has the following advantages:
the face recognition tracking method based on machine learning and realized by using a Python programming language and a third-party OpenCv library can accurately recognize face information in image information, and performs binary matrix processing on each pixel point in the face region; and carrying out LPBH algorithm analysis on the face area, and carrying out definition processing on the face area. And then, the face image information is accurately extracted after the face area is subjected to image capture processing. And matching the extracted facial features with the existing facial features in the database to obtain the personnel identity information of the facial features. A series of modes of recognizing the face of the image information and extracting the features are realized, the recognition definition is ensured, and the error rate is reduced. The method can be applied to the fields of security protection, finance and the like which need higher safety factors.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description will be briefly introduced, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without inventive labor.
Fig. 1 is a flow chart of a Python-based deep learning face recognition method.
Detailed Description
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. the functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and in actual implementation, there may be other divisions, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The invention relates to a face recognition method by using a Python programming language and an OpenCV third-party library. The development of the Python language related by the invention has high efficiency, and the Python can quickly and easily connect modules made by other languages due to the rich third-party library.
The OpenCV used in the invention is a third-party visual library that can be called through Python language. OpenCV, created by Intel, has been a powerful and general-purpose image vision processing library in the field of computer vision today through many years of development. The invention uses a cascade classifier of CascadeClassification in a CV2 library in OpenCV to detect the human face, and uses an LBPH (local binary pattern histogram) human face recognizer of an LBPHFaceRecognizer to match the human face.
Specifically, the present invention provides a Python-based deep learning face recognition method, as shown in fig. 1, the method includes:
s1, detecting a face range from the image information and determining a face area;
the acquisition mode can use a camera to shoot image information, and the modes of turning, brightness adjustment and gray level adjustment are respectively carried out on each image to judge whether the face information exists;
face detection is performed on the basis of each frame on the captured video image information using a cascadeclassifier.
Carrying out gray level conversion processing on the image information;
judging whether effective face information exists;
if the face information is valid, the image information is identified, and the confirmed value range of the face area is output.
The Python related by the invention can adopt the following modes:
Figure BDA0002391722730000041
s2, performing definition processing on the face area;
identifying a face area and intercepting;
performing binary matrix processing on each pixel point in the face region;
and carrying out LPBH algorithm analysis on the face region.
Traversing and classifying the acquired image information;
classifying and identifying images shot in the same time period, and inputting the images into an LBPH classifier;
classifying and identifying based on images shot at the same place, and inputting the images into an LBPH classifier;
classifying and identifying images shot based on the same preset requirement, and inputting the images into an LBPH classifier; and collecting the classification identification information to form a classification information table.
The Python related by the invention can adopt the following modes:
Figure BDA0002391722730000051
s3, extracting facial features from the human face region;
capturing images of the face area, analyzing face information of each frame of image, and generating a face feature histogram;
specifically, local information of an image is detected to obtain a characteristic value, and gray values between each pixel point and adjacent pixel points in the image are compared to obtain face characteristic information;
converting an RGB (red, green and blue) picture in the image into a gray picture, and taking a matrix of 3x 3;
when the gray value in the image is larger than the gray value of the image at the center of the image, 0 is adopted for representing;
when the gray value in the image is smaller than the gray value of the image at the center of the image, 1 is used for representing, so that a binary list consisting of 0 and 1 is obtained;
processing each pixel in the picture, and converting the pixel into a decimal system to obtain a histogram, wherein the histogram is a feature histogram.
Determining facial features in the face region;
and marking and storing the facial features, wherein the marks of the facial features are matched with the marks of the image information.
And S4, matching the extracted facial features with the existing facial features in the database to obtain the personnel identity information of the facial features.
When the extracted facial features are not matched with the existing facial features in the database, identifying the facial features; and storing the facial features into a database.
Based on the method, the method related by the invention is determined and verified through a specific implementation mode, specifically, the tested person marked as 5 is tested in a mode of recording 20 photos of each person of 5 tested persons, and 10 groups of identification results and degrees of acquaintance are randomly selected and output to be put into table 1. The method can correctly identify and track the specific human face through testing.
Label (R) 5 5 5 5 5 5 5 5 5 5
Degree of similarity 40.26 41.22 44.19 46.94 44.77 39.78 38.82 45.89 39.19 44.06
Table 1 randomly selected 10 groups of recognition results and similarity
Therefore, the characteristic information of the face can be clearly acquired, and the identity information of the person can be output for later use.
Based on the method, the invention also provides equipment for realizing the deep learning face recognition method based on Python, which comprises the following steps: the memory is used for storing a computer program and a deep learning face identification method based on Python; and the processor is used for executing the computer program and the deep learning face recognition method based on Python so as to realize the steps of the deep learning face recognition method based on Python.
Based on the method, the invention also provides a readable storage medium with a deep learning face recognition method based on Python, wherein the readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the deep learning face recognition method based on Python.
The apparatus for implementing the Python-based deep learning face recognition method is the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, and can be implemented in electronic hardware, computer software, or a combination of both, and in the above description, the components and steps of the examples have been generally described in terms of functions in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A deep learning face recognition method based on Python is characterized by comprising the following steps:
s1, detecting a face range from the image information and determining a face area;
s2, performing definition processing on the face area;
s3, extracting facial features from the human face region;
and S4, matching the extracted facial features with the existing facial features in the database to obtain the personnel identity information of the facial features.
2. The deep learning face recognition method according to claim 1,
step S1 further includes:
carrying out gray level conversion processing on the image information;
judging whether effective face information exists;
and if the face information is valid, identifying the image information and outputting a confirmed numerical range of the face region.
3. The deep learning face recognition method according to claim 1,
step S2 further includes:
identifying a face area and intercepting;
performing binary matrix processing on each pixel point in the face region;
and carrying out LPBH algorithm analysis on the face region.
4. The deep learning face recognition method according to claim 1,
step S3 further includes:
capturing images of the face area, analyzing face information of each frame of image, and generating a face feature histogram;
determining facial features in the face region;
and marking and storing the facial features, wherein the marks of the facial features are matched with the marks of the image information.
5. The deep learning face recognition method according to claim 4,
the step of analyzing the face information of each frame of image further comprises:
detecting local information of the image to obtain a characteristic value, and comparing gray values between each pixel point and adjacent pixel points in the image to obtain face characteristic information;
converting an RGB (red, green and blue) picture in the image into a gray picture, and taking a matrix of 3x 3;
when the gray value in the image is larger than the gray value of the image at the center of the image, 0 is adopted for representing;
when the gray value in the image is smaller than the gray value of the image at the center of the image, 1 is used for representing, so that a binary list consisting of 0 and 1 is obtained;
after each pixel in the picture is processed and converted into a decimal system, a histogram is obtained, and the histogram is a feature histogram.
6. The deep learning face recognition method according to claim 1,
step S1 further includes:
using a camera to shoot image information, and judging whether face information exists or not in a mode of respectively turning over, brightness adjusting and gray level adjusting each image;
face detection is performed on the basis of each frame on the captured video image information using a cascadeclassifier.
7. The deep learning face recognition method according to claim 1 or 2,
s2 further includes:
traversing and classifying the collected image information;
classifying and identifying images shot in the same time period, and inputting the images into an LBPH classifier;
classifying and identifying based on images shot at the same place, and inputting the images into an LBPH classifier;
classifying and identifying images shot based on the same preset requirement, and inputting the images into an LBPH classifier;
and collecting the classification identification information to form a classification information table.
8. The deep learning face recognition method according to claim 1 or 2,
s4 further includes:
when the extracted facial features are not matched with the existing facial features in the database, identifying the facial features;
and storing the facial features into a database.
9. An apparatus for implementing a Python-based deep learning face recognition method is characterized by comprising:
the memory is used for storing a computer program and a deep learning face recognition method based on Python;
a processor for executing the computer program and the Python-based deep learning face recognition method to realize the steps of the Python-based deep learning face recognition method according to any one of claims 1 to 8.
10. A readable storage medium having a Python-based deep learning face recognition method, wherein the readable storage medium has stored thereon a computer program, which is executed by a processor to implement the steps of the Python-based deep learning face recognition method according to any one of claims 1 to 8.
CN202010116742.6A 2020-02-25 2020-02-25 Python-based deep learning face recognition method, equipment and readable storage medium Pending CN111291711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010116742.6A CN111291711A (en) 2020-02-25 2020-02-25 Python-based deep learning face recognition method, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010116742.6A CN111291711A (en) 2020-02-25 2020-02-25 Python-based deep learning face recognition method, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN111291711A true CN111291711A (en) 2020-06-16

Family

ID=71030800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010116742.6A Pending CN111291711A (en) 2020-02-25 2020-02-25 Python-based deep learning face recognition method, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111291711A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107609459A (en) * 2016-12-15 2018-01-19 平安科技(深圳)有限公司 A kind of face identification method and device based on deep learning
WO2019153739A1 (en) * 2018-02-09 2019-08-15 深圳壹账通智能科技有限公司 Identity authentication method, device, and apparatus based on face recognition, and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107609459A (en) * 2016-12-15 2018-01-19 平安科技(深圳)有限公司 A kind of face identification method and device based on deep learning
WO2019153739A1 (en) * 2018-02-09 2019-08-15 深圳壹账通智能科技有限公司 Identity authentication method, device, and apparatus based on face recognition, and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
薛同来等: "《基于Python的深度学习人脸识别方法》", 《工业控制计算机》 *

Similar Documents

Publication Publication Date Title
CN102902959B (en) Face recognition method and system for storing identification photo based on second-generation identity card
CN110008909B (en) Real-name system business real-time auditing system based on AI
CN110838119B (en) Human face image quality evaluation method, computer device and computer readable storage medium
Anand et al. An improved local binary patterns histograms techniques for face recognition for real time application
TW202042113A (en) Face recognition system, establishing data method for face recognition, and face recognizing method thereof
Li et al. Quality assessment for fingerprints collected by smartphone cameras
WO2017092272A1 (en) Face identification method and device
Thepade et al. Novel face liveness detection using fusion of features and machine learning classifiers
Ali et al. A robust and efficient system to detect human faces based on facial features
Lian Pedestrian detection using quaternion histograms of oriented gradients
CN113537050A (en) Dynamic face recognition algorithm based on local image enhancement
US8879805B2 (en) Automated image identification method
CN112329597A (en) Face recognition method and device
CN104615985B (en) A kind of recognition methods of human face similarity degree
CN111291711A (en) Python-based deep learning face recognition method, equipment and readable storage medium
CN210442821U (en) Face recognition device
Aydoğdu et al. A study on liveness analysis for palmprint recognition system
Das et al. Person identification through IRIS recognition
Yamini et al. Class attendance using face detection and recognition with opencv
Khalid et al. Face recognition for varying illumination and different optical zoom using a combination of binary and geometric features
CN112733738A (en) Method for comparing face recognition data
Monwar et al. A real-time face recognition approach from video sequence using skin color model and eigenface method
CN110555792A (en) Image tampering blind detection method based on normalized histogram comprehensive feature vector
CN110110623A (en) A kind of face identification system and design method based on Android platform
Shen et al. Face recognition with directional local binary patterns

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200616

RJ01 Rejection of invention patent application after publication