A machine learning-based web application that detects whether a person is smiling in an image. The system classifies input images into two categories: Smiling or Not Smiling. It provides instant predictions through an interactive web interface built with Streamlit.
This project demonstrates practical use of computer vision, image preprocessing, and binary classification using a trained machine learning model.
- Upload an image and get instant smile detection
- Automatic face detection using OpenCV
- Machine learning-based binary classification
- Displays prediction confidence score
- Simple and responsive web interface
- Dark-themed UI for better user experience
- The user uploads an image through the web interface
- OpenCV detects a face in the image
- The detected face is cropped and preprocessed
- The image is converted to grayscale, resized, and flattened
- A trained machine learning model predicts whether the person is smiling
- The result and confidence score are displayed on the screen
| Technology | Purpose |
|---|---|
| Python | Core programming language |
| Streamlit | Web application framework |
| OpenCV | Face detection and image processing |
| NumPy | Numerical computations |
| scikit-learn | Model training and prediction |
| Joblib | Model serialization |
| Pillow | Image handling |
Smile-Predictor/
│ ├── app.py # Streamlit application
├── smile_stalker.pkl # Trained machine learning model
├── scaler.pkl # Feature scaler
├── requirements.txt # Project dependencies
└── README.md # Documentation