Intel OpenVINO is the most powerful AI platform around the world. It's ability to run inference with any models whether it is Caffe or TF. Harnessing it's true power I am going to build a school student attendance system with face detection and recognition.
ProblemThe traditional ways of attendance marking has so many drawbacks. But implementing systematic way is very expensive until Intel OpenVINO came to the market. On the other hand traditional register marking takes lot of valuable time and it takes additional time to convert paper based attendance records into the system rather computer readable format.
SolutionMy solution for the problem is face-recognition based attendance system. It is very cheap because of Intel OpenVINO heterogenous hardware platform support. Using single laptop can take entire school students attendance without human intervention and less time. This solution is totally touch-less and healthy. The existing thumb prints attendance may subject to spread touch based infection such as Covid-19 or any kind of viral diseases.
How it worksI am using the below pre-trained models to identify the students from face database (face gallery).
face-detection-retail-0004
- Fore detection for face
head-pose-estimation-adas-0001
- Detect face angle
landmarks-regression-retail-0009
- Predict face key points
face-reidentification-retail-0095
- Recognize face
The terminal application reads the input video stream from webcam and performs independent analysis of each frame. The face-detection model predicts the face bounding boxes. Then, head-pose-estimation detects angle of the face but this is not mandatory. The landmark-regression model predicts the face key points and feed those into face-reidentification model to match with faces in face gallery. Then, the processing results are visualized and displayed on the screen.
Installing and setup IntelOpenVINO
You can find information how to install Intel OpenVINO on Windows environment here.
Python 3 needs to be installed. You can find information how to install python here.
How to install OpenCV you can find here.
Components of the system
Run the code
- Download all the pre-trained model from the github.
- Copy all of them into a folder.
- Before run the code there should be a folder called "face_gallery" in the C drive with all the student faces that need to be recognized,
- Open run.bat using a text editor
- Adjust setupvars.bat file according to your OpenVINO installation.
- Open a terminal and run the run.bat
- If everything is okay it will show OpenCV window to display the resulting video frame and detections.
Below is the code snippet of the run.bat
call "C:\Program Files (x86)\IntelSWTools\openvino\bin\seupvars.bat"
python ./face_recognition_demo.py ^
-m_fd ./face-detection-retail-0004.xml ^
-m_lm ./landmarks-regression-retail-0009.xml ^
-m_reid ./face-reidentification-retail-0095.xml ^
-m_hp ./head-pose-estimation-adas-0001.xml ^
-fg "C:/face_gallery" ^
-v
ConclusionIntel OpenVINO is very easy to use unified inference engine designed for heterogenous hardware platform. The platform is well tested and has a lot of getting started materials and it is totally free to use also. Intel has put enormous effort to bring this kind of technology to the world and ultimately bring a lot of benefits for the community.
Comments