--- license: other license_name: academic-research-only license_link: LICENSE task_categories: - image-to-image language: - en pretty_name: "AllWeather: Unified Adverse Weather Image Restoration Benchmark" size_categories: - 100K **Note on the Dataset Viewer above:** The interactive Hugging Face viewer (`preview_samples`) displays a lightweight **50-pair visual preview** (10 pairs per split) so you can inspect degraded (`input`) and ground-truth (`gt`) images in the browser. The complete benchmark (**52,289 paired samples / 104,578 images**, **14.54 GiB**) is provided as lossless `ZIP_STORED` archives under `train/` and `test/` for high-speed server download. --- ## 1. Benchmark Summary | Split | Benchmark | Archive Path | Pairs (Images) | File Formats | Resolution Range (`W x H`) | Archive Size | Task / Composition | | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | Train | **AllWeather (Unified Train)** | `train/allweather_train.zip` | **18,069** (36,138 imgs) | `.jpg` (9,001), `.png` (9,068) | `260x262` – `725x640` | 10.19 GiB | Snow100K (9,001) + Outdoor-Rain (8,250) + RainDrop (818) | | Test 1 | **Snow100K-S** | `test/Snow100K-S.zip` | **16,611** (33,222 imgs) | `.jpg` (16,611) | `263x252` – `640x640` | 1.71 GiB | Synthetic small-particle snow removal | | Test 2 | **Snow100K-L** | `test/Snow100K-L.zip` | **16,801** (33,602 imgs) | `.jpg` (16,801) | `281x250` – `641x641` | 1.82 GiB | Synthetic large-particle snow removal | | Test 3 | **Outdoor-Rain (Test1)** | `test/Outdoor-Rain-Test1.zip` | **750** (1,500 imgs) | `.png` (750) | `720x480` – `720x480` | 0.76 GiB | Joint heavy rain streak + rain accumulation (haze) removal | | Test 4 | **RainDrop (test_a)** | `test/RainDrop-test_a.zip` | **58** (116 imgs) | `.png` (58) | `720x480` – `721x540` | 63.6 MiB | Adherent raindrop removal (quantitative split) | | **Total** | **All Splits** | `train/` + `test/` | **52,289** (104,578 imgs) | `.jpg`, `.png` | — | **14.54 GiB** | Unified All-in-One Weather Restoration | --- ## 2. Why This Curated Release Exists (Pitfalls Fixed) Upstream links for several sub-datasets (such as the original DesnowNet `Snow100K` host and `Outdoor-Rain Test1`) have expired, and existing scattered mirrors suffer from subtle inconsistencies that break standard training/evaluation pipelines (`BasicSR`, `Restormer`, `Histoformer`, `TransWeather`): 1. **Zero Pixel Re-encoding (`ZIP_STORED` Byte Preservation):** Every `.png` and `.jpg` file in this repository preserves the **exact original compressed file bytes** from the official TransWeather / Histoformer / DeRaindrop releases. No JPEG recompression or PNG re-saving was performed (`0.0000 dB` metric drift). Using uncompressed `ZIP_STORED` containers also enables `1–2 GB/s` extraction and `O(1)` seekable random access directly from `.zip` files in Python. 2. **Unified `{input, gt}` Directory & Basename Pairing:** - Every archive extracts cleanly to `/input/` and `/gt/` with **100% 1-to-1 matching basenames**. - **RainDrop `test_a` Cleanup:** Official `test_a.zip` stores inputs in `data/_rain.png`, targets in `gt/_clean.png`, and includes macOS `__MACOSX` / `._2_rain.png` resource forks—causing `AssertionError` crashes in `BasicSR`'s `paired_paths_from_folder`. Here, resource forks are stripped and pairs are canonically named `0.png` … `57.png` in both `input/` and `gt/` (original name mapping preserved in `splits/RainDrop-test_a_orig_map.tsv`). - **Quantitative Split Clarity (`test_a` vs `test_b`):** Only `RainDrop test_a` (58 aligned pairs) is used for quantitative PSNR/SSIM reporting in TransWeather, WeatherDiff, and Histoformer (`test_b` has 249 pairs with minor camera misalignment). 3. **Exact `18,069`-Pair De-duplicated Training Set (Zero Test1 Leakage):** - While several papers prose-summarize the training set as `9,000 + 9,000 + 1,069 = 19,069`, the actual official `AllWeather` training set from TransWeather contains **`18,069` pairs**: `9,001` from Snow100K (`.jpg`), `8,250` from Outdoor-Rain (`.png`), and `818` from RainDrop (`.png`). - Crucially, the raw 9,000-image `Outdoor-Rain` training set shares clean ground-truth scenes `im_0301`–`im_0350` (50 scenes × 15 syntheses = 750 pairs) with `Outdoor-Rain Test1`. Those 750 overlapping pairs are **already excluded** in `train/allweather_train.zip` (unlike uncurated third-party mirrors that concatenate raw `Outdoor-Rain` and leak `Test1` ground truth). ### Automated Train-vs-Test Leakage & Integrity Audit Verified across all 104,578 images (`manifest.json`): - **100% Pairwise Spatial Alignment:** `0` `(input, gt)` dimension mismatches across all 52,289 pairs (note that some test images have odd widths/heights such as `721` or `641`, so whole-image inference must pad inputs to multiples of `8` and unpad back to `(H, W)`). - **Exact Byte-Level SHA256 Overlap Check:** `Outdoor-Rain-Test1` has `0` overlap on filenames, scene IDs, inputs, and ground truths. Upstream `RainDrop` contains `1` identical pair shared between `train` and `test_a`, and upstream `Snow100K` contains `7` (`Snow100K-S`) and `9` (`Snow100K-L`) Flickr background images (`gt` only; `0` snowy `input` overlap) crawled under different category filenames. All official splits are preserved verbatim for strict comparability with published benchmarks. | Evaluation Split | Filename Overlap with Train | Input SHA256 Overlap | GT SHA256 Overlap | Clean Scene ID Overlap (`im_XXXX`) | | :--- | :---: | :---: | :---: | :---: | | `RainDrop-test_a` | 0 | 1 | 1 | 0 | | `Outdoor-Rain-Test1` | 0 | 0 | 0 | 0 | | `Snow100K-S` | 0 | 0 | 7 | 0 | | `Snow100K-L` | 0 | 0 | 9 | 0 | --- ## 3. Repository Structure ```text AllWeather/ ├── README.md ├── manifest.json # Exact counts, resolutions, SHA256 checksums, leakage audit ├── preview/ │ └── sample.parquet # 50-pair preview for Hugging Face Dataset Viewer ├── splits/ │ ├── allweather_train.txt # 18,069 training filenames │ ├── Snow100K-S.txt # 16,611 test filenames │ ├── Snow100K-L.txt # 16,801 test filenames │ ├── Outdoor-Rain-Test1.txt # 750 test filenames │ ├── RainDrop-test_a.txt # 58 test filenames │ └── RainDrop-test_a_orig_map.tsv # Mapping between 0.png and 0_rain.png / 0_clean.png ├── train/ │ └── allweather_train.zip # Extracts to train/allweather/{input,gt}/ └── test/ ├── Snow100K-S.zip # Extracts to test/Snow100K-S/{input,gt}/ ├── Snow100K-L.zip # Extracts to test/Snow100K-L/{input,gt}/ ├── Outdoor-Rain-Test1.zip # Extracts to test/Outdoor-Rain-Test1/{input,gt}/ └── RainDrop-test_a.zip # Extracts to test/RainDrop-test_a/{input,gt}/ ``` --- ## 4. Quick Start: Download & Extract ### Option A: Download via Hugging Face CLI (`hf`) ```bash pip install -U "huggingface_hub[cli]" # Download full benchmark (train + 4 test sets) hf download lime-j/AllWeather --repo-type dataset --local-dir ./AllWeather # Extract all archives in place (creates ./AllWeather/train/allweather/... and ./AllWeather/test/...) cd ./AllWeather for z in train/*.zip test/*.zip; do unzip -q "$z" -d . done ``` ### Option B: Download Only the 4 Evaluation Benchmarks (~4.5 GiB) ```bash hf download lime-j/AllWeather --repo-type dataset --include "test/*.zip" "splits/*" "manifest.json" --local-dir ./AllWeather ``` ### Option C: Zero-Extraction Python `Dataset` (Read Directly from `ZIP_STORED`) Because all archives use `ZIP_STORED` (uncompressed container over original `.png`/`.jpg` bytes), you can train and evaluate directly from the `.zip` files without extracting 104,578 loose files onto shared cluster filesystems: ```python import io, zipfile from PIL import Image from torch.utils.data import Dataset class AllWeatherZipDataset(Dataset): def __init__(self, zip_path: str, arc_prefix: str, split_txt: str, transform=None): self.zip_path = zip_path self.arc_prefix = arc_prefix with open(split_txt) as f: self.filenames = [line.strip() for line in f if line.strip()] self.transform = transform self._zf = None def _get_zf(self): if self._zf is None: self._zf = zipfile.ZipFile(self.zip_path, "r") return self._zf def __len__(self): return len(self.filenames) def __getitem__(self, idx): zf = self._get_zf() name = self.filenames[idx] inp = Image.open(io.BytesIO(zf.read(f"{self.arc_prefix}/input/{name}"))).convert("RGB") gt = Image.open(io.BytesIO(zf.read(f"{self.arc_prefix}/gt/{name}"))).convert("RGB") if self.transform is not None: inp, gt = self.transform(inp, gt) return inp, gt ``` --- ## 5. Compatibility Notes for Histoformer / BasicSR 1. **Directory Paths in `Allweather_Histoformer.yml`:** After unzipping into `/path/to/AllWeather`, point your YAML config directly to: - `train`: `dataroot_lq: /path/to/AllWeather/train/allweather/input/`, `dataroot_gt: /path/to/AllWeather/train/allweather/gt/` - `val_snow_s`: `dataroot_lq: /path/to/AllWeather/test/Snow100K-S/input/`, `dataroot_gt: /path/to/AllWeather/test/Snow100K-S/gt/` - `val_snow_l`: `dataroot_lq: /path/to/AllWeather/test/Snow100K-L/input/`, `dataroot_gt: /path/to/AllWeather/test/Snow100K-L/gt/` - `val_test1`: `dataroot_lq: /path/to/AllWeather/test/Outdoor-Rain-Test1/input/`, `dataroot_gt: /path/to/AllWeather/test/Outdoor-Rain-Test1/gt/` - `val_raindrop`: `dataroot_lq: /path/to/AllWeather/test/RainDrop-test_a/input/`, `dataroot_gt: /path/to/AllWeather/test/RainDrop-test_a/gt/` *(If an older script expects `Snow100K-S/synthetic`, simply run `ln -s input /path/to/AllWeather/test/Snow100K-S/synthetic` and `ln -s input /path/to/AllWeather/test/Snow100K-L/synthetic`.)* 2. **Progressive Patch Size Fix (`362` -> `360`):** In `Histoformer`'s official `Allweather_Histoformer.yml`, change `gt_size: 362` and `gt_sizes: [128,160,256,320,362]` to `360`; `362` is not divisible by `8` and causes `nn.PixelUnshuffle(2)` to fail at iteration `268,001`. 3. **Evaluation Protocol:** Standard quantitative evaluation in TransWeather, WeatherDiff, and Histoformer computes **PSNR and SSIM on the Y channel (YCbCr)** with `crop_border=0` and `win_size=11` on lossless `.png` predictions. --- ## 6. SHA256 Checksums - `train/allweather_train.zip` (`10,937,603,445` bytes): `ab8f0f18b2436cd47e8829423d0b406bde2343f864579a4b1c75ed379f8dc595` - `test/RainDrop-test_a.zip` (`66,649,880` bytes): `e387ca0c869ed11ae0c15eef844a76303fd93788f0edca2ad7cd6603f875961d` - `test/Outdoor-Rain-Test1.zip` (`820,362,670` bytes): `c90116d1d72bb7c5d8e5893336bdbfde48e871ba876a1081e50eb7c9226838de` - `test/Snow100K-S.zip` (`1,838,816,042` bytes): `526e1abb258bc6efe0629d402fa85947101499f6a587371f114f8f91f78673e6` - `test/Snow100K-L.zip` (`1,952,074,710` bytes): `193fc52fd67e147e6e4733045fec1856f25e23d004f0ac377b5b91662ad781a9` --- ## 7. License & Citations This curated benchmark redistributes unmodified research images from **Snow100K**, **Outdoor-Rain**, and **RainDrop** as organized by **TransWeather** and **Histoformer**. It is released strictly for **non-commercial academic research and educational purposes** in accordance with the licenses of the original datasets. If you use this benchmark in your research, please cite the original dataset and benchmark papers: ```bibtex @article{liu2018desnownet, title={DesnowNet: Context-Aware Deep Network for Snow Removal}, author={Liu, Yun-Fu and Jaw, Da-Wei and Huang, Shih-Chia and Hwang, Jenq-Neng}, journal={IEEE Transactions on Image Processing}, volume={27}, number={6}, pages={3064--3073}, year={2018} } @inproceedings{qian2018attentive, title={Attentive Generative Adversarial Network for Raindrop Removal from A Single Image}, author={Qian, Rui and Tan, Robby T. and Yang, Wenhan and Su, Jiajun and Liu, Jiaying}, booktitle={CVPR}, year={2018} } @inproceedings{li2019heavy, title={Heavy Rain Image Restoration: Integrating Physics Model and Conditional Adversarial Learning}, author={Li, Ruoteng and Cheong, Loong-Fah and Tan, Robby T.}, booktitle={CVPR}, year={2019} } @inproceedings{li2020all, title={All in One Bad Weather Removal Using Architectural Search}, author={Li, Ruoteng and Tan, Robby T. and Cheong, Loong-Fah}, booktitle={CVPR}, year={2020} } @inproceedings{valanarasu2022transweather, title={TransWeather: Transformer-based Restoration of Images Degraded by Adverse Weather Conditions}, author={Valanarasu, Jeya Maria Jose and Yasarla, Rajeev and Patel, Vishal M.}, booktitle={CVPR}, year={2022} } @article{ozdenizci2023restoring, title={Restoring Vision in Adverse Weather Conditions with Patch-Based Denoising Diffusion Models}, author={\"Ozdenizci, Ozan and Legenstein, Robert}, journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, volume={45}, number={8}, pages={10346--10357}, year={2023} } @inproceedings{sun2024histoformer, title={Restoring Images in Adverse Weather Conditions via Histogram Transformer}, author={Sun, Shangquan and Ren, Wenqi and Gao, Xinwei and Wang, Rui and Cao, Xiaochun}, booktitle={ECCV}, pages={111--129}, year={2024} } ```