In this project, we will make the Attendance machine use face recognitioin and check health status: Oxygen saturation (SpO2) and heart rate.
SpO2 is a measurement of how much oxygen your blood is carrying as a percentage of the maximum it could carry. For a healthy individual, the normal SpO2 should be between 96% to 99%.
Some people with the novel coronavirus have alarmingly low levels of blood oxygen, and they don’t even have a clue that their lives are in danger.
If this level falls below 90, the person will require oxygen to maintain brain, heart and other organ function, they run the risk of developing hypoxemia or lungs are failing to sufficiently oxygenate their blood.
2) Features- Face recogintion
- Measure SPO2 and Heart rate
- LCD display
LCD and Raspi
Max30102 and Raspi
1) 3D printing for cam and Max30102 holder
2) All in box:
1) Install Opencv on raspi
If your Raspi not install Opencv, please follow tutorials:
https://www.pyimagesearch.com/2018/09/26/install-opencv-4-on-your-raspberry-pi/
2) Get the code
Download the code attached, you will have the folder and all the code needed for this project
3) Get and train data
Step 1: get face data
In dataset folder, make new folder with name of person you would like your recognition system to recognize.
Then run this command
python 1_build_face_dataset.py --cascade haarcascade_frontalface_default.xml --output .\dataset\Dami\
This
will open webcam and you press "K" to take picture.
Step 2: Train data
Run this command to train data in dataset
python 2_encode_faces.py --dataset dataset --encodings encodings.pickle --detection-method cnn
Affter
finish, we will have "encodings.pickle" file
4) Run on raspi
Put all file in raspi, install packet in requirement file
sudo pip install -r requirement.txt
Then start program
python 3_pi_face_recognition.py --cascade haarcascade_frontalface_default.xml --encodings encodings.pickle
Runing
6) ConclusionThis is a simple version, the heart rate and SpO2 sometime measure not correct
and the fps of camera is 1 - 2 fps, need to improve more.
Comments