Datasets:
Convert raw images to Parquet to optimize dataset loading
#10
by
thompsonmj
- opened
This PR accomplishes four goals:
- Fix error with EXIF metadata for two files:
exiftool -overwrite_original -all= \
dataset/Animalia-Chordata-Amphibia-Anura-Rhacophoridae-Pseudophilautus-wynaadensis/29536718_1048330_eol-full-size-copy.jpg \
dataset/Animalia-Chordata-Amphibia-Anura-Rhacophoridae-Pseudophilautus-wynaadensis/29536723_1048330_eol-full-size-copy.jpg
2 image files updated
- Defuse a decompression bomb by resizing a very large image to below the threshold for Pillow's default
Image.MAX_IMAGE_PIXELS
of 89,478,485 pixels.
DecompressionBombWarning triggered for:
dataset/Animalia-Mollusca-Bivalvia-Cardiida-Cardiidae-Tridacna-gigas/30003931_46473744_eol-full-size-copy.jpg
Resizing 17000ร6800->14956ร5982 (115,600,000->89,466,792 pixels)
Done. New file size: 2.202237129211426 MB
- Restructure the repository to a Hugging Face
Dataset
which may be loaded using theload_dataset
method fromdatasets
(described in README.md). - Provide an export method for users to be able to get the 'legacy' structure on their filesystem without the need to clone the repository (described in README.md).
thompsonmj
changed pull request status to
open
This looks great! One suggestion: At line 163 of the README, I would indicate "...previous structure (JPGs in taxa folders, not parquet)" or something to that effect.
It works great! I was able to load and transform each image without the issues mentioned.
thompsonmj
changed pull request status to
merged
Looks great ๐