Deep Learning · TEE · section
F25 Q3b
Final examination December 2025 fully solved
Question
Question (10 marks). Design face-recognition attendance using a CNN when the supplied dataset is very small. Discuss ways to address the issue and explain transfer learning.
Answer — step by step
Transfer learning reuses features learned on a source task to solve a related target task. For a small face-attendance dataset, a pretrained CNN provides a stronger starting point than estimating a very large model entirely from that small dataset.
1. Collect labeled examples with varied lighting, pose and background. Split data so duplicate or near-duplicate photos do not leak across sets. For evaluation on enrolled identities, use different capture sessions in each split.
2. Resize images and apply the preprocessing expected by the pretrained model. Use label-preserving augmentation such as small crops, shifts or illumination changes.
3. Load a suitable pretrained CNN, remove its source classification head and attach a new head with one output per required class. For mutually exclusive classes use softmax and categorical cross-entropy.
4. Freeze the convolutional base and train the new head. Frozen parameters still participate in prediction but are not updated in this stage.
5. If validation results justify it, unfreeze selected later layers and fine-tune with a smaller learning rate. Use early stopping and appropriate regularization.
6. Evaluate on held-out sessions, inspect per-class errors, and reject low-confidence/unregistered cases if the attendance design requires that behavior.
Feature extraction keeps the base frozen; fine-tuning updates some pretrained weights. Benefits include reduced target-data requirements and faster useful training. Risks include source-target mismatch and overfitting the small target set. Transfer learning improves the starting point, not a guarantee of perfect recognition.