Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 8
Cover: Face Recognition Occlusion-Tolerant #6 Class: Occlusion Tolerance Testing & Face Attendance Application
Click a page or use ◀ ▶ to turn · swipe on mobile · to enlarge
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Face Recognition Occlusion-Tolerant #6 Occlusion Resistance Test & Face Attendance Application”.
Other ways we can help with Python.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

Multi-Objective Optimization Course: NSGA-II, MOPSO & Hybrid Algorithms (Python)

ECG Arrhythmia Classification Course with Wavelet & Deep Learning (PyTorch)

ANFIS + PSO/GA Course for Non-Linear Time Series Forecasting (Python)
Have it built for you
No time to learn Python? Our team can do the project for you.

Python Machine Learning — Prediction Models, Customer Segmentation, Fraud Detection & AI Apps

AI Image Creation with Stable Diffusion — Unlimited Custom Visual Production
★ 4.9

AI Image & Video Creation with Leonardo AI — All-in-One Visuals for Business
★ 4.9
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Here is the final result, a facial attendance application that still recognizes employees even when wearing a mask, records their attendance time, and rejects unregistered strangers. Previously, we proved with numbers what actually makes the model resistant to occlusion. The results may not be what you expected. Let's get started. Hello, welcome to the final episode of the facial recognition series with occlusion resistance. We already have three models and methods to measure verification. Today's main question is, how resistant are the models to masks, glasses, and hands, and what causes it? After that, we face a real-world issue that is often overlooked, which is unregistered strangers, then packaging everything into a facial attendance application.
Create a test file underscore occlusion dot pey. The accuracy function builds the centroid gallery from the training data, then recognizes each test face. We prepare four versions of test data. Without occlusion, everything is masked, everything is wearing black glasses, and everything is covered by hands. The three models from episode 4 are tested on these four versions.
Run. Without occlusion, the three models are comparable, around 95%. With occlusion, the multi-scale fusion model and the single-scale model trained with occlusion augmentation remain around 90%. But the fusion model without occlusion augmentation drops drastically. Around 60% for masks, 50% for hands, and only 20-40% for black glasses. This is the most important finding of this series. The key to occlusion resistance is occlusion augmentation during training. Meanwhile, multi-scale fusion on the small LFWi dataset gives results comparable to single-scale. Honest results like this are important to report in research.
Now, preparing for attendance. Create a file named underscore_asing.py that contains 600 faces of people from the LFWi dataset outside the gallery as foreign individuals, with cacen.pz. Then create a file named daftar_underscore_wajah.py. Each employee is registered as a sentroid embedding from their training photos and saved to the galeri.npz. We also prepare example photos for the application. Three employees from the test data, original version and masked or glasses version, plus one unregistered visitor. Run the application.
Create a file named kalibrasi_underscore_asing.py. Tresol from episode 5 is calculated between known model individuals. For attendance, foreign individuals must be rejected, even though their embeddings were never trained. We compare employee scores, both without occlusion and with occlusion, with the highest score of foreign individuals in the gallery. Run the application. The table shows the trade-off, Low Tresol accepts almost all employees but many foreign individuals pass through, High Tresol rejects foreign individuals but more masked employees are rejected. We choose Tres, which allows a maximum of 10% foreign individuals to pass, around 0.8, and save it.
Now the application. Create a file named app_underscore_absensi.py with streamlit. Model, gallery, employee names, and Tresol attendance are loaded once with cacah resource. The page contains a select box for example photos, file uploader, and an option to use webcam with input camera, So that your attendance can be taken directly from the camera on your laptop.
In the face recognition section, landmarks are detected with units, the face is aligned to 112 pixels, embedding is calculated, then compared with all centroids. If the highest score exceeds Tresol, the employee's name is displayed and their attendance is recorded in absensi.csv along with the date and time, once per day. If not, the face is considered unknown. We run it with streamlit run and open it in the browser.
The application appears. First image, Serena Williams without a mask, is immediately recognized and their attendance is recorded. We select Junichiro Koizumi who is wearing a mask, still recognized with a high score and added to the attendance list. Lastly, an unregistered visitor, their highest score is far below Tresol, so they are rejected and not recorded. For use in the office, retrain with your own employee photos and recalibrate Tresol.
Done And that concludes this series. We have built a complete research on occlusion-resistant face recognition, the LFW dataset and synthetic occlusion, face detection and alignment, pyramid features, multi-scale fusion with arc face loss, verification with ROC and IIR, occlusion robustness testing, open set calibration, up to the face attendance application. For further research, try much larger datasets like Kasia Web Face, real occlusion datasets like masked face datasets, or spatial attention that learns to ignore covered areas. Thank you for following this series. Currently working on a thesis, dissertation, or AI research in the field of face and biometric recognition? Cerdas Inovasi Digital helps with deep learning implementation, from synthetic occlusion, face alignment, pyramid features, arc face, verification and ROC, up to face attendance application. As well as opening a deep learning course with PyTor. Want to master the entire series? From face dataset to face attendance application? All 6 episodes, complete with a step-by-step PDF guide and source code, available for premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or one-time payment of Rp999.000 for lifetime access. Want just one class? Buy the single class with lifetime access. Subscribe now at the premium page cerdasinovasidigital.com Contact our WhatsApp, or visit cerdasinovasidigital.com Thank you for watching, see you in the next episode. Thank you for watching,
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →