Datasets:
File size: 14,387 Bytes
75f95e0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | ---
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<n<1M
tags:
- image-restoration
- adverse-weather
- low-level-vision
- deraining
- desnowing
- dehazing
- raindrop-removal
- transweather
- weatherdiff
- histoformer
- basicsr
configs:
- config_name: preview_samples
data_files:
- split: sample
path: preview/sample.parquet
---
# AllWeather: Unified Adverse Weather Image Restoration Benchmark
A clean, byte-verified, ready-to-use public archive of the **AllWeather** unified multi-weather training dataset and all **four standard quantitative evaluation benchmarks** (**Snow100K-S**, **Snow100K-L**, **Outdoor-Rain Test1**, and **RainDrop test_a**) used across modern all-in-one adverse weather image restoration literature, including **All-in-One** (CVPR 2020), **TransWeather** (CVPR 2022), **WeatherDiff** (TPAMI 2023), and **Histoformer** (ECCV 2024).
> **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 `<split_root>/input/<filename>` and `<split_root>/gt/<filename>` with **100% 1-to-1 matching basenames**.
- **RainDrop `test_a` Cleanup:** Official `test_a.zip` stores inputs in `data/<id>_rain.png`, targets in `gt/<id>_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}
}
```
|