Skip to content

Commit e227dfc

Browse files
committed
docs: update README.
* update av2_mode to data_mode. * revert back for zod process file * runner metric is good in last version as it's range_bucket have different meaning.
1 parent 722ac2d commit e227dfc

6 files changed

Lines changed: 24 additions & 15 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ DeltaFlow: An Efficient Multi-frame Scene Flow Estimation Method
66
<!-- [![poster](https://img.shields.io/badge/ECCV24|Poster-6495ed?style=flat&logo=Shotcut&logoColor=wihte)](https://hkustconnect-my.sharepoint.com/:b:/g/personal/qzhangcb_connect_ust_hk/EWyWD-tAX4xIma5U7ZQVk9cBVjsFv0Y_jAC2G7xAB-w4cg?e=c3FbMg) -->
77
<!-- [![video](https://img.shields.io/badge/video-YouTube-FF0000?logo=youtube&logoColor=white)](https://youtu.be/fQqx2IES-VI) -->
88

9+
<img width="1864" height="756" alt="deltaflow_cover" src="https://github.com/user-attachments/assets/a7348910-8073-4703-8c0b-57c613401552" />
10+
911
**News w. TBD**:
1012

1113
Note (2025/09/18): We got accepted by NeurIPS 2025 and it's **spotlighted**! 🎉🎉🎉 Working on release the code here.
@@ -20,16 +22,18 @@ Note (2025/09/18): We got accepted by NeurIPS 2025 and it's **spotlighted**!
2022

2123
## Quick Run
2224

25+
To train the full dataset, please refer to the [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow?tab=readme-ov-file#1-data-preparation) for raw data download and h5py files preparation.
26+
2327
### Training
2428

25-
1. Prepare the demo train and val data:
29+
1. Prepare the **demo** train and val data for a quick run:
2630
```bash
2731
# around 1.3G
2832
wget https://huggingface.co/kin-zhang/OpenSceneFlow/resolve/main/demo-data-v2.zip
2933
unzip demo-data-v2.zip -d /home/kin/data/av2/h5py # to your data path
3034
```
3135

32-
2. Follow the [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow/tree/main?tab=readme-ov-file#0-installation) to setup the environment.
36+
2. Follow the [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow/tree/main?tab=readme-ov-file#0-installation) to setup the environment or [use docker](https://github.com/KTH-RPL/OpenSceneFlow?tab=readme-ov-file#docker-recommended-for-isolation).
3337

3438
3. Run the training with the following command (modify the data path accordingly):
3539
```bash
@@ -49,7 +53,6 @@ Please refer to the [OpenSceneFlow](https://github.com/KTH-RPL/OpenSceneFlow/tre
4953
While I will update a unified visualization script for OpenSceneFlow to quickly save all window views as images at the same view and same time etc. (Free us from qualitative figure making work!)
5054

5155

52-
5356
## Cite & Acknowledgements
5457
```
5558
@article{zhang2025deltaflow,

assets/slurm/2_eval.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ cd /proj/berzelius-2023-364/users/x_qinzh/workspace/OpenSceneFlow
1212

1313

1414
# ====> leaderboard model
15-
# $PYTHON eval.py wandb_mode=online dataset_path=/proj/berzelius-2023-364/users/x_qinzh/data/av2/autolabel av2_mode=test \
15+
# $PYTHON eval.py wandb_mode=online dataset_path=/proj/berzelius-2023-364/users/x_qinzh/data/av2/autolabel data_mode=test \
1616
# checkpoint=/proj/berzelius-2023-154/users/x_qinzh/seflow/logs/wandb/seflow-10086990/checkpoints/epoch_19_seflow.ckpt \
1717
# save_res=True
1818

19-
$PYTHON eval.py wandb_mode=online dataset_path=/proj/berzelius-2023-364/users/x_qinzh/data/av2/autolabel av2_mode=val \
19+
$PYTHON eval.py wandb_mode=online dataset_path=/proj/berzelius-2023-364/users/x_qinzh/data/av2/autolabel data_mode=val \
2020
checkpoint=/proj/berzelius-2023-154/users/x_qinzh/seflow/logs/wandb/seflow-10086990/checkpoints/epoch_19_seflow.ckpt

dataprocess/extract_zod.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ def process_logs(data_dir: Path, output_dir: Path, nproc: int):
122122

123123
def main(
124124
dataset_root: str = "/home/kin/DATA_HDD/public_data/zod/drives",
125+
output_dir: str ="/home/kin/data/zod/h5py/himo",
126+
nproc: int = (multiprocessing.cpu_count() - 1),
127+
only_index: bool = False,
125128
):
129+
output_dir_ = Path(output_dir)
126130
if only_index:
127131
create_reading_index(output_dir_)
128132
return

src/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
print(f"Detail error message\033[0m: {e}. Just ignore this warning if code runs without these models.")
2323

2424
# following need install extra package:
25-
# * pip install spconv-cu118
25+
# * pip install spconv-cu117
2626
try:
2727
from .deltaflow import DeltaFlow
2828
from .flow4d import Flow4D

src/runner.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,17 @@ def _run_process(cfg, mode):
267267
final_metrics.epe_3way[key].extend(val_list)
268268

269269
for class_idx, class_name in enumerate(metrics_obj.bucketedMatrix.class_names):
270-
for range_idx, range_bucket in enumerate(metrics_obj.bucketedMatrix.range_buckets):
271-
count = metrics_obj.bucketedMatrix.count_storage_matrix[class_idx, range_idx]
270+
# NOTE(Qingwen): for bucketedMatrix range_buckets = speed_buckets
271+
for speed_idx, speed_bucket in enumerate(metrics_obj.bucketedMatrix.range_buckets):
272+
count = metrics_obj.bucketedMatrix.count_storage_matrix[class_idx, speed_idx]
272273
if count > 0:
273-
avg_epe = metrics_obj.bucketedMatrix.epe_storage_matrix[class_idx, range_idx]
274-
avg_range = metrics_obj.bucketedMatrix.range_storage_matrix[class_idx, range_idx]
274+
avg_epe = metrics_obj.bucketedMatrix.epe_storage_matrix[class_idx, speed_idx]
275+
avg_speed = metrics_obj.bucketedMatrix.range_storage_matrix[class_idx, speed_idx]
275276
final_metrics.bucketedMatrix.accumulate_value(
276-
class_name, range_bucket, avg_epe, avg_range, count
277+
class_name, speed_bucket, avg_epe, avg_speed, count
277278
)
278279
for class_idx, class_name in enumerate(metrics_obj.distanceMatrix.class_names):
280+
# NOTE(Qingwen): for distanceMatrix range_buckets = distance_buckets
279281
for range_idx, range_bucket in enumerate(metrics_obj.distanceMatrix.range_buckets):
280282
count = metrics_obj.distanceMatrix.count_storage_matrix[class_idx, range_idx]
281283
if count > 0:
@@ -304,7 +306,7 @@ def _spawn_wrapper(rank, world_size, cfg, mode):
304306
os.environ['RANK'] = str(rank)
305307
os.environ['WORLD_SIZE'] = str(world_size)
306308
os.environ['MASTER_ADDR'] = 'localhost'
307-
os.environ['MASTER_PORT'] = cfg.get('master_port', '12355')
309+
os.environ['MASTER_PORT'] = str(cfg.get('master_port', 12355))
308310
_run_process(cfg, mode)
309311

310312
def launch_runner(cfg, mode):

src/utils/eval_metric.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ def get_mean_average_values(self, normalized: bool = True):
201201
pass
202202

203203
class BucketedSpeedMatrix(BucketResultMatrix):
204-
def __init__(self, class_names: List[str], range_buckets: List[Tuple[float, float]]):
205-
super().__init__(class_names, range_buckets)
204+
def __init__(self, class_names: List[str], speed_buckets: List[Tuple[float, float]]):
205+
super().__init__(class_names, speed_buckets)
206206

207207
def get_normalized_error_matrix(self):
208208
error_matrix = self.epe_storage_matrix.copy()
@@ -266,7 +266,7 @@ def __init__(self):
266266
speed_splits = np.concatenate([np.linspace(0, 2.0, 51), [np.inf]])
267267
self.bucketedMatrix = BucketedSpeedMatrix(
268268
class_names=['BACKGROUND', 'CAR', 'OTHER_VEHICLES', 'PEDESTRIAN', 'WHEELED_VRU'],
269-
range_buckets=list(zip(speed_splits, speed_splits[1:]))
269+
speed_buckets=list(zip(speed_splits, speed_splits[1:]))
270270
)
271271

272272
distance_split = [0, 35, 50, 75, 100, np.inf]

0 commit comments

Comments
 (0)