Age & Gender Detection
A transfer-learning pipeline with no training required
Real-time face detection predicting gender and age bracket from images or webcam video, built entirely on OpenCV's DNN module with pre-trained Caffe models.
- Age buckets
- 8
- 0–2 through 60–100
- Training required
- None
- Caffe Model Zoo weights
- Input
- Image or webcam
The pipeline locates faces with OpenCV's DNN face detector, then runs each detected region through two separate CNNs — one for gender, one for age — bucketing predictions into eight ranges: 0–2, 4–6, 8–12, 15–20, 25–32, 38–43, 48–53 and 60–100. Results are drawn onto the source image or video frame.
Everything runs on pre-trained Caffe Model Zoo weights with no training step, which is the point: it is a demonstration of an end-to-end transfer-learning pipeline for facial attribute prediction, assembled rather than trained.