Datasets:
Tasks:
Image-to-Image
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
10K - 100K
ArXiv:
License:
Tighten legal language in Disclaimer: avoid unverifiable copyright-ownership claims
39395ed verified | language: | |
| - en | |
| license: bsd-3-clause | |
| pretty_name: SPA-Data (Unofficial, Subsampled Mirror) | |
| task_categories: | |
| - image-to-image | |
| tags: | |
| - image-restoration | |
| - deraining | |
| - rain-removal | |
| - computer-vision | |
| - real-world | |
| - pytorch | |
| - clearview | |
| size_categories: | |
| - 1K<n<10K | |
| # SPA-Data: Real-World Single-Image Deraining Dataset (Unofficial, Subsampled Mirror) | |
| <p align="center"> | |
| <img src="banner.jpg" alt="SPA-Data sample rain/clean pairs"/> | |
| </p> | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| > **Unofficial, subsampled redistribution of SPA-Data**, the real-world rain/rain-free image dataset from SPANet (Wang et al., CVPR 2019), packaged in a directory layout directly consumable by [ClearView](https://github.com/dronefreak/clearview)'s `SPADataDataset` parser. | |
| ## Disclaimer | |
| This repository is **not** an official release of SPA-Data. | |
| SPA-Data was created by Tianyu Wang, Xin Yang, Ke Xu, Shaozhe Chen, Qiang Zhang, and Rynson W.H. Lau. This repository does **not** claim ownership of any images or metadata, and attributes the dataset to its original creators. (We describe them as "creators" rather than "copyright holders" deliberately — copyright in academic datasets can rest with an author's university, a funding body, or otherwise, under arrangements we have no way to verify from the outside. The official repository's BSD-3-Clause license, discussed under [License](#license) below, is what actually governs redistribution here.) | |
| This repository exists for two purposes: | |
| 1. To provide a directly downloadable mirror. The official training set is distributed as a 12-part split archive (`real_world.zip.00`–`.11`, ~44GB) that must be manually concatenated and unzipped — inconvenient for quick experimentation. | |
| 2. To provide a **subsampled** training set (6,385 of the official ~29,500 pairs, ~22%) sized for fast iteration on a single workstation GPU, while leaving the full official validation/test split (1,000 pairs) **untouched**, so evaluation numbers on this mirror's `val` split remain comparable to published results. | |
| **Two-hop provenance.** This redistribution is not sourced directly from the official 44GB multi-part archive. It is sourced from a pre-subsampled copy whose directory layout and exact training-set size (6,385 pairs) match a Kaggle re-upload also called "SPA-Data" (`leftthomas/spadata`), which is referenced by name in some downstream repositories in the deraining literature. We were **not able to independently verify** that Kaggle listing's own stated license via automated retrieval while preparing this card — see [License](#license) below for what this mirror's terms are actually based on. | |
| --- | |
| # Dataset Description | |
| SPA-Data is a **real-world** (not synthetically rendered) single-image deraining benchmark, introduced alongside the SPANet architecture. The authors collected 170 real rain videos — 84 scenes captured on iPhones plus 86 scenes sourced from stock-footage libraries (StoryBlocks) and YouTube — and used a semi-automatic method combining temporal priors with human supervision to reconstruct a clean, rain-free reference frame for each rainy sequence, yielding strictly spatially-aligned rain/clean pairs. This is the standard reason SPA-Data is used as a **real-world generalization check** for models trained on synthetic rain (Rain13K, DDN-Data, etc.) — synthetic rain streaks don't fully capture the shape, direction, and intensity variation of real rain. | |
| Officially: ~29.5K rain/rain-free training pairs, plus a held-out 1,000-pair test split. | |
| This mirror: **6,385** training pairs (subsampled) + the **full 1,000-pair** official validation/test split. | |
| --- | |
| # Changes from the Official Release | |
| The transformation chain has two hops, each scoped narrowly: | |
| ### 1. Official 44GB archive → subsampled Kaggle-style copy (not performed by this repository) | |
| An intermediate source (see [Disclaimer](#disclaimer)) subsampled the official ~29,500-pair training set down to 6,385 pairs. **We do not know the exact selection method used** (random subsample vs. scene-stratified — not documented anywhere we could find). If your use case is sensitive to sampling bias in the training set, be aware of this. The validation/test split was **not** subsampled — it retains all 1,000 official pairs. | |
| ### 2. Subsampled copy → this repository | |
| - No images added, removed, or modified. | |
| - No labels/pairings changed. | |
| - No further subsampling — training set is redistributed exactly as received (6,385 pairs). | |
| - Directory layout preserved as-is (`rgb_reconstruction/{rain,norain}` under `train/`/`val/`), since it already matches the naming convention documented in the official SPANet repo. | |
| **Note on resolution:** `train/` images are 256×256 patches; `val/` images are 512×512 patches. This matches the crop convention used in the official release and is preserved unchanged. | |
| --- | |
| # Dataset Structure | |
| ```text | |
| spa-data/ | |
| ├── README.md | |
| ├── banner.jpg | |
| ├── train/ | |
| │ └── rgb_reconstruction/ | |
| │ ├── rain/ # rain-{id}.png (6,385 images, 256x256) | |
| │ └── norain/ # norain-{id}.png (6,385 images, 256x256) | |
| └── val/ | |
| └── rgb_reconstruction/ | |
| ├── rain/ # rain-{id}.png (1,000 images, 512x512) | |
| └── norain/ # norain-{id}.png (1,000 images, 512x512) | |
| ``` | |
| Rain and clean images share a common numeric ID but different filename **prefixes** (`rain-{id}.png` / `norain-{id}.png`), not identical stems — this is why ClearView ships a dedicated `SPADataDataset` parser rather than relying on the generic `ImagePairDataset` (which expects exact-stem matches). | |
| | Split | Pairs | Resolution | Size on disk | | |
| |---|---|---|---| | |
| | `train` | 6,385 | 256×256 | ~806 MB | | |
| | `val` | 1,000 | 512×512 | ~451 MB | | |
| | **Total** | **7,385** | — | **~1.3 GB** | | |
| --- | |
| # Usage with ClearView | |
| This dataset is designed to be used directly with [ClearView](https://github.com/dronefreak/clearview), an open-source PyTorch framework for image deraining. | |
| ```python | |
| from huggingface_hub import snapshot_download | |
| from clearview.data import SPADataDataset, get_train_transforms, get_val_transforms | |
| data_dir = snapshot_download(repo_id="dronefreak/SPA-Data", repo_type="dataset") | |
| train_ds = SPADataDataset(root_dir=data_dir, split="train", transform=get_train_transforms(crop_size=(256, 256))) | |
| val_ds = SPADataDataset(root_dir=data_dir, split="val", transform=get_val_transforms()) | |
| rainy, clean = train_ds[0] | |
| ``` | |
| Or directly via the training CLI: | |
| ```bash | |
| clearview-train \ | |
| --data-dir <path-to-downloaded-snapshot> \ | |
| --dataset-type spa-data --train-split train --val-split val \ | |
| --model restormer --batch-size 8 --crop-size 256 --epochs 100 \ | |
| --output-dir ./runs/spa_data_restormer | |
| ``` | |
| `SPADataDataset` auto-detects the `rgb_reconstruction/{rain,norain}` layout and matches pairs by numeric ID after stripping the `rain-`/`norain-` prefixes — no path overrides needed beyond `--train-split`/`--val-split`. | |
| --- | |
| # Dataset Sources | |
| ## Original Paper | |
| **Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset** | |
| Tianyu Wang, Xin Yang, Ke Xu, Shaozhe Chen, Qiang Zhang, Rynson W.H. Lau | |
| IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. | |
| - **arXiv:** https://arxiv.org/abs/1904.01538 | |
| - **CVPR Open Access (PDF):** https://openaccess.thecvf.com/content_CVPR_2019/papers/Wang_Spatial_Attentive_Single-Image_Deraining_With_a_High_Quality_Real_Rain_CVPR_2019_paper.pdf | |
| ## Official Resources | |
| - **Code + Dataset:** https://github.com/stevewongv/SPANet | |
| - **Official train/test dataset READMEs:** [Train_Dataset_README.md](https://github.com/stevewongv/SPANet/blob/master/Train_Dataset_README.md), [Test_Datset_README.md](https://github.com/stevewongv/SPANet/blob/master/Test_Datset_README.md) | |
| ## Possible Intermediate Source (unverified) | |
| - **Kaggle:** https://www.kaggle.com/datasets/leftthomas/spadata — directory layout and 6,385-pair training-set size match this mirror; license field could not be independently confirmed via automated retrieval while preparing this card. | |
| --- | |
| # Attribution | |
| **All credit for the dataset belongs entirely to the original authors: Tianyu Wang, Xin Yang, Ke Xu, Shaozhe Chen, Qiang Zhang, and Rynson W.H. Lau.** | |
| If an intermediate Kaggle re-upload was in fact the direct source of this subsampled copy, credit for the subsampling also belongs to that contributor (see [above](#possible-intermediate-source-unverified)) — we could not fully confirm this chain, and note it here in the interest of transparency rather than certainty. | |
| If you use this dataset in your research, **please cite the original publication below.** | |
| --- | |
| # License | |
| The official SPANet repository ships an explicit **BSD 3-Clause License** (`License.txt`), and its README states: *"If you use this code or our dataset (including test set), please cite"* the paper below — i.e. the dataset is explicitly covered by, and offered for use under, the same repository license as the code, with no non-commercial restriction and no access-request gate. | |
| Key BSD-3-Clause conditions: redistributions must retain the copyright notice, the license conditions, and the disclaimer; the authors' names may not be used to endorse derived products without prior written permission; the software/data is provided with no warranty. | |
| **A note on verification.** This determination is based on the *official* SPANet GitHub repository's license file, which we did retrieve and confirm directly. The possible intermediate Kaggle source's own stated license (if different) could not be independently confirmed — see [Dataset Sources](#dataset-sources). If you require certainty for commercial use, we recommend cross-checking the [official repository](https://github.com/stevewongv/SPANet/blob/master/License.txt) directly. | |
| This repository is distributed under the same terms as the official source: **BSD-3-Clause**. | |
| --- | |
| # Citation | |
| If you use this dataset, please cite: | |
| ```bibtex | |
| @InProceedings{Wang_2019_CVPR, | |
| author = {Wang, Tianyu and Yang, Xin and Xu, Ke and Chen, Shaozhe and Zhang, Qiang and Lau, Rynson W.H.}, | |
| title = {Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset}, | |
| booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, | |
| month = {June}, | |
| year = {2019} | |
| } | |
| ``` | |
| --- | |
| # Acknowledgements | |
| We sincerely thank Tianyu Wang, Xin Yang, Ke Xu, Shaozhe Chen, Qiang Zhang, and Rynson W.H. Lau for creating and publicly releasing this valuable real-world deraining benchmark, and the community contributor(s) behind the intermediate subsampled copy this repository redistributes. | |