Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 7
Cover: Face Recognition with Occlusion Tolerance #1: LFW Face Dataset & Creating Synthetic Occlusion (Mask, Glasses, Hand)
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 with Occlusion Tolerance #1: LFW Face Dataset & Creating Synthetic Occlusion (Mask, Sunglasses, Hand)”.
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, faces from the LFW dataset automatically covered with masks, sunglasses, and hands. Occlusion like this is the main enemy of face recognition systems, and in this series, we build a model that still recognizes faces even when they are covered. Let's get started. Hello, welcome to the AI research tutorial series, face recognition with occlusion resistance using multi-scale feature fusion. Face-based attendance and security systems often fail when faces are covered by masks, sunglasses, or hands. This condition is called occlusion. In this 6-episode series, we build a complete system, dataset and synthetic occlusion, face detection and alignment, feature pyramid, multi-scale fusion with arc face loss, verification with ROC curve, up to occlusion resistance testing and face attendance application. In this first episode, we prepare the data.
We open the terminal through the terminal menu, new terminal, then install the libraries for this series, Torque, Torchvision, OpenPithon, Scikit-learn, Medplotlib, and Streamlit. The dataset is label Faces in the Wild or LFW, a collection of photos of public figures from news. Scikit-learn can download it automatically, and the version for the customer is available in the special project file for premium customers. Create a file named data_underscore_lfw.py
The load function takes people who have at least 20 photos, in color and original resolution, then saves them as a NPZ file so that the next loading is instant. The split data function divides the data into 70, 15, 15% stratified per person, so that each person appears in the training, validation, and test data.
Now create the file exploration_underscore_lfw.py and run it. There are 3,023 photos of 62 people, each 125x94 pixels. The number of photos is highly unbalanced, with the minimum being 20, the median 31, and George Wibu alone has 530 photos. This imbalance must be remembered when evaluating accuracy. The split is 2,116 training, 453 validation, and 454 test. All of them contain 62 people.
Create a file named occlusion.py Synthetic occlusion is placed based on 5 facial landmarks, 2 eyes, nose, and 2 corners of the mouth, so that the position adjusts according to the face size. The mask is a polygon from below the nose to the chin with 3 color options, sunglasses are two ellipses above the eyes along with the bridge, and the hand is an ellipse in skin color taken from the median color of the face itself, with random position and angle. Return to the exploration file.
We import the add occlusion function. Then, for the raw LFW photos, we use the average landmark position estimate, in the next episode, landmarks are detected for each face. Run. The first graph shows the imbalance in the number of photos per person. The second graph shows 4 faces in 4 versions. Original, mask, sunglasses, and hand. In this way, we can create as many occluded faces as needed without retaking photos, for augmentation during training as well as for testing.
Done. We have now learned about occlusion problems in face recognition, created the LFW dataset with 62 people, split the data in a stratified manner, and created synthetic occlusions for masks, sunglasses, and hands. In the next episode, we will detect facial landmarks with units, and align each face to the ArcV 112 pixel template. Currently working on a thesis, dissertation, or AI research in the field of face recognition and biometrics? Cerdas Inovasi Digital helps with deep learning implementation, from synthetic occlusion, face alignment, pyramid features, art face, verification, and ROC, all the way to face attendance applications, as well as opening deep learning courses with PyTor. Want to master the entire series? From face datasets to attendance applications? 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 pay once Rp999.000 for lifetime access. Want just one class? Buy single classes with lifetime access. Subscribe now on 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 →