Haloroute commited on
Commit
5d1afd8
·
verified ·
1 Parent(s): 4dd4829

Update README: schema, splits, dedup note, label table

Browse files
Files changed (1) hide show
  1. README.md +198 -62
README.md CHANGED
@@ -3,6 +3,14 @@ task_categories:
3
  - video-classification
4
  language:
5
  - vi
 
 
 
 
 
 
 
 
6
  configs:
7
  - config_name: default
8
  data_files:
@@ -15,76 +23,204 @@ configs:
15
  ---
16
  # ViSignLanguage-MediaPipe
17
 
18
- MediaPipe Holistic 3D keypoint dataset extracted from the Vietnamese Sign Language (**ViSignLanguage**) video dataset.
19
-
20
- ## Dataset Splits & Shard Mapping
21
-
22
- Custom split names (`train`, `public_test`, `private_test`) are configured in the YAML header above so `datasets.load_dataset("Haloroute/ViSignLanguage-MediaPipe")` automatically resolves all splits:
23
-
24
- | Split | Total Videos | Extracted (Uploaded) | Failed / Empty |
25
- | :--- | ---: | ---: | ---: |
26
- | `train` | 2806 | 2806 | 0 |
27
- | `public_test` | 1630 | 1630 | 0 |
28
- | `private_test` | 2859 | 2859 | 0 |
29
-
30
- ## Schema & Columns
31
-
32
- Each row corresponds to a single video clip stored in Arrow/Parquet format:
33
-
34
- | Column | Type / Shape | Description |
35
- | :--- | :--- | :--- |
36
- | `pose_pts` | `float32[T, 33, 3]` | Normalized 3D body pose landmarks (`x, y, z`). |
37
- | `pose_conf` | `float32[T, 33]` | Per-landmark visibility score from MediaPipe Pose (`[0.0, 1.0]`, `0.0` when missing). |
38
- | `face_pts` | `float32[T, 478, 3]` | Normalized 3D face mesh landmarks (`x, y, z`, 478 points including iris). |
39
- | `face_conf` | `float32[T, 478]` | Presence score (`1.0` when face is detected in frame, `0.0` when missing). |
40
- | `left_hand_pts` | `float32[T, 21, 3]` | Normalized 3D left-hand landmarks (`x, y, z`). |
41
- | `left_hand_conf` | `float32[T, 21]` | Presence score (`1.0` when left hand is detected in frame, `0.0` when missing). |
42
- | `right_hand_pts` | `float32[T, 21, 3]` | Normalized 3D right-hand landmarks (`x, y, z`). |
43
- | `right_hand_conf` | `float32[T, 21]` | Presence score (`1.0` when right hand is detected in frame, `0.0` when missing). |
44
- | `transcript` | `string` | NFC-normalized Vietnamese sign gloss for `train`; empty string `""` for test splits. |
45
- | `fps` | `float32` | Video frame rate (probed via OpenCV, fallback to metadata CSV). |
46
- | `duration` | `int32` | Number of decoded frames `T`. |
47
- | `key` | `string` | Unique relative identifier: `train/<label>/<filename>` or `<split>/<filename>`. |
48
- | `metadata` | `string` | JSON-encoded object (`ensure_ascii=False`) with `label`, `label_id`, `split`, `filename`, and CSV metadata (`size_mb`, `fps`, `total_frames`, `width`, `height`, `duration_s` for `train`). |
49
-
50
- ## Keypoint Layout
51
-
52
- - **Pose**: 33 landmarks (`x, y` normalized to `[0, 1]` image coordinates, `z` relative depth at hips origin). Confidence is the landmark `visibility` probability.
53
- - **Face**: 478 landmarks (`x, y, z` normalized). Confidence is binary (`1.0` if detected, `0.0` if missing).
54
- - **Hands (Left / Right)**: 21 landmarks each (`x, y, z` normalized). Confidence is binary (`1.0` if detected, `0.0` if missing).
55
- - Leading person dimension `(1, T, ...)` from `HolisticPose` is squeezed to `(T, ...)`.
56
-
57
- ## Label Mapping
58
-
59
- The complete 100-class mapping (`label -> int id`, NFC-normalized) is stored in [`label_mapping.json`](label_mapping.json).
60
-
61
- | ID | Label (NFC Vietnamese) |
62
- | ---: | :--- |
63
- | 0 | `An ủi` |
64
- | 1 | `Áp dụng` |
65
- | 2 | `Ăn` |
66
- | 3 | `Ăn mừng` |
67
- | 4 | `Ban ngày` |
68
- | 5 | `Ban đêm` |
69
- | 6 | `Bàn tay` |
70
- | 7 | `Băn khoăn` |
71
- | 8 | `Bạn thân` |
72
- | 9 | `Bế mạc` |
73
- | 10 | `Bệnh nhân` |
74
- | 11 | `Bệnh viện` |
75
- | 12 | `Biết` |
76
- | 13 | `Biếu tặng` |
77
- | 14 | `Bộ y tế` |
78
- | ... | *(100 total classes — see `label_mapping.json`)* |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  ## Usage
81
 
82
  ```python
83
  import json
 
84
  from datasets import load_dataset
85
 
86
  ds = load_dataset("Haloroute/ViSignLanguage-MediaPipe")
87
- sample = ds["train"][0]
 
 
88
  print(sample["key"], sample["transcript"], sample["duration"])
 
 
89
  meta = json.loads(sample["metadata"])
 
 
 
 
90
  ```
 
 
 
 
 
3
  - video-classification
4
  language:
5
  - vi
6
+ tags:
7
+ - sign-language
8
+ - pose-estimation
9
+ - mediapipe
10
+ - keypoints
11
+ pretty_name: ViSignLanguage-MediaPipe
12
+ size_categories:
13
+ - 1K<n<10K
14
  configs:
15
  - config_name: default
16
  data_files:
 
23
  ---
24
  # ViSignLanguage-MediaPipe
25
 
26
+ This dataset holds MediaPipe Holistic 3D keypoints extracted from the **ViSignLanguage** dataset of Vietnamese isolated-sign videos. Each row is one video clip. The rows contain per-frame landmarks for the body pose, the face mesh and both hands, so models can be trained on keypoints without decoding any video.
27
+
28
+ - **Task:** isolated sign recognition with 100 classes.
29
+ - **Clips:** 7,295 short clips, each 16–30 frames long, from 224×224 source videos.
30
+ - **Format:** Parquet (ZSTD), with tensor columns stored as Hugging Face `Array2D`/`Array3D` features.
31
+
32
+ ## Splits
33
+
34
+ | Split | Clips | Shards | Labels | Parquet size |
35
+ | :--- | ---: | ---: | :--- | ---: |
36
+ | `train` | 2,806 | 8 | ✅ 100 classes (5–52 clips per class) | ~480 MB |
37
+ | `public_test` | 1,630 | 4 | ❌ unlabeled | ~290 MB |
38
+ | `private_test` | 2,859 | 6 | ❌ unlabeled | ~504 MB |
39
+ | **Total** | **7,295** | **18** | | **~1.27 GB** |
40
+
41
+ - Shards are named `data/shard_<N>-<split>.parquet`. The YAML header maps them to the split names, so `load_dataset` returns all three splits with no extra arguments.
42
+ - Every source video was extracted successfully: no split has failed or empty clips.
43
+ - **Deduplication (2026-11-14):** the original `train` split had 3,875 clips. 1,069 of them were duplicates, named `<id>_<n>.mp4` (for example `13326_1.mp4`), whose base clip `<id>.mp4` was also present. Their keypoints were identical to the base clip's, so they were removed. No filename or `key` in the dataset ends in `_<digits>` any more. The test splits contained no duplicates.
44
+ - The source dataset publishes no labels for the test splits. In those splits `transcript` is `""` and `label_id` is `null`.
45
+ - Train shards hold 268–370 rows each, and test shards hold up to 500.
46
+
47
+ ## Schema
48
+
49
+ `T` is the clip's frame count (its `duration`, 16–30).
50
+
51
+ | Column | Feature type | Shape | Description |
52
+ | :--- | :--- | :--- | :--- |
53
+ | `pose_pts` | `Array3D(float32)` | `(T, 33, 3)` | Body pose landmarks `(x, y, z)` |
54
+ | `pose_conf` | `Array2D(float32)` | `(T, 33)` | Per-landmark `visibility` from MediaPipe Pose, in `[0, 1]` |
55
+ | `face_pts` | `Array3D(float32)` | `(T, 478, 3)` | Face mesh landmarks `(x, y, z)`, including iris points |
56
+ | `face_conf` | `Array2D(float32)` | `(T, 478)` | `1.0` if a face was detected in the frame, else `0.0` |
57
+ | `left_hand_pts` | `Array3D(float32)` | `(T, 21, 3)` | Left-hand landmarks `(x, y, z)` |
58
+ | `left_hand_conf` | `Array2D(float32)` | `(T, 21)` | `1.0` if the left hand was detected in the frame, else `0.0` |
59
+ | `right_hand_pts` | `Array3D(float32)` | `(T, 21, 3)` | Right-hand landmarks `(x, y, z)` |
60
+ | `right_hand_conf` | `Array2D(float32)` | `(T, 21)` | `1.0` if the right hand was detected in the frame, else `0.0` |
61
+ | `transcript` | `string` | – | Gloss (class label), NFC-normalized Vietnamese. `""` in the test splits |
62
+ | `fps` | `float32` | – | Video frame rate, probed with OpenCV (the metadata CSV is the fallback) |
63
+ | `duration` | `int32` | – | Number of decoded frames, `T` |
64
+ | `key` | `string` | – | Unique ID: `train/<label>/<filename>` or `<split>/<filename>` |
65
+ | `metadata` | `string` | – | JSON object; see below |
66
+
67
+ ### `metadata` JSON
68
+
69
+ | Field | `train` | Test splits | Description |
70
+ | :--- | :---: | :---: | :--- |
71
+ | `label` | ✅ | `""` | Gloss, NFC-normalized (same as `transcript`) |
72
+ | `label_id` | ✅ | `null` | Integer class ID from [`label_mapping.json`](label_mapping.json) |
73
+ | `split` | ✅ | ✅ | `train`, `public_test` or `private_test` |
74
+ | `filename` | ✅ | ✅ | Source video filename, e.g. `133326.mp4` |
75
+ | `size_mb`, `fps`, `total_frames`, `width`, `height`, `duration_s` | ✅ | – | Copied from the source `dataset_metadata.csv` (train only) |
76
+
77
+ Example from `train`:
78
+
79
+ ```json
80
+ {"label": "An ủi", "label_id": 0, "split": "train", "filename": "133326.mp4", "size_mb": 0.021, "fps": 20.01, "total_frames": 30, "width": 224, "height": 224, "duration_s": 1.499}
81
+ ```
82
+
83
+ ## Keypoint layout and missing data
84
+
85
+ - **Pose:** 33 landmarks. `x` and `y` are normalized image coordinates in `[0, 1]`, and `z` is relative depth with the hips as origin. Confidence is MediaPipe's per-landmark `visibility`.
86
+ - **Face:** 478 landmarks (the 468-point mesh plus 10 iris points), with normalized `(x, y, z)`. Confidence is binary.
87
+ - **Hands:** 21 landmarks per hand, with normalized `(x, y, z)`. Confidence is binary.
88
+ - **Missing detections:** when a part is not detected in a frame, all of its points for that frame are `0.0` and its confidence is `0.0`. No `NaN` values are used. Mask with `*_conf > 0` rather than checking the coordinates. Hands are often out of frame: in a sample, the left hand was missing in about 40–70% of frames and the right hand in about 30–40%.
89
+ - The extractor's leading person axis `(1, T, …)` was squeezed out, giving `(T, …)`.
90
+
91
+ ## Labels
92
+
93
+ There are 100 classes. The full `label -> id` mapping (NFC-normalized) is in [`label_mapping.json`](label_mapping.json). The table below gives the number of `train` clips per class after deduplication.
94
+
95
+ <details>
96
+ <summary>All 100 classes</summary>
97
+
98
+ | ID | Label | Train clips |
99
+ | ---: | :--- | ---: |
100
+ | 0 | An ủi | 24 |
101
+ | 1 | Áp dụng | 50 |
102
+ | 2 | Ăn | 43 |
103
+ | 3 | Ăn mừng | 47 |
104
+ | 4 | Ban ngày | 15 |
105
+ | 5 | Ban đêm | 5 |
106
+ | 6 | Bàn tay | 5 |
107
+ | 7 | Băn khoăn | 43 |
108
+ | 8 | Bạn thân | 15 |
109
+ | 9 | Bế mạc | 26 |
110
+ | 10 | Bệnh nhân | 5 |
111
+ | 11 | Bệnh viện | 36 |
112
+ | 12 | Biết | 46 |
113
+ | 13 | Biếu tặng | 38 |
114
+ | 14 | Bộ y tế | 14 |
115
+ | 15 | Cá | 41 |
116
+ | 16 | Cách ly | 5 |
117
+ | 17 | Cám dỗ | 49 |
118
+ | 18 | Cần | 6 |
119
+ | 19 | Cảm ơn | 46 |
120
+ | 20 | Chào | 26 |
121
+ | 21 | Chân | 48 |
122
+ | 22 | Chấp nhận | 5 |
123
+ | 23 | Chạy | 51 |
124
+ | 24 | Chậm lại | 49 |
125
+ | 25 | Chiều | 45 |
126
+ | 26 | Cho | 34 |
127
+ | 27 | Chúng ta | 12 |
128
+ | 28 | Con gấu | 41 |
129
+ | 29 | Có thể | 15 |
130
+ | 30 | Cơ thể | 5 |
131
+ | 31 | Cứu | 37 |
132
+ | 32 | Dạy dỗ | 30 |
133
+ | 33 | Dễ | 35 |
134
+ | 34 | Ghét | 23 |
135
+ | 35 | Giúp | 30 |
136
+ | 36 | Hâm mộ | 41 |
137
+ | 37 | Ho | 5 |
138
+ | 38 | Hôm nay | 17 |
139
+ | 39 | Họ | 35 |
140
+ | 40 | Học sinh | 5 |
141
+ | 41 | Hy sinh | 37 |
142
+ | 42 | Kết hôn | 23 |
143
+ | 43 | Khai báo | 40 |
144
+ | 44 | Khẩu trang | 8 |
145
+ | 45 | Khóc | 45 |
146
+ | 46 | Khu cách ly | 9 |
147
+ | 47 | Lây bệnh | 36 |
148
+ | 48 | Lo lắng | 5 |
149
+ | 49 | Mời vào | 40 |
150
+ | 50 | Mua | 26 |
151
+ | 51 | Nặng | 34 |
152
+ | 52 | Nghe | 49 |
153
+ | 53 | Nghỉ ngơi | 49 |
154
+ | 54 | Ngón tay | 5 |
155
+ | 55 | Nhà | 51 |
156
+ | 56 | Nhầm | 5 |
157
+ | 57 | Nhìn | 40 |
158
+ | 58 | Nhớ | 40 |
159
+ | 59 | Nói | 21 |
160
+ | 60 | Nói xấu | 50 |
161
+ | 61 | Nôn ói | 31 |
162
+ | 62 | Ô tô | 33 |
163
+ | 63 | Phạt | 26 |
164
+ | 64 | Phía sau | 49 |
165
+ | 65 | Phỏng vấn | 32 |
166
+ | 66 | Phục hồi | 5 |
167
+ | 67 | Rau | 51 |
168
+ | 68 | Rẽ phải | 12 |
169
+ | 69 | Rẽ trái | 47 |
170
+ | 70 | San sẻ | 33 |
171
+ | 71 | Sốt | 5 |
172
+ | 72 | Sử dụng | 44 |
173
+ | 73 | Tập luyện | 9 |
174
+ | 74 | Thất lạc | 20 |
175
+ | 75 | Thăm | 13 |
176
+ | 76 | Thích | 8 |
177
+ | 77 | Thương | 5 |
178
+ | 78 | Thức ăn | 39 |
179
+ | 79 | Thức dậy | 51 |
180
+ | 80 | Tôi | 36 |
181
+ | 81 | Tối | 18 |
182
+ | 82 | Trưa | 41 |
183
+ | 83 | Trường học | 52 |
184
+ | 84 | Uống | 19 |
185
+ | 85 | Ủng hộ | 5 |
186
+ | 86 | Vâng lời | 5 |
187
+ | 87 | Virus | 5 |
188
+ | 88 | Xa | 42 |
189
+ | 89 | Xe máy | 5 |
190
+ | 90 | Xe đạp | 13 |
191
+ | 91 | Xin lỗi | 14 |
192
+ | 92 | Xin phép | 28 |
193
+ | 93 | Xuất viện | 35 |
194
+ | 94 | Xúc động | 43 |
195
+ | 95 | Đâu | 39 |
196
+ | 96 | Đầu | 36 |
197
+ | 97 | Đẹp | 14 |
198
+ | 98 | Đi | 46 |
199
+ | 99 | Đồng ý | 36 |
200
+
201
+ </details>
202
 
203
  ## Usage
204
 
205
  ```python
206
  import json
207
+ import numpy as np
208
  from datasets import load_dataset
209
 
210
  ds = load_dataset("Haloroute/ViSignLanguage-MediaPipe")
211
+ print(ds) # train: 2806, public_test: 1630, private_test: 2859
212
+
213
+ sample = ds["train"].with_format("numpy")[0]
214
  print(sample["key"], sample["transcript"], sample["duration"])
215
+ print(sample["right_hand_pts"].shape) # (T, 21, 3)
216
+
217
  meta = json.loads(sample["metadata"])
218
+ label_id = meta["label_id"]
219
+
220
+ # Frames where the right hand was detected
221
+ rh_valid = sample["right_hand_conf"][:, 0] > 0
222
  ```
223
+
224
+ ## Extraction
225
+
226
+ The keypoints were extracted with the MediaPipe Tasks Holistic Landmarker (`holistic_landmarker.task`) and written as one Parquet row per video. Labels come from the source folder names and were mapped to IDs with the source `label_mapping.pkl`. Train metadata was joined from `dataset_metadata.csv` on `filename`, because that CSV's label and filepath columns are mojibake.