|
Download README.md from Haloroute/SignBible-MediaPipe: direct link, hf CLI and curl.
- Browser
- Download file 17.3 kB
-
https://huggingface.co/datasets/Haloroute/SignBible-MediaPipe/resolve/main/README.md
- Command line
-
hf download hf://datasets/Haloroute/SignBible-MediaPipe/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Haloroute/SignBible-MediaPipe/resolve/main/README.md
17.3 kB
| task_categories: | |
| - translation | |
| - video-classification | |
| language: | |
| - ase | |
| - bqn | |
| - esl | |
| - eso | |
| - eth | |
| - gse | |
| - ins | |
| - lsb | |
| - mis | |
| - mzy | |
| - nsi | |
| - nsp | |
| - rsl | |
| - sqs | |
| - tza | |
| - ugn | |
| - xki | |
| license: cc-by-sa-4.0 | |
| datasets: | |
| - bible-nlp/sign-bibles | |
| tags: | |
| - sign-language | |
| - mediapipe | |
| - holistic | |
| - keypoints | |
| - pose | |
| - sign-bibles | |
| - bible-nlp | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: "data/shard_*-train.parquet" | |
| - split: val | |
| path: "data/shard_*-val.parquet" | |
| - split: test | |
| path: "data/shard_*-test.parquet" | |
| # SignBible-MediaPipe | |
| MediaPipe Holistic 3D keypoint dataset extracted from the `.pose-mediapipe.pose` files of [`bible-nlp/sign-bibles`](https://huggingface.co/datasets/bible-nlp/sign-bibles) across **17 sign languages**, **21 Bible translation projects**, and **1,653 source WebDataset `.tar` shards** (~8,103 estimated samples). | |
| - **Storage format**: `zstd`-compressed Parquet shards (`data/shard_XXXXX-{split}.parquet`), capped at **25 videos per shard** to keep memory bounded on long Bible passages. | |
| - **Array encoding**: The 8 keypoint and confidence tensors are stored as raw C-contiguous `float32` `bytes` (`Value("binary")` in Hugging Face `Features` / `binary` in Arrow) instead of nested Arrow lists, avoiding RAM blow-up during serialization and streaming. | |
| ## Keypoints Extraction, Normalization & Face Mesh Masking | |
| - **Source format**: `pose-format` binary `.pose-mediapipe.pose` files from `bible-nlp/sign-bibles` (`POSE_LANDMARKS` 33, `FACE_LANDMARKS` 468 or 478, `LEFT_HAND_LANDMARKS` 21, `RIGHT_HAND_LANDMARKS` 21; `POSE_WORLD_LANDMARKS` is omitted). The leading person dimension `(1, T, ...)` is squeezed to `(T, ...)`. | |
| - **Coordinate normalization**: `x` and `y` pixel coordinates are normalized to `[0, 1]` by dividing by the pose header / video dimensions `(width, height)`, while `z` relative depth is preserved verbatim. | |
| - **Invalid & missing detections**: Landmarks that are masked in `.pose`, non-finite (`NaN`/`Inf`), or have `conf <= 0` are zeroed out (`0.0`) in both coordinates and confidence so downstream consumers never encounter `NaN` values. Mask frames/landmarks using `*_conf > 0`. | |
| - **468 vs. 478 Face Landmarks Masking**: Estonian Sign Language (`eso/the_bible_in_estonian_sign_language`) stores 468 face mesh points (omitting the 10 MediaPipe iris landmarks `468:478`). To keep a uniform `(T, 478, 3)` / `(T, 478)` tensor shape across all languages, `face_pts[:, 468:478, :]` is zero-padded (`0.0`) and `face_conf[:, 468:478]` is masked to **`0.0`**. Check `meta["face_landmarks_orig"]` (`468` vs. `478`) to distinguish iris availability. | |
| ## Splits & Extraction Summary | |
| | Split | Discovered Source `.tar` Shards | Completed Tasks | Failed / Empty | Samples Uploaded | | |
| | :--- | ---: | ---: | ---: | ---: | | |
| | `train` | 1153 | 1148 | 5 | 5451 | | |
| | `val` | 171 | 171 | 0 | 848 | | |
| | `test` | 329 | 328 | 1 | 1602 | | |
| > [!NOTE] | |
| > - **All `.pose-mediapipe.pose` shards are 100% extracted**: Across the `1,653` source `.tar` shards in `bible-nlp/sign-bibles`, all `1,647` shards containing `.pose-mediapipe.pose` files (`1,148` `train`, `171` `val`, `328` `test`) are fully uploaded into **`323` Parquet shards** (`224` `train`, `34` `val`, `65` `test`; `25` rows/shard max). | |
| > - **Why 6 source `.tar` shards appear under `Failed / Empty` (`5` `train`, `1` `test`)**: None of those 6 archives contain `.pose-mediapipe.pose` files upstream: | |
| > - `ase/chronological_bible_translation_in_american_sign_language_119_introductions_and_passages_expanded_with_more_information/shard_00048-train.tar`: 10 KB empty archive (`0` files; videos `> 2 GB` omitted upstream). | |
| > - Five shards in `mis/chronological_bible_translation_in_west_bengal_sign_language` (`shard_00014-train.tar`, `shard_00017-train.tar`, `shard_00022-train.tar`, `shard_00025-train.tar`, and `shard_00019-test.tar`): contain `.mp4`, `.pose-dwpose.npz`, `.json`, and `.transcripts.json` upstream, with `0` `.pose-mediapipe.pose` files. | |
| > - **Unique keys vs. total Parquet rows**: `Samples Uploaded` reports unique sample `key`s (`5,451` `train`, `848` `val`, `1,602` `test`; **`7,901` unique keys total**). Because a few upstream subsets (`bqn`, `mis/andhra_pradesh`, `mis/south_sudanese`, `xki`) package the same `sample_id` into more than one source `.tar` shard (`149` duplicate keys in `train`, `1` in `test`), the Parquet shards hold **`5,600`** (`train`), **`848`** (`val`), and **`1,603`** (`test`) rows (**`8,051` total rows**). | |
| ## Schema & Columns | |
| Each row corresponds to one sign-language video clip (`T = duration` frames). The 8 keypoint and confidence columns store raw C-contiguous `float32` `bytes` (4 bytes per float) and are reconstructed with `np.frombuffer(sample[col], dtype=np.float32).reshape(T, ...)`: | |
| | Column | Arrow Type | Decoded Shape / Byte Length | Description | | |
| | :--- | :--- | :--- | :--- | | |
| | `pose_pts` | `binary` | `float32[T, 33, 3]` (`T * 33 * 3 * 4` B) | Normalized 3D body pose landmarks (`x, y, z`). | | |
| | `pose_conf` | `binary` | `float32[T, 33]` (`T * 33 * 4` B) | Per-landmark visibility score (`0.0` when missing/masked). | | |
| | `face_pts` | `binary` | `float32[T, 478, 3]` (`T * 478 * 3 * 4` B) | Normalized 3D face mesh landmarks (`468:478` zero-padded when source has 468 points). | | |
| | `face_conf` | `binary` | `float32[T, 478]` (`T * 478 * 4` B) | Face landmark confidence (`0.0` for missing frames, masked points, and `468:478` when padded). | | |
| | `left_hand_pts` | `binary` | `float32[T, 21, 3]` (`T * 21 * 3 * 4` B) | Normalized 3D left-hand landmarks (`x, y, z`). | | |
| | `left_hand_conf` | `binary` | `float32[T, 21]` (`T * 21 * 4` B) | Left-hand landmark confidence (`0.0` when missing/masked). | | |
| | `right_hand_pts` | `binary` | `float32[T, 21, 3]` (`T * 21 * 3 * 4` B) | Normalized 3D right-hand landmarks (`x, y, z`). | | |
| | `right_hand_conf` | `binary` | `float32[T, 21]` (`T * 21 * 4` B) | Right-hand landmark confidence (`0.0` when missing/masked). | | |
| | `transcript` | `string` | — | Concatenated verse text from `.transcripts.json` (NFC-normalized, `\n`-joined when multiple segments exist). | | |
| | `fps` | `float32` | scalar | Frame rate from `.pose` header (fallback to sample metadata or `30.0`). | | |
| | `duration` | `int32` | scalar | Total number of frames `T`. | | |
| | `key` | `string` | — | Unique identifier: `<split>/<lang>/<project>/<sample_id>`. | | |
| | `metadata` | `string` | JSON | JSON object (`ensure_ascii=False`) containing original and extraction metadata (fields below). | | |
| ## Metadata Fields | |
| Every row's `metadata` column is a JSON-encoded string containing the original `.json` fields, verse-aligned `.transcripts.json` segments, and source shard provenance: | |
| | Field | Type | Description | | |
| | :--- | :--- | :--- | | |
| | `language` | `dict` | Language metadata (`ISO639-3`, `BCP-47`, `name`, `nameLocal`). | | |
| | `project_name` | `string` | Human-readable Digital Bible Library (DBL) project title. | | |
| | `copyright` | `list[dict]` | Attribution entries (`name`, `abbr`, `url`) for the sign language translation. | | |
| | `license` | `string` | Source license string (e.g., `"Creative Commons - Attribution-ShareAlike [CC BY-SA]"`). | | |
| | `source` | `string` | Digital Bible Library entry URL. | | |
| | `total_frames` | `int` | Total frame count `T` of the video / pose sequence. | | |
| | `fps` | `float` | Video frame rate. | | |
| | `width` | `int` | Source video frame width in pixels (used for `x` normalization). | | |
| | `height` | `int` | Source video frame height in pixels (used for `y` normalization). | | |
| | `duration_sec` | `float` | Clip duration in seconds. | | |
| | `bible-ref` | `string` | Passage reference (e.g., `"LUK 1:1-4"`, `"GEN 9:18-29"`). | | |
| | `split` | `string` | Dataset split (`"train"`, `"val"`, or `"test"`). | | |
| | `sample_id` | `string` | Original sample basename inside the WebDataset `.tar` shard. | | |
| | `lang_code` | `string` | Three-letter ISO 639-3 language folder code (e.g., `"ase"`, `"eso"`, `"xki"`). | | |
| | `project_slug` | `string` | Project folder slug in `bible-nlp/sign-bibles`. | | |
| | `face_landmarks_orig` | `int` | Original `FACE_LANDMARKS` count in the source `.pose` (`478` or `468`). | | |
| | `transcripts` | `list[dict]` | Verse/segment annotations from `.transcripts.json` (`text`, `start_frame`, `end_frame`, `language`, `license`, `source`, `biblenlp-vref`, `bible-ref`). | | |
| | `tar_shard` | `string` | Source `.tar` path in `bible-nlp/sign-bibles`. | | |
| | `tar_key` | `string` | Pipeline task key `<split>/<lang>/<project>/shard_XXXXX-<split>`. | | |
| | `tar_num_samples` | `int` | Number of `.pose-mediapipe.pose` samples in that source `.tar` shard. | | |
| Example `metadata` JSON (abbreviated): | |
| ```json | |
| { | |
| "language": {"ISO639-3": "eso", "BCP-47": "eso", "name": "Estonian Sign Language", "nameLocal": "Eesti viipekeel"}, | |
| "project_name": "The Bible in Estonian Sign Language", | |
| "copyright": [{"name": "Deaf Bible Society", "abbr": "Deaf Bible", "url": "https://www.deafbiblesociety.com"}], | |
| "license": "Creative Commons - Attribution-ShareAlike [CC BY-SA]", | |
| "source": "https://app.thedigitalbiblelibrary.org/entry?id=6ad9cf57ab084a3b", | |
| "total_frames": 1390, | |
| "fps": 25.0, | |
| "width": 3840, | |
| "height": 2160, | |
| "duration_sec": 55.6, | |
| "bible-ref": "LUK 1:1-4", | |
| "split": "test", | |
| "sample_id": "eso_the_bible_in_estonian_sign_language_luk_1_1-4", | |
| "lang_code": "eso", | |
| "project_slug": "the_bible_in_estonian_sign_language", | |
| "face_landmarks_orig": 468, | |
| "transcripts": [ | |
| { | |
| "text": "...", | |
| "start_frame": 0, | |
| "end_frame": 1389, | |
| "bible-ref": "LUK 1:1-4", | |
| "biblenlp-vref": [1, 2, 3, 4] | |
| } | |
| ], | |
| "tar_shard": "eso/the_bible_in_estonian_sign_language/shard_00000-test.tar", | |
| "tar_key": "test/eso/the_bible_in_estonian_sign_language/shard_00000-test", | |
| "tar_num_samples": 5 | |
| } | |
| ``` | |
| ## Source Subsets (`bible-nlp/sign-bibles`) | |
| | ISO | Language | Subset (`<lang>/<project>`) | Face Pts | Train | Val | Test | Total Shards | Est. Samples | | |
| | :--- | :--- | :--- | ---: | ---: | ---: | ---: | ---: | ---: | | |
| | `ase` | American Sign Language | `ase/chronological_bible_translation_in_american_sign_language_119_introductions_and_passages` | `478` | 28 | 5 | 9 | 42 | 182 | | |
| | `ase` | American Sign Language | `ase/chronological_bible_translation_in_american_sign_language_119_introductions_and_passages_expanded_with_more_information` | `478` | 35 | 5 | 9 | 49 | 179 | | |
| | `bqn` | Bulgarian Sign Language | `bqn/chronological_bible_translation_in_bulgarian_sign_language` | `478` | 70 | 10 | 21 | 101 | 505 | | |
| | `esl` | Egyptian Sign Language | `esl/chronological_bible_translation_in_egyptian_sign_language` | `478` | 7 | 2 | 3 | 12 | 60 | | |
| | `eso` | Estonian Sign Language | `eso/the_bible_in_estonian_sign_language` | `468` | 13 | 2 | 3 | 18 | 90 | | |
| | `eth` | Ethiopian Sign Language | `eth/chronological_bible_translation_in_ethiopian_sign_language` | `478` | 76 | 11 | 21 | 108 | 540 | | |
| | `gse` | Ghanaian Sign Language | `gse/chronological_bible_translation_in_ghanaian_sign_language` | `478` | 75 | 11 | 21 | 107 | 535 | | |
| | `ins` | Indian (Delhi) Sign Language | `ins/chronological_bible_translation_in_indian_delhi_sign_language` | `478` | 14 | 2 | 4 | 20 | 93 | | |
| | `lsb` | Burundian Sign Language | `lsb/chronological_bible_translation_in_burundian_sign_language` | `478` | 76 | 11 | 21 | 108 | 540 | | |
| | `mis` | Andhra Pradesh Sign Language | `mis/chronological_bible_translation_in_andhra_pradesh_sign_language` | `478` | 77 | 11 | 22 | 110 | 550 | | |
| | `mis` | Kerala Sign Language | `mis/chronological_bible_translation_in_kerala_sign_language` | `478` | 77 | 11 | 22 | 110 | 550 | | |
| | `mis` | South Sudanese Sign Language | `mis/chronological_bible_translation_in_south_sudanese_sign_language` | `478` | 93 | 14 | 27 | 134 | 625 | | |
| | `mis` | West Bengal Sign Language | `mis/chronological_bible_translation_in_west_bengal_sign_language` | `478` | 18 | 3 | 5 | 26 | 121 | | |
| | `mzy` | Mozambican Sign Language | `mzy/chronological_bible_translation_in_mozambican_sign_language` | `478` | 35 | 5 | 10 | 50 | 250 | | |
| | `nsi` | Nigerian Sign Language | `nsi/chronological_bible_translation_in_nigerian_sign_language` | `478` | 76 | 11 | 21 | 108 | 540 | | |
| | `nsp` | Nepali Sign Language | `nsp/chronological_bible_translation_in_nepali_sign_language` | `478` | 7 | 1 | 3 | 11 | 55 | | |
| | `rsl` | Russian Sign Language | `rsl/chronological_bible_translation_in_russian_sign_language` | `478` | 52 | 8 | 15 | 75 | 375 | | |
| | `sqs` | Sri Lankan Sign Language | `sqs/chronological_bible_translation_in_sri_lankan_sign_language` | `478` | 2 | 1 | 1 | 4 | 13 | | |
| | `tza` | Tanzanian Sign Language | `tza/chronological_bible_translation_in_tanzanian_sign_language` | `478` | 75 | 11 | 21 | 107 | 535 | | |
| | `ugn` | Ugandan Sign Language | `ugn/chronological_bible_translation_in_ugandan_sign_language` | `478` | 75 | 11 | 21 | 107 | 535 | | |
| | `xki` | Kenyan Sign Language | `xki/chronological_bible_translation_in_kenyan_sign_language` | `478` | 172 | 25 | 49 | 246 | 1230 | | |
| | **Total** | **17 languages / 21 projects** | — | `468` / `478` | **1,153** | **171** | **329** | **1,653** | **8,103** | | |
| ## Usage | |
| ```python | |
| import json | |
| import numpy as np | |
| from datasets import load_dataset | |
| ARRAY_SHAPES = { | |
| "pose_pts": (33, 3), | |
| "pose_conf": (33,), | |
| "face_pts": (478, 3), | |
| "face_conf": (478,), | |
| "left_hand_pts": (21, 3), | |
| "left_hand_conf": (21,), | |
| "right_hand_pts": (21, 3), | |
| "right_hand_conf": (21,), | |
| } | |
| def decode_keypoints(sample: dict) -> dict[str, np.ndarray]: | |
| """Decode all 8 binary columns in a sample row to float32 numpy arrays.""" | |
| t = int(sample["duration"]) | |
| return { | |
| col: np.frombuffer(sample[col], dtype=np.float32).reshape(t, *tail) | |
| for col, tail in ARRAY_SHAPES.items() | |
| } | |
| # Stream shards directly without downloading the whole dataset | |
| ds = load_dataset("Haloroute/SignBible-MediaPipe", split="train", streaming=True) | |
| sample = next(iter(ds)) | |
| kpts = decode_keypoints(sample) | |
| meta = json.loads(sample["metadata"]) | |
| print(sample["key"], kpts["pose_pts"].shape, meta.get("face_landmarks_orig"), meta.get("bible-ref")) | |
| # Mask missing detections (confidence > 0.0; iris 468:478 is 0.0 when face_landmarks_orig == 468) | |
| lh_detected_frames = kpts["left_hand_conf"][:, 0] > 0.0 | |
| face_valid_mask = kpts["face_conf"] > 0.0 | |
| # Slice keypoints for each verse / transcript segment | |
| for seg in meta.get("transcripts", []): | |
| s, e = int(seg["start_frame"]), int(seg["end_frame"]) | |
| seg_pose = kpts["pose_pts"][s : e + 1] | |
| print(seg.get("bible-ref"), seg.get("biblenlp-vref"), seg_pose.shape, seg["text"][:80]) | |
| ``` | |
| ## Source Notes & Known Issues | |
| - **Videos larger than 2 GB are omitted upstream** in [`bible-nlp/sign-bibles`](https://huggingface.co/datasets/bible-nlp/sign-bibles) due to PyArrow `ArrowCapacityError` ([huggingface/datasets#7691](https://github.com/huggingface/datasets/issues/7691)); see [BibleNLP/sign-bibles-dataset#22](https://github.com/BibleNLP/sign-bibles-dataset/issues/22). This leaves 1 empty archive (`ase/chronological_bible_translation_in_american_sign_language_119_introductions_and_passages_expanded_with_more_information/shard_00048-train.tar`, 10 KB, 0 samples). | |
| - **Missing `.pose-mediapipe.pose` in West Bengal Sign Language (`mis`)**: Five upstream shards (`mis/chronological_bible_translation_in_west_bengal_sign_language/shard_00014-train.tar`, `shard_00017-train.tar`, `shard_00022-train.tar`, `shard_00025-train.tar`, and `shard_00019-test.tar`) contain `.mp4`, `.pose-dwpose.npz`, `.json`, and `.transcripts.json` files but omit `.pose-mediapipe.pose` in `bible-nlp/sign-bibles`, so they produce 0 MediaPipe records here. | |
| - **Duplicate `sample_id` across upstream `.tar` shards**: Some upstream subsets (`bqn`, `mis/andhra_pradesh`, `mis/south_sudanese`, `xki`) include the same `sample_id` in two different `.tar` shards (`149` keys in `train`, `1` key in `test`). Every source `.tar` shard is extracted without deduplicating across `.tar` shards, yielding `8,051` Parquet rows (`7,901` unique `key`s). | |
| - **Non-square pixel aspect ratio**: Some source videos had non-square pixels, which can horizontally squeeze frames and keypoints computed from them; see [BibleNLP/sign-bibles-dataset#45](https://github.com/BibleNLP/sign-bibles-dataset/issues/45). | |
| - **Gloss annotations**: Timestamped ASL gloss annotations for 10 videos (679 annotations) are available in [`bible-nlp/sign-bibles` (`osb_glosses`)](https://huggingface.co/datasets/bible-nlp/sign-bibles/blob/main/osb_glosses/README.md). | |
| ## License & Citation | |
| Derived from [`bible-nlp/sign-bibles`](https://huggingface.co/datasets/bible-nlp/sign-bibles) under **CC BY-SA 4.0**. Please check individual sample `metadata` (`copyright`, `license`, `source`) for specific attribution requirements and cite: | |
| ```bibtex | |
| @misc{leong2026osb, | |
| title = {Open Sign Bibles ({OSB}): An Open-Access Multilingual Sign Language Bibles Dataset}, | |
| author = {Leong, Colin and Nemecek, Joshua and Raju, Kavitha and Mathew, Joel and Asari, Vijayan and Leong, Elisabeth}, | |
| year = {2026}, | |
| howpublished = {Research Square preprint}, | |
| doi = {10.21203/rs.3.rs-7918028/v1} | |
| } | |
| ``` | |