combe4259 commited on
Commit
4cf8a14
ยท
verified ยท
1 Parent(s): 9e44157

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -0
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: ko
3
+ license: apache-2.0
4
+ tags:
5
+ - video-classification
6
+ - cnn-lstm
7
+ - pytorch
8
+ - confusion-detection
9
+ - daiSEE
10
+ datasets:
11
+ - daiSEE
12
+ metrics:
13
+ - accuracy
14
+ - f1
15
+ - precision
16
+ - recall
17
+ ---
18
+
19
+ ## Colab Notebook
20
+
21
+ ์•„๋ž˜ Colab์—์„œ ๋ชจ๋ธ์„ ์ง์ ‘ ์‹คํ–‰ํ•˜๊ณ  ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
22
+
23
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1OkrPq9Cc0kXllSUFG24C-Xz6zZm45Izx?authuser=1#scrollTo=ixU-OYlQ2o79)
24
+
25
+
26
+ # Face Comprehension: Confusion Binary Classification
27
+
28
+ ์ด ๋ชจ๋ธ์€ **DAiSEE ๋ฐ์ดํ„ฐ์…‹**์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์‚ฌ๋žŒ์˜ ํ‘œ์ •ยทํ–‰๋™์„ ๋ถ„์„ํ•˜์—ฌ **Confusion(ํ˜ผ๋ž€)** ์—ฌ๋ถ€๋ฅผ ์ด์ง„ ๋ถ„๋ฅ˜ํ•˜๋Š” **๋น„๋””์˜ค ์ดํ•ด ๋ชจ๋ธ**์ž…๋‹ˆ๋‹ค.
29
+ Confusion ๋ ˆ์ด๋ธ”(0~3)์„ **0: Not Confused vs 1: Confused(1~3)** ๋กœ ๋‹จ์ˆœํ™”ํ•˜์—ฌ ํ•™์Šตํ•˜์˜€์Šต๋‹ˆ๋‹ค.
30
+
31
+ ---
32
+
33
+ ## ๋ชจ๋ธ ๊ตฌ์กฐ (Model Architecture)
34
+
35
+ - **Backbone**: MobileNetV2 (ImageNet ์‚ฌ์ „ํ•™์Šต ๊ฐ€์ค‘์น˜ ์‚ฌ์šฉ, ์ผ๋ถ€ ๋ ˆ์ด์–ด ๊ณ ์ •)
36
+ - **Sequence Modeling**: LSTM (hidden_dim=256, num_layers=2)
37
+ - **Attention Mechanism**: Temporal Attention ์ ์šฉ
38
+ - **Classifier**: Fully-connected layer (2 ํด๋ž˜์Šค: Not Confused / Confused)
39
+
40
+ ---
41
+
42
+ ## ํ•™์Šต ๋ฐ์ดํ„ฐ (Dataset)
43
+
44
+ - **DAiSEE Dataset** (ํด๋ž˜์Šค: Boredom, Confusion, Engagement, Frustration ์ค‘ Confusion๋งŒ ์‚ฌ์šฉ)
45
+ - ๋ ˆ์ด๋ธ” ๋งคํ•‘:
46
+ - Confusion = 0 โ†’ Not Confused (0)
47
+ - Confusion = 1~3 โ†’ Confused (1)
48
+ - ์ž…๋ ฅ ๋ฐ์ดํ„ฐ: ๋น„๋””์˜ค ํ”„๋ ˆ์ž„ (sequence_length=30, image_size=112ร—112)
49
+
50
+ ---
51
+
52
+ ## ํ•™์Šต ์ ˆ์ฐจ (Training Procedure)
53
+
54
+ - Optimizer: Adam (lr=0.001)
55
+ - Loss: Weighted CrossEntropyLoss (Class imbalance ๋ณด์ •)
56
+ - Not Confused: 67.5%, Confused: 32.5% โ†’ ๊ฐ€์ค‘์น˜ ๋น„์œจ ์•ฝ 1 : 2.1
57
+ - Scheduler: ReduceLROnPlateau (patience=3, factor=0.5)
58
+ - Epochs: 3~10 (์˜ต์…˜์— ๋”ฐ๋ผ ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ)
59
+ - Batch Size: 8~16
60
+
61
+ ---
62
+
63
+ ## ์‚ฌ์šฉ ๋ฐฉ๋ฒ• (How to Use)
64
+
65
+ ```python
66
+ import torch
67
+ from face import DAiSEEConfusionNet
68
+
69
+ # ๋ชจ๋ธ ๋กœ๋“œ
70
+ model = DAiSEEConfusionNet()
71
+ model.load_state_dict(torch.load("confusion_binary_model.pth", map_location="cpu"))
72
+ model.eval()
73
+
74
+ # ์ž…๋ ฅ: (batch, seq_len, C, H, W)
75
+ dummy_input = torch.randn(1, 30, 3, 112, 112)
76
+ outputs = model(dummy_input)
77
+
78
+ prediction = torch.argmax(outputs, dim=1).item()
79
+ print("์˜ˆ์ธก ๊ฒฐ๊ณผ:", "Confused" if prediction == 1 else "Not Confused")