プロジェクト
GitHubで見る
murtiunlimited/face-emotion-recognition
概要
Real-time Face & emotion recognition system using a lightweight CNN, with OpenCV webcam inference, GroqCloud for chatbot & FastAPI + frontend web deployment.
Web・アプリ開発できること
- Real-time emotion detection
- Lightweight CNN (fast inference)
- Works with webcam + browser
- FastAPI backend for scalable deployment
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルFacial Emotion Recognition (FER Project)
This project performs real-time facial emotion detection using a CNN model.
It supports both:
- OpenCV (desktop webcam)
- Web browser (FastAPI + frontend)
- Web Browser Version With Shell
- Vercel and Render For Web Deployment (TBD)
📁 Project Setup and Structure
FER-PROJ-2/
├── .github/
│ ├── workflows/
│ ├── ci.yml
├── api/
│ ├── app.py
│ ├── __init__.py
├── data/
│ ├── processed/
│ │ ├── train/
│ │ └── validation/
│ └── raw/
│ ├── test/
│ └── train/
├── frontend/
│ └── index.html
│ ├── ai.html
│ ├── realtime.html
├── tests/
│ ├── test_api.py
│ ├── test_data.py
│ ├── test_imports.py
│ ├── test_inference.py
│ ├── test_model.py
├── models/
│ ├── best_emotion_model.keras
│ └── final_emotion_model.keras
└── src/
├── data/
│ ├── __pycache__/
│ ├── __init__.py
│ ├── preprocess.py
├── inference/
│ ├── __init__.py
│ ├── predict.py
│ └── webcam.py # if user prefers openCV
├── llm/
│ ├── __init__.py
│ ├── groq_client.py
├── models/
│ ├── __init__.py
│ ├── evaluate.py # MLFLOW included
│ ├── model.py
│ └── train.py # MLFLOW included
├── utils/
│ ├── __init__.py
│ └── config.py
└── __init__.py
├── Dockerfile
├── README.md
├── render.yaml
├── .env (MAKE SURE TO ADD IN GITIGNORE FILE)
├── .gitattributes
├── requirements.txt
├── run_pipeline.py # if user prefers web version by python script
└── shellscript.sh # if user prefers web version by shell script
1. Create Virtual Environment
python -m venv venv
2. Activate Virtual Environment
Windows:
venv\Scripts\activate
Mac/Linux:
source venv/bin/activate
3. Install Requirements
pip install -r requirements.txt
pip install -r requirements-dev.txt
OpenCV Version (Desktop Webcam)
1. Preprocess Data
python -m src.data.preprocess
2. Train Model
python -m src.models.train
3. Run Webcam Detection
python -m src.inference.webcam
Web Browser Version (FastAPI + Frontend)
Step 1: Preprocess Data
python -m src.data.preprocess
Step 2: Train Model
python -m src.models.train
Step 3: Start Backend Server
uvicorn api.app:app --reload
Step 4: Launch Frontend
- Open
frontend/index.htmlin your browser - Allow camera access
- Start detecting emotions 🎉
Web Browser Version With Shell
Enable Script Execution
chmod +x shellscript.sh
Run Full Pipeline (Preprocess + Train + Launch)
./shellscript.sh
Model Details
- Input: 48×48 grayscale face images
- Architecture: Lightweight CNN
- Classes:
- Angry
- Disgust
- Fear
- Happy
- Sad
- Surprise
- Neutral
Features
- Real-time emotion detection
- Lightweight CNN (fast inference)
- Works with webcam + browser
- FastAPI backend for scalable deployment
Notes
- Ensure your webcam is accessible
- Backend must be running before opening the frontend
- Model file (
final_emotion_model.keras) must exist in model_artifacts - Backend will be deployed using Render and Frontend with Vercel
関連プロジェクトを探す
読み込み中…