Skip to content

Merge SeFlow++ and ZOD extraction from HiMo Project#17

Merged
Kin-Zhang merged 21 commits intoKTH-RPL:mainfrom
Kin-Zhang:feature/himo
Aug 30, 2025
Merged

Merge SeFlow++ and ZOD extraction from HiMo Project#17
Kin-Zhang merged 21 commits intoKTH-RPL:mainfrom
Kin-Zhang:feature/himo

Conversation

@Kin-Zhang
Copy link
Copy Markdown
Member

@Kin-Zhang Kin-Zhang commented Aug 20, 2025

This pull request introduces several improvements and updates to the OpenSceneFlow codebase, primarily focusing on new methods, documentation, Docker and environment setup, and training workflows.

Documentation and Training Workflow Updates from HiMo project:

  • Major reorganization of the README.md to clearly separate supervised and self-supervised training instructions, update dataset support (added ZOD), and streamline pretrained weight download links and training commands. Also, the changelog section was removed for clarity. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updating 1) a new three-frame backbone; 2) seflowppLoss; 3) seflowpp_auto from HiMo (SeFlow++) part. Major reorganization of feed-forward self-supervised methods. Now we comment the ssl-loss config by default, it needs to add `+' with new parameters. The ssl_label can be changed for easy future exploration, etc.
  • Training commands now consistently use the optimizer.lr parameter and improved loss function specification for all models. [1] [2] [3]

Environment and Installation:

  • Dockerfile updated to install pytorch3d/torch-scatter via conda/pip to support running all methods inside Docker.
  • Revert the environment to python=3.8, torch=2.0.0 and cuda=11.7 check more discussion for upgrading-issue in discussion CUDA utils #11

Old Message:

HiMo got accepted into T-RO now! 🔥 I will try my best to update all detailed codes so that everyone can reproduce all the tables/results/figures in the paper.
All Scene Flow-related parts will be merged into OpenSceneFlow as this pull request shows, and then we will update another repo for the HiMo task and downstream task codes.

The self-supervised learning SSL part has a big refactor. We added auto_label involved in cfg, etc, for afterward potential seflowpp hyper-paramters tuning by users, etc.

@Kin-Zhang Kin-Zhang added new method new method involve new data new data involve labels Aug 20, 2025
@Kin-Zhang Kin-Zhang requested review from Copilot and iyuner August 21, 2025 11:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR merges SeFlow++ and ZOD extraction code from the HiMo project into OpenSceneFlow. It represents a major update to support self-supervised learning with automated labeling and extends the framework to handle three-frame processing for improved scene flow estimation.

  • Updates training infrastructure to support new self-supervised loss functions (seflowLoss, seflowppLoss) with automated labeling
  • Refactors model architectures to support three-frame processing and adds new DeFlowPP model
  • Adds ZOD dataset extraction capabilities and updates AV2 extraction with additional metadata

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
train.py Updates training configuration validation and dataset initialization for SSL workflows
src/trainer.py Extends training step to handle three-frame data and new loss functions
src/models/ Refactors models to use centralized point cloud processing and adds DeFlowPP
src/lossfuncs/ Restructures loss functions into separate modules for supervised and self-supervised learning
src/dataset.py Updates dataset loading to support automated labeling and three-frame sequences
dataprocess/ Adds ZOD extraction and enhances AV2 extraction with lidar metadata
process.py Major refactor to support multiple labeling strategies (DUFO, clustering, NND)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

trainer.fit(model, train_dataloaders = train_loader, val_dataloaders = val_loader, ckpt_path = cfg.checkpoint)
wandb.finish()
if cfg.wandb_mode != "disabled":
wandb.finish()
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wandb.finish() call is inside the conditional block but not properly indented. This will cause a syntax error as it appears to be at the same indentation level as the if statement.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't get this point.... check later.

# raw: pc0 to pc1, est: pseudo_pc1from0 to pc1, idx means the nearest index
est_dist0, est_dist1, _, _ = MyCUDAChamferDis.disid_res(pseudo_pc1from0, pc1)
raw_dist0, raw_dist1, raw_idx0, _ = MyCUDAChamferDis.disid_res(pc0, pc1)
chamfer_dis = torch.nanmean(est_dist0[est_dist0 <= TRUNCATED_DIST]) + torch.nanmean(est_dist1[est_dist1 <= TRUNCATED_DIST])
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using torch.nanmean instead of torch.mean for consistency with seflowLoss function. However, this creates an inconsistency between the two loss functions where seflowLoss uses torch.mean. Consider standardizing the approach.

Suggested change
chamfer_dis = torch.nanmean(est_dist0[est_dist0 <= TRUNCATED_DIST]) + torch.nanmean(est_dist1[est_dist1 <= TRUNCATED_DIST])
chamfer_dis = torch.mean(est_dist0[est_dist0 <= TRUNCATED_DIST]) + torch.mean(est_dist1[est_dist1 <= TRUNCATED_DIST])

Copilot uses AI. Check for mistakes.
Kin-Zhang and others added 13 commits August 26, 2025 00:13
* hotfix(ssf): bug fixes in seflow+ssf as ssf concat two pc and forget to - index.
* add data with lidar_id and lidar_dt
* add flow_instances for afterward easy deltaflow update.
* tested with demo good, need double check the results on av2 and update the training time & weight link also.
* it could be a good reference for users to extract other data into h5 files etc.
- update from DeltaFlow.
- align some format with copilot comments.
* update other submodule repo to align the lr changed.
@Kin-Zhang
Copy link
Copy Markdown
Member Author

Kin-Zhang commented Aug 29, 2025

SeFlow++ ckpt for av2 leaderboard (local results after fixed gt #5 ):

image

Some notes here:
SeFlow++ introduced by HiMo has three changes compared to the original SeFlow: a) a three-frame 'deflowpp' backbone; b) refine auto-label seflowpp_auto; c) new symmetric loss function seflowppLoss.

We observed that for Argoverse 2 data, SeFlow++ benefits from a) most and c). For a highway with less observed free-space on the DUFO label, b) can help. However, for low-speed environments like urban environments, it might break the cluster consistency and introduce noise, etc. Feel free to explore more. In the main READM, we present the one we trained on the paper AV2 results.

Here is for training seflowpp backbone (deflowpp) with seflow loss and auto-label etc:

# (for av2) if you don't want to auto-label again etc, seflow++ could use seflow loss on seflow++ three-frame backbone, their av2 performance are simialr.
python train.py model=deflowpp save_top_model=3 val_every=3 voxel_size="[0.2, 0.2, 6]" point_cloud_range="[-51.2, -51.2, -3, 51.2, 51.2, 3]" num_workers=16 epochs=9 optimizer.lr=1e-4 "+add_seloss={chamfer_dis: 1.0, static_flow_loss: 1.0, dynamic_chamfer_dis: 1.0, cluster_based_pc0pc1: 1.0}" +ssl_label=seflow_auto loss_fn=seflowLoss num_frames=3 batch_size=8

@Kin-Zhang Kin-Zhang changed the title [WIP] Merge SeFlow++ and ZOD extraction from HiMo Project Merge SeFlow++ and ZOD extraction from HiMo Project Aug 29, 2025
here are effort I tried to upgrade and found out some issues: KTH-RPL#11
check with env.yaml is good, double check the dockerfile for all methods.
* checked locally on all methods' training is good.

docs update README
@Kin-Zhang Kin-Zhang merged commit 7fb4973 into KTH-RPL:main Aug 30, 2025
@Kin-Zhang Kin-Zhang deleted the feature/himo branch March 31, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new data new data involve new method new method involve

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants