A real time face recognition system is fit for recognising or checking a human from a video outline. To perceive the face in a casing, first you have to identify whether the face is available in the frame. If it is available, stamp it as a Ratio Of Index (ROI), remove the ROI and process it for facial recognition.
Real Time Face Recognition Software
This article is divided in two parts:
1. Creating a database
2. Training and Testing
1. Creating Database:
Run create_database.py script and then capture the image so it will automatically create train folder in database folder and will store all the images for future references. Then you can change ts name from train to that person's name.
While creating the database, the face should have different expressions that's why it gives us 0.38 second of delay for getting all expressions. As much images you take as your face recognition system will work accurately.
2. Training and Testing:
Data base has been created already, now here we will do next part which is Training and Testing.
![]() |
| Face_Trainig_and_Recognition |
In Haar-features, all human faces share some comman properties. So it will be helpful using haar feature.
Install OpenCV and Python on Ubuntu 16.04 :
Fallowing Shell script installs all dependencies required for OpenCV and also installs OpenCv 3.2.0
[stextbox id="grey"]$ sh ./install-opencv.sh[/stextbox]
After installing OpenCV, check it in the terminal as import commad shown in terminal.
![]() |
| Checking OpenCV version |
1. Create the database and run the recogniser script, as given below:
[stextbox id="grey"]$ python create_databse.py person_name[/stextbox]
2. Run the recogniser script, as below:
[stextbox id=”grey”]$ python face_rec.py[/stextbox]
This will start the training and camera will open up, as shown below image. Accuracy will depend on camera quality, number of data sets and light condition.
![]() |
| Face Detection complete |
That's it for today...!!!
Enjoy The day...!!!
Download Source file of this project




Comments
Post a Comment