Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- video-classification
|
| 5 |
+
- emotion-detection
|
| 6 |
+
- education
|
| 7 |
+
- qwen2.5-vl
|
| 8 |
+
library_name: transformers
|
| 9 |
+
base_model:
|
| 10 |
+
- Qwen/Qwen2.5-7B-Instruct
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# DAiSEE Emotion Detection Model
|
| 14 |
+
|
| 15 |
+
This model detects 4 emotion states (Boredom, Engagement, Confusion, Frustration) from educational videos.
|
| 16 |
+
|
| 17 |
+
## Architecture
|
| 18 |
+
|
| 19 |
+
- **Stage 1**: Qwen2.5-VL-7B-Instruct (embedding extraction)
|
| 20 |
+
- **Stage 2**: MLP classifiers (4 separate models)
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
+
|
| 24 |
+
### Via Inference Endpoint
|
| 25 |
+
|
| 26 |
+
```python
|
| 27 |
+
import requests
|
| 28 |
+
import base64
|
| 29 |
+
|
| 30 |
+
# Encode video
|
| 31 |
+
with open("student_video.avi", "rb") as f:
|
| 32 |
+
video_b64 = base64.b64encode(f.read()).decode()
|
| 33 |
+
|
| 34 |
+
# Send request
|
| 35 |
+
response = requests.post(
|
| 36 |
+
"https://YOUR-ENDPOINT.aws.endpoints.huggingface.cloud",
|
| 37 |
+
headers={"Authorization": f"Bearer {YOUR_HF_TOKEN}"},
|
| 38 |
+
json={"inputs": video_b64}
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
predictions = response.json()
|
| 42 |
+
print(predictions)
|