Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,13 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🧠 Stroke Pain Detection App
|
| 2 |
+
|
| 3 |
+
A Streamlit-based app for automatically assessing pain intensity in stroke patients using facial asymmetry and deep learning.
|
| 4 |
+
|
| 5 |
+
This project uses three steps:
|
| 6 |
+
1. **Detect the affected side** of a stroke patient's face using a Keras-based CNN model.
|
| 7 |
+
2. **Crop the unaffected half** of the face.
|
| 8 |
+
3. Use a PyTorch model to **predict the pain intensity (PSPI score)** from the expressive half.
|
| 9 |
+
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
## 🚀 How to Use This App
|
| 13 |
+
|
| 14 |
+
Simply upload a **full-face image** of a stroke patient and let the model:
|
| 15 |
+
- Detect the affected side
|
| 16 |
+
- Crop the unaffected side
|
| 17 |
+
- Predict the patient's pain intensity (PSPI)
|
| 18 |
+
|
| 19 |
+
✅ You can access the live app here:
|
| 20 |
+
[🔗 Launch App →](https://huggingface.co/spaces/AdhamQQ/StrokePatientsModel)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
## 💾 Models Used
|
| 24 |
+
|
| 25 |
+
These models are automatically downloaded on first run:
|
| 26 |
+
|
| 27 |
+
| Model | Description | Link |
|
| 28 |
+
|----------------------------------|----------------------------------------|----------------------------------------------------------------------|
|
| 29 |
+
| `cnn_stroke_model.keras` | Detects the affected side of the face | [Download](https://huggingface.co/AdhamQQ/cnn_stroke_model/resolve/main/cnn_stroke_model.keras) |
|
| 30 |
+
| `right_side_pain_model.pth` | Predicts pain intensity (PSPI score) | [Download](https://huggingface.co/AdhamQQ/cnn_stroke_model/resolve/main/right_side_pain_model.pth) |
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## 🧠 Project Goals
|
| 35 |
+
|
| 36 |
+
This app is part of a larger system to:
|
| 37 |
+
- Automatically detect which side of a stroke patient's face is impaired
|
| 38 |
+
- Use the **expressive side** to analyze pain using PSPI (Prkachin and Solomon Pain Intensity) scores
|
| 39 |
+
|
| 40 |
---
|
| 41 |
|
| 42 |
+
## ✨ Credits
|
| 43 |
+
|
| 44 |
+
using:
|
| 45 |
+
- Streamlit
|
| 46 |
+
- TensorFlow/Keras
|
| 47 |
+
- PyTorch
|
| 48 |
+
- Hugging Face Hub
|
| 49 |
+
|