Haloroute's picture
Update README: schema, splits, dedup note, label table
5d1afd8 verified
|
Raw History Blame Contribute Delete
8.81 kB
---
task_categories:
- video-classification
language:
- vi
tags:
- sign-language
- pose-estimation
- mediapipe
- keypoints
pretty_name: ViSignLanguage-MediaPipe
size_categories:
- 1K<n<10K
configs:
- config_name: default
data_files:
- split: train
path: "data/shard_*-train.parquet"
- split: public_test
path: "data/shard_*-public_test.parquet"
- split: private_test
path: "data/shard_*-private_test.parquet"
---
# ViSignLanguage-MediaPipe
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.
- **Task:** isolated sign recognition with 100 classes.
- **Clips:** 7,295 short clips, each 16–30 frames long, from 224×224 source videos.
- **Format:** Parquet (ZSTD), with tensor columns stored as Hugging Face `Array2D`/`Array3D` features.
## Splits
| Split | Clips | Shards | Labels | Parquet size |
| :--- | ---: | ---: | :--- | ---: |
| `train` | 2,806 | 8 | ✅ 100 classes (5–52 clips per class) | ~480 MB |
| `public_test` | 1,630 | 4 | ❌ unlabeled | ~290 MB |
| `private_test` | 2,859 | 6 | ❌ unlabeled | ~504 MB |
| **Total** | **7,295** | **18** | | **~1.27 GB** |
- 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.
- Every source video was extracted successfully: no split has failed or empty clips.
- **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.
- The source dataset publishes no labels for the test splits. In those splits `transcript` is `""` and `label_id` is `null`.
- Train shards hold 268–370 rows each, and test shards hold up to 500.
## Schema
`T` is the clip's frame count (its `duration`, 16–30).
| Column | Feature type | Shape | Description |
| :--- | :--- | :--- | :--- |
| `pose_pts` | `Array3D(float32)` | `(T, 33, 3)` | Body pose landmarks `(x, y, z)` |
| `pose_conf` | `Array2D(float32)` | `(T, 33)` | Per-landmark `visibility` from MediaPipe Pose, in `[0, 1]` |
| `face_pts` | `Array3D(float32)` | `(T, 478, 3)` | Face mesh landmarks `(x, y, z)`, including iris points |
| `face_conf` | `Array2D(float32)` | `(T, 478)` | `1.0` if a face was detected in the frame, else `0.0` |
| `left_hand_pts` | `Array3D(float32)` | `(T, 21, 3)` | Left-hand landmarks `(x, y, z)` |
| `left_hand_conf` | `Array2D(float32)` | `(T, 21)` | `1.0` if the left hand was detected in the frame, else `0.0` |
| `right_hand_pts` | `Array3D(float32)` | `(T, 21, 3)` | Right-hand landmarks `(x, y, z)` |
| `right_hand_conf` | `Array2D(float32)` | `(T, 21)` | `1.0` if the right hand was detected in the frame, else `0.0` |
| `transcript` | `string` | – | Gloss (class label), NFC-normalized Vietnamese. `""` in the test splits |
| `fps` | `float32` | – | Video frame rate, probed with OpenCV (the metadata CSV is the fallback) |
| `duration` | `int32` | – | Number of decoded frames, `T` |
| `key` | `string` | – | Unique ID: `train/<label>/<filename>` or `<split>/<filename>` |
| `metadata` | `string` | – | JSON object; see below |
### `metadata` JSON
| Field | `train` | Test splits | Description |
| :--- | :---: | :---: | :--- |
| `label` | ✅ | `""` | Gloss, NFC-normalized (same as `transcript`) |
| `label_id` | ✅ | `null` | Integer class ID from [`label_mapping.json`](label_mapping.json) |
| `split` | ✅ | ✅ | `train`, `public_test` or `private_test` |
| `filename` | ✅ | ✅ | Source video filename, e.g. `133326.mp4` |
| `size_mb`, `fps`, `total_frames`, `width`, `height`, `duration_s` | ✅ | – | Copied from the source `dataset_metadata.csv` (train only) |
Example from `train`:
```json
{"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}
```
## Keypoint layout and missing data
- **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`.
- **Face:** 478 landmarks (the 468-point mesh plus 10 iris points), with normalized `(x, y, z)`. Confidence is binary.
- **Hands:** 21 landmarks per hand, with normalized `(x, y, z)`. Confidence is binary.
- **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%.
- The extractor's leading person axis `(1, T, …)` was squeezed out, giving `(T, …)`.
## Labels
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.
<details>
<summary>All 100 classes</summary>
| ID | Label | Train clips |
| ---: | :--- | ---: |
| 0 | An ủi | 24 |
| 1 | Áp dụng | 50 |
| 2 | Ăn | 43 |
| 3 | Ăn mừng | 47 |
| 4 | Ban ngày | 15 |
| 5 | Ban đêm | 5 |
| 6 | Bàn tay | 5 |
| 7 | Băn khoăn | 43 |
| 8 | Bạn thân | 15 |
| 9 | Bế mạc | 26 |
| 10 | Bệnh nhân | 5 |
| 11 | Bệnh viện | 36 |
| 12 | Biết | 46 |
| 13 | Biếu tặng | 38 |
| 14 | Bộ y tế | 14 |
| 15 | Cá | 41 |
| 16 | Cách ly | 5 |
| 17 | Cám dỗ | 49 |
| 18 | Cần | 6 |
| 19 | Cảm ơn | 46 |
| 20 | Chào | 26 |
| 21 | Chân | 48 |
| 22 | Chấp nhận | 5 |
| 23 | Chạy | 51 |
| 24 | Chậm lại | 49 |
| 25 | Chiều | 45 |
| 26 | Cho | 34 |
| 27 | Chúng ta | 12 |
| 28 | Con gấu | 41 |
| 29 | Có thể | 15 |
| 30 | Cơ thể | 5 |
| 31 | Cứu | 37 |
| 32 | Dạy dỗ | 30 |
| 33 | Dễ | 35 |
| 34 | Ghét | 23 |
| 35 | Giúp | 30 |
| 36 | Hâm mộ | 41 |
| 37 | Ho | 5 |
| 38 | Hôm nay | 17 |
| 39 | Họ | 35 |
| 40 | Học sinh | 5 |
| 41 | Hy sinh | 37 |
| 42 | Kết hôn | 23 |
| 43 | Khai báo | 40 |
| 44 | Khẩu trang | 8 |
| 45 | Khóc | 45 |
| 46 | Khu cách ly | 9 |
| 47 | Lây bệnh | 36 |
| 48 | Lo lắng | 5 |
| 49 | Mời vào | 40 |
| 50 | Mua | 26 |
| 51 | Nặng | 34 |
| 52 | Nghe | 49 |
| 53 | Nghỉ ngơi | 49 |
| 54 | Ngón tay | 5 |
| 55 | Nhà | 51 |
| 56 | Nhầm | 5 |
| 57 | Nhìn | 40 |
| 58 | Nhớ | 40 |
| 59 | Nói | 21 |
| 60 | Nói xấu | 50 |
| 61 | Nôn ói | 31 |
| 62 | Ô tô | 33 |
| 63 | Phạt | 26 |
| 64 | Phía sau | 49 |
| 65 | Phỏng vấn | 32 |
| 66 | Phục hồi | 5 |
| 67 | Rau | 51 |
| 68 | Rẽ phải | 12 |
| 69 | Rẽ trái | 47 |
| 70 | San sẻ | 33 |
| 71 | Sốt | 5 |
| 72 | Sử dụng | 44 |
| 73 | Tập luyện | 9 |
| 74 | Thất lạc | 20 |
| 75 | Thăm | 13 |
| 76 | Thích | 8 |
| 77 | Thương | 5 |
| 78 | Thức ăn | 39 |
| 79 | Thức dậy | 51 |
| 80 | Tôi | 36 |
| 81 | Tối | 18 |
| 82 | Trưa | 41 |
| 83 | Trường học | 52 |
| 84 | Uống | 19 |
| 85 | Ủng hộ | 5 |
| 86 | Vâng lời | 5 |
| 87 | Virus | 5 |
| 88 | Xa | 42 |
| 89 | Xe máy | 5 |
| 90 | Xe đạp | 13 |
| 91 | Xin lỗi | 14 |
| 92 | Xin phép | 28 |
| 93 | Xuất viện | 35 |
| 94 | Xúc động | 43 |
| 95 | Đâu | 39 |
| 96 | Đầu | 36 |
| 97 | Đẹp | 14 |
| 98 | Đi | 46 |
| 99 | Đồng ý | 36 |
</details>
## Usage
```python
import json
import numpy as np
from datasets import load_dataset
ds = load_dataset("Haloroute/ViSignLanguage-MediaPipe")
print(ds) # train: 2806, public_test: 1630, private_test: 2859
sample = ds["train"].with_format("numpy")[0]
print(sample["key"], sample["transcript"], sample["duration"])
print(sample["right_hand_pts"].shape) # (T, 21, 3)
meta = json.loads(sample["metadata"])
label_id = meta["label_id"]
# Frames where the right hand was detected
rh_valid = sample["right_hand_conf"][:, 0] > 0
```
## Extraction
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.