peal.web.ingest¶
Dataset ingest for the web demo: a zip of one folder per class becomes the
imgs/<0|1>/... + data.csv layout Image2MixedDataset reads (the same
layout tools/generate_imagenet_binary_dataset.py writes).
Uploads come from strangers, so extraction refuses path traversal, absolute paths, symlinks, too many files, too many bytes and zip bombs.
Functions
Write the binary |
|
Find the folder level that holds one sub-folder per class. |
|
Extract an upload into |
|
Extract |
Exceptions
Raised for any rejected or malformed upload (bad zip, unsafe member, unknown class folder, ...). |