This project is entirely set up on Raspberry Pi-3 model
- Raspberry Pi 3 model B
- USB webcam
- Numpy
- cv2
- pymongo
- Mediapipe (Using Mediapipe, I was able to detect multifaces in the frame in real time.)
- Dlib( Click here to know how I installed Dlib on Raspberry Pi )
- imutils
- Go to MongoDB and configure a MongoDB Atlas cluter running, Setup the MongoDB cluster and copy the URI. (Procedure)
- create var.py file in the root folder and create variable DB and paste your MongoDB URI
DB = YOUR_URI_WITH_QUOTES
Mediapipe gives 468 facial landmarks. To locate iris posistion,it is required to note down the eye landmarks.
On running the python file given in this repositry on Raspberry Pi with USB Webcam connected,I was able to detect the face and eye landmarks. Also detects the Iris position (tells whether the person is looking at center,right or left). Along with this, it also determines the number of people in the frame.
The number of faces in the frame will be logged on to the database every 5 seconds.
Referneces: Ai Phile