Face Recognition with Python and OpenCV
Hello Guys, we hope you and your family are safe. Today, we have come up with a new python tutorial to build a face recognition program based on Python and OpenCV. As asked by some of the followers on Instagram (@_tech_tutor). Today in this tutorial we are going to show something real beautiful program. Here, we are using Python 3.7.3, OpenCV, and some other Python libraries (NumPy, Dlib, CMake, and face_recognition) to build a face recognition program. But, the interesting point is that you can use any version of Python and OpenCV to run this script.
Keep in mind, You just need to install a C++ compiler on your computer. You can download the C++ compiler while installing the Visual Studio Community version.
We are going to develop a Python script that can detect whatever faces you like, it may be faces of your friends, faces of your relatives, faces of your best celebrities, faces of your idol. So, after developing a Python script you will be able to detect and recognize any faces you like and as many as you like. So what it does in this Python Script is actually drawing rectangular boxes around the faces and attempting to classify which ones they are based on a list of the provided faces. Otherwise, it will just show unknown but it still draws a rectangular box around the face.
STEPS TO RUN CODE
- a. Install the Python modules which are specified in
"requirements.txt"
- b. Within the root directory, there is the folder named “faces” which includes all the known faces, and that will be how faces of people are recognized and detected by the system.
- c. Within the root directory, there is the folder named “test” where you can place your own images in which faces are recognized and detected.
- d. The final step is to run the python script named
“face_rec.py”
.
At last, Press ‘q’ to exit the program
Finally, you can download project codes from the link given below:-
SCREENSHOT
!! Download code Now !!
My View
It is not a simple task to detect and recognize the name of a person through images. The actual work is not easy, although it looks simple. We have got a variety of algorithms and models while researching and studying different papers. There was a huge doubt as to whether it would be complete or not while pursuing this project i.e. “Face Recognition and Detection”. This project has been successful as it was expected. Additional features like an explanation of look were added for better performance to identify the detect and recognize the name of the person. Time management was one of the challenging jobs because of the late completion of the project. However, information from different sources like reports, conferences, and books help us complete this project. The project was completed successfully due to numerous resources and libraries used.
Future Plans
In the future, the following improvement can be done in this project:
- a. Deploy program on web and camera.
- b. Use a large number of images for “Face Detection and Recognize”.
- c. Save the images in the database.
- d. Improve the user interface of the system.
- e. Live detect of the face by opening webcam and camera.
☺ Thanks for your time ☺
What do you think of this “Face Recognition with Python and OpenCV“? Let us know by leaving a comment below. (Appreciation, Suggestions, and Questions are highly appreciated).
Pingback: FACE DETECTION IN 11 LINES OF CODE - AI PROJECTS - AI PROJECTS
Pingback: Sudoku Solver - AI Game | GRASP CODING
Pingback: Best Artificial Intelligence Project Ideas For FYP | GRASP CODING
Thx so much,am a student trying to do a similar project for plant desease detection
Do you have any recommendations to such system?
Thx alot
Much love from UGANDA
Hey Narath, We hope you and your family are keeping safe.
The project you are talking about is based on Multi-Label classification.
Visit this link for a dataset: https://www.kaggle.com/emmarex/plantdisease
For more details mail us at graspcoding.business@gmail.com
Thank You!!
hello did you do any of the future plans with this project such as webcam face recognition ?
thanks
Hello Hamza,
we are planning to use webcam face recognition for verifying valid voters during the constitution, also in sports games (to verify valid players), and so on.
I am a final year student of computer science working on Object recognition using CNN.
Please any help will be appreciated!
This is post. I´ve.
Best regards,
Thompson Raahauge