-
Notifications
You must be signed in to change notification settings - Fork 16
Merge two optimization-based (NSFP, FastNSF) methods into codebase from HiMo project #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c77154c
feat: nus data initial haven't finished yet.
Kin-Zhang 89871f4
Merge branch 'main' into feature/datanus
Kin-Zhang b15f53f
env(mmcv): fix pip install
Kin-Zhang 8ff2678
env(mmcv): remove ext in the load module for the setup changes.
Kin-Zhang 41dbe18
feat(nsfp, fastnsf): update two methods module files.
Kin-Zhang eacf54c
chore(runner): for all optimization-based methods.
Kin-Zhang ed9458f
docs(readme): update readme.
Kin-Zhang 84a2481
hotfix: multi-gpu metric evaluation
Kin-Zhang aa8ad94
env(opensf): update environment yaml to py310, add requirement.txt fo…
Kin-Zhang cce2e3d
fix(docker): need move out FastGeodis out.
Kin-Zhang a63ba8b
fix(docker): torch is on the base env in the new dockerfile.
Kin-Zhang b698c28
hotfix(nsfp): we can remove pytorch3d dependence.
Kin-Zhang e0d9139
fix(sftool): argoverse 2 need 0.2.1 for py38, revert to previous vers…
Kin-Zhang 4131847
env(data): update two more datasets used in the himo projects.
Kin-Zhang 3a8b8d4
github(action): stale issues.
Kin-Zhang a5c9b03
fix(runner): save mode passed 1-gpu test now.
Kin-Zhang abccd67
docs(README): update readme and running nsfp and fastnsf.
Kin-Zhang 339fa10
docs: add contributing README for afterward users.
Kin-Zhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Close inactive issues | ||
| on: | ||
| schedule: | ||
| - cron: "35 11 * * 5" | ||
|
|
||
| env: | ||
| DAYS_BEFORE_ISSUE_STALE: 30 | ||
| DAYS_BEFORE_ISSUE_CLOSE: 14 | ||
|
|
||
| jobs: | ||
| close-issues: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/stale@v5 | ||
| with: | ||
| days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }} | ||
| days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} | ||
| stale-issue-label: "stale" | ||
| stale-issue-message: | | ||
| This issue is stale because it has been open for ${{ env.DAYS_BEFORE_ISSUE_STALE }} days with no activity. | ||
| It will be closed if no further activity occurs. Let us know if you still need help! | ||
| close-issue-message: | | ||
| This issue is being closed because it has been stale for ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days with no activity. | ||
| If you still need help, please feel free to leave comments. | ||
| days-before-pr-stale: -1 | ||
| days-before-pr-close: -1 | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Contributing to OpenSceneFlow | ||
|
|
||
| We want to make contributing to this project as easy and transparent as possible. We welcome any contributions, from bug fixes to new features. If you're interested in adding your own scene flow method, this guide will walk you through the process. | ||
|
|
||
| ## Adding a New Method | ||
|
|
||
| Here is a quick guide to integrating a new method into the OpenSceneFlow codebase. | ||
|
|
||
| ### 1. Data Preparation | ||
|
|
||
| All data is expected to be processed into the `.h5` format. Each file represents a scene, and within the file, each data sample is indexed by a `timestamp` key. | ||
|
|
||
| For more details on the data processing pipeline, please see the [Data Processing README](./dataprocess/README.md#process). | ||
|
|
||
| ### 2. Model Implementation | ||
|
|
||
| All model source files are located in [`src/models`](./src/models). When adding your model, please remember to import your new model class in the [`src/models/__init__.py`](./src/models/__init__.py) file. Don't forget to add your model conf files in [`conf/model`](./conf/model). | ||
|
|
||
| * **For Feed-Forward Methods:** You can use `deflow` and `fastflow3d` as implementation examples. | ||
| * **For Optimization-Based Methods:** Please refer to `nsfp` and `fastnsf` for guidance on structure and integration. A detailed example can be found in the [NSFP model file](./src/models/nsfp.py). | ||
|
|
||
| ### 3. Custom Loss Functions | ||
|
|
||
| All loss functions are defined in [`src/lossfuncs.py`](./src/lossfuncs.py). If your model requires a new loss function, you can add it to this file by following the pattern of the existing functions. SeFlow provided a self-supervised loss function example for all feed-forward methods. Feel free to check. | ||
|
|
||
| ### 4.1 Training a Feed-Forward Model | ||
|
|
||
| 1. Add a configuration file for your new model in the [`conf/model`](./conf/model) directory. | ||
| 2. Begin training by running the following command: | ||
| ```bash | ||
| python train.py model=your_model_name | ||
| ``` | ||
| 3. **Note:** If your model's output dictionary (`res_dict`) has a different structure from the existing models, you may need to add a new pattern in the `training_step` and `validation_step` methods in the main training script. | ||
|
|
||
| ### 4.2 Running an Optimization-Based Model | ||
|
|
||
| Our framework supports multi-GPU execution for optimization-based methods out of the box. You can follow the structure of existing methods like NSFP to run and evaluate your model. | ||
|
|
||
| ----- | ||
|
|
||
| Once the steps above are completed, other parts of the framework, such as evaluation (`eval`) and visualization (`save`), should integrate with your new model accordingly. | ||
|
|
||
| Thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: fastnsf | ||
|
|
||
| target: | ||
| _target_: src.models.FastNSF | ||
| filter_size: 128 | ||
| act_fn: relu | ||
| layer_size: 8 | ||
| itr_num: 5000 | ||
| lr: 8e-3 | ||
| min_delta: 5e-5 | ||
| grid_factor: 10 | ||
| init_weight: True | ||
| early_patience: 10 # default is 10, set 30 to get better results | ||
| point_cloud_range: [-51.2, -51.2, -3, 51.2, 51.2, 3] | ||
|
|
||
| val_monitor: val/Dynamic/Mean | ||
| iter_only: True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: nsfp | ||
|
|
||
| target: | ||
| _target_: src.models.NSFP | ||
| filter_size: 128 | ||
| act_fn: relu | ||
| layer_size: 8 | ||
| itr_num: 5000 | ||
| lr: 8e-3 | ||
| min_delta: 5e-5 | ||
| early_patience: 30 # default is 30, set 100 to get better results (zeroflow setting.) | ||
| point_cloud_range: [-51.2, -51.2, -3, 51.2, 51.2, 3] | ||
|
|
||
| val_monitor: val/Dynamic/Mean | ||
| iter_only: True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.