ย ย ย ย
Recognizes people from video using dlib's state-of-the-art face recognition
built with deep learning. This is revised model of face_recognition which works on live video or live stream from drone. Dlib's accuracy is much more than openCV recognition models. (Almost 98% accurate)
1. git clone https://github.com/thirstycode/face-recognition-drone-dlib/
2. cd face-recognition-drone-dlib
3. pip3 install -r requirements.txt
- Install dlib
- For Windows Users : Dlib for windows
- For MACOS : Dlib for macos
- For Linux/Ubuntu : Dlib for ubuntu
5. pip3 install dlib
6. pip3 install face_recognition
- There are two models included in here. 1. Normal model 2. Knn model
- Normal model : It is normal model that use 1 image of user to train the face recognition.
- Knn model (Works on Euclidean distance) : Uses as many as images to train the model , so that it can be better in accuracy. This model is 2-4 times slower than normal model.
- There is status of every person's data . Vip status persons will be shown in green & Blacklisted in red & undetected in white
- Have a look at error1.txt in errors folder before using normal model.
- Normal Model : Add new folder in 'train-images' folder and name it as s3 , s4 etc etc (it depends on how much person's data you have added). Add only 1 image of person in respective folder and add name.txt having name and status.txt having status i.e vip/blacklisted.
- Knn model : Add new folder in 'knn-train' folder , named as the person's name. Add as much as person's photos in respective folder and make status.txt
For normal model
1. python3 webcam.py
2. python3 drone.py
For knn model
1. python3 webcam_knn.py
2. python3 drone_knn.py
To check on image with normal model
Make sure to open image_test and give path to your image
1. python3 image_test.py
- Normal model : Edit variables in
config.py
(All the working of respective variables are given itself in config.py) - Knn model : Edit variables in
config_knn.py
(All the working of respective variables are given itself in config_knn.py)
- Insert live stream url in
config.py
/config_knn.py
to use drone.py
- All checked images are saved in 'reports' folder.
- Can be used with cuda of nvidia for parallel computation in gpu to have faster processing.
- Thus we can process whole video as processing will be accompanied by powerful nvidia graphic cards.
- Adam Geitgey who made face_recognition module to make things connecting with dlib.
- Feel free to create an issue in repo. I'll be happy to help you ๐