SynFlow / README.md
kin-zhang's picture
Add files using upload-large-folder tool
2cab6ec verified
|
Raw
History Blame Contribute Delete
11.9 kB
---
license: cc-by-4.0
task_categories:
- other
tags:
- scene-flow
- lidar
- autonomous-driving
- carla
- synthetic
- 3d
language:
- en
configs:
- config_name: 1k
default: true
data_files:
- split: train
path: "town-06-07-10/*"
- config_name: 2k
data_files:
- split: train
path: "town-01-05/*"
- config_name: 3k
data_files:
- split: train
path:
- "town-06-07-10/*"
- "town-01-05/*"
- config_name: 4k
data_files:
- split: train
path:
- "town-01-05/*"
- "town-12/*"
---
SynFlow: Scaling Up LiDAR Scene Flow Estimation with Synthetic Data
---
[![arXiv](https://img.shields.io/badge/arXiv-2604.09411-b31b1b?logo=arxiv&logoColor=white)](https://arxiv.org/abs/2604.09411)
[![page](https://img.shields.io/badge/Project-Page-green)](https://kin-zhang.github.io/SynFlow)
The SynFlow dataset is a synthetic LiDAR scene flow benchmark collected using the [CARLA](https://carla.org/) simulator, and is formatted for seamless compatibility with [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow).
We provide both the full dataset and [two pretrained model checkpoints](model-ckpt/) (one trained on the SynFlow-4k dataset, and another on SynFlow-4k augmented with real-world data; both are trained with [*DeltaFlow* backbone](https://github.com/Kin-Zhang/DeltaFlow)) to support further research and development by the community. Check [licenses](#license) for more detail usage.
<p align="center">
<img alt="synflow_cover" src="https://kin-zhang.github.io/SynFlow/assets/images/cover.png" />
</p>
## Dataset Summary
SynFlow dataset provides dense 3D scene-flow ground truth for autonomous-driving research.
An ego vehicle drives along pre-defined routes in multiple CARLA towns while a LiDAR captures point clouds at **10 Hz**.
Each **scene** is stored as a separate HDF5 file and spans roughly **20 seconds** (~200 frames for 64-beam LiDAR, ~30 s / 302 frames for 32-beam LiDAR).
Dynamic objects (vehicles, pedestrians, cyclists, etc.) receive instance-level rigid-body flow labels; static background points receive ego-motion-compensated flow.
**Folder Structure**
```
town-data-folder/
├── scene-{town}{channels}{route_id:04d}{split:02d}.h5 # one file per scene
├── ...
├── index_total.pkl # frame index for training / visualization
...
# The backbone here is *DeltaFlow*
model-ckpt/
├── synflow-4k-longadp.ckpt # the ckpt trained only on our SynFlow-4k dataset
├── synflow-real-longadp.ckpt # the ckpt trained on our SynFlow-4k dataset and real-world dataset (Av2, Waymo, nuscene)
routes-xml/ # generate from our code, check: https://github.com/Kin-Zhang/SynFlow
├── town01.xml
├── ...
└── town12.xml
```
**Data Split**
Here is the data split presented in our SynFlow paper Tab. 1, with the folder name and composition.
| Split | # Annotated Frames | Folder Name | Composition | Storage Size (GB) |
|:---:|:---:|:---:|---|:---:|
| 1k | 271, 148 | `town-06-07-10` | Town06, 07, 10 arterials, complex junctions, rural roads | 214G |
| 2k | 449,407 | `town-01-05` | Town01–05 roundabouts, multi-lane intersections | 419G |
| 3k | 720,555 | `town-06-07-10` + `town-01-05` | Town06-07-10, Town01-05 | 633G |
| 4k | 939,083 | `town-01-05` + `town-12` | Town01-05, Town12 | 986G |
**Command for Download**
```bash
# full
hf download KTH/SynFlow --repo-type dataset --local-dir ./SynFlow-data
# 1k split (for a quick training test) around 214G
hf download KTH/SynFlow --repo-type dataset --include "town-06-07-10/*" --local-dir ./SynFlow-data/town-06-07-10
```
**File Naming Convention**: `scene-{town_id}{channels}{route_id:04d}{scene_split:02d}.h5`,
where `town_id` is the CARLA town number (e.g. `01`, `12`),
`channels` is LiDAR beam count (`32`, `64`),
`route_id` is a 4-digit route index (e.g. `0042`),
and `scene_split` is a 2-digit split for long routes (`00`, `01`, etc).
**Example:** `scene-0164004200.h5` → Town01, 64-beam LiDAR, route 42, split 0. Scenes with fewer than 120 valid frames are discarded during collection.
## Data Collection
This dataset is generated by [SynFlow-Github](https://github.com/Kin-Zhang/SynFlow).
See the repository for route generation, multi-instance collection, and configuration details.
| Property | Value |
|---|---|
| Simulator | CARLA 0.9.16 |
| Sensor | `sensor.lidar.ray_cast_semantic` |
| Frame rate | 10 Hz (`fixed_delta_seconds = 0.1`) |
| Coordinate system | Right-handed (RHS); Y-axis flipped from CARLA's native left-handed system |
| Ego vehicle | Tesla Model 3 with BehaviorAgent route following |
| NPCs | ~70 vehicles + ~80 pedestrians per scene (town-dependent) |
| Towns | Town01–Town10, Town12 (diverse urban, highway, rural, and large-map environments) |
**LiDAR Configurations**
| Channels | Range | FOV (upper / lower) | Points/sec | Frames / scene | Duration |
|---|---|---|---|---|---|
| **64** | 85 m | +10° / −30° | 460,000 | 201 | ~20 s |
| **32** | 75 m | +10° / −30° | 160,000 (typical) | 302 | ~30 s |
Default: LiDAR is mounted at `z = 2.1 m` above the ego vehicle origin.
## HDF5 Schema
Each HDF5 file contains one scene. Every frame is stored as an HDF5 **group** keyed by its simulation timestamp in **microseconds** (e.g. `"1577836800000000"`). There is no separate `timestamps` dataset—the group key is the timestamp.
| Key | Shape | Dtype | Description |
|---|---|---|---|
| `lidar` | `(N, 3)` | `float32` | Point cloud in **sensor frame** (X, Y, Z), RHS |
| `pose` | `(4, 4)` | `float64` | Ego vehicle 4×4 transformation matrix (world ← ego), RHS |
| `flow` | `(N, 3)` | `float32` | Scene-flow vector from frame *t* to *t+1* in sensor frame, RHS |
| `flow_is_valid` | `(N,)` | `bool` | Per-point flow validity mask (currently all `True`) |
| `flow_category_indices` | `(N,)` | `uint8` | Semantic category index; `0` = background/static |
| `flow_instance_id` | `(N,)` | `int16` | Instance ID; `-1` = background, positive = dynamic object |
| `ground_mask` | `(N,)` | `bool` | `True` for ground points (road, sidewalk, terrain, road line, ground) |
`N` varies per frame depending on LiDAR density and scene complexity.
### Scene-Flow Ground Truth
- **Background (static) points:** flow computed by projecting world coordinates through the ego motion from frame *t* to *t+1* (sensor frame).
- **Foreground (dynamic) points:** flow refined using per-object rigid-body transforms derived from NPC bounding boxes and semantic instance tags.
- Points inside the ego vehicle bounding box are filtered before saving.
- The first frame of the first scene in a collection run is skipped (no *t−1* reference for flow).
### Instance & Category Labels
- `flow_instance_id`: dynamic objects are labeled with `npc.id % 32000 + 1`; background is `-1` (training code uses 0-indexed instances, so background must not be `0`).
- `flow_category_indices`: maps to the `AnnotationCategories` enum used in OpenSceneFlow (e.g. `REGULAR_VEHICLE`, `PEDESTRIAN`, `TRUCK`, `BICYCLE`, `MOTORCYCLE`, `BUS`, …). Index `0` denotes background / static.
### Ground Mask
`ground_mask` is `True` for points whose CARLA semantic tag is one of `{Road, SideWalk, Terrain, RoadLine, Ground}` (tags 1, 2, 10, 24, 25).
## Quick Usage Example
**Index Files**
`index_total.pkl` is a pickled list of `[scene_id, timestamp]` pairs covering all frames, required for OpenSceneFlow training and visualization:
```python
import pickle
with open("index_total.pkl", "rb") as f:
index = pickle.load(f) # e.g. [["scene-0164004200", "1577836800000000"], ...]
```
`index_eval.pkl` (optional) subsamples every 5 frames with a minimum non-ground point count, for standardized evaluation.
**HDF5 File Example**
```python
import h5py
import numpy as np
scene_id = "scene-0164004200"
timestamp = "1577836800000000"
with h5py.File(f"{scene_id}.h5", "r") as f:
frame = f[timestamp]
points = frame["lidar"][:] # (N, 3) float32
pose = frame["pose"][:] # (4, 4) float64
flow = frame["flow"][:] # (N, 3) float32
valid = frame["flow_is_valid"][:] # (N,) bool
cats = frame["flow_category_indices"][:] # (N,) uint8
inst = frame["flow_instance_id"][:] # (N,) int16
ground = frame["ground_mask"][:] # (N,) bool
# Dynamic (non-background) points
dynamic_mask = inst != -1
```
For visualization and training, use the [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow) toolchain:
```bash
python tools/visualization.py --res_name flow --data_dir /path/to/data
```
For training, please follow the [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow) to setup environment and change the data path to this dataset, example command:
```bash
python train.py slurm_id=$SLURM_JOB_ID wandb_mode=online wandb_project_name=synflow \
train_data="['data/town-06-07-10', 'SynFlow/data/town-01-05', 'SynFlow/data/town-12']" \
val_data='$DATA_DIR/val' model=deltaflow loss_fn=deltaflowLoss model.target.decoder_option=default \
num_workers=16 num_frames=5 model.target.decay_factor=0.4 epochs=21 batch_size=2 \
save_top_model=3 val_every=3 train_aug=True "voxel_size=[0.15, 0.15, 0.15]" "point_cloud_range=[-38.4, -38.4, -3, 38.4, 38.4, 3]" \
optimizer.lr=2e-4 +optimizer.scheduler.name=StepLR +optimizer.scheduler.step_size=3 +optimizer.scheduler.gamma=0.9
```
<!--
## Coordinate System
CARLA uses a left-handed coordinate system (LHS). All stored data is converted to a standard **right-handed system (RHS)** by flipping the Y axis on point coordinates, flow vectors, and the ego pose matrix. Point clouds and flow are expressed in the **LiDAR sensor frame** at frame *t*; `pose` gives the ego-to-world transform at frame *t*. -->
## Citation
If you use this dataset, please cite our papers (datasets and models), more works on [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow#cite-us).
```bibtex
@article{zhang2026synflow,
author = {Zhang, Qingwen and Zhu, Xiaomeng and Jiang, Chenhan and Jensfelt, Patric},
title = {{SynFlow}: Scaling Up LiDAR Scene Flow Estimation with Synthetic Data},
journal = {arXiv preprint arXiv:2604.09411},
year = {2026},
}
@inproceedings{zhang2025deltaflow,
title={{DeltaFlow}: An Efficient Multi-frame Scene Flow Estimation Method},
author={Zhang, Qingwen and Zhu, Xiaomeng and Zhang, Yushan and Cai, Yixi and Andersson, Olov and Jensfelt, Patric},
booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
year={2025},
url={https://openreview.net/forum?id=T9qNDtvAJX}
}
```
## License
- **SynFlow-4k dataset** and checkpoints trained **only** on SynFlow-4k (e.g. `synflow-4k-longadp.ckpt`) are released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). You are free to share, adapt, and use them for any purpose, including commercial use, as long as you provide appropriate credit (see [Citation](#citation)).
- This dataset was generated using the [CARLA](https://carla.org/) simulator. CARLA code is distributed under the [MIT License](https://github.com/carla-simulator/carla/blob/master/LICENSE); CARLA digital assets (maps, buildings, vehicles, etc.) are distributed under [CC BY](https://creativecommons.org/licenses/by/4.0/).
- Checkpoints trained on SynFlow-4k **plus** real-world datasets (e.g. `synflow-real-longadp.ckpt`) remain subject to [Argoverse 2](https://www.argoverse.org/about.html#terms-of-use), [Waymo Open Dataset](https://waymo.com/open/terms/), and [nuScenes](https://www.nuscenes.org/terms-of-use) licenses. Note that checkpoints trained on real-world datasets are **not** available for commercial use because of the restrictions of the real-world datasets. Please refer to the respective licenses for more details.