Efficient data loading utilities for sign language datasets.
Project description
sign-language-data-loading (sldl)
Efficient, PyTorch-friendly data loading for sign language datasets stored as WebDataset shards — poses, videos, and temporal annotations, with windowing and target encoding built in.
Installation
You can simply install it in your Python environment:
pip install sign-language-data-loading
The package is imported as sldl (see examples).
Some features need extra dependencies. Typically, data-loaders and custom targets need PyTorch. If you load the videos too, torchcodec is required. You can install them along with:
# For SignLanguageCollator and the built-in target encoders (sldl.targets.*)
pip install "sign-language-data-loading[torch]"
# For on-the-fly video loading (load_videos=True)
pip install "sign-language-data-loading[video]"
However, we do recommend setting them up yourself in your environment before installing sign-language-data-loading.
Quickstart
Load an isolated-sign dataset
from sldl import SignLanguageDataset
from sldl.configs import LSFBIsolConfig
dataset = SignLanguageDataset.from_config(
LSFBIsolConfig(
root="path/to/lsfb-isol",
variant="500",
split="training",
)
)
sample = dataset[0]
print(sample["label"]) # e.g. "bonjour"
print(sample["poses"]["upper_pose"].shape)
Load a continuous dataset
from sldl import SignLanguageDataset
from sldl.configs import LSFBContConfig
dataset = SignLanguageDataset.from_config(
LSFBContConfig(
root="path/to/lsfb-cont",
split="training",
)
)
sample = dataset[0]
print(sample["annotations"]["both_hands"].head())
Batch samples for training
from torch.utils.data import DataLoader
from sldl import SignLanguageCollator
loader = DataLoader(dataset, batch_size=8, collate_fn=SignLanguageCollator())
batch = next(iter(loader))
print(batch["poses"]["upper_pose"].shape) # (batch, max_n_frames, ...)
print(batch["masks"].shape) # (batch, max_n_frames)
Going further
- Custom dataset paths, windowing, and target encoders: see
SignLanguageDatasetandsldl.targets. - Full worked examples (loading, visualizing poses/video, windowing, target encoding) are in
examples/.
Related projects
- sign-language-tools (PyPI) — pose and annotation transforms (e.g.
SegmentsToFrameLabels,SegmentsToBoundaryOffsets) used by some of the built-in target encoders (sldl.targets.FrameLabelsTarget,sldl.targets.TemporalBoundaryOffsetsTarget). - lsfb-cont dataset — French-Belgian Sign Language (LSFB) dataset, available on HuggingFace. It is very useful for Sign Language Processing tasks that requires a Continuous Sign Language Dataset, such as Continuous Sign Language Recognition (CSLR) and Sign Language Segmentation (SLS).
- lsfb-isol dataset — Isolated version, i.e. ONE sign per video, of the LSFB dataset. Very useful for Isolated Sign Language Recognition (ISLR).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sign_language_data_loading-1.0.2.tar.gz.
File metadata
- Download URL: sign_language_data_loading-1.0.2.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ee0d24c892f57f80ed0c74d31d053366eb17f6bd7423d155267a2072437692b
|
|
| MD5 |
184a8ca7667efa0c1aa3ec60fbddcfec
|
|
| BLAKE2b-256 |
5354f4d037ead2f142140d5981d8bb4178accc0e34d3b0e5c9b63d3900dde041
|
Provenance
The following attestation bundles were made for sign_language_data_loading-1.0.2.tar.gz:
Publisher:
publish.yml on ppoitier/sign-language-data-loading
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sign_language_data_loading-1.0.2.tar.gz -
Subject digest:
2ee0d24c892f57f80ed0c74d31d053366eb17f6bd7423d155267a2072437692b - Sigstore transparency entry: 2226526476
- Sigstore integration time:
-
Permalink:
ppoitier/sign-language-data-loading@c436fcd2c42f58028f60e8f5be7e413c5c817a05 -
Branch / Tag:
refs/heads/release - Owner: https://github.com/ppoitier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c436fcd2c42f58028f60e8f5be7e413c5c817a05 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sign_language_data_loading-1.0.2-py3-none-any.whl.
File metadata
- Download URL: sign_language_data_loading-1.0.2-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a92d2001a2da32675da8e8931b02e2362094ba401c94b80e4a7f660c78868d41
|
|
| MD5 |
6ecd0cbf09e7b5ec4b69e20f53b5072d
|
|
| BLAKE2b-256 |
84af2923008f0816ab8a5b413e19c3a9080ff9f47fa592cab8e2c66671a5ae26
|
Provenance
The following attestation bundles were made for sign_language_data_loading-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on ppoitier/sign-language-data-loading
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sign_language_data_loading-1.0.2-py3-none-any.whl -
Subject digest:
a92d2001a2da32675da8e8931b02e2362094ba401c94b80e4a7f660c78868d41 - Sigstore transparency entry: 2226526569
- Sigstore integration time:
-
Permalink:
ppoitier/sign-language-data-loading@c436fcd2c42f58028f60e8f5be7e413c5c817a05 -
Branch / Tag:
refs/heads/release - Owner: https://github.com/ppoitier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c436fcd2c42f58028f60e8f5be7e413c5c817a05 -
Trigger Event:
push
-
Statement type: