RobustSpring / README.md
jeschmalfuss's picture
Added usage instructions to readme
5fd4000 verified
---
license: cc-by-4.0
dataset_info:
features:
- name: image1_path
dtype: string
- name: image2_path
dtype: string
- name: image1s_path
dtype: string
- name: image2s_path
dtype: string
- name: corruption
dtype: string
- name: split
dtype: string
- name: scene_id
dtype: string
- name: frame_leftright
dtype: string
- name: frame_forwardbackward
dtype: string
- name: index
dtype: int32
- name: sample_type
dtype: string
splits:
- name: test
num_bytes: 34406100
num_examples: 158800
download_size: 2757713
dataset_size: 34406100
configs:
- config_name: default
data_files:
- split: test
path: data/test-*
language:
- en
tags:
- computer-vision
- robustness
- image-corruption
- optical-flow
- scene-flow
- stereo
size_categories:
- 100K<n<1M
---
# RobustSpring: Benchmarking Robustness to Image Corruptions for Optical Flow, Scene Flow and Stereo
This dataset provides structured **metadata only** for the [RobustSpring](https://spring-benchmark.org) dataset. All image samples are referenced by relative file paths, and must be paired with local image data downloaded separately from the public release site.
* **Dataset on the Hub**: [jeschmalfuss/RobustSpring](https://huggingface.co/datasets/jeschmalfuss/RobustSpring)
* **Image Data**: [RobustSpring](https://doi.org/10.18419/DARUS-5047)
For the related [research](https://www.arxiv.org/abs/2505.09368) see
```
RobustSpring: Benchmarking Robustness to Image Corruptions for Optical Flow, Scene Flow and Stereo
Jenny Schmalfuss*, Victor Oei*, Lukas Mehl, Madlen Bartsch, Shashank Agnihotri, Margret Keuper, Andrés Bruhn
https://doi.org/10.48550/arXiv.2505.09368
```
RobustSpring is an image-corruption dataset for optical flow, scene flow and stereo, that applies 20 different image corruption to the test split of the [Spring](https://spring-benchmark.org) dataset.
The combined Spring and RobustSpring website is at [spring-benchmark.org](https://spring-benchmark.org)
---
## Dataset Overview
Each sample in this dataset represents one data sample on which to predict:
- **Optical Flow**
- **Scene Flow**
- **Stereo Disparity**
The dataset contains only **file paths** to local image files. The raw image data must be downloaded separately.
---
## Download Image Data
Please download the raw image data zips files from:
**https://doi.org/10.18419/DARUS-5047**
After downloading:
1. Extract all contents to a local `data/` folder.
2. Ensure the folder structure looks like:
```
/data/
brightness/
test/
scene_0003/
frame_left/
frame_left_0001.png
frame_left_0002.png
...
frame_right/
frame_right_0001.png
frame_right_0002.png
...
scene_0019/
frame_left/
...
frame_right/
...
scene_0028
...
contrast/
test/
scene_0003/
scene_0019/
...
defocus_blur/
test/
scene_0003/
scene_0019/
...
...
```
---
## Dataset Structure
Each sample in the dataset includes:
| Field | Type | Description |
|--------------- |----------|------------------------------------------------- |
| `sample_type` | `string` | `"optic-flow"`, `"scene-flow"` or `"stereo"` |
| `corruption` | `string` | Image corruption type |
| `split` | `string` | Dataset split. `test` for all data. |
| `scene_id` | `string` | Spring's scene ID |
| `frame_leftright` | `string` | If data is centered on left or right stereo frame |
| `frame_forwardbackward` | `string` | For optic- and scene-flow. Forward or backward in time. |
| `index` | `int32` | Data sample index. Own indices for optical flow, scene flow and stereo. |
| `image1_path` | `string` | Relative path to pivot image |
| `image2_path` | `string` | Relative path to pivot image at next time step (OF & SF only) |
| `image1s_path` | `string` | Relative path to stereo of pivot image (SF and S only) |
| `image2s_path` | `string` | Relative path to stereo of image at next time step (SF only) |
No image content is stored. Paths only.
---
## How to Use
### 1. Install Dependencies
```bash
pip install datasets Pillow
```
### 2. Load the Dataset
```python
from datasets import load_dataset
dataset = load_dataset("jeschmalfuss/RobustSpring", split="test") # all samples
```
## 3. Filtering by Data Type
You can filter the dataset to only retrieve the type of samples you're interested in: optical flow, scene flow or stereo.
```python
dataset_optic_flow = dataset.filter(lambda x: x["sample_type"] == "optic-flow")
dataset_scene_flow = dataset.filter(lambda x: x["sample_type"] == "scene-flow")
dataset_stereo = dataset.filter(lambda x: x["sample_type"] == "stereo")
```
### 4. Set Local Path to Images
```python
import os
from PIL import Image
base_path = "/absolute/path/to/data" # where you extracted the downloaded zip
sample = dataset_optic_flow[0]
img1 = Image.open(os.path.join(base_path, sample["image1_path"]))
img2 = Image.open(os.path.join(base_path, sample["image2_path"]))
```
---
## License
The RobustSpring dataset is licensed under CC-BY-4.0