This repository contains the official implementation of the paper
UniFlow: Towards Zero-Shot LiDAR Scene Flow for Autonomous Vehicles via Cross-Domain Generalization [arXiv] · [Project Page]
Please follow the environment setup and data preparation instructions provided in OpenSceneFlow.
Beam ID is required for beam-dropout augmentation during training. It is supported for:
Beam ID is not supported for TruckScenes due to information availability, and nuScenes as it is already a sparse 32-beam LiDAR dataset.
If you have not preprocessed Argoverse 2, please run:
python dataprocess/extract_av2.py \
--av2_type sensor \
--data_mode train \
--argo_dir /path/to/av2 \
--output_dir /path/to/av2/preprocess
If you already have preprocessed Argoverse 2 ‘.h5’ files without beam information, add ‘–only_insert_beamid’ to your command.
If you have not preprocessed Waymo, please run:
python dataprocess/extract_waymo.py \
--mode train \
--flow_data_dir /path/to/waymo/flowlabel \
--map_dir /path/to/waymo/flowlabel/map \
--output_dir /path/to/waymo/preprocess \
--nproc <N>
If you already have preprocessed Waymo ‘.h5’ files without beam information, you can insert beam IDs post-hoc using:
python dataprocess/add_beam_id_waymo.py \
--preprocess_dir /path/to/waymo/preprocess/train \
--tfrecord_root /path/to/waymo/flowlabel \
--split train \
--num_workers <N>
Joint training across multiple datasets is supported via train.py, with data augmentations controlled through configuration options.
Example:
python train.py \
model=flow4d \
train_data="[
/scratch/siyili/waymo/preprocess/train/,
/scratch/siyili/av2/preprocess/train/,
/scratch/siyili/nuscenes/preprocess/train/
]" \
val_data=/scratch/siyili/av2/preprocess/val/ \
optimizer.lr=1e-3 \
epochs=18 \
batch_size=4 \
num_frames=5 \
"voxel_size=[0.2, 0.2, 0.2]" \
"point_cloud_range=[-51.2, -51.2, -3.2, 51.2, 51.2, 3.2]" \
backbone=xl \
basic_augment=true \
beam_dropout.enable=true \
dataset_weight_mode=proportional
This repository is based on OpenSceneFlow and includes code adapted from Flow4D and DeFlow. Original copyright and license notices are preserved in the source files where applicable.