An open API service indexing awesome lists of open source software.

https://github.com/wishercarts/face-recognition-system

AI Face Recognition System using Python & Streamlit
https://github.com/wishercarts/face-recognition-system

machine-learning python streamlit

Last synced: 2 months ago
JSON representation

AI Face Recognition System using Python & Streamlit

Awesome Lists containing this project

README

          

# Face Recognition System 🧠

โปรเจกต์ระบบจำแนกใบหน้าโดยใช้ Machine Learning

[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://wishercarts-face-recognition-system-app-vti7zr.streamlit.app/)

👉 **[Live Demo](https://wishercarts-face-recognition-system-app-vti7zr.streamlit.app/)**

## ทำอะไร?

ระบบนี้ใช้ **PCA** ลดขนาดข้อมูลรูปภาพ แล้วใช้ **SVM** จำแนกว่าเป็นใบหน้าของใคร

## Dataset

ใช้ชุดข้อมูล **LFW (Labeled Faces in the Wild)** จาก sklearn

- รูปใบหน้าคนดัง
- ขนาด 62x47 pixels

## วิธีรัน

```bash
# ติดตั้ง dependencies
pip install -r requirements.txt

# รัน training script
python Faces.py

# รัน dashboard
streamlit run app.py
```

## ไฟล์ในโปรเจกต์

| ไฟล์ | อธิบาย |
| ------------------ | -------------------------- |
| `Faces.py` | โค้ดหลักสำหรับ train model |
| `app.py` | Dashboard แสดงผลลัพธ์ |
| `requirements.txt` | รายการ library ที่ใช้ |

## เทคนิคที่ใช้

1. **PCA** - ลด features จาก ~3000 เหลือ 150
2. **SVM (RBF kernel)** - จำแนกใบหน้า
3. **GridSearchCV** - หาค่า parameter ที่ดีที่สุด

## ผลลัพธ์

- Accuracy ประมาณ 85-90%
- แสดง Confusion Matrix และ Pie Chart

## สิ่งที่เรียนรู้

- การใช้ PCA สำหรับ dimensionality reduction
- การ train SVM classifier
- การปรับจูน hyperparameters ด้วย GridSearchCV
- การ visualize ผลลัพธ์ด้วย matplotlib และ seaborn

---

# 🌐 English Version

## What is this?

A Face Recognition System using Machine Learning techniques: **PCA** for dimensionality reduction and **SVM** for classification.

[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://wishercarts-face-recognition-system-app-vti7zr.streamlit.app/)

👉 **[Live Demo](https://wishercarts-face-recognition-system-app-vti7zr.streamlit.app/)**

## Dataset

Using **LFW (Labeled Faces in the Wild)** dataset from sklearn:

- Celebrity face images
- Image size: 62x47 pixels

## How to Run

```bash
# Install dependencies
pip install -r requirements.txt

# Run training script
python Faces.py

# Run dashboard
streamlit run app.py
```

## Project Files

| File | Description |
| ------------------ | ------------------------------- |
| `Faces.py` | Main training script |
| `app.py` | Streamlit dashboard for results |
| `requirements.txt` | List of required libraries |

## Techniques Used

1. **PCA (Principal Component Analysis)** - Reduce features from ~3000 to 150 components
2. **SVM (Support Vector Machine with RBF kernel)** - Face classification
3. **GridSearchCV** - Hyperparameter tuning to find optimal parameters

## Results

- Accuracy: approximately **85-90%**
- Visualization: Confusion Matrix and Pie Chart

## What I Learned

- Implementing PCA for dimensionality reduction
- Training SVM classifier for multi-class classification
- Hyperparameter tuning with GridSearchCV
- Data visualization with matplotlib and seaborn
- Building interactive dashboards with Streamlit

---

Made by **Wish Nakthong** | 📧 Contact: [GitHub](https://github.com/WISHERCARTs)