FangSen9000 commited on
Commit
eaf4dff
·
1 Parent(s): 321f47a

Optimize display logic (PDF saving, good samples, good display)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. SignX/detailed_prediction_20260101_114639/sample_000/analysis_report.txt +43 -0
  2. SignX/detailed_prediction_20260101_114639/sample_000/attention_heatmap.png +3 -0
  3. SignX/detailed_prediction_20260101_114639/sample_000/attention_keyframes/keyframes_index.txt +35 -0
  4. SignX/detailed_prediction_20260101_114639/sample_000/attention_weights.npy +3 -0
  5. SignX/detailed_prediction_20260101_114639/sample_000/debug_video_path.txt +4 -0
  6. SignX/detailed_prediction_20260101_114639/sample_000/feature_frame_mapping.json +176 -0
  7. SignX/detailed_prediction_20260101_114639/sample_000/frame_alignment.json +86 -0
  8. SignX/detailed_prediction_20260101_114639/sample_000/frame_alignment.png +3 -0
  9. SignX/detailed_prediction_20260101_114639/sample_000/gloss_to_frames.png +3 -0
  10. SignX/detailed_prediction_20260101_114639/sample_000/interactive_alignment.html +579 -0
  11. SignX/detailed_prediction_20260101_114639/sample_000/translation.txt +2 -0
  12. SignX/detailed_prediction_20260101_131106/3381121/analysis_report.txt +43 -0
  13. SignX/detailed_prediction_20260101_131106/3381121/attention_heatmap.pdf +0 -0
  14. SignX/detailed_prediction_20260101_131106/3381121/attention_heatmap.png +3 -0
  15. SignX/detailed_prediction_20260101_131106/3381121/attention_keyframes/keyframes_index.txt +39 -0
  16. SignX/detailed_prediction_20260101_131106/3381121/attention_weights.npy +3 -0
  17. SignX/detailed_prediction_20260101_131106/3381121/debug_video_path.txt +4 -0
  18. SignX/detailed_prediction_20260101_131106/3381121/feature_frame_mapping.json +218 -0
  19. SignX/detailed_prediction_20260101_131106/3381121/frame_alignment.json +86 -0
  20. SignX/detailed_prediction_20260101_131106/3381121/frame_alignment.pdf +0 -0
  21. SignX/detailed_prediction_20260101_131106/3381121/frame_alignment.png +3 -0
  22. SignX/detailed_prediction_20260101_131106/3381121/gloss_to_frames.png +3 -0
  23. SignX/detailed_prediction_20260101_131106/3381121/interactive_alignment.html +579 -0
  24. SignX/detailed_prediction_20260101_131106/3381121/translation.txt +3 -0
  25. SignX/eval/attention_analysis.py +27 -6
  26. SignX/eval/generate_gloss_frames.py +1 -1
  27. SignX/eval/regenerate_visualizations.py +3 -4
  28. SignX/eval/tiny_test_data/good_videos/171921.mp4 +3 -0
  29. SignX/eval/tiny_test_data/good_videos/173238.mp4 +3 -0
  30. SignX/eval/tiny_test_data/good_videos/173745.mp4 +3 -0
  31. SignX/eval/tiny_test_data/good_videos/23880856.mp4 +3 -0
  32. SignX/eval/tiny_test_data/good_videos/23881350.mp4 +3 -0
  33. SignX/eval/tiny_test_data/good_videos/31655975.mp4 +3 -0
  34. SignX/eval/tiny_test_data/good_videos/31657848.mp4 +3 -0
  35. SignX/eval/tiny_test_data/good_videos/3378265.mp4 +3 -0
  36. SignX/eval/tiny_test_data/good_videos/3381121.mp4 +3 -0
  37. SignX/eval/tiny_test_data/good_videos/4235359.mp4 +3 -0
  38. SignX/eval/tiny_test_data/good_videos/4236171.mp4 +3 -0
  39. SignX/eval/tiny_test_data/good_videos/50802118.mp4 +3 -0
  40. SignX/eval/tiny_test_data/good_videos/5597316.mp4 +3 -0
  41. SignX/eval/tiny_test_data/good_videos/6185086.mp4 +3 -0
  42. SignX/eval/tiny_test_data/good_videos/6185381.mp4 +3 -0
  43. SignX/eval/tiny_test_data/good_videos/619048.mp4 +3 -0
  44. SignX/eval/tiny_test_data/good_videos/629983.mp4 +3 -0
  45. SignX/eval/tiny_test_data/good_videos/634818.mp4 +3 -0
  46. SignX/eval/tiny_test_data/good_videos/63579.mp4 +3 -0
  47. SignX/eval/tiny_test_data/good_videos/7454155.mp4 +3 -0
  48. SignX/eval/tiny_test_data/good_videos/7566726.mp4 +3 -0
  49. SignX/eval/tiny_test_data/good_videos/7569669.mp4 +3 -0
  50. SignX/eval/tiny_test_data/good_videos/7701925.mp4 +3 -0
SignX/detailed_prediction_20260101_114639/sample_000/analysis_report.txt ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ================================================================================
2
+ Sign Language Recognition - Attention分析报告
3
+ ================================================================================
4
+
5
+ 生成时间: 2026-01-01 11:46:42
6
+
7
+ 翻译结果:
8
+ --------------------------------------------------------------------------------
9
+ #IF FRIEND GROUP/TOGETHER DEPART PARTY IX-1p JOIN IX-1p
10
+
11
+ 视频信息:
12
+ --------------------------------------------------------------------------------
13
+ 总帧数: 28
14
+ 词数量: 8
15
+
16
+ Attention权重信息:
17
+ --------------------------------------------------------------------------------
18
+ 形状: (26, 28)
19
+ - 解码步数: 26
20
+
21
+ 词-帧对应详情:
22
+ ================================================================================
23
+ No. Word Frames Peak Attn Conf
24
+ --------------------------------------------------------------------------------
25
+ 1 #IF 2-2 2 0.472 medium
26
+ 2 FRIEND 5-5 5 0.425 medium
27
+ 3 GROUP/TOGETHER 8-8 8 0.375 medium
28
+ 4 DEPART 27-27 27 0.348 medium
29
+ 5 PARTY 27-27 27 0.383 medium
30
+ 6 IX-1p 27-27 27 0.333 medium
31
+ 7 JOIN 11-11 11 0.520 high
32
+ 8 IX-1p 14-14 14 0.368 medium
33
+
34
+ ================================================================================
35
+
36
+ 统计摘要:
37
+ --------------------------------------------------------------------------------
38
+ 平均attention权重: 0.403
39
+ 高置信度词: 1 (12.5%)
40
+ 中置信度词: 7 (87.5%)
41
+ 低置信度词: 0 (0.0%)
42
+
43
+ ================================================================================
SignX/detailed_prediction_20260101_114639/sample_000/attention_heatmap.png ADDED

Git LFS Details

  • SHA256: 4918d39931330a20fd501a59f4b545a70a72fe2dc56effc29a49ffe18dd628e8
  • Pointer size: 130 Bytes
  • Size of remote file: 86.8 kB
SignX/detailed_prediction_20260101_114639/sample_000/attention_keyframes/keyframes_index.txt ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 关键帧索引
2
+ ============================================================
3
+
4
+ 样本目录: /common/users/sf895/output/huggingface_asllrp_repo/SignX/detailed_prediction_20260101_114639/sample_000
5
+ 视频路径: /common/users/sf895/output/huggingface_asllrp_repo/SignX/eval/tiny_test_data/videos/632051.mp4
6
+ 总关键帧数: 26
7
+
8
+ 关键帧列表:
9
+ ------------------------------------------------------------
10
+ Gloss 0: keyframe_000_feat2_frame9_att0.472.jpg
11
+ Gloss 1: keyframe_001_feat5_frame20_att0.425.jpg
12
+ Gloss 2: keyframe_002_feat8_frame32_att0.375.jpg
13
+ Gloss 3: keyframe_003_feat27_frame104_att0.348.jpg
14
+ Gloss 4: keyframe_004_feat27_frame104_att0.383.jpg
15
+ Gloss 5: keyframe_005_feat27_frame104_att0.333.jpg
16
+ Gloss 6: keyframe_006_feat11_frame43_att0.520.jpg
17
+ Gloss 7: keyframe_007_feat14_frame54_att0.368.jpg
18
+ Gloss 8: keyframe_008_feat17_frame66_att0.252.jpg
19
+ Gloss 9: keyframe_009_feat19_frame73_att0.884.jpg
20
+ Gloss 10: keyframe_010_feat0_frame1_att0.118.jpg
21
+ Gloss 11: keyframe_011_feat27_frame104_att0.164.jpg
22
+ Gloss 12: keyframe_012_feat25_frame96_att0.265.jpg
23
+ Gloss 13: keyframe_013_feat25_frame96_att0.282.jpg
24
+ Gloss 14: keyframe_014_feat25_frame96_att0.278.jpg
25
+ Gloss 15: keyframe_015_feat25_frame96_att0.277.jpg
26
+ Gloss 16: keyframe_016_feat27_frame104_att0.219.jpg
27
+ Gloss 17: keyframe_017_feat27_frame104_att0.190.jpg
28
+ Gloss 18: keyframe_018_feat27_frame104_att0.225.jpg
29
+ Gloss 19: keyframe_019_feat23_frame88_att0.150.jpg
30
+ Gloss 20: keyframe_020_feat27_frame104_att0.151.jpg
31
+ Gloss 21: keyframe_021_feat25_frame96_att0.360.jpg
32
+ Gloss 22: keyframe_022_feat25_frame96_att0.153.jpg
33
+ Gloss 23: keyframe_023_feat27_frame104_att0.144.jpg
34
+ Gloss 24: keyframe_024_feat25_frame96_att0.144.jpg
35
+ Gloss 25: keyframe_025_feat27_frame104_att0.186.jpg
SignX/detailed_prediction_20260101_114639/sample_000/attention_weights.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d89932ced21ae95e0d7e034d8b3917146effa747bf7236c5eed30dd8cb9a258a
3
+ size 3040
SignX/detailed_prediction_20260101_114639/sample_000/debug_video_path.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ video_path = '/common/users/sf895/output/huggingface_asllrp_repo/SignX/eval/tiny_test_data/videos/632051.mp4'
2
+ video_path type = <class 'str'>
3
+ video_path is None: False
4
+ bool(video_path): True
SignX/detailed_prediction_20260101_114639/sample_000/feature_frame_mapping.json ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "original_frame_count": 106,
3
+ "feature_count": 28,
4
+ "downsampling_ratio": 3.7857142857142856,
5
+ "fps": 24.0,
6
+ "mapping": [
7
+ {
8
+ "feature_index": 0,
9
+ "frame_start": 0,
10
+ "frame_end": 3,
11
+ "frame_count": 3
12
+ },
13
+ {
14
+ "feature_index": 1,
15
+ "frame_start": 3,
16
+ "frame_end": 7,
17
+ "frame_count": 4
18
+ },
19
+ {
20
+ "feature_index": 2,
21
+ "frame_start": 7,
22
+ "frame_end": 11,
23
+ "frame_count": 4
24
+ },
25
+ {
26
+ "feature_index": 3,
27
+ "frame_start": 11,
28
+ "frame_end": 15,
29
+ "frame_count": 4
30
+ },
31
+ {
32
+ "feature_index": 4,
33
+ "frame_start": 15,
34
+ "frame_end": 18,
35
+ "frame_count": 3
36
+ },
37
+ {
38
+ "feature_index": 5,
39
+ "frame_start": 18,
40
+ "frame_end": 22,
41
+ "frame_count": 4
42
+ },
43
+ {
44
+ "feature_index": 6,
45
+ "frame_start": 22,
46
+ "frame_end": 26,
47
+ "frame_count": 4
48
+ },
49
+ {
50
+ "feature_index": 7,
51
+ "frame_start": 26,
52
+ "frame_end": 30,
53
+ "frame_count": 4
54
+ },
55
+ {
56
+ "feature_index": 8,
57
+ "frame_start": 30,
58
+ "frame_end": 34,
59
+ "frame_count": 4
60
+ },
61
+ {
62
+ "feature_index": 9,
63
+ "frame_start": 34,
64
+ "frame_end": 37,
65
+ "frame_count": 3
66
+ },
67
+ {
68
+ "feature_index": 10,
69
+ "frame_start": 37,
70
+ "frame_end": 41,
71
+ "frame_count": 4
72
+ },
73
+ {
74
+ "feature_index": 11,
75
+ "frame_start": 41,
76
+ "frame_end": 45,
77
+ "frame_count": 4
78
+ },
79
+ {
80
+ "feature_index": 12,
81
+ "frame_start": 45,
82
+ "frame_end": 49,
83
+ "frame_count": 4
84
+ },
85
+ {
86
+ "feature_index": 13,
87
+ "frame_start": 49,
88
+ "frame_end": 53,
89
+ "frame_count": 4
90
+ },
91
+ {
92
+ "feature_index": 14,
93
+ "frame_start": 53,
94
+ "frame_end": 56,
95
+ "frame_count": 3
96
+ },
97
+ {
98
+ "feature_index": 15,
99
+ "frame_start": 56,
100
+ "frame_end": 60,
101
+ "frame_count": 4
102
+ },
103
+ {
104
+ "feature_index": 16,
105
+ "frame_start": 60,
106
+ "frame_end": 64,
107
+ "frame_count": 4
108
+ },
109
+ {
110
+ "feature_index": 17,
111
+ "frame_start": 64,
112
+ "frame_end": 68,
113
+ "frame_count": 4
114
+ },
115
+ {
116
+ "feature_index": 18,
117
+ "frame_start": 68,
118
+ "frame_end": 71,
119
+ "frame_count": 3
120
+ },
121
+ {
122
+ "feature_index": 19,
123
+ "frame_start": 71,
124
+ "frame_end": 75,
125
+ "frame_count": 4
126
+ },
127
+ {
128
+ "feature_index": 20,
129
+ "frame_start": 75,
130
+ "frame_end": 79,
131
+ "frame_count": 4
132
+ },
133
+ {
134
+ "feature_index": 21,
135
+ "frame_start": 79,
136
+ "frame_end": 83,
137
+ "frame_count": 4
138
+ },
139
+ {
140
+ "feature_index": 22,
141
+ "frame_start": 83,
142
+ "frame_end": 87,
143
+ "frame_count": 4
144
+ },
145
+ {
146
+ "feature_index": 23,
147
+ "frame_start": 87,
148
+ "frame_end": 90,
149
+ "frame_count": 3
150
+ },
151
+ {
152
+ "feature_index": 24,
153
+ "frame_start": 90,
154
+ "frame_end": 94,
155
+ "frame_count": 4
156
+ },
157
+ {
158
+ "feature_index": 25,
159
+ "frame_start": 94,
160
+ "frame_end": 98,
161
+ "frame_count": 4
162
+ },
163
+ {
164
+ "feature_index": 26,
165
+ "frame_start": 98,
166
+ "frame_end": 102,
167
+ "frame_count": 4
168
+ },
169
+ {
170
+ "feature_index": 27,
171
+ "frame_start": 102,
172
+ "frame_end": 106,
173
+ "frame_count": 4
174
+ }
175
+ ]
176
+ }
SignX/detailed_prediction_20260101_114639/sample_000/frame_alignment.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "translation": "#IF FRIEND GROUP/TOGETHER DEPART PARTY IX-1p JOIN IX-1p",
3
+ "words": [
4
+ "#IF",
5
+ "FRIEND",
6
+ "GROUP/TOGETHER",
7
+ "DEPART",
8
+ "PARTY",
9
+ "IX-1p",
10
+ "JOIN",
11
+ "IX-1p"
12
+ ],
13
+ "total_video_frames": 28,
14
+ "frame_ranges": [
15
+ {
16
+ "word": "#IF",
17
+ "start_frame": 2,
18
+ "end_frame": 2,
19
+ "peak_frame": 2,
20
+ "avg_attention": 0.47214657068252563,
21
+ "confidence": "medium"
22
+ },
23
+ {
24
+ "word": "FRIEND",
25
+ "start_frame": 5,
26
+ "end_frame": 5,
27
+ "peak_frame": 5,
28
+ "avg_attention": 0.4252290427684784,
29
+ "confidence": "medium"
30
+ },
31
+ {
32
+ "word": "GROUP/TOGETHER",
33
+ "start_frame": 8,
34
+ "end_frame": 8,
35
+ "peak_frame": 8,
36
+ "avg_attention": 0.37518179416656494,
37
+ "confidence": "medium"
38
+ },
39
+ {
40
+ "word": "DEPART",
41
+ "start_frame": 27,
42
+ "end_frame": 27,
43
+ "peak_frame": 27,
44
+ "avg_attention": 0.3480324149131775,
45
+ "confidence": "medium"
46
+ },
47
+ {
48
+ "word": "PARTY",
49
+ "start_frame": 27,
50
+ "end_frame": 27,
51
+ "peak_frame": 27,
52
+ "avg_attention": 0.38299673795700073,
53
+ "confidence": "medium"
54
+ },
55
+ {
56
+ "word": "IX-1p",
57
+ "start_frame": 27,
58
+ "end_frame": 27,
59
+ "peak_frame": 27,
60
+ "avg_attention": 0.33272165060043335,
61
+ "confidence": "medium"
62
+ },
63
+ {
64
+ "word": "JOIN",
65
+ "start_frame": 11,
66
+ "end_frame": 11,
67
+ "peak_frame": 11,
68
+ "avg_attention": 0.5199229121208191,
69
+ "confidence": "high"
70
+ },
71
+ {
72
+ "word": "IX-1p",
73
+ "start_frame": 14,
74
+ "end_frame": 14,
75
+ "peak_frame": 14,
76
+ "avg_attention": 0.3677118122577667,
77
+ "confidence": "medium"
78
+ }
79
+ ],
80
+ "statistics": {
81
+ "avg_confidence": 0.4029928669333458,
82
+ "high_confidence_words": 1,
83
+ "medium_confidence_words": 7,
84
+ "low_confidence_words": 0
85
+ }
86
+ }
SignX/detailed_prediction_20260101_114639/sample_000/frame_alignment.png ADDED

Git LFS Details

  • SHA256: 7b3166edb1add7d66c39ab764a7c8b75fdd5753f53dd2679af49cf8827526622
  • Pointer size: 131 Bytes
  • Size of remote file: 151 kB
SignX/detailed_prediction_20260101_114639/sample_000/gloss_to_frames.png ADDED

Git LFS Details

  • SHA256: b147ca7e50fac483f6862169e2e9ee78f726fa591bbf99979612d99187af71ef
  • Pointer size: 132 Bytes
  • Size of remote file: 3.6 MB
SignX/detailed_prediction_20260101_114639/sample_000/interactive_alignment.html ADDED
@@ -0,0 +1,579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Interactive Word-Frame Alignment</title>
7
+ <style>
8
+ body {
9
+ font-family: 'Arial', sans-serif;
10
+ margin: 20px;
11
+ background-color: #f5f5f5;
12
+ }
13
+ .container {
14
+ max-width: 1800px;
15
+ margin: 0 auto;
16
+ background-color: white;
17
+ padding: 30px;
18
+ border-radius: 8px;
19
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
20
+ }
21
+ h1 {
22
+ color: #333;
23
+ border-bottom: 3px solid #4CAF50;
24
+ padding-bottom: 10px;
25
+ margin-bottom: 20px;
26
+ }
27
+ .stats {
28
+ background-color: #E3F2FD;
29
+ padding: 15px;
30
+ border-radius: 5px;
31
+ margin-bottom: 20px;
32
+ border-left: 4px solid #2196F3;
33
+ font-size: 14px;
34
+ }
35
+ .controls {
36
+ background-color: #f9f9f9;
37
+ padding: 20px;
38
+ border-radius: 5px;
39
+ margin-bottom: 30px;
40
+ border: 1px solid #ddd;
41
+ }
42
+ .control-group {
43
+ margin-bottom: 15px;
44
+ }
45
+ label {
46
+ font-weight: bold;
47
+ display: inline-block;
48
+ width: 250px;
49
+ color: #555;
50
+ }
51
+ input[type="range"] {
52
+ width: 400px;
53
+ vertical-align: middle;
54
+ }
55
+ .value-display {
56
+ display: inline-block;
57
+ width: 80px;
58
+ font-family: monospace;
59
+ font-size: 14px;
60
+ color: #2196F3;
61
+ font-weight: bold;
62
+ }
63
+ .reset-btn {
64
+ margin-top: 15px;
65
+ padding: 10px 25px;
66
+ background-color: #2196F3;
67
+ color: white;
68
+ border: none;
69
+ border-radius: 5px;
70
+ cursor: pointer;
71
+ font-size: 14px;
72
+ font-weight: bold;
73
+ }
74
+ .reset-btn:hover {
75
+ background-color: #1976D2;
76
+ }
77
+ canvas {
78
+ border: 1px solid #999;
79
+ display: block;
80
+ margin: 20px auto;
81
+ background: white;
82
+ }
83
+ .legend {
84
+ margin-top: 20px;
85
+ padding: 15px;
86
+ background-color: #fff;
87
+ border: 1px solid #ddd;
88
+ border-radius: 5px;
89
+ }
90
+ .legend-item {
91
+ display: inline-block;
92
+ margin-right: 25px;
93
+ font-size: 13px;
94
+ margin-bottom: 10px;
95
+ }
96
+ .color-box {
97
+ display: inline-block;
98
+ width: 30px;
99
+ height: 15px;
100
+ margin-right: 8px;
101
+ vertical-align: middle;
102
+ border: 1px solid #666;
103
+ }
104
+ .info-panel {
105
+ margin-top: 20px;
106
+ padding: 15px;
107
+ background-color: #f9f9f9;
108
+ border-radius: 5px;
109
+ border: 1px solid #ddd;
110
+ }
111
+ .confidence {
112
+ display: inline-block;
113
+ padding: 3px 10px;
114
+ border-radius: 10px;
115
+ font-weight: bold;
116
+ font-size: 11px;
117
+ text-transform: uppercase;
118
+ }
119
+ .confidence.high {
120
+ background-color: #4CAF50;
121
+ color: white;
122
+ }
123
+ .confidence.medium {
124
+ background-color: #FF9800;
125
+ color: white;
126
+ }
127
+ .confidence.low {
128
+ background-color: #f44336;
129
+ color: white;
130
+ }
131
+ </style>
132
+ </head>
133
+ <body>
134
+ <div class="container">
135
+ <h1>🎯 Interactive Word-to-Frame Alignment Visualizer</h1>
136
+
137
+ <div class="stats">
138
+ <strong>Translation:</strong> #IF FRIEND GROUP/TOGETHER DEPART PARTY IX-1p JOIN IX-1p<br>
139
+ <strong>Total Words:</strong> 8 |
140
+ <strong>Total Features:</strong> 28
141
+ </div>
142
+
143
+ <div class="controls">
144
+ <h3>⚙️ Threshold Controls</h3>
145
+
146
+ <div class="control-group">
147
+ <label for="peak-threshold">Peak Threshold (% of max):</label>
148
+ <input type="range" id="peak-threshold" min="1" max="100" value="90" step="1">
149
+ <span class="value-display" id="peak-threshold-value">90%</span>
150
+ <br>
151
+ <small style="margin-left: 255px; color: #666;">
152
+ 帧的注意力权重 ≥ (峰值权重 × 阈值%) 时被认为是"显著帧"
153
+ </small>
154
+ </div>
155
+
156
+ <div class="control-group">
157
+ <label for="confidence-high">High Confidence (avg attn >):</label>
158
+ <input type="range" id="confidence-high" min="0" max="100" value="50" step="1">
159
+ <span class="value-display" id="confidence-high-value">0.50</span>
160
+ </div>
161
+
162
+ <div class="control-group">
163
+ <label for="confidence-medium">Medium Confidence (avg attn >):</label>
164
+ <input type="range" id="confidence-medium" min="0" max="100" value="20" step="1">
165
+ <span class="value-display" id="confidence-medium-value">0.20</span>
166
+ </div>
167
+
168
+ <button class="reset-btn" onclick="resetDefaults()">
169
+ Reset to Defaults
170
+ </button>
171
+ </div>
172
+
173
+ <div>
174
+ <h3>Word-to-Frame Alignment</h3>
175
+ <p style="color: #666; font-size: 13px;">
176
+ 每个词显示为彩色矩形,宽度表示该词对应的特征帧范围。★ = 峰值帧。矩形内部显示注意力权重波形。
177
+ </p>
178
+ <canvas id="alignment-canvas" width="1600" height="600"></canvas>
179
+
180
+ <h3 style="margin-top: 30px;">Timeline Progress Bar</h3>
181
+ <canvas id="timeline-canvas" width="1600" height="100"></canvas>
182
+
183
+ <div class="legend">
184
+ <strong>Legend:</strong><br><br>
185
+ <div class="legend-item">
186
+ <span class="confidence high">High</span>
187
+ <span class="confidence medium">Medium</span>
188
+ <span class="confidence low">Low</span>
189
+ Confidence Levels (opacity reflects confidence)
190
+ </div>
191
+ <div class="legend-item">
192
+ <span style="color: red; font-size: 20px;">★</span>
193
+ Peak Frame (highest attention)
194
+ </div>
195
+ <div class="legend-item">
196
+ <span style="color: blue;">━</span>
197
+ Attention Waveform (within word region)
198
+ </div>
199
+ </div>
200
+ </div>
201
+
202
+ <div class="info-panel">
203
+ <h3>Alignment Details</h3>
204
+ <div id="alignment-details"></div>
205
+ </div>
206
+ </div>
207
+
208
+ <script>
209
+ // Attention data from Python
210
+ const attentionData = [{"word": "#IF", "word_idx": 0, "weights": [0.013499895110726357, 0.02982642501592636, 0.47214657068252563, 0.4107391834259033, 0.04950176924467087, 0.011385880410671234, 0.007043282967060804, 0.0014652750687673688, 0.0005238102748990059, 0.00040972864371724427, 0.0001160625834017992, 6.416538963094354e-05, 5.9505786339286715e-05, 5.076597517472692e-05, 6.82844765833579e-05, 0.00012157609307905659, 6.597878382308409e-05, 0.00010269331687595695, 0.00013462362403515726, 6.423696322599426e-05, 8.642762986710295e-05, 9.25226995605044e-05, 0.00011670421372400597, 0.0001578366500325501, 0.00020240909361746162, 0.0003825947642326355, 0.0007172566256485879, 0.0008544913143850863]}, {"word": "FRIEND", "word_idx": 1, "weights": [0.009660173207521439, 0.010518566705286503, 0.011222519911825657, 0.014483344741165638, 0.1795402616262436, 0.4252290427684784, 0.25737643241882324, 0.05393827706575394, 0.01512613520026207, 0.013365501537919044, 0.002376752672716975, 0.00014935070066712797, 8.692959818290547e-05, 0.0004998841905035079, 0.0008451194153167307, 0.0011626698542386293, 0.00042453958303667605, 0.00017692227265797555, 0.00016767902707215399, 4.8644251364748925e-05, 8.348096889676526e-05, 0.0001094180770451203, 0.00030694258748553693, 0.0002885134017560631, 0.00031121523352339864, 0.0006241592927835882, 0.0008697768207639456, 0.0010077793849632144]}, {"word": "GROUP/TOGETHER", "word_idx": 2, "weights": [0.010994982905685902, 0.004551935940980911, 0.002873026067391038, 0.003936904948204756, 0.008626177906990051, 0.014811795204877853, 0.02318989858031273, 0.12032425403594971, 0.37518179416656494, 0.2971201539039612, 0.08549409359693527, 0.014250868931412697, 0.008063109591603279, 0.00339426938444376, 0.0037573552690446377, 0.004879903048276901, 0.0018731161253526807, 0.0011690640822052956, 0.0013268929906189442, 0.0007135092164389789, 0.000632062554359436, 0.000777124660089612, 0.0009553946438245475, 0.0009487943025305867, 0.0007010120898485184, 0.001496487995609641, 0.0037835948169231415, 0.004172381013631821]}, {"word": "DEPART", "word_idx": 3, "weights": [0.22514434158802032, 0.12377114593982697, 0.00781786348670721, 0.0074639273807406425, 0.01298774778842926, 0.00438598683103919, 0.004350316245108843, 0.006786263547837734, 0.006216868292540312, 0.0061629218980669975, 0.004193580709397793, 0.0015793128404766321, 0.0011525226291269064, 0.0014239393640309572, 0.0007423617644235492, 0.0008507575839757919, 0.0008870838792063296, 0.00024679809575900435, 0.00034805957693606615, 0.005230794660747051, 0.0011639633448794484, 0.001367528340779245, 0.010013289749622345, 0.018452608957886696, 0.0018141826149076223, 0.001117207808420062, 0.19629621505737305, 0.3480324149131775]}, {"word": "PARTY", "word_idx": 4, "weights": [0.1664648950099945, 0.06123431771993637, 0.0020844682585448027, 0.0020428383722901344, 0.0058554718270897865, 0.004360921215265989, 0.004692059941589832, 0.009323552250862122, 0.015183845534920692, 0.016528787091374397, 0.015347503125667572, 0.007253072690218687, 0.005231750197708607, 0.009598116390407085, 0.00704572768881917, 0.007053114008158445, 0.006423295009881258, 0.0010452027199789882, 0.0009786873124539852, 0.004494669381529093, 0.005323153454810381, 0.006433582864701748, 0.022334398701786995, 0.03912580758333206, 0.004556183237582445, 0.0021732028108090162, 0.18481463193893433, 0.38299673795700073]}, {"word": "IX-1p", "word_idx": 5, "weights": [0.2268882542848587, 0.10439852625131607, 0.005018203519284725, 0.005008632782846689, 0.005379822570830584, 0.00215631234459579, 0.0024426421150565147, 0.007580526173114777, 0.011461855843663216, 0.010575865395367146, 0.010204891674220562, 0.004322281572967768, 0.0023845669347792864, 0.0016265056328848004, 0.0011272492120042443, 0.0014091862831264734, 0.0019118450582027435, 0.0019068039255216718, 0.002558623207733035, 0.005466249771416187, 0.002576562575995922, 0.0033958060666918755, 0.014094071462750435, 0.03357496112585068, 0.005502632353454828, 0.003941097296774387, 0.19036439061164856, 0.33272165060043335]}, {"word": "JOIN", "word_idx": 6, "weights": [0.006536237895488739, 0.002151536289602518, 0.0006580766057595611, 0.0008207014761865139, 0.0003112705599050969, 0.0003111894184257835, 0.0008894064230844378, 0.004121360369026661, 0.01069970428943634, 0.008291625417768955, 0.01931559480726719, 0.5199229121208191, 0.40212148427963257, 0.004480497911572456, 0.0010337198618799448, 0.0007998707587830722, 0.00024323497200384736, 7.284984894795343e-05, 0.00011325528612360358, 0.00540410028770566, 0.0011726750526577234, 0.0009422790608368814, 0.0003188242844771594, 0.00024731658049859107, 3.1396619306178764e-05, 4.355102646513842e-05, 0.0036189379170536995, 0.005326398182660341]}, {"word": "IX-1p", "word_idx": 7, "weights": [0.0013159031514078379, 0.0007256589597091079, 0.00017777174070943147, 0.0001744187029544264, 0.00025140171055682003, 0.00039260604535229504, 0.0003829205525107682, 0.000333531730575487, 0.0007308170897886157, 0.0010108469286933541, 0.0015992401167750359, 0.003526317421346903, 0.012568545527756214, 0.2852487564086914, 0.3677118122577667, 0.19535787403583527, 0.07697467505931854, 0.012815488502383232, 0.007124335505068302, 0.0009805350564420223, 0.007633780129253864, 0.007437399588525295, 0.005485337693244219, 0.003693929873406887, 0.0026681837625801563, 0.0011110405903309584, 0.0008843602845445275, 0.0016825739294290543]}];
211
+ const numGlosses = 8;
212
+ const numFeatures = 28;
213
+
214
+ // Colors for different words (matching matplotlib tab20)
215
+ const colors = [
216
+ '#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd',
217
+ '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf',
218
+ '#aec7e8', '#ffbb78', '#98df8a', '#ff9896', '#c5b0d5',
219
+ '#c49c94', '#f7b6d2', '#c7c7c7', '#dbdb8d', '#9edae5'
220
+ ];
221
+
222
+ // Get controls
223
+ const peakThresholdSlider = document.getElementById('peak-threshold');
224
+ const peakThresholdValue = document.getElementById('peak-threshold-value');
225
+ const confidenceHighSlider = document.getElementById('confidence-high');
226
+ const confidenceHighValue = document.getElementById('confidence-high-value');
227
+ const confidenceMediumSlider = document.getElementById('confidence-medium');
228
+ const confidenceMediumValue = document.getElementById('confidence-medium-value');
229
+ const alignmentCanvas = document.getElementById('alignment-canvas');
230
+ const timelineCanvas = document.getElementById('timeline-canvas');
231
+ const alignmentCtx = alignmentCanvas.getContext('2d');
232
+ const timelineCtx = timelineCanvas.getContext('2d');
233
+
234
+ // Update displays when sliders change
235
+ peakThresholdSlider.oninput = function() {
236
+ peakThresholdValue.textContent = this.value + '%';
237
+ updateVisualization();
238
+ };
239
+
240
+ confidenceHighSlider.oninput = function() {
241
+ confidenceHighValue.textContent = (this.value / 100).toFixed(2);
242
+ updateVisualization();
243
+ };
244
+
245
+ confidenceMediumSlider.oninput = function() {
246
+ confidenceMediumValue.textContent = (this.value / 100).toFixed(2);
247
+ updateVisualization();
248
+ };
249
+
250
+ function resetDefaults() {
251
+ peakThresholdSlider.value = 90;
252
+ confidenceHighSlider.value = 50;
253
+ confidenceMediumSlider.value = 20;
254
+ peakThresholdValue.textContent = '90%';
255
+ confidenceHighValue.textContent = '0.50';
256
+ confidenceMediumValue.textContent = '0.20';
257
+ updateVisualization();
258
+ }
259
+
260
+ function calculateAlignment(weights, peakThreshold) {
261
+ // Find peak
262
+ let peakIdx = 0;
263
+ let peakWeight = weights[0];
264
+ for (let i = 1; i < weights.length; i++) {
265
+ if (weights[i] > peakWeight) {
266
+ peakWeight = weights[i];
267
+ peakIdx = i;
268
+ }
269
+ }
270
+
271
+ // Find significant frames
272
+ const threshold = peakWeight * (peakThreshold / 100);
273
+ let startIdx = peakIdx;
274
+ let endIdx = peakIdx;
275
+ let sumWeight = 0;
276
+ let count = 0;
277
+
278
+ for (let i = 0; i < weights.length; i++) {
279
+ if (weights[i] >= threshold) {
280
+ if (i < startIdx) startIdx = i;
281
+ if (i > endIdx) endIdx = i;
282
+ sumWeight += weights[i];
283
+ count++;
284
+ }
285
+ }
286
+
287
+ const avgWeight = count > 0 ? sumWeight / count : peakWeight;
288
+
289
+ return {
290
+ startIdx: startIdx,
291
+ endIdx: endIdx,
292
+ peakIdx: peakIdx,
293
+ peakWeight: peakWeight,
294
+ avgWeight: avgWeight,
295
+ threshold: threshold
296
+ };
297
+ }
298
+
299
+ function getConfidenceLevel(avgWeight, highThreshold, mediumThreshold) {
300
+ if (avgWeight > highThreshold) return 'high';
301
+ if (avgWeight > mediumThreshold) return 'medium';
302
+ return 'low';
303
+ }
304
+
305
+ function drawAlignmentChart() {
306
+ const peakThreshold = parseInt(peakThresholdSlider.value);
307
+ const highThreshold = parseInt(confidenceHighSlider.value) / 100;
308
+ const mediumThreshold = parseInt(confidenceMediumSlider.value) / 100;
309
+
310
+ // Canvas dimensions
311
+ const width = alignmentCanvas.width;
312
+ const height = alignmentCanvas.height;
313
+ const leftMargin = 180;
314
+ const rightMargin = 50;
315
+ const topMargin = 60;
316
+ const bottomMargin = 80;
317
+
318
+ const plotWidth = width - leftMargin - rightMargin;
319
+ const plotHeight = height - topMargin - bottomMargin;
320
+
321
+ const rowHeight = plotHeight / numGlosses;
322
+ const featureWidth = plotWidth / numFeatures;
323
+
324
+ // Clear canvas
325
+ alignmentCtx.clearRect(0, 0, width, height);
326
+
327
+ // Draw title
328
+ alignmentCtx.fillStyle = '#333';
329
+ alignmentCtx.font = 'bold 18px Arial';
330
+ alignmentCtx.textAlign = 'center';
331
+ alignmentCtx.fillText('Word-to-Frame Alignment', width / 2, 30);
332
+ alignmentCtx.font = '13px Arial';
333
+ alignmentCtx.fillText('(based on attention peaks, ★ = peak frame)', width / 2, 48);
334
+
335
+ // Calculate alignments
336
+ const alignments = [];
337
+ for (let wordIdx = 0; wordIdx < numGlosses; wordIdx++) {
338
+ const data = attentionData[wordIdx];
339
+ const alignment = calculateAlignment(data.weights, peakThreshold);
340
+ alignment.word = data.word;
341
+ alignment.wordIdx = wordIdx;
342
+ alignment.weights = data.weights;
343
+ alignments.push(alignment);
344
+ }
345
+
346
+ // Draw grid
347
+ alignmentCtx.strokeStyle = '#e0e0e0';
348
+ alignmentCtx.lineWidth = 0.5;
349
+ for (let i = 0; i <= numFeatures; i++) {
350
+ const x = leftMargin + i * featureWidth;
351
+ alignmentCtx.beginPath();
352
+ alignmentCtx.moveTo(x, topMargin);
353
+ alignmentCtx.lineTo(x, topMargin + plotHeight);
354
+ alignmentCtx.stroke();
355
+ }
356
+
357
+ // Draw word regions
358
+ for (let wordIdx = 0; wordIdx < numGlosses; wordIdx++) {
359
+ const alignment = alignments[wordIdx];
360
+ const confidence = getConfidenceLevel(alignment.avgWeight, highThreshold, mediumThreshold);
361
+ const y = topMargin + wordIdx * rowHeight;
362
+
363
+ // Alpha based on confidence
364
+ const alpha = confidence === 'high' ? 0.9 : confidence === 'medium' ? 0.7 : 0.5;
365
+
366
+ // Draw rectangle for word region
367
+ const startX = leftMargin + alignment.startIdx * featureWidth;
368
+ const rectWidth = (alignment.endIdx - alignment.startIdx + 1) * featureWidth;
369
+
370
+ alignmentCtx.fillStyle = colors[wordIdx % 20];
371
+ alignmentCtx.globalAlpha = alpha;
372
+ alignmentCtx.fillRect(startX, y, rectWidth, rowHeight * 0.8);
373
+ alignmentCtx.globalAlpha = 1.0;
374
+
375
+ // Draw border
376
+ alignmentCtx.strokeStyle = '#000';
377
+ alignmentCtx.lineWidth = 2;
378
+ alignmentCtx.strokeRect(startX, y, rectWidth, rowHeight * 0.8);
379
+
380
+ // Draw attention waveform inside rectangle
381
+ alignmentCtx.strokeStyle = 'rgba(0, 0, 255, 0.8)';
382
+ alignmentCtx.lineWidth = 1.5;
383
+ alignmentCtx.beginPath();
384
+ for (let i = alignment.startIdx; i <= alignment.endIdx; i++) {
385
+ const x = leftMargin + i * featureWidth + featureWidth / 2;
386
+ const weight = alignment.weights[i];
387
+ const maxWeight = alignment.peakWeight;
388
+ const normalizedWeight = weight / (maxWeight * 1.2); // Scale for visibility
389
+ const waveY = y + rowHeight * 0.8 - (normalizedWeight * rowHeight * 0.6);
390
+
391
+ if (i === alignment.startIdx) {
392
+ alignmentCtx.moveTo(x, waveY);
393
+ } else {
394
+ alignmentCtx.lineTo(x, waveY);
395
+ }
396
+ }
397
+ alignmentCtx.stroke();
398
+
399
+ // Draw word label
400
+ const labelX = startX + rectWidth / 2;
401
+ const labelY = y + rowHeight * 0.4;
402
+
403
+ alignmentCtx.fillStyle = 'rgba(0, 0, 0, 0.7)';
404
+ alignmentCtx.fillRect(labelX - 60, labelY - 12, 120, 24);
405
+ alignmentCtx.fillStyle = '#fff';
406
+ alignmentCtx.font = 'bold 13px Arial';
407
+ alignmentCtx.textAlign = 'center';
408
+ alignmentCtx.textBaseline = 'middle';
409
+ alignmentCtx.fillText(alignment.word, labelX, labelY);
410
+
411
+ // Mark peak frame with star
412
+ const peakX = leftMargin + alignment.peakIdx * featureWidth + featureWidth / 2;
413
+ const peakY = y + rowHeight * 0.4;
414
+
415
+ // Draw star
416
+ alignmentCtx.fillStyle = '#ff0000';
417
+ alignmentCtx.strokeStyle = '#ffff00';
418
+ alignmentCtx.lineWidth = 1.5;
419
+ alignmentCtx.font = '20px Arial';
420
+ alignmentCtx.textAlign = 'center';
421
+ alignmentCtx.strokeText('★', peakX, peakY);
422
+ alignmentCtx.fillText('★', peakX, peakY);
423
+
424
+ // Y-axis label (word names)
425
+ alignmentCtx.fillStyle = '#333';
426
+ alignmentCtx.font = '12px Arial';
427
+ alignmentCtx.textAlign = 'right';
428
+ alignmentCtx.textBaseline = 'middle';
429
+ alignmentCtx.fillText(alignment.word, leftMargin - 10, y + rowHeight * 0.4);
430
+ }
431
+
432
+ // Draw horizontal grid lines
433
+ alignmentCtx.strokeStyle = '#ccc';
434
+ alignmentCtx.lineWidth = 0.5;
435
+ for (let i = 0; i <= numGlosses; i++) {
436
+ const y = topMargin + i * rowHeight;
437
+ alignmentCtx.beginPath();
438
+ alignmentCtx.moveTo(leftMargin, y);
439
+ alignmentCtx.lineTo(leftMargin + plotWidth, y);
440
+ alignmentCtx.stroke();
441
+ }
442
+
443
+ // Draw axes
444
+ alignmentCtx.strokeStyle = '#000';
445
+ alignmentCtx.lineWidth = 2;
446
+ alignmentCtx.strokeRect(leftMargin, topMargin, plotWidth, plotHeight);
447
+
448
+ // X-axis labels (frame indices)
449
+ alignmentCtx.fillStyle = '#000';
450
+ alignmentCtx.font = '11px Arial';
451
+ alignmentCtx.textAlign = 'center';
452
+ alignmentCtx.textBaseline = 'top';
453
+ for (let i = 0; i < numFeatures; i++) {
454
+ const x = leftMargin + i * featureWidth + featureWidth / 2;
455
+ alignmentCtx.fillText(i.toString(), x, topMargin + plotHeight + 10);
456
+ }
457
+
458
+ // Axis titles
459
+ alignmentCtx.fillStyle = '#333';
460
+ alignmentCtx.font = 'bold 14px Arial';
461
+ alignmentCtx.textAlign = 'center';
462
+ alignmentCtx.fillText('Feature Frame Index', leftMargin + plotWidth / 2, height - 20);
463
+
464
+ alignmentCtx.save();
465
+ alignmentCtx.translate(30, topMargin + plotHeight / 2);
466
+ alignmentCtx.rotate(-Math.PI / 2);
467
+ alignmentCtx.fillText('Generated Word', 0, 0);
468
+ alignmentCtx.restore();
469
+
470
+ return alignments;
471
+ }
472
+
473
+ function drawTimeline(alignments) {
474
+ const highThreshold = parseInt(confidenceHighSlider.value) / 100;
475
+ const mediumThreshold = parseInt(confidenceMediumSlider.value) / 100;
476
+
477
+ const width = timelineCanvas.width;
478
+ const height = timelineCanvas.height;
479
+ const leftMargin = 180;
480
+ const rightMargin = 50;
481
+ const plotWidth = width - leftMargin - rightMargin;
482
+ const featureWidth = plotWidth / numFeatures;
483
+
484
+ // Clear canvas
485
+ timelineCtx.clearRect(0, 0, width, height);
486
+
487
+ // Background bar
488
+ timelineCtx.fillStyle = '#ddd';
489
+ timelineCtx.fillRect(leftMargin, 30, plotWidth, 40);
490
+ timelineCtx.strokeStyle = '#000';
491
+ timelineCtx.lineWidth = 2;
492
+ timelineCtx.strokeRect(leftMargin, 30, plotWidth, 40);
493
+
494
+ // Draw word regions on timeline
495
+ for (let wordIdx = 0; wordIdx < alignments.length; wordIdx++) {
496
+ const alignment = alignments[wordIdx];
497
+ const confidence = getConfidenceLevel(alignment.avgWeight, highThreshold, mediumThreshold);
498
+ const alpha = confidence === 'high' ? 0.9 : confidence === 'medium' ? 0.7 : 0.5;
499
+
500
+ const startX = leftMargin + alignment.startIdx * featureWidth;
501
+ const rectWidth = (alignment.endIdx - alignment.startIdx + 1) * featureWidth;
502
+
503
+ timelineCtx.fillStyle = colors[wordIdx % 20];
504
+ timelineCtx.globalAlpha = alpha;
505
+ timelineCtx.fillRect(startX, 30, rectWidth, 40);
506
+ timelineCtx.globalAlpha = 1.0;
507
+ timelineCtx.strokeStyle = '#000';
508
+ timelineCtx.lineWidth = 0.5;
509
+ timelineCtx.strokeRect(startX, 30, rectWidth, 40);
510
+ }
511
+
512
+ // Title
513
+ timelineCtx.fillStyle = '#333';
514
+ timelineCtx.font = 'bold 13px Arial';
515
+ timelineCtx.textAlign = 'left';
516
+ timelineCtx.fillText('Timeline Progress Bar', leftMargin, 20);
517
+ }
518
+
519
+ function updateDetailsPanel(alignments, highThreshold, mediumThreshold) {
520
+ const panel = document.getElementById('alignment-details');
521
+ let html = '<table style="width: 100%; border-collapse: collapse;">';
522
+ html += '<tr style="background: #f0f0f0; font-weight: bold;">';
523
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Word</th>';
524
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Feature Range</th>';
525
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Peak</th>';
526
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Span</th>';
527
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Avg Attention</th>';
528
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Confidence</th>';
529
+ html += '</tr>';
530
+
531
+ for (const align of alignments) {
532
+ const confidence = getConfidenceLevel(align.avgWeight, highThreshold, mediumThreshold);
533
+ const span = align.endIdx - align.startIdx + 1;
534
+
535
+ html += '<tr>';
536
+ html += `<td style="padding: 8px; border: 1px solid #ddd;"><strong>${align.word}</strong></td>`;
537
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${align.startIdx} → ${align.endIdx}</td>`;
538
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${align.peakIdx}</td>`;
539
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${span}</td>`;
540
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${align.avgWeight.toFixed(4)}</td>`;
541
+ html += `<td style="padding: 8px; border: 1px solid #ddd;"><span class="confidence ${confidence}">${confidence}</span></td>`;
542
+ html += '</tr>';
543
+ }
544
+
545
+ html += '</table>';
546
+ panel.innerHTML = html;
547
+ }
548
+
549
+ function updateVisualization() {
550
+ const alignments = drawAlignmentChart();
551
+ drawTimeline(alignments);
552
+ const highThreshold = parseInt(confidenceHighSlider.value) / 100;
553
+ const mediumThreshold = parseInt(confidenceMediumSlider.value) / 100;
554
+ updateDetailsPanel(alignments, highThreshold, mediumThreshold);
555
+ }
556
+
557
+ // Event listeners for sliders
558
+ peakSlider.addEventListener('input', function() {
559
+ peakValue.textContent = peakSlider.value + '%';
560
+ updateVisualization();
561
+ });
562
+
563
+ confidenceHighSlider.addEventListener('input', function() {
564
+ const val = parseInt(confidenceHighSlider.value) / 100;
565
+ confidenceHighValue.textContent = val.toFixed(2);
566
+ updateVisualization();
567
+ });
568
+
569
+ confidenceMediumSlider.addEventListener('input', function() {
570
+ const val = parseInt(confidenceMediumSlider.value) / 100;
571
+ confidenceMediumValue.textContent = val.toFixed(2);
572
+ updateVisualization();
573
+ });
574
+
575
+ // Initial visualization
576
+ updateVisualization();
577
+ </script>
578
+ </body>
579
+ </html>
SignX/detailed_prediction_20260101_114639/sample_000/translation.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ With BPE: #IF FRIEND GROUP/TOGE@@ TH@@ E@@ R DEPART PARTY IX-1p JO@@ I@@ N IX-1p
2
+ Clean: #IF FRIEND GROUP/TOGETHER DEPART PARTY IX-1p JOIN IX-1p
SignX/detailed_prediction_20260101_131106/3381121/analysis_report.txt ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ================================================================================
2
+ Sign Language Recognition - Attention分析报告
3
+ ================================================================================
4
+
5
+ 生成时间: 2026-01-01 13:11:10
6
+
7
+ 翻译结果:
8
+ --------------------------------------------------------------------------------
9
+ BOX/ROOM IX NOT-YET ARRIVE IX SHOULD CONTACT ns-fs-FEDEX
10
+
11
+ 视频信息:
12
+ --------------------------------------------------------------------------------
13
+ 总帧数: 35
14
+ 词数量: 8
15
+
16
+ Attention权重信息:
17
+ --------------------------------------------------------------------------------
18
+ 形状: (30, 35)
19
+ - 解码步数: 30
20
+
21
+ 词-帧对应详情:
22
+ ================================================================================
23
+ No. Word Frames Peak Attn Conf
24
+ --------------------------------------------------------------------------------
25
+ 1 BOX/ROOM 4-4 4 0.618 high
26
+ 2 IX 7-7 7 0.524 high
27
+ 3 NOT-YET 7-7 7 0.266 medium
28
+ 4 ARRIVE 8-10 8 0.308 medium
29
+ 5 IX 11-11 11 0.486 medium
30
+ 6 SHOULD 13-13 13 0.595 high
31
+ 7 CONTACT 13-13 13 0.179 low
32
+ 8 ns-fs-FEDEX 17-17 17 0.761 high
33
+
34
+ ================================================================================
35
+
36
+ 统计摘要:
37
+ --------------------------------------------------------------------------------
38
+ 平均attention权重: 0.467
39
+ 高置信度词: 4 (50.0%)
40
+ 中置信度词: 3 (37.5%)
41
+ 低置信度词: 1 (12.5%)
42
+
43
+ ================================================================================
SignX/detailed_prediction_20260101_131106/3381121/attention_heatmap.pdf ADDED
Binary file (34.7 kB). View file
 
SignX/detailed_prediction_20260101_131106/3381121/attention_heatmap.png ADDED

Git LFS Details

  • SHA256: 0ef8392c2b7438bd5eed3d032dd64084eab2c49f3c825752ebaccc6657d73ee2
  • Pointer size: 130 Bytes
  • Size of remote file: 90.1 kB
SignX/detailed_prediction_20260101_131106/3381121/attention_keyframes/keyframes_index.txt ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 关键帧索引
2
+ ============================================================
3
+
4
+ 样本目录: /common/users/sf895/output/huggingface_asllrp_repo/SignX/detailed_prediction_20260101_131106/3381121
5
+ 视频路径: /common/users/sf895/output/huggingface_asllrp_repo/SignX/eval/tiny_test_data/good_videos/3381121.mp4
6
+ 总关键帧数: 30
7
+
8
+ 关键帧列表:
9
+ ------------------------------------------------------------
10
+ Gloss 0: keyframe_000_feat4_frame17_att0.618.jpg
11
+ Gloss 1: keyframe_001_feat7_frame29_att0.524.jpg
12
+ Gloss 2: keyframe_002_feat7_frame29_att0.266.jpg
13
+ Gloss 3: keyframe_003_feat8_frame32_att0.316.jpg
14
+ Gloss 4: keyframe_004_feat11_frame44_att0.486.jpg
15
+ Gloss 5: keyframe_005_feat13_frame52_att0.595.jpg
16
+ Gloss 6: keyframe_006_feat13_frame52_att0.179.jpg
17
+ Gloss 7: keyframe_007_feat17_frame67_att0.761.jpg
18
+ Gloss 8: keyframe_008_feat21_frame83_att0.176.jpg
19
+ Gloss 9: keyframe_009_feat22_frame87_att0.085.jpg
20
+ Gloss 10: keyframe_010_feat25_frame99_att0.222.jpg
21
+ Gloss 11: keyframe_011_feat28_frame110_att0.069.jpg
22
+ Gloss 12: keyframe_012_feat32_frame126_att0.146.jpg
23
+ Gloss 13: keyframe_013_feat32_frame126_att0.088.jpg
24
+ Gloss 14: keyframe_014_feat34_frame134_att0.117.jpg
25
+ Gloss 15: keyframe_015_feat32_frame126_att0.153.jpg
26
+ Gloss 16: keyframe_016_feat32_frame126_att0.090.jpg
27
+ Gloss 17: keyframe_017_feat34_frame134_att0.116.jpg
28
+ Gloss 18: keyframe_018_feat34_frame134_att0.119.jpg
29
+ Gloss 19: keyframe_019_feat34_frame134_att0.127.jpg
30
+ Gloss 20: keyframe_020_feat34_frame134_att0.128.jpg
31
+ Gloss 21: keyframe_021_feat32_frame126_att0.105.jpg
32
+ Gloss 22: keyframe_022_feat34_frame134_att0.139.jpg
33
+ Gloss 23: keyframe_023_feat34_frame134_att0.146.jpg
34
+ Gloss 24: keyframe_024_feat34_frame134_att0.149.jpg
35
+ Gloss 25: keyframe_025_feat34_frame134_att0.154.jpg
36
+ Gloss 26: keyframe_026_feat34_frame134_att0.157.jpg
37
+ Gloss 27: keyframe_027_feat34_frame134_att0.115.jpg
38
+ Gloss 28: keyframe_028_feat34_frame134_att0.161.jpg
39
+ Gloss 29: keyframe_029_feat34_frame134_att0.144.jpg
SignX/detailed_prediction_20260101_131106/3381121/attention_weights.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f75d778a2e7e7598b861f3b4b05e86ee83ce116f7594899cdac92ec25de5b2f2
3
+ size 4328
SignX/detailed_prediction_20260101_131106/3381121/debug_video_path.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ video_path = '/common/users/sf895/output/huggingface_asllrp_repo/SignX/eval/tiny_test_data/good_videos/3381121.mp4'
2
+ video_path type = <class 'str'>
3
+ video_path is None: False
4
+ bool(video_path): True
SignX/detailed_prediction_20260101_131106/3381121/feature_frame_mapping.json ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "original_frame_count": 136,
3
+ "feature_count": 35,
4
+ "downsampling_ratio": 3.8857142857142857,
5
+ "fps": 30.0,
6
+ "mapping": [
7
+ {
8
+ "feature_index": 0,
9
+ "frame_start": 0,
10
+ "frame_end": 3,
11
+ "frame_count": 3
12
+ },
13
+ {
14
+ "feature_index": 1,
15
+ "frame_start": 3,
16
+ "frame_end": 7,
17
+ "frame_count": 4
18
+ },
19
+ {
20
+ "feature_index": 2,
21
+ "frame_start": 7,
22
+ "frame_end": 11,
23
+ "frame_count": 4
24
+ },
25
+ {
26
+ "feature_index": 3,
27
+ "frame_start": 11,
28
+ "frame_end": 15,
29
+ "frame_count": 4
30
+ },
31
+ {
32
+ "feature_index": 4,
33
+ "frame_start": 15,
34
+ "frame_end": 19,
35
+ "frame_count": 4
36
+ },
37
+ {
38
+ "feature_index": 5,
39
+ "frame_start": 19,
40
+ "frame_end": 23,
41
+ "frame_count": 4
42
+ },
43
+ {
44
+ "feature_index": 6,
45
+ "frame_start": 23,
46
+ "frame_end": 27,
47
+ "frame_count": 4
48
+ },
49
+ {
50
+ "feature_index": 7,
51
+ "frame_start": 27,
52
+ "frame_end": 31,
53
+ "frame_count": 4
54
+ },
55
+ {
56
+ "feature_index": 8,
57
+ "frame_start": 31,
58
+ "frame_end": 34,
59
+ "frame_count": 3
60
+ },
61
+ {
62
+ "feature_index": 9,
63
+ "frame_start": 34,
64
+ "frame_end": 38,
65
+ "frame_count": 4
66
+ },
67
+ {
68
+ "feature_index": 10,
69
+ "frame_start": 38,
70
+ "frame_end": 42,
71
+ "frame_count": 4
72
+ },
73
+ {
74
+ "feature_index": 11,
75
+ "frame_start": 42,
76
+ "frame_end": 46,
77
+ "frame_count": 4
78
+ },
79
+ {
80
+ "feature_index": 12,
81
+ "frame_start": 46,
82
+ "frame_end": 50,
83
+ "frame_count": 4
84
+ },
85
+ {
86
+ "feature_index": 13,
87
+ "frame_start": 50,
88
+ "frame_end": 54,
89
+ "frame_count": 4
90
+ },
91
+ {
92
+ "feature_index": 14,
93
+ "frame_start": 54,
94
+ "frame_end": 58,
95
+ "frame_count": 4
96
+ },
97
+ {
98
+ "feature_index": 15,
99
+ "frame_start": 58,
100
+ "frame_end": 62,
101
+ "frame_count": 4
102
+ },
103
+ {
104
+ "feature_index": 16,
105
+ "frame_start": 62,
106
+ "frame_end": 66,
107
+ "frame_count": 4
108
+ },
109
+ {
110
+ "feature_index": 17,
111
+ "frame_start": 66,
112
+ "frame_end": 69,
113
+ "frame_count": 3
114
+ },
115
+ {
116
+ "feature_index": 18,
117
+ "frame_start": 69,
118
+ "frame_end": 73,
119
+ "frame_count": 4
120
+ },
121
+ {
122
+ "feature_index": 19,
123
+ "frame_start": 73,
124
+ "frame_end": 77,
125
+ "frame_count": 4
126
+ },
127
+ {
128
+ "feature_index": 20,
129
+ "frame_start": 77,
130
+ "frame_end": 81,
131
+ "frame_count": 4
132
+ },
133
+ {
134
+ "feature_index": 21,
135
+ "frame_start": 81,
136
+ "frame_end": 85,
137
+ "frame_count": 4
138
+ },
139
+ {
140
+ "feature_index": 22,
141
+ "frame_start": 85,
142
+ "frame_end": 89,
143
+ "frame_count": 4
144
+ },
145
+ {
146
+ "feature_index": 23,
147
+ "frame_start": 89,
148
+ "frame_end": 93,
149
+ "frame_count": 4
150
+ },
151
+ {
152
+ "feature_index": 24,
153
+ "frame_start": 93,
154
+ "frame_end": 97,
155
+ "frame_count": 4
156
+ },
157
+ {
158
+ "feature_index": 25,
159
+ "frame_start": 97,
160
+ "frame_end": 101,
161
+ "frame_count": 4
162
+ },
163
+ {
164
+ "feature_index": 26,
165
+ "frame_start": 101,
166
+ "frame_end": 104,
167
+ "frame_count": 3
168
+ },
169
+ {
170
+ "feature_index": 27,
171
+ "frame_start": 104,
172
+ "frame_end": 108,
173
+ "frame_count": 4
174
+ },
175
+ {
176
+ "feature_index": 28,
177
+ "frame_start": 108,
178
+ "frame_end": 112,
179
+ "frame_count": 4
180
+ },
181
+ {
182
+ "feature_index": 29,
183
+ "frame_start": 112,
184
+ "frame_end": 116,
185
+ "frame_count": 4
186
+ },
187
+ {
188
+ "feature_index": 30,
189
+ "frame_start": 116,
190
+ "frame_end": 120,
191
+ "frame_count": 4
192
+ },
193
+ {
194
+ "feature_index": 31,
195
+ "frame_start": 120,
196
+ "frame_end": 124,
197
+ "frame_count": 4
198
+ },
199
+ {
200
+ "feature_index": 32,
201
+ "frame_start": 124,
202
+ "frame_end": 128,
203
+ "frame_count": 4
204
+ },
205
+ {
206
+ "feature_index": 33,
207
+ "frame_start": 128,
208
+ "frame_end": 132,
209
+ "frame_count": 4
210
+ },
211
+ {
212
+ "feature_index": 34,
213
+ "frame_start": 132,
214
+ "frame_end": 136,
215
+ "frame_count": 4
216
+ }
217
+ ]
218
+ }
SignX/detailed_prediction_20260101_131106/3381121/frame_alignment.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "translation": "BOX/ROOM IX NOT-YET ARRIVE IX SHOULD CONTACT ns-fs-FEDEX",
3
+ "words": [
4
+ "BOX/ROOM",
5
+ "IX",
6
+ "NOT-YET",
7
+ "ARRIVE",
8
+ "IX",
9
+ "SHOULD",
10
+ "CONTACT",
11
+ "ns-fs-FEDEX"
12
+ ],
13
+ "total_video_frames": 35,
14
+ "frame_ranges": [
15
+ {
16
+ "word": "BOX/ROOM",
17
+ "start_frame": 4,
18
+ "end_frame": 4,
19
+ "peak_frame": 4,
20
+ "avg_attention": 0.6183844208717346,
21
+ "confidence": "high"
22
+ },
23
+ {
24
+ "word": "IX",
25
+ "start_frame": 7,
26
+ "end_frame": 7,
27
+ "peak_frame": 7,
28
+ "avg_attention": 0.5238878726959229,
29
+ "confidence": "high"
30
+ },
31
+ {
32
+ "word": "NOT-YET",
33
+ "start_frame": 7,
34
+ "end_frame": 7,
35
+ "peak_frame": 7,
36
+ "avg_attention": 0.26562702655792236,
37
+ "confidence": "medium"
38
+ },
39
+ {
40
+ "word": "ARRIVE",
41
+ "start_frame": 8,
42
+ "end_frame": 10,
43
+ "peak_frame": 8,
44
+ "avg_attention": 0.3079790771007538,
45
+ "confidence": "medium"
46
+ },
47
+ {
48
+ "word": "IX",
49
+ "start_frame": 11,
50
+ "end_frame": 11,
51
+ "peak_frame": 11,
52
+ "avg_attention": 0.48612749576568604,
53
+ "confidence": "medium"
54
+ },
55
+ {
56
+ "word": "SHOULD",
57
+ "start_frame": 13,
58
+ "end_frame": 13,
59
+ "peak_frame": 13,
60
+ "avg_attention": 0.5946471691131592,
61
+ "confidence": "high"
62
+ },
63
+ {
64
+ "word": "CONTACT",
65
+ "start_frame": 13,
66
+ "end_frame": 13,
67
+ "peak_frame": 13,
68
+ "avg_attention": 0.17889028787612915,
69
+ "confidence": "low"
70
+ },
71
+ {
72
+ "word": "ns-fs-FEDEX",
73
+ "start_frame": 17,
74
+ "end_frame": 17,
75
+ "peak_frame": 17,
76
+ "avg_attention": 0.7611479163169861,
77
+ "confidence": "high"
78
+ }
79
+ ],
80
+ "statistics": {
81
+ "avg_confidence": 0.46708640828728676,
82
+ "high_confidence_words": 4,
83
+ "medium_confidence_words": 3,
84
+ "low_confidence_words": 1
85
+ }
86
+ }
SignX/detailed_prediction_20260101_131106/3381121/frame_alignment.pdf ADDED
Binary file (38.6 kB). View file
 
SignX/detailed_prediction_20260101_131106/3381121/frame_alignment.png ADDED

Git LFS Details

  • SHA256: bfdc1d847461423af90dd37076d691e707d1503e670e747ef8b4574cc08dcbbc
  • Pointer size: 131 Bytes
  • Size of remote file: 143 kB
SignX/detailed_prediction_20260101_131106/3381121/gloss_to_frames.png ADDED

Git LFS Details

  • SHA256: 1cf9fc261023740c5cae26682718d2d53aa31ec175a64443fa1c00136e72ba61
  • Pointer size: 132 Bytes
  • Size of remote file: 3.8 MB
SignX/detailed_prediction_20260101_131106/3381121/interactive_alignment.html ADDED
@@ -0,0 +1,579 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Interactive Word-Frame Alignment</title>
7
+ <style>
8
+ body {
9
+ font-family: 'Arial', sans-serif;
10
+ margin: 20px;
11
+ background-color: #f5f5f5;
12
+ }
13
+ .container {
14
+ max-width: 1800px;
15
+ margin: 0 auto;
16
+ background-color: white;
17
+ padding: 30px;
18
+ border-radius: 8px;
19
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
20
+ }
21
+ h1 {
22
+ color: #333;
23
+ border-bottom: 3px solid #4CAF50;
24
+ padding-bottom: 10px;
25
+ margin-bottom: 20px;
26
+ }
27
+ .stats {
28
+ background-color: #E3F2FD;
29
+ padding: 15px;
30
+ border-radius: 5px;
31
+ margin-bottom: 20px;
32
+ border-left: 4px solid #2196F3;
33
+ font-size: 14px;
34
+ }
35
+ .controls {
36
+ background-color: #f9f9f9;
37
+ padding: 20px;
38
+ border-radius: 5px;
39
+ margin-bottom: 30px;
40
+ border: 1px solid #ddd;
41
+ }
42
+ .control-group {
43
+ margin-bottom: 15px;
44
+ }
45
+ label {
46
+ font-weight: bold;
47
+ display: inline-block;
48
+ width: 250px;
49
+ color: #555;
50
+ }
51
+ input[type="range"] {
52
+ width: 400px;
53
+ vertical-align: middle;
54
+ }
55
+ .value-display {
56
+ display: inline-block;
57
+ width: 80px;
58
+ font-family: monospace;
59
+ font-size: 14px;
60
+ color: #2196F3;
61
+ font-weight: bold;
62
+ }
63
+ .reset-btn {
64
+ margin-top: 15px;
65
+ padding: 10px 25px;
66
+ background-color: #2196F3;
67
+ color: white;
68
+ border: none;
69
+ border-radius: 5px;
70
+ cursor: pointer;
71
+ font-size: 14px;
72
+ font-weight: bold;
73
+ }
74
+ .reset-btn:hover {
75
+ background-color: #1976D2;
76
+ }
77
+ canvas {
78
+ border: 1px solid #999;
79
+ display: block;
80
+ margin: 20px auto;
81
+ background: white;
82
+ }
83
+ .legend {
84
+ margin-top: 20px;
85
+ padding: 15px;
86
+ background-color: #fff;
87
+ border: 1px solid #ddd;
88
+ border-radius: 5px;
89
+ }
90
+ .legend-item {
91
+ display: inline-block;
92
+ margin-right: 25px;
93
+ font-size: 13px;
94
+ margin-bottom: 10px;
95
+ }
96
+ .color-box {
97
+ display: inline-block;
98
+ width: 30px;
99
+ height: 15px;
100
+ margin-right: 8px;
101
+ vertical-align: middle;
102
+ border: 1px solid #666;
103
+ }
104
+ .info-panel {
105
+ margin-top: 20px;
106
+ padding: 15px;
107
+ background-color: #f9f9f9;
108
+ border-radius: 5px;
109
+ border: 1px solid #ddd;
110
+ }
111
+ .confidence {
112
+ display: inline-block;
113
+ padding: 3px 10px;
114
+ border-radius: 10px;
115
+ font-weight: bold;
116
+ font-size: 11px;
117
+ text-transform: uppercase;
118
+ }
119
+ .confidence.high {
120
+ background-color: #4CAF50;
121
+ color: white;
122
+ }
123
+ .confidence.medium {
124
+ background-color: #FF9800;
125
+ color: white;
126
+ }
127
+ .confidence.low {
128
+ background-color: #f44336;
129
+ color: white;
130
+ }
131
+ </style>
132
+ </head>
133
+ <body>
134
+ <div class="container">
135
+ <h1>🎯 Interactive Word-to-Frame Alignment Visualizer</h1>
136
+
137
+ <div class="stats">
138
+ <strong>Translation:</strong> BOX/ROOM IX NOT-YET ARRIVE IX SHOULD CONTACT ns-fs-FEDEX<br>
139
+ <strong>Total Words:</strong> 8 |
140
+ <strong>Total Features:</strong> 35
141
+ </div>
142
+
143
+ <div class="controls">
144
+ <h3>⚙️ Threshold Controls</h3>
145
+
146
+ <div class="control-group">
147
+ <label for="peak-threshold">Peak Threshold (% of max):</label>
148
+ <input type="range" id="peak-threshold" min="1" max="100" value="90" step="1">
149
+ <span class="value-display" id="peak-threshold-value">90%</span>
150
+ <br>
151
+ <small style="margin-left: 255px; color: #666;">
152
+ 帧的注意力权重 ≥ (峰值权重 × 阈值%) 时被认为是"显著帧"
153
+ </small>
154
+ </div>
155
+
156
+ <div class="control-group">
157
+ <label for="confidence-high">High Confidence (avg attn >):</label>
158
+ <input type="range" id="confidence-high" min="0" max="100" value="50" step="1">
159
+ <span class="value-display" id="confidence-high-value">0.50</span>
160
+ </div>
161
+
162
+ <div class="control-group">
163
+ <label for="confidence-medium">Medium Confidence (avg attn >):</label>
164
+ <input type="range" id="confidence-medium" min="0" max="100" value="20" step="1">
165
+ <span class="value-display" id="confidence-medium-value">0.20</span>
166
+ </div>
167
+
168
+ <button class="reset-btn" onclick="resetDefaults()">
169
+ Reset to Defaults
170
+ </button>
171
+ </div>
172
+
173
+ <div>
174
+ <h3>Word-to-Frame Alignment</h3>
175
+ <p style="color: #666; font-size: 13px;">
176
+ 每个词显示为彩色矩形,宽度表示该词对应的特征帧范围。★ = 峰值帧。矩形内部显示注意力权重波形。
177
+ </p>
178
+ <canvas id="alignment-canvas" width="1600" height="600"></canvas>
179
+
180
+ <h3 style="margin-top: 30px;">Timeline Progress Bar</h3>
181
+ <canvas id="timeline-canvas" width="1600" height="100"></canvas>
182
+
183
+ <div class="legend">
184
+ <strong>Legend:</strong><br><br>
185
+ <div class="legend-item">
186
+ <span class="confidence high">High</span>
187
+ <span class="confidence medium">Medium</span>
188
+ <span class="confidence low">Low</span>
189
+ Confidence Levels (opacity reflects confidence)
190
+ </div>
191
+ <div class="legend-item">
192
+ <span style="color: red; font-size: 20px;">★</span>
193
+ Peak Frame (highest attention)
194
+ </div>
195
+ <div class="legend-item">
196
+ <span style="color: blue;">━</span>
197
+ Attention Waveform (within word region)
198
+ </div>
199
+ </div>
200
+ </div>
201
+
202
+ <div class="info-panel">
203
+ <h3>Alignment Details</h3>
204
+ <div id="alignment-details"></div>
205
+ </div>
206
+ </div>
207
+
208
+ <script>
209
+ // Attention data from Python
210
+ const attentionData = [{"word": "BOX/ROOM", "word_idx": 0, "weights": [0.006351051852107048, 0.006571591831743717, 0.012744346633553505, 0.25818338990211487, 0.6183844208717346, 0.07160329818725586, 0.0038708881475031376, 0.0009234889294020832, 0.006989854387938976, 0.004734584596008062, 0.005883616860955954, 0.0007752194069325924, 0.00019075380987487733, 2.629558821354294e-06, 7.526499302912271e-06, 2.065691842290107e-05, 5.081619747215882e-05, 0.0004794567357748747, 0.0001349998638033867, 8.269475074484944e-05, 0.00010472737631062046, 7.984995318111032e-05, 6.447096529882401e-05, 7.145031850086525e-05, 0.00010799866140587255, 0.00015245474060066044, 0.00019921209604945034, 0.0001767162320902571, 0.00017511387704871595, 0.00020259163284208626, 0.00013320642756298184, 9.409035556018353e-05, 0.00012235736357979476, 0.00015512105892412364, 0.00017536635277792811]}, {"word": "IX", "word_idx": 1, "weights": [0.0011723862262442708, 0.0009910413064062595, 0.0016792321112006903, 0.009498031809926033, 0.014361615292727947, 0.04359763115644455, 0.280988484621048, 0.5238878726959229, 0.05194198712706566, 0.03270686790347099, 0.03140342980623245, 0.003325593890622258, 0.001596319954842329, 0.0011391377774998546, 0.0005484184948727489, 0.00033490045461803675, 7.97669927123934e-05, 0.0003001391014549881, 5.5829652410466224e-05, 7.975448170327581e-06, 8.45913564262446e-06, 1.2661466826102696e-05, 1.240926758327987e-05, 8.69539326231461e-06, 9.886168299999554e-06, 1.1390139661671128e-05, 1.0159355042560492e-05, 9.64598439168185e-06, 8.925362635636702e-06, 9.117472473008092e-06, 1.2588812751346268e-05, 2.6802983484230936e-05, 5.668022276950069e-05, 8.233459811890498e-05, 0.00010355122503824532]}, {"word": "NOT-YET", "word_idx": 2, "weights": [0.16965249180793762, 0.07323458045721054, 0.029197975993156433, 0.0025396100245416164, 0.002445423509925604, 0.009898832067847252, 0.037797823548316956, 0.26562702655792236, 0.009848427027463913, 0.00526211503893137, 0.004250594414770603, 0.0014572322834283113, 0.001674243831075728, 0.05451618880033493, 0.060803089290857315, 0.04630552604794502, 0.01521533913910389, 0.004090897738933563, 0.003519815392792225, 0.0038278333377093077, 0.0024895716924220324, 0.002131127519533038, 0.0033031043130904436, 0.0035419934429228306, 0.0020546577870845795, 0.0016667826566845179, 0.0013373601250350475, 0.0012249398278072476, 0.001324663171544671, 0.0019041926134377718, 0.004013519734144211, 0.019279679283499718, 0.04461098462343216, 0.053339678794145584, 0.05661269277334213]}, {"word": "ARRIVE", "word_idx": 3, "weights": [0.0002905388828366995, 0.0002083813596982509, 0.00032632541842758656, 0.0025478217285126448, 0.0073820799589157104, 0.014858342707157135, 0.018400374799966812, 0.021123293787240982, 0.3158378005027771, 0.25220221281051636, 0.30012035369873047, 0.010648821480572224, 0.001886643934994936, 6.4878404373303056e-06, 5.923872322455281e-06, 2.3099497411749326e-05, 0.0005105354939587414, 0.04699746519327164, 0.005902951583266258, 0.00029092541080899537, 0.00018096565327141434, 6.506430509034544e-05, 3.2437703339383006e-05, 2.104153281834442e-05, 7.040531727398047e-06, 7.098288733686786e-06, 7.855384865251835e-06, 6.147487965790788e-06, 5.554756626224844e-06, 7.759556865494233e-06, 6.213985670910915e-06, 1.072721897799056e-05, 1.9002200133400038e-05, 2.5421264581382275e-05, 2.727148421399761e-05]}, {"word": "IX", "word_idx": 4, "weights": [0.0003390431229490787, 0.00022571485897060484, 0.0002557964762672782, 0.0005381361697800457, 0.002120023826137185, 0.0273550096899271, 0.012844335287809372, 0.00290689617395401, 0.01703452318906784, 0.02637772634625435, 0.15619716048240662, 0.48612749576568604, 0.2603294849395752, 0.0005641445168294013, 0.00019721912394743413, 0.00033904434530995786, 0.0006775215733796358, 0.0013669012114405632, 0.0016405221540480852, 0.0007656495436094701, 0.0005228326190263033, 0.0003606425889302045, 0.00021389758330769837, 0.00013279783888719976, 3.7730329495389014e-05, 3.255438059568405e-05, 3.4443997719790787e-05, 3.628108970588073e-05, 3.273988113505766e-05, 3.9840597310103476e-05, 4.062296648044139e-05, 5.8705947594717145e-05, 7.590500899823382e-05, 9.174603474093601e-05, 8.684050408191979e-05]}, {"word": "SHOULD", "word_idx": 5, "weights": [0.00527340080589056, 0.004166516475379467, 0.003337869420647621, 0.0011889089364558458, 0.0007747402414679527, 0.01280419435352087, 0.03180841729044914, 0.04200495034456253, 0.002391757909208536, 0.004637685138732195, 0.006087929010391235, 0.01985923945903778, 0.060313232243061066, 0.5946471691131592, 0.15804460644721985, 0.029653724282979965, 0.0008350771386176348, 0.00013930512068327516, 0.00016234509530477226, 0.00027477910043671727, 0.0006075621349737048, 0.0018652487779036164, 0.0021796557120978832, 0.0014713223790749907, 0.0024460090789943933, 0.002028325106948614, 0.0012717237696051598, 0.001144407782703638, 0.0009023174061439931, 0.0005251378170214593, 0.0008574927924200892, 0.001382339047268033, 0.001502902596257627, 0.001733113662339747, 0.001676460960879922]}, {"word": "CONTACT", "word_idx": 6, "weights": [0.14272911846637726, 0.0573246069252491, 0.0188103336840868, 0.0006784269353374839, 0.00042378040961921215, 0.0014155198587104678, 0.0069302283227443695, 0.08298847824335098, 0.002187008038163185, 0.0017832987941801548, 0.0012008043704554439, 0.0009829651098698378, 0.0021144067868590355, 0.17889028787612915, 0.15413032472133636, 0.09035450220108032, 0.021829815581440926, 0.004844403825700283, 0.006283571477979422, 0.00830614659935236, 0.007968198508024216, 0.008506102487444878, 0.010532977990806103, 0.01149566750973463, 0.008719464763998985, 0.006225862540304661, 0.004270944744348526, 0.003964268136769533, 0.0038093950133770704, 0.004123717080801725, 0.006864133290946484, 0.021106082946062088, 0.03659150376915932, 0.041107941418886185, 0.04050571098923683]}, {"word": "ns-fs-FEDEX", "word_idx": 7, "weights": [7.23023695172742e-05, 5.213047916186042e-05, 4.6853372623445466e-05, 8.384212560486048e-05, 5.267366213956848e-05, 4.4198710384080186e-05, 6.236167973838747e-05, 0.0005651791580021381, 0.004614907316863537, 0.0062443651258945465, 0.00276308530010283, 0.0010768879437819123, 0.0007893505389802158, 0.0001608922757441178, 0.00028600034420378506, 0.0006088865338824689, 0.010051908902823925, 0.7611479163169861, 0.1628209799528122, 0.011173587292432785, 0.01768321916460991, 0.008066349662840366, 0.003297096583992243, 0.002270511817187071, 0.0019132717279717326, 0.0015967994695529342, 0.001093801110982895, 0.0005375861073844135, 0.00038413898437283933, 0.0001939320209203288, 7.028852996882051e-05, 4.9711332394508645e-05, 4.136270945309661e-05, 4.271505167707801e-05, 4.087587149115279e-05]}];
211
+ const numGlosses = 8;
212
+ const numFeatures = 35;
213
+
214
+ // Colors for different words (matching matplotlib tab20)
215
+ const colors = [
216
+ '#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd',
217
+ '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf',
218
+ '#aec7e8', '#ffbb78', '#98df8a', '#ff9896', '#c5b0d5',
219
+ '#c49c94', '#f7b6d2', '#c7c7c7', '#dbdb8d', '#9edae5'
220
+ ];
221
+
222
+ // Get controls
223
+ const peakThresholdSlider = document.getElementById('peak-threshold');
224
+ const peakThresholdValue = document.getElementById('peak-threshold-value');
225
+ const confidenceHighSlider = document.getElementById('confidence-high');
226
+ const confidenceHighValue = document.getElementById('confidence-high-value');
227
+ const confidenceMediumSlider = document.getElementById('confidence-medium');
228
+ const confidenceMediumValue = document.getElementById('confidence-medium-value');
229
+ const alignmentCanvas = document.getElementById('alignment-canvas');
230
+ const timelineCanvas = document.getElementById('timeline-canvas');
231
+ const alignmentCtx = alignmentCanvas.getContext('2d');
232
+ const timelineCtx = timelineCanvas.getContext('2d');
233
+
234
+ // Update displays when sliders change
235
+ peakThresholdSlider.oninput = function() {
236
+ peakThresholdValue.textContent = this.value + '%';
237
+ updateVisualization();
238
+ };
239
+
240
+ confidenceHighSlider.oninput = function() {
241
+ confidenceHighValue.textContent = (this.value / 100).toFixed(2);
242
+ updateVisualization();
243
+ };
244
+
245
+ confidenceMediumSlider.oninput = function() {
246
+ confidenceMediumValue.textContent = (this.value / 100).toFixed(2);
247
+ updateVisualization();
248
+ };
249
+
250
+ function resetDefaults() {
251
+ peakThresholdSlider.value = 90;
252
+ confidenceHighSlider.value = 50;
253
+ confidenceMediumSlider.value = 20;
254
+ peakThresholdValue.textContent = '90%';
255
+ confidenceHighValue.textContent = '0.50';
256
+ confidenceMediumValue.textContent = '0.20';
257
+ updateVisualization();
258
+ }
259
+
260
+ function calculateAlignment(weights, peakThreshold) {
261
+ // Find peak
262
+ let peakIdx = 0;
263
+ let peakWeight = weights[0];
264
+ for (let i = 1; i < weights.length; i++) {
265
+ if (weights[i] > peakWeight) {
266
+ peakWeight = weights[i];
267
+ peakIdx = i;
268
+ }
269
+ }
270
+
271
+ // Find significant frames
272
+ const threshold = peakWeight * (peakThreshold / 100);
273
+ let startIdx = peakIdx;
274
+ let endIdx = peakIdx;
275
+ let sumWeight = 0;
276
+ let count = 0;
277
+
278
+ for (let i = 0; i < weights.length; i++) {
279
+ if (weights[i] >= threshold) {
280
+ if (i < startIdx) startIdx = i;
281
+ if (i > endIdx) endIdx = i;
282
+ sumWeight += weights[i];
283
+ count++;
284
+ }
285
+ }
286
+
287
+ const avgWeight = count > 0 ? sumWeight / count : peakWeight;
288
+
289
+ return {
290
+ startIdx: startIdx,
291
+ endIdx: endIdx,
292
+ peakIdx: peakIdx,
293
+ peakWeight: peakWeight,
294
+ avgWeight: avgWeight,
295
+ threshold: threshold
296
+ };
297
+ }
298
+
299
+ function getConfidenceLevel(avgWeight, highThreshold, mediumThreshold) {
300
+ if (avgWeight > highThreshold) return 'high';
301
+ if (avgWeight > mediumThreshold) return 'medium';
302
+ return 'low';
303
+ }
304
+
305
+ function drawAlignmentChart() {
306
+ const peakThreshold = parseInt(peakThresholdSlider.value);
307
+ const highThreshold = parseInt(confidenceHighSlider.value) / 100;
308
+ const mediumThreshold = parseInt(confidenceMediumSlider.value) / 100;
309
+
310
+ // Canvas dimensions
311
+ const width = alignmentCanvas.width;
312
+ const height = alignmentCanvas.height;
313
+ const leftMargin = 180;
314
+ const rightMargin = 50;
315
+ const topMargin = 60;
316
+ const bottomMargin = 80;
317
+
318
+ const plotWidth = width - leftMargin - rightMargin;
319
+ const plotHeight = height - topMargin - bottomMargin;
320
+
321
+ const rowHeight = plotHeight / numGlosses;
322
+ const featureWidth = plotWidth / numFeatures;
323
+
324
+ // Clear canvas
325
+ alignmentCtx.clearRect(0, 0, width, height);
326
+
327
+ // Draw title
328
+ alignmentCtx.fillStyle = '#333';
329
+ alignmentCtx.font = 'bold 18px Arial';
330
+ alignmentCtx.textAlign = 'center';
331
+ alignmentCtx.fillText('Word-to-Frame Alignment', width / 2, 30);
332
+ alignmentCtx.font = '13px Arial';
333
+ alignmentCtx.fillText('(based on attention peaks, ★ = peak frame)', width / 2, 48);
334
+
335
+ // Calculate alignments
336
+ const alignments = [];
337
+ for (let wordIdx = 0; wordIdx < numGlosses; wordIdx++) {
338
+ const data = attentionData[wordIdx];
339
+ const alignment = calculateAlignment(data.weights, peakThreshold);
340
+ alignment.word = data.word;
341
+ alignment.wordIdx = wordIdx;
342
+ alignment.weights = data.weights;
343
+ alignments.push(alignment);
344
+ }
345
+
346
+ // Draw grid
347
+ alignmentCtx.strokeStyle = '#e0e0e0';
348
+ alignmentCtx.lineWidth = 0.5;
349
+ for (let i = 0; i <= numFeatures; i++) {
350
+ const x = leftMargin + i * featureWidth;
351
+ alignmentCtx.beginPath();
352
+ alignmentCtx.moveTo(x, topMargin);
353
+ alignmentCtx.lineTo(x, topMargin + plotHeight);
354
+ alignmentCtx.stroke();
355
+ }
356
+
357
+ // Draw word regions
358
+ for (let wordIdx = 0; wordIdx < numGlosses; wordIdx++) {
359
+ const alignment = alignments[wordIdx];
360
+ const confidence = getConfidenceLevel(alignment.avgWeight, highThreshold, mediumThreshold);
361
+ const y = topMargin + wordIdx * rowHeight;
362
+
363
+ // Alpha based on confidence
364
+ const alpha = confidence === 'high' ? 0.9 : confidence === 'medium' ? 0.7 : 0.5;
365
+
366
+ // Draw rectangle for word region
367
+ const startX = leftMargin + alignment.startIdx * featureWidth;
368
+ const rectWidth = (alignment.endIdx - alignment.startIdx + 1) * featureWidth;
369
+
370
+ alignmentCtx.fillStyle = colors[wordIdx % 20];
371
+ alignmentCtx.globalAlpha = alpha;
372
+ alignmentCtx.fillRect(startX, y, rectWidth, rowHeight * 0.8);
373
+ alignmentCtx.globalAlpha = 1.0;
374
+
375
+ // Draw border
376
+ alignmentCtx.strokeStyle = '#000';
377
+ alignmentCtx.lineWidth = 2;
378
+ alignmentCtx.strokeRect(startX, y, rectWidth, rowHeight * 0.8);
379
+
380
+ // Draw attention waveform inside rectangle
381
+ alignmentCtx.strokeStyle = 'rgba(0, 0, 255, 0.8)';
382
+ alignmentCtx.lineWidth = 1.5;
383
+ alignmentCtx.beginPath();
384
+ for (let i = alignment.startIdx; i <= alignment.endIdx; i++) {
385
+ const x = leftMargin + i * featureWidth + featureWidth / 2;
386
+ const weight = alignment.weights[i];
387
+ const maxWeight = alignment.peakWeight;
388
+ const normalizedWeight = weight / (maxWeight * 1.2); // Scale for visibility
389
+ const waveY = y + rowHeight * 0.8 - (normalizedWeight * rowHeight * 0.6);
390
+
391
+ if (i === alignment.startIdx) {
392
+ alignmentCtx.moveTo(x, waveY);
393
+ } else {
394
+ alignmentCtx.lineTo(x, waveY);
395
+ }
396
+ }
397
+ alignmentCtx.stroke();
398
+
399
+ // Draw word label
400
+ const labelX = startX + rectWidth / 2;
401
+ const labelY = y + rowHeight * 0.4;
402
+
403
+ alignmentCtx.fillStyle = 'rgba(0, 0, 0, 0.7)';
404
+ alignmentCtx.fillRect(labelX - 60, labelY - 12, 120, 24);
405
+ alignmentCtx.fillStyle = '#fff';
406
+ alignmentCtx.font = 'bold 13px Arial';
407
+ alignmentCtx.textAlign = 'center';
408
+ alignmentCtx.textBaseline = 'middle';
409
+ alignmentCtx.fillText(alignment.word, labelX, labelY);
410
+
411
+ // Mark peak frame with star
412
+ const peakX = leftMargin + alignment.peakIdx * featureWidth + featureWidth / 2;
413
+ const peakY = y + rowHeight * 0.4;
414
+
415
+ // Draw star
416
+ alignmentCtx.fillStyle = '#ff0000';
417
+ alignmentCtx.strokeStyle = '#ffff00';
418
+ alignmentCtx.lineWidth = 1.5;
419
+ alignmentCtx.font = '20px Arial';
420
+ alignmentCtx.textAlign = 'center';
421
+ alignmentCtx.strokeText('★', peakX, peakY);
422
+ alignmentCtx.fillText('★', peakX, peakY);
423
+
424
+ // Y-axis label (word names)
425
+ alignmentCtx.fillStyle = '#333';
426
+ alignmentCtx.font = '12px Arial';
427
+ alignmentCtx.textAlign = 'right';
428
+ alignmentCtx.textBaseline = 'middle';
429
+ alignmentCtx.fillText(alignment.word, leftMargin - 10, y + rowHeight * 0.4);
430
+ }
431
+
432
+ // Draw horizontal grid lines
433
+ alignmentCtx.strokeStyle = '#ccc';
434
+ alignmentCtx.lineWidth = 0.5;
435
+ for (let i = 0; i <= numGlosses; i++) {
436
+ const y = topMargin + i * rowHeight;
437
+ alignmentCtx.beginPath();
438
+ alignmentCtx.moveTo(leftMargin, y);
439
+ alignmentCtx.lineTo(leftMargin + plotWidth, y);
440
+ alignmentCtx.stroke();
441
+ }
442
+
443
+ // Draw axes
444
+ alignmentCtx.strokeStyle = '#000';
445
+ alignmentCtx.lineWidth = 2;
446
+ alignmentCtx.strokeRect(leftMargin, topMargin, plotWidth, plotHeight);
447
+
448
+ // X-axis labels (frame indices)
449
+ alignmentCtx.fillStyle = '#000';
450
+ alignmentCtx.font = '11px Arial';
451
+ alignmentCtx.textAlign = 'center';
452
+ alignmentCtx.textBaseline = 'top';
453
+ for (let i = 0; i < numFeatures; i++) {
454
+ const x = leftMargin + i * featureWidth + featureWidth / 2;
455
+ alignmentCtx.fillText(i.toString(), x, topMargin + plotHeight + 10);
456
+ }
457
+
458
+ // Axis titles
459
+ alignmentCtx.fillStyle = '#333';
460
+ alignmentCtx.font = 'bold 14px Arial';
461
+ alignmentCtx.textAlign = 'center';
462
+ alignmentCtx.fillText('Feature Frame Index', leftMargin + plotWidth / 2, height - 20);
463
+
464
+ alignmentCtx.save();
465
+ alignmentCtx.translate(30, topMargin + plotHeight / 2);
466
+ alignmentCtx.rotate(-Math.PI / 2);
467
+ alignmentCtx.fillText('Generated Word', 0, 0);
468
+ alignmentCtx.restore();
469
+
470
+ return alignments;
471
+ }
472
+
473
+ function drawTimeline(alignments) {
474
+ const highThreshold = parseInt(confidenceHighSlider.value) / 100;
475
+ const mediumThreshold = parseInt(confidenceMediumSlider.value) / 100;
476
+
477
+ const width = timelineCanvas.width;
478
+ const height = timelineCanvas.height;
479
+ const leftMargin = 180;
480
+ const rightMargin = 50;
481
+ const plotWidth = width - leftMargin - rightMargin;
482
+ const featureWidth = plotWidth / numFeatures;
483
+
484
+ // Clear canvas
485
+ timelineCtx.clearRect(0, 0, width, height);
486
+
487
+ // Background bar
488
+ timelineCtx.fillStyle = '#ddd';
489
+ timelineCtx.fillRect(leftMargin, 30, plotWidth, 40);
490
+ timelineCtx.strokeStyle = '#000';
491
+ timelineCtx.lineWidth = 2;
492
+ timelineCtx.strokeRect(leftMargin, 30, plotWidth, 40);
493
+
494
+ // Draw word regions on timeline
495
+ for (let wordIdx = 0; wordIdx < alignments.length; wordIdx++) {
496
+ const alignment = alignments[wordIdx];
497
+ const confidence = getConfidenceLevel(alignment.avgWeight, highThreshold, mediumThreshold);
498
+ const alpha = confidence === 'high' ? 0.9 : confidence === 'medium' ? 0.7 : 0.5;
499
+
500
+ const startX = leftMargin + alignment.startIdx * featureWidth;
501
+ const rectWidth = (alignment.endIdx - alignment.startIdx + 1) * featureWidth;
502
+
503
+ timelineCtx.fillStyle = colors[wordIdx % 20];
504
+ timelineCtx.globalAlpha = alpha;
505
+ timelineCtx.fillRect(startX, 30, rectWidth, 40);
506
+ timelineCtx.globalAlpha = 1.0;
507
+ timelineCtx.strokeStyle = '#000';
508
+ timelineCtx.lineWidth = 0.5;
509
+ timelineCtx.strokeRect(startX, 30, rectWidth, 40);
510
+ }
511
+
512
+ // Title
513
+ timelineCtx.fillStyle = '#333';
514
+ timelineCtx.font = 'bold 13px Arial';
515
+ timelineCtx.textAlign = 'left';
516
+ timelineCtx.fillText('Timeline Progress Bar', leftMargin, 20);
517
+ }
518
+
519
+ function updateDetailsPanel(alignments, highThreshold, mediumThreshold) {
520
+ const panel = document.getElementById('alignment-details');
521
+ let html = '<table style="width: 100%; border-collapse: collapse;">';
522
+ html += '<tr style="background: #f0f0f0; font-weight: bold;">';
523
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Word</th>';
524
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Feature Range</th>';
525
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Peak</th>';
526
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Span</th>';
527
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Avg Attention</th>';
528
+ html += '<th style="padding: 8px; border: 1px solid #ddd;">Confidence</th>';
529
+ html += '</tr>';
530
+
531
+ for (const align of alignments) {
532
+ const confidence = getConfidenceLevel(align.avgWeight, highThreshold, mediumThreshold);
533
+ const span = align.endIdx - align.startIdx + 1;
534
+
535
+ html += '<tr>';
536
+ html += `<td style="padding: 8px; border: 1px solid #ddd;"><strong>${align.word}</strong></td>`;
537
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${align.startIdx} → ${align.endIdx}</td>`;
538
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${align.peakIdx}</td>`;
539
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${span}</td>`;
540
+ html += `<td style="padding: 8px; border: 1px solid #ddd;">${align.avgWeight.toFixed(4)}</td>`;
541
+ html += `<td style="padding: 8px; border: 1px solid #ddd;"><span class="confidence ${confidence}">${confidence}</span></td>`;
542
+ html += '</tr>';
543
+ }
544
+
545
+ html += '</table>';
546
+ panel.innerHTML = html;
547
+ }
548
+
549
+ function updateVisualization() {
550
+ const alignments = drawAlignmentChart();
551
+ drawTimeline(alignments);
552
+ const highThreshold = parseInt(confidenceHighSlider.value) / 100;
553
+ const mediumThreshold = parseInt(confidenceMediumSlider.value) / 100;
554
+ updateDetailsPanel(alignments, highThreshold, mediumThreshold);
555
+ }
556
+
557
+ // Event listeners for sliders
558
+ peakSlider.addEventListener('input', function() {
559
+ peakValue.textContent = peakSlider.value + '%';
560
+ updateVisualization();
561
+ });
562
+
563
+ confidenceHighSlider.addEventListener('input', function() {
564
+ const val = parseInt(confidenceHighSlider.value) / 100;
565
+ confidenceHighValue.textContent = val.toFixed(2);
566
+ updateVisualization();
567
+ });
568
+
569
+ confidenceMediumSlider.addEventListener('input', function() {
570
+ const val = parseInt(confidenceMediumSlider.value) / 100;
571
+ confidenceMediumValue.textContent = val.toFixed(2);
572
+ updateVisualization();
573
+ });
574
+
575
+ // Initial visualization
576
+ updateVisualization();
577
+ </script>
578
+ </body>
579
+ </html>
SignX/detailed_prediction_20260101_131106/3381121/translation.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ With BPE: BOX/ROOM I@@ X NOT-YET ARRIVE I@@ X SHOULD CONT@@ ACT ns-fs-@@ F@@ E@@ DE@@ X
2
+ Clean: BOX/ROOM IX NOT-YET ARRIVE IX SHOULD CONTACT ns-fs-FEDEX
3
+ Ground Truth: BOX/ROOM IX NOT-YET ARRIVE IX SHOULD CONTACT ns-fs-FEDEX
SignX/eval/attention_analysis.py CHANGED
@@ -237,9 +237,12 @@ class AttentionAnalyzer:
237
 
238
  plt.tight_layout()
239
  plt.savefig(output_path, dpi=150, bbox_inches='tight')
 
 
 
240
  plt.close()
241
 
242
- print(f" ✓ {output_path.name}")
243
 
244
  def plot_frame_alignment(self, output_path):
245
  """生成帧对齐可视化"""
@@ -307,13 +310,15 @@ class AttentionAnalyzer:
307
 
308
  ax1.set_xlim(-2, self.video_frames + 2)
309
  ax1.set_ylim(-0.5, len(self.words))
310
- ax1.set_xlabel('Video Frame Index', fontsize=13, fontweight='bold')
 
311
  ax1.set_ylabel('Generated Word', fontsize=13, fontweight='bold')
312
  ax1.set_title('Word-to-Frame Alignment\n(based on attention peaks, ★ = peak frame)',
313
  fontsize=15, pad=15, fontweight='bold')
314
  ax1.grid(True, alpha=0.3, axis='x', linestyle='--')
315
  ax1.set_yticks(range(len(self.words)))
316
  ax1.set_yticklabels([w['word'] for w in self.word_frame_ranges], fontsize=10)
 
317
 
318
  # === 中图1: SMKD特征帧时间线进度条 ===
319
  ax2 = fig.add_subplot(gs[1])
@@ -334,12 +339,14 @@ class AttentionAnalyzer:
334
 
335
  ax2.set_xlim(-2, self.video_frames + 2)
336
  ax2.set_ylim(-0.4, 0.4)
337
- ax2.set_xlabel('SMKD Feature Frame Index', fontsize=12, fontweight='bold')
338
  ax2.set_yticks([])
339
- ax2.set_title('SMKD Feature Timeline', fontsize=13, fontweight='bold')
340
  ax2.grid(True, alpha=0.3, axis='x', linestyle='--')
341
 
342
  # === 中图2: 原始视频帧时间线进度条 (如果有feature mapping) ===
 
 
343
  if feature_mapping:
344
  ax3 = fig.add_subplot(gs[2])
345
 
@@ -368,7 +375,7 @@ class AttentionAnalyzer:
368
 
369
  ax3.set_xlim(-2, original_frame_count + 2)
370
  ax3.set_ylim(-0.4, 0.4)
371
- ax3.set_xlabel('Original Video Frame Index', fontsize=12, fontweight='bold')
372
  ax3.set_yticks([])
373
  ax3.set_title(f'Original Video Timeline ({original_frame_count} frames, '
374
  f'{feature_mapping["downsampling_ratio"]:.2f}x downsampling)',
@@ -376,6 +383,7 @@ class AttentionAnalyzer:
376
  ax3.grid(True, alpha=0.3, axis='x', linestyle='--')
377
 
378
  legend_row = 3
 
379
  else:
380
  legend_row = 2
381
 
@@ -388,10 +396,23 @@ class AttentionAnalyzer:
388
  fontsize=11, transform=ax_legend.transAxes)
389
 
390
  plt.tight_layout()
 
 
 
 
 
 
 
 
 
 
391
  plt.savefig(output_path, dpi=150, bbox_inches='tight')
 
 
 
392
  plt.close()
393
 
394
- print(f" ✓ {output_path.name}")
395
 
396
  def save_alignment_data(self, output_path):
397
  """保存帧对齐数据为JSON"""
 
237
 
238
  plt.tight_layout()
239
  plt.savefig(output_path, dpi=150, bbox_inches='tight')
240
+ # also save PDF copy for high-res usage
241
+ pdf_path = Path(output_path).with_suffix('.pdf')
242
+ plt.savefig(str(pdf_path), format='pdf', bbox_inches='tight')
243
  plt.close()
244
 
245
+ print(f" ✓ {output_path.name} (PDF copy saved)")
246
 
247
  def plot_frame_alignment(self, output_path):
248
  """生成帧对齐可视化"""
 
310
 
311
  ax1.set_xlim(-2, self.video_frames + 2)
312
  ax1.set_ylim(-0.5, len(self.words))
313
+ # Remove redundant label (timeline info shown below)
314
+ ax1.set_xlabel('')
315
  ax1.set_ylabel('Generated Word', fontsize=13, fontweight='bold')
316
  ax1.set_title('Word-to-Frame Alignment\n(based on attention peaks, ★ = peak frame)',
317
  fontsize=15, pad=15, fontweight='bold')
318
  ax1.grid(True, alpha=0.3, axis='x', linestyle='--')
319
  ax1.set_yticks(range(len(self.words)))
320
  ax1.set_yticklabels([w['word'] for w in self.word_frame_ranges], fontsize=10)
321
+ ax1_label_pos = ax1.yaxis.label.get_position()
322
 
323
  # === 中图1: SMKD特征帧时间线进度条 ===
324
  ax2 = fig.add_subplot(gs[1])
 
339
 
340
  ax2.set_xlim(-2, self.video_frames + 2)
341
  ax2.set_ylim(-0.4, 0.4)
342
+ ax2.set_xlabel('')
343
  ax2.set_yticks([])
344
+ ax2.set_title('Latent Feature Timeline', fontsize=13, fontweight='bold')
345
  ax2.grid(True, alpha=0.3, axis='x', linestyle='--')
346
 
347
  # === 中图2: 原始视频帧时间线进度条 (如果有feature mapping) ===
348
+ timeline_axes = [ax2]
349
+
350
  if feature_mapping:
351
  ax3 = fig.add_subplot(gs[2])
352
 
 
375
 
376
  ax3.set_xlim(-2, original_frame_count + 2)
377
  ax3.set_ylim(-0.4, 0.4)
378
+ ax3.set_xlabel('')
379
  ax3.set_yticks([])
380
  ax3.set_title(f'Original Video Timeline ({original_frame_count} frames, '
381
  f'{feature_mapping["downsampling_ratio"]:.2f}x downsampling)',
 
383
  ax3.grid(True, alpha=0.3, axis='x', linestyle='--')
384
 
385
  legend_row = 3
386
+ timeline_axes.append(ax3)
387
  else:
388
  legend_row = 2
389
 
 
396
  fontsize=11, transform=ax_legend.transAxes)
397
 
398
  plt.tight_layout()
399
+ fig.canvas.draw()
400
+
401
+ # Draw shared Timeline label aligned with Generated Word label (after layout)
402
+ label_disp = ax1.transAxes.transform(ax1_label_pos)
403
+ label_fig = fig.transFigure.inverted().transform(label_disp)
404
+ timeline_bounds = [ax.get_position() for ax in timeline_axes]
405
+ timeline_center = 0.5 * (min(pos.y0 for pos in timeline_bounds) + max(pos.y1 for pos in timeline_bounds))
406
+ fig.text(label_fig[0], timeline_center, 'Timeline', rotation='vertical',
407
+ ha='center', va='center', fontsize=12, fontweight='bold')
408
+
409
  plt.savefig(output_path, dpi=150, bbox_inches='tight')
410
+ # Save PDF copy for high-res needs
411
+ pdf_path = Path(output_path).with_suffix('.pdf')
412
+ plt.savefig(str(pdf_path), format='pdf', bbox_inches='tight')
413
  plt.close()
414
 
415
+ print(f" ✓ {output_path.name} (PDF copy saved)")
416
 
417
  def save_alignment_data(self, output_path):
418
  """保存帧对齐数据为JSON"""
SignX/eval/generate_gloss_frames.py CHANGED
@@ -222,7 +222,7 @@ if __name__ == "__main__":
222
  sys.exit(1)
223
 
224
  # 处理所有样本
225
- sample_dirs = sorted(detailed_dir.glob("sample_*"))
226
 
227
  for sample_dir in sample_dirs:
228
  print(f"\n处理 {sample_dir.name}...")
 
222
  sys.exit(1)
223
 
224
  # 处理所有样本
225
+ sample_dirs = sorted([d for d in detailed_dir.iterdir() if d.is_dir()])
226
 
227
  for sample_dir in sample_dirs:
228
  print(f"\n处理 {sample_dir.name}...")
SignX/eval/regenerate_visualizations.py CHANGED
@@ -111,10 +111,9 @@ def main():
111
 
112
  # 处理所有样本
113
  success_count = 0
114
- for sample_dir in sorted(pred_dir.glob("sample_*")):
115
- if sample_dir.is_dir():
116
- if regenerate_sample_visualizations(sample_dir, video_path):
117
- success_count += 1
118
 
119
  print(f"\n✓ 完成!成功处理 {success_count} 个样本")
120
 
 
111
 
112
  # 处理所有样本
113
  success_count = 0
114
+ for sample_dir in sorted([d for d in pred_dir.iterdir() if d.is_dir()]):
115
+ if regenerate_sample_visualizations(sample_dir, video_path):
116
+ success_count += 1
 
117
 
118
  print(f"\n✓ 完成!成功处理 {success_count} 个样本")
119
 
SignX/eval/tiny_test_data/good_videos/171921.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b55f3fae16c90ecd7e799d2515aeea9af00df4efad003d84e6b0aba1a3527822
3
+ size 102121
SignX/eval/tiny_test_data/good_videos/173238.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48c605e2c0dbd04fe25871a7b2e270615d02a198567f3f903c3ae7da68bcf8ca
3
+ size 98921
SignX/eval/tiny_test_data/good_videos/173745.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:289b2fa3e751823c99b78a40e38ff799dfb7e28cdc53053b045c5e9dbb15d7fb
3
+ size 494802
SignX/eval/tiny_test_data/good_videos/23880856.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:555d737baa311faa5ff33afa7d8a6ca4c3090c41e8c47eaa39569e493dce7282
3
+ size 87354
SignX/eval/tiny_test_data/good_videos/23881350.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:910a66cdb56e3099362c109e0d5eca9a802d84384447450361a17fd1eadd2437
3
+ size 956456
SignX/eval/tiny_test_data/good_videos/31655975.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be37c2b598e44b89f31c5f716b8e58953f222b1da7e5d78043a7bdf33df9747a
3
+ size 632842
SignX/eval/tiny_test_data/good_videos/31657848.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7959393ce0fb59a832113b12966203777bef8859c4f21b9b4401b5621f5bb80
3
+ size 79933
SignX/eval/tiny_test_data/good_videos/3378265.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e91b2fbe52346403e109933052e53dcf3e172b6a638ccc87eb72507d2ab0ba3
3
+ size 739857
SignX/eval/tiny_test_data/good_videos/3381121.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:571fea555cf82d20e3ccb155759389414f2e214b9a5aa82b08a022a47395adca
3
+ size 923026
SignX/eval/tiny_test_data/good_videos/4235359.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3255cd64085e24f93527adc5159b457583c2da9dfcc21472e370254c6f3b0812
3
+ size 62516
SignX/eval/tiny_test_data/good_videos/4236171.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:608e2c41f8c445ecbf08bc22321c7e50c69999108755d9a4d2c4d784dbc20dc8
3
+ size 529850
SignX/eval/tiny_test_data/good_videos/50802118.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c3db765ef374d1247d8d4a90ec00a01833fda7d71c171ec774e675b092674a9
3
+ size 90142
SignX/eval/tiny_test_data/good_videos/5597316.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a40b162f904048599a7b3ce04d439038afcc8f8c8a70bcd15c6faae00ad495c0
3
+ size 88439
SignX/eval/tiny_test_data/good_videos/6185086.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea4e7811e3452b5c4a36ef84aa1bad600af68b5b5d2a29f130a42907a27f29c3
3
+ size 724598
SignX/eval/tiny_test_data/good_videos/6185381.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c35bdbf4087677ffb0b9d348feda0d5f45f53549f7cc6c3e8680303a6562b3b5
3
+ size 632143
SignX/eval/tiny_test_data/good_videos/619048.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:011b44c741b104d2aa07efb0df33df970e1ece034a7915590c68a9716d843f52
3
+ size 135468
SignX/eval/tiny_test_data/good_videos/629983.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bb7fd93838b5c931ac89f00adf62c08be3e45f0b90803126035c924bb7e2bde
3
+ size 90085
SignX/eval/tiny_test_data/good_videos/634818.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a7d034c6da97babb440de4eb8dc598e243141a9a8ed3b9ca3b6b222841eea6d
3
+ size 523852
SignX/eval/tiny_test_data/good_videos/63579.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21c8fa94f8c3bc8f9a771ed47b646ecc2e02c0345bedf37ea3b803e9d9d8293c
3
+ size 52159
SignX/eval/tiny_test_data/good_videos/7454155.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb47173044695c44654232f7fed41810e08f999280d066a84c88c83cdc3b9221
3
+ size 66481
SignX/eval/tiny_test_data/good_videos/7566726.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79376e879cd691efe05a10db610d97c3a06d33f3d44dafedeaddabb1a00cdfef
3
+ size 54623
SignX/eval/tiny_test_data/good_videos/7569669.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e756f0fcb4bfa4a64f433dc11309a4752fa202884310c72f5deb64923e10d5a4
3
+ size 80089
SignX/eval/tiny_test_data/good_videos/7701925.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2508adc6e401bcf01be6b1d3599bb047db0c5c90b26199bb9bfa32f49d17f52a
3
+ size 88745