Face Shape Recognition for Eyewear

Type
University project
Stage
First year
Team
Solo
Date
April 2025

A face-shape classifier (round, square, heart) and a clickable prototype for small online eyewear retailers, with an honest account of how well it works: the best model reached 43.9% against 50.4% for people.

  • Python
  • TensorFlow / Keras
  • CNNs
  • Transfer learning
  • Grad-CAM
  • Figma
  • A/B testing

Closest shape

Round

180 images in the dataset

Width ÷ length
Forehead ÷ jaw
Jawline
Round
Square
Heart

Drag between the three shapes the model learned. The boundaries are soft: on the same images, people agreed only 50.4% of the time. Outlines are illustrative.

Problem

Glasses are among the most-returned online purchases. Around 17.6% of online orders come back, often because of poor fit. Big brands use AI to help shoppers choose; small retailers, especially in Eastern Europe, can't. I designed a privacy-friendly alternative that needs only a photo, not a resource-heavy AR try-on.

What I did

I built a 564-image dataset of three face shapes (heart, round and square) from scratch, filtering for frontal faces and standardising formats, and audited it for racial imbalance. I then trained five models, from a basic network to transfer learning with MobileNet and VGG16, used Grad-CAM to check what the model looked at, and designed a Figma prototype tested through think-aloud sessions and an A/B test.

  1. Photoupload or capture
  2. 128 × 128standardised input
  3. VGG16transfer learning
  4. Face shapeheart, round or square
  5. Framesstyles that suit it

Result

The best model, VGG16, reached 43.9% accuracy. That is clearly above chance, but below the 50.4% that people scored on the same task, which shows how ambiguous face shapes really are. Grad-CAM confirmed it focused on the jawline, cheeks and forehead. Users found the prototype intuitive; the A/B test showed no significant difference between layouts (p > 0.05).

The honest leaderboard

Chance 34.6%
Humans 50.4%

    Test-set accuracy on 57 held-out images; errors grouped from 66 misclassifications, some fitting more than one category.

    What I'd do now

    The project was deliberately scoped to the foundations of computer vision: building a dataset, training networks from scratch, augmentation and transfer learning. The error analysis shows where those tools reach their limit, and where I would take it next:

    • Measure the face, not the pixels. Face shape is geometric. Detecting facial landmarks and computing proportions such as width-to-length and jaw-to-forehead ratios would give the model the features that actually define a shape.
    • Detect and align before classifying. Cropping and aligning each face first would remove background, hair and head tilt, the causes behind four in ten errors.
    • Treat the labels as uncertain. Since people agree only half the time, I would collect several labels per image, measure agreement, and return the two most likely shapes with a confidence score instead of a single answer.
    • Evaluate fairness per group. Rebalance the dataset across ethnicities and report accuracy for each group, not just overall.

    Skills gained

    • Dataset creation: sourcing, filtering and standardising a 564-image dataset from scratch
    • Deep learning: CNNs, data augmentation and transfer learning with MobileNet and VGG16
    • Explainable AI: Grad-CAM to verify which facial regions drive predictions
    • Responsible AI: auditing a dataset for bias and applying a fairness method to a sensitive attribute
    • User research: think-aloud studies, A/B testing with t-tests, and prototyping in Figma
    • Business analysis: market research, stakeholder mapping and a DAPS framework for the business case

    Contact

    Open to internships

    Looking for a data science or AI intern?

    I'm open to internships in data science, machine learning and computer vision. Email is the quickest way to reach me.