In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to achieve Python face recognition system, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
Basic principles
Face recognition and target detection are not quite the same. For example, people traditionally train a target detection model. Only after you train this target, can your model find such a target. For example, if your target detection model is to detect plants, it is obvious that you cannot detect animals. But face recognition is different. take your mobile phone as an example, you find that you only enter your face information once, and he can identify you accurately without training. the principle of recognition here is to extract the feature vector of your face through the face recognition model, and then compare your face detected in real time with the face stored in the database. If the similarity exceeds a certain threshold, the comparison is considered to be successful. However, what I am talking about here is only a simplified version of face recognition, now mobile phones and access controls are much more complex and secure, and they are not face recognition on a simple plane.
In summary, it can be divided into the following steps:
1. Upload faces to the database
two。 Face detection
3. Compare the database and return the results
Here I have made a schematic diagram of a brief answer, which can help you to understand it briefly.
Code implementation
Needless to say, here is our code implementation, the code I have uploaded to the code cloud, you can download directly, the address is at the beginning of the blog.
Brothers who will not install the python environment, see here: how to configure the virtual environment of anaconda in pycharm
Create a virtual environment
Please download the code cloud source code at the beginning of the blog to your local before creating a virtual environment.
This time we need to use the virtual environment of python3.7. The command is as follows:
Conda create-n face python==3.7.3conda activate face installs the necessary libraries pip install-r requirements.txt
Happily start your face recognition!
Just execute the following master file
Python UI.py
Or you can run it directly in pycharm as follows
First, upload the faces of the people you need to identify to the database.
Real-time face recognition through the second video detection function
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.