1 minute read

Background

This project was built as part of my Machine Learning course at Rice University. I developed a Jewelry Recommendation System that personalizes jewelry design suggestions based on a userโ€™s face shape and skin undertone using computer vision and a Streamlit app.

๐Ÿง  Problem Statement

How can we use machine learning and color theory to suggest jewelry that complements an individualโ€™s unique facial features?

๐Ÿ“Š Dataset

We used a publicly available dataset from Kaggle with over 5,000 labeled celebrity images across 5 face shapes: Oval, Round, Square, Heart, and Oblong.
Kaggle Dataset โ†’

Dataset Structure

Here are two example images from the dataset:

Heart Face Shape Example     Oval Face Shape Example

๐Ÿ’ป Tech Stack

  • Face Detection: MTCNN for facial landmarks
  • Face Shape Classification: Custom CNN using TensorFlow/Keras
  • Skin Tone Extraction: Dominant color detection with OpenCV
  • App Interface: Streamlit

๐Ÿงฌ Model Pipeline

  1. Upload image
  2. Detect facial landmarks and extract dominant colors
  3. Classify face shape (CNN)
  4. Perform color clustering to infer undertone
  5. Generate jewelry, gemstone, and metal color recommendations

Hereโ€™s a snapshot of the app in action:

๐Ÿ–ผ๏ธ Application Demo

Below are screenshots of the application UI and results:

App Screenshot

App UI Example

๐Ÿง  Recommendation Logic

We hardcoded the jewelry logic based on domain knowledge:

def recommend_jewelry_face_shape(face_shape):
    recommendations = {
        "oval": ["Drop earrings, hoops...", "Layered necklaces..."],
        ...
    }
    return recommendations.get(face_shape.lower(), "No recommendation")

๐Ÿ’ก Future Improvements

  1. Learning from user feedback:
    Incorporate aesthetic ratings to fine-tune recommendations using reinforcement learning or similarity metrics.

  2. Multimodal modeling:
    Explore neural networks that take both face shape and undertone embeddings for holistic recommendations.

  3. Jewelry embeddings:
    Fine-tune CLIP-style models to learn representations of jewelry pieces and generate recommendations based on visual similarity.


๐Ÿ“Ž Additional Resources


Built with ๐Ÿ’Ž and Python.