4.4.0
Dataset Features
-
Add nifti support by @CloseChoice in https://github.com/huggingface/datasets/pull/7815
- Load medical imaging datasets from Hugging Face:
ds = load_dataset("username/my_nifti_dataset") ds["train"][0] # {"nifti": <nibabel.nifti1.Nifti1Image>}- Load medical imaging datasets from your disk:
files = ["/path/to/scan_001.nii.gz", "/path/to/scan_002.nii.gz"] ds = Dataset.from_dict({"nifti": files}).cast_column("nifti", Nifti()) ds["train"][0] # {"nifti": <nibabel.nifti1.Nifti1Image>}- Documentation: https://huggingface.co/docs/datasets/nifti_dataset
-
Add num channels to audio by @CloseChoice in https://github.com/huggingface/datasets/pull/7840
# samples have shape (num_channels, num_samples)
ds = ds.cast_column("audio", Audio()) # default, use all channels
ds = ds.cast_column("audio", Audio(num_channels=2)) # use stereo
ds = ds.cast_column("audio", Audio(num_channels=1)) # use mono
- Python 3.14 support by @lhoestq in https://github.com/huggingface/datasets/pull/7836