# FacEmotion

> Facial-emotion classifier trained on 35K+ images with 87% accuracy, paired with Gemini 1.5 Pro mood recommendations; first place among 53 teams.

**Timeline:** Jan 2024 - May 2024

**Organization:** Data Science SB

**Focus:** ml, cv

**Stack:** PyTorch, OpenCV, Gemini, Streamlit

## Problem

Detect facial emotions in real time and recommend personalized actions to improve user mood.

## Approach

CNN optimized on a 35K+ image dataset with robust preprocessing and augmentation; Gemini 1.5 Pro integration for context-aware recommendations; Streamlit + OpenCV for low-latency delivery.

## Implementation notes

- Built a facial-emotion analysis system that secured first place among 53 teams in the UCSB Data Science Competition.
- Designed and trained a CNN architecture on 35,000+ labeled facial images, achieving 87% accuracy in multi-class emotion detection.
- Integrated Gemini 1.5 Pro to provide personalized, real-time mood enhancement recommendations based on live frame analysis.
- Built an end-to-end prototype with OpenCV preprocessing and a Streamlit UI for responsive inference and user feedback.
- Outcomes: 1st Place Winner — UCSB Data Science Competition; 87% emotion detection accuracy; 35,000+ training images.

## Impact

- 1st place among 53 teams — UCSB Data Science Competition
- 87% emotion detection accuracy
- 35,000+ training images
- **accuracy:** 87%
- **images:** 35,000
- **teams:** 53

## Recognition

- 1st place among 53 teams — UCSB Data Science Competition

## Source and supporting links

- [https://github.com/cboiteux2765/FacEmotion/tree/main](https://github.com/cboiteux2765/FacEmotion/tree/main)

## Related projects

- [Self-play vs. text pretraining](https://mihir-s.com/projects/icl-selfplay-vs-text.md)
- [Wine Quality Classifier](https://mihir-s.com/projects/wine-quality.md)
