Datasets:
Document PNG format and add snow/gt/mask viewer configs
Browse files19 unmodified lines20212223242531 unmodified lines575859606162636465666768694 unmodified lines7475767778798081828384858687888990919293942 unmodified lines9798991001011021035 unmodified lines10911011111211311411511611711811912012112212312412512612719 unmodified linessize_categories:- 10K<n<100K---# CSD: Comprehensive Snow Dataset (Unofficial Mirror)31 unmodified lines- **Training**: 8,000 pairs.- **Testing**: 2,000 pairs.- **Resolution**: 640×480, `.tif` (LZW-compressed, lossless).---# Changes from the Official ReleaseNone beyond repackaging. No images added, removed, or modified. No relabeling. The `Train/{Gt,Mask,Snow}` and `Test/{Gt,Mask,Snow}` directory layout matches the official archive's structure exactly, this is a full mirror, not a subsample.---4 unmodified lines├── README.md├── banner.jpg├── Train/│ ├── Gt/ # {id}.tif — 8,000 clean images│ ├── Snow/ # {id}.tif — 8,000 synthetic snow images│ └── Mask/ # {id}.tif — 8,000 binary snow masks└── Test/├── Gt/ # {id}.tif — 2,000 clean images├── Snow/ # {id}.tif — 2,000 synthetic snow images└── Mask/ # {id}.tif — 2,000 binary snow masks````Gt`/`Snow`/`Mask` share identical filenames within each split (e.g. `1000.tif` appears in all three), exact-stem matching, no custom parser needed.| Split | Pairs | Resolution | Format ||---|---|---|---|| `Train` | 8,000 | 640×480 | `.tif` || `Test` | 2,000 | 640×480 | `.tif` || **Total** | **10,000** | | |---2 unmodified linesThis dataset is designed to be used directly with [ClearView](https://github.com/dronefreak/clearview), an open-source PyTorch framework for image restoration.CSD's `Gt`/`Snow` folders share identical filenames, so ClearView's generic `ImagePairDataset` works directly, **no dedicated parser needed**, unlike SPA-Data or DDN-Data. The one thing to set explicitly is the file extension, since CSD ships `.tif` rather than `ImagePairDataset`'s `.png`/`.jpg`/`.jpeg` default:```pythonfrom huggingface_hub import snapshot_download5 unmodified linesrainy_dir=f"{data_dir}/Train/Snow", # "rainy_dir" is just the degraded-image arg name; snow works the same wayclean_dir=f"{data_dir}/Train/Gt",transform=get_train_transforms(crop_size=(256, 256)),extensions=(".tif",),)test_ds = ImagePairDataset(rainy_dir=f"{data_dir}/Test/Snow",clean_dir=f"{data_dir}/Test/Gt",transform=get_val_transforms(),extensions=(".tif",),)snowy, clean = train_ds[0]```**A caveat on the `clearview-train` CLI specifically**: `--dataset-type pair` instantiates `ImagePairDataset` without passing through an `extensions` argument (see `clearview/scripts/train.py`'s `_build_dataset` helper), so it's hardcoded to the `.png`/`.jpg`/`.jpeg` default and won't find this dataset's `.tif` files as-is. Until a `--extensions` flag is wired through the CLI, use the Python API above directly (which does accept `extensions=(".tif",)`), or convert the `.tif` files to `.png` first.---19 unmodified lines202122232425262728293031323334353637383940414243444546474831 unmodified lines8081828384858687888990919293944 unmodified lines991001011021031041051061071081091101111121131141151161171181192 unmodified lines1221231241251261271285 unmodified lines13413513613713813914014114214314414514614714814915019 unmodified linessize_categories:- 10K<n<100Kconfigs:- config_name: snowdrop_labels: truedata_files:- split: trainpath: Train/Snow/*.png- split: testpath: Test/Snow/*.png- config_name: gtdrop_labels: truedata_files:- split: trainpath: Train/Gt/*.png- split: testpath: Test/Gt/*.png- config_name: maskdrop_labels: truedata_files:- split: trainpath: Train/Mask/*.png- split: testpath: Test/Mask/*.png---# CSD: Comprehensive Snow Dataset (Unofficial Mirror)31 unmodified lines- **Training**: 8,000 pairs.- **Testing**: 2,000 pairs.- **Resolution**: 640×480, `.png` (lossless, converted from the official `.tif`, see below).---# Changes from the Official ReleaseNo images added or removed, and no relabeling. The `Train/{Gt,Mask,Snow}` and `Test/{Gt,Mask,Snow}` directory layout matches the official archive's structure exactly, this is a full mirror, not a subsample.**File format only:** the official archive ships LZW-compressed `.tif` files, which most browsers (and so the Hugging Face Dataset Viewer) cannot display. Every image was converted to `.png`, which is also lossless. Each conversion was checked pixel for pixel (identical values, color mode and size) against its source `.tif`, and each source `.tif` was first matched by SHA-256 against the file previously mirrored here. Filenames are unchanged apart from the extension (`1000.tif` is now `1000.png`). The PNGs take less than half the space of the original TIFFs (9.8 GB vs 23.7 GB). The original `.tif` files remain available in this repository's commit history.---4 unmodified lines├── README.md├── banner.jpg├── Train/│ ├── Gt/ # {id}.png, 8,000 clean images│ ├── Snow/ # {id}.png, 8,000 synthetic snow images│ └── Mask/ # {id}.png, 8,000 binary snow masks└── Test/├── Gt/ # {id}.png, 2,000 clean images├── Snow/ # {id}.png, 2,000 synthetic snow images└── Mask/ # {id}.png, 2,000 binary snow masks````Gt`/`Snow`/`Mask` share identical filenames within each split (e.g. `1000.png` appears in all three), exact-stem matching, no custom parser needed.| Split | Pairs | Resolution | Format ||---|---|---|---|| `Train` | 8,000 | 640×480 | `.png` || `Test` | 2,000 | 640×480 | `.png` || **Total** | **10,000** | | |---2 unmodified linesThis dataset is designed to be used directly with [ClearView](https://github.com/dronefreak/clearview), an open-source PyTorch framework for image restoration.CSD's `Gt`/`Snow` folders share identical filenames, so ClearView's generic `ImagePairDataset` works directly, with its default extensions and **no dedicated parser needed**, unlike SPA-Data or DDN-Data:```pythonfrom huggingface_hub import snapshot_download5 unmodified linesrainy_dir=f"{data_dir}/Train/Snow", # "rainy_dir" is just the degraded-image arg name; snow works the same wayclean_dir=f"{data_dir}/Train/Gt",transform=get_train_transforms(crop_size=(256, 256)),)test_ds = ImagePairDataset(rainy_dir=f"{data_dir}/Test/Snow",clean_dir=f"{data_dir}/Test/Gt",transform=get_val_transforms(),)snowy, clean = train_ds[0]```The `clearview-train` CLI works too: `--dataset-type pair --data-dir <snapshot> --train-rainy Train/Snow --train-clean Train/Gt --val-rainy Test/Snow --val-clean Test/Gt`.---
README.md+38-15