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M
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
# RobustSpring: Benchmarking Robustness to Image Corruptions for Optical Flow, Scene Flow and Stereo
|
| 52 |
+
|
| 53 |
+
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.
|
| 54 |
+
|
| 55 |
+
* **Dataset on the Hub**: [jeschmalfuss/RobustSpring](https://huggingface.co/datasets/jeschmalfuss/RobustSpring)
|
| 56 |
+
* **Image Data**: [RobustSpring](https://doi.org/10.18419/DARUS-5047)
|
| 57 |
+
|
| 58 |
+
For the related [research](https://www.arxiv.org/abs/2505.09368) see
|
| 59 |
+
```
|
| 60 |
+
RobustSpring: Benchmarking Robustness to Image Corruptions for Optical Flow, Scene Flow and Stereo
|
| 61 |
+
Jenny Schmalfuss*, Victor Oei*, Lukas Mehl, Madlen Bartsch, Shashank Agnihotri, Margret Keuper, Andrés Bruhn
|
| 62 |
+
https://doi.org/10.48550/arXiv.2505.09368
|
| 63 |
+
```
|
| 64 |
+
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.
|
| 65 |
+
The combined Spring and RobustSpring website is at [spring-benchmark.org](https://spring-benchmark.org)
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## Dataset Overview
|
| 70 |
+
|
| 71 |
+
Each sample in this dataset represents one data sample on which to predict:
|
| 72 |
+
|
| 73 |
+
- **Optical Flow**
|
| 74 |
+
- **Scene Flow**
|
| 75 |
+
- **Stereo Disparity**
|
| 76 |
+
|
| 77 |
+
The dataset contains only **file paths** to local image files. The raw image data must be downloaded separately.
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
## Download Image Data
|
| 82 |
+
|
| 83 |
+
Please download the raw image data zips files from:
|
| 84 |
+
|
| 85 |
+
**https://doi.org/10.18419/DARUS-5047**
|
| 86 |
+
|
| 87 |
+
After downloading:
|
| 88 |
+
1. Extract all contents to a local `data/` folder.
|
| 89 |
+
2. Ensure the folder structure looks like:
|
| 90 |
+
|
| 91 |
+
```
|
| 92 |
+
/data/
|
| 93 |
+
brightness/
|
| 94 |
+
test/
|
| 95 |
+
scene_0003/
|
| 96 |
+
frame_left/
|
| 97 |
+
frame_left_0001.png
|
| 98 |
+
frame_left_0002.png
|
| 99 |
+
...
|
| 100 |
+
frame_right/
|
| 101 |
+
frame_right_0001.png
|
| 102 |
+
frame_right_0002.png
|
| 103 |
+
...
|
| 104 |
+
scene_0019/
|
| 105 |
+
frame_left/
|
| 106 |
+
...
|
| 107 |
+
frame_right/
|
| 108 |
+
...
|
| 109 |
+
scene_0028
|
| 110 |
+
...
|
| 111 |
+
contrast/
|
| 112 |
+
test/
|
| 113 |
+
scene_0003/
|
| 114 |
+
scene_0019/
|
| 115 |
+
...
|
| 116 |
+
defocus_blur/
|
| 117 |
+
test/
|
| 118 |
+
scene_0003/
|
| 119 |
+
scene_0019/
|
| 120 |
+
...
|
| 121 |
+
...
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
---
|
| 125 |
+
|
| 126 |
+
## Dataset Structure
|
| 127 |
+
|
| 128 |
+
Each sample in the dataset includes:
|
| 129 |
+
|
| 130 |
+
| Field | Type | Description |
|
| 131 |
+
|--------------- |----------|------------------------------------------------- |
|
| 132 |
+
| `sample_type` | `string` | `"optic-flow"`, `"scene-flow"` or `"stereo"` |
|
| 133 |
+
| `corruption` | `string` | Image corruption type |
|
| 134 |
+
| `split` | `string` | Dataset split. `test` for all data. |
|
| 135 |
+
| `scene_id` | `string` | Spring's scene ID |
|
| 136 |
+
| `frame_leftright` | `string` | If data is centered on left or right stereo frame |
|
| 137 |
+
| `frame_forwardbackward` | `string` | For optic- and scene-flow. Forward or backward in time. |
|
| 138 |
+
| `index` | `int32` | Data sample index. Own indices for optical flow, scene flow and stereo. |
|
| 139 |
+
| `image1_path` | `string` | Relative path to pivot image |
|
| 140 |
+
| `image2_path` | `string` | Relative path to pivot image at next time step (OF & SF only) |
|
| 141 |
+
| `image1s_path` | `string` | Relative path to stereo of pivot image (SF and S only) |
|
| 142 |
+
| `image2s_path` | `string` | Relative path to stereo of image at next time step (SF only) |
|
| 143 |
+
|
| 144 |
+
No image content is stored. Paths only.
|
| 145 |
+
|
| 146 |
+
---
|
| 147 |
+
|
| 148 |
+
## How to Use
|
| 149 |
+
|
| 150 |
+
### 1. Install Dependencies
|
| 151 |
+
|
| 152 |
+
```bash
|
| 153 |
+
pip install datasets Pillow
|
| 154 |
+
```
|
| 155 |
+
|
| 156 |
+
### 2. Load the Dataset
|
| 157 |
+
|
| 158 |
+
```python
|
| 159 |
+
from datasets import load_dataset
|
| 160 |
+
|
| 161 |
+
dataset = load_dataset("jeschmalfuss/RobustSpring", split="test") # all samples
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
## 3. Filtering by Data Type
|
| 165 |
+
|
| 166 |
+
You can filter the dataset to only retrieve the type of samples you're interested in: optical flow, scene flow or stereo.
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
```python
|
| 170 |
+
dataset_optic_flow = dataset.filter(lambda x: x["sample_type"] == "optic-flow")
|
| 171 |
+
dataset_scene_flow = dataset.filter(lambda x: x["sample_type"] == "scene-flow")
|
| 172 |
+
dataset_stereo = dataset.filter(lambda x: x["sample_type"] == "stereo")
|
| 173 |
+
```
|
| 174 |
+
|
| 175 |
+
### 4. Set Local Path to Images
|
| 176 |
+
|
| 177 |
+
```python
|
| 178 |
+
import os
|
| 179 |
+
from PIL import Image
|
| 180 |
+
|
| 181 |
+
base_path = "/absolute/path/to/data" # where you extracted the downloaded zip
|
| 182 |
+
|
| 183 |
+
sample = dataset_optic_flow[0]
|
| 184 |
+
img1 = Image.open(os.path.join(base_path, sample["image1_path"]))
|
| 185 |
+
img2 = Image.open(os.path.join(base_path, sample["image2_path"]))
|
| 186 |
+
```
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
---
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
## License
|
| 193 |
+
|
| 194 |
+
The RobustSpring dataset is licensed under CC-BY-4.0
|