Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,12 +54,55 @@ footer { display: none !important; }
|
|
| 54 |
"""
|
| 55 |
|
| 56 |
ABOUT_MARKDOWN = """
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
"""
|
| 64 |
|
| 65 |
# --- BACKEND LOGIC ---
|
|
|
|
| 54 |
"""
|
| 55 |
|
| 56 |
ABOUT_MARKDOWN = """
|
| 57 |
+
## 🚀 About This Project
|
| 58 |
+
|
| 59 |
+
This application is the culmination of a complete, end-to-end MLOps project, demonstrating the full lifecycle from research and experimentation to a final, deployed, state-of-the-art solution.
|
| 60 |
+
|
| 61 |
+
**💻 [View Project on GitHub](https://github.com/AlyyanAhmed21/Emotion-Recognition-MLOps)**
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
### ✨ Key Technical Features
|
| 67 |
+
|
| 68 |
+
* **State-of-the-Art AI Model:** The core of this app is a **Swin Transformer**, a powerful Vision Transformer (ViT) architecture. It was pre-trained on the massive **AffectNet** dataset, ensuring high accuracy and robust generalization to real-world, "in the wild" facial expressions.
|
| 69 |
+
|
| 70 |
+
* **Full MLOps Lifecycle Demonstration:** This project wasn't a straight line. It involved a reproducible pipeline built with **DVC** that progressed through:
|
| 71 |
+
1. **Initial Model (MobileNetV2):** Achieved high accuracy (~96%) on a clean, posed dataset (CK+) but failed to generalize to real-world faces, demonstrating a key data science challenge.
|
| 72 |
+
2. **Data-Centric Iteration:** Experimented with combining and balancing multiple datasets (FER+, CK+) to improve robustness, highlighting the importance of data quality.
|
| 73 |
+
3. **Final SOTA Integration:** Strategically pivoted to a powerful, pre-trained model from the Hugging Face Hub to achieve superior real-world performance.
|
| 74 |
+
|
| 75 |
+
* **Full-Stack & Deployment:** The application architecture evolved from a Python-only script to a decoupled **FastAPI backend** and a **React frontend**, and was ultimately deployed as this streamlined and robust **Gradio** application.
|
| 76 |
+
|
| 77 |
+
* **Containerized & Automated:** The entire application is packaged with **Docker** and is set up for **CI/CD with GitHub Actions**, enabling automated testing and deployment to cloud platforms like Hugging Face Spaces.
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
### 🛠️ Architecture & Tech Stack
|
| 82 |
+
|
| 83 |
+
* **Machine Learning & CV:**
|
| 84 |
+
* Python, PyTorch, Hugging Face `transformers`
|
| 85 |
+
* `MTCNN` for robust face detection
|
| 86 |
+
* `OpenCV` for image processing
|
| 87 |
+
|
| 88 |
+
* **MLOps & DevOps:**
|
| 89 |
+
* **DVC:** For data versioning and building reproducible pipelines.
|
| 90 |
+
* **GitHub Actions:** For CI/CD and automated deployment.
|
| 91 |
+
* **Docker:** For containerizing the application for consistent environments.
|
| 92 |
+
* *(MLflow was used for experiment tracking during the training phase)*
|
| 93 |
+
|
| 94 |
+
* **Application & UI:**
|
| 95 |
+
* **Gradio:** For building and deploying this interactive UI.
|
| 96 |
+
* *(FastAPI and React were used in an alternate full-stack version of the application)*
|
| 97 |
+
|
| 98 |
+
### 💡 Skills Demonstrated
|
| 99 |
+
|
| 100 |
+
This project showcases a comprehensive skillset in building modern AI systems:
|
| 101 |
+
|
| 102 |
+
* **Data Science & Analysis:** Deeply analyzing dataset quality, identifying limitations (e.g., posed vs. "in the wild"), and making strategic, data-driven decisions to improve model performance.
|
| 103 |
+
* **Deep Learning & Computer Vision:** Implementing and fine-tuning multiple advanced architectures (CNNs, Vision Transformers) for a complex computer vision task.
|
| 104 |
+
* **Full-Stack Application Development:** Building both decoupled (FastAPI/React) and unified (Gradio) web applications to serve a live ML model.
|
| 105 |
+
* **MLOps & CI/CD Automation:** Engineering a complete, end-to-end pipeline that is version-controlled, reproducible, and automatically deployed, reflecting best practices in production machine learning.
|
| 106 |
"""
|
| 107 |
|
| 108 |
# --- BACKEND LOGIC ---
|