-
Notifications
You must be signed in to change notification settings - Fork 0
Structural changes for BundleSDF-PLL cyclic pipeline #1
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
base: dev-loss
Are you sure you want to change the base?
Conversation
…more helpful parameter naming
…-generation submodule instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shows up as new, though it's moved from {REPO}/run_custom.py
to {REPO}/bundlenets/run_custom.py
and the changes were significant enough to call this a new file rather than a moved and edited file. This makes seeing the changes a little more difficult.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed here because all conversions are done by the cnets-data-generation
git submodule.
…raining; fix file checking bug
bundlenets/nerf_runner.py
Outdated
##### Hyperplane-constrained SDF loss | ||
# Only contribute support point loss to total loss if using PLL | ||
# information for training. | ||
if self.cfg['use_pll_for_training']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minghanz Thanks for pointing out that the former dry_cnets
setting had a use that we'd like to preserve. The old dry_cnets
flag let the PLL-related losses to be computed without contributing to the SDF training process. Now, that is achieved with setting the use_pll_for_training
to false, but still providing a PLL run ID from which to use PLL information.
… into structural-changes
…ndlenets into structural-changes
…ht}) without contact. Change the parsing of vision_asset so that the object name can contain "_". Deal with corner cases: 1. When no mesh is generated. 2. When there is a single support point, the point dimension will get squeezed unexpectedly. 3. When support point is empty. Submodules updated.
…ndlenets into structural-changes
…etc. Add octree-related options and put them into cfg. Implement contact filter based on octree occupancy (not working). convexity_vision_weight when using contact. convexity_weight in click. Preserve near-contact mini-meshes when not using convexity prior. Occupancy grid output for volumetric evaluation. Processing occluded data. Corner case when all contact points are filtered. Add share_tracking option to use the same tracking in iteration 2 (on paper staying at iteration 1 with a different nerf_id). Allow objects with underscore. vis_utils.py takes click options.
compute_scene_bounds() now uses support points. build_octree_pts includes support and huperplane points. Mesh hull exports visibility when bsdf finishes. New convex interpolation. vis_utils take slice_x_coord input. Tracking center initialization uses more filtering to remove foreground outliers in Frame.cpp. YcbineoatReader fix a bug when offset is default. Some utility scripts for debug in the utils_debug folder. Fixed system name checking with VISION_SYSTEMS. Submodules updated.
Add misc scripts for file organization and debugging.
Trimming some obselete comments.
Current work-in-progress for file reorganization efforts. The new file structure is documented here and will be able to keep track of:
Cyclic BundleSDF-PLL experiments
The new organization will allow for more seamless execution of the cyclic BundleSDF-PLL pipeline. The above diagram shows how the pipeline can be used for multiple iterations starting from BundleSDF trajectories (above the grey dashed line), or how the pipeline can be run for one iteration with TagSLAM trajectories to train PLL (below the grey dashed line). The blue iteration numbers or purple TagSLAM labels indicate how the experiments will be sorted in the new file structure.
File structure
The file structure re-design focuses on the 4 data groups from the above flow diagram.
1. BundleSDF pose outputs
BundleSDF pose outputs are expressed:
These outputs are stored per BundleSDF experiment under
bundlenets/results/{DATASET}/bundlesdf_iteration_{C}/bundlesdf_id_{B}/
. This structure lets multiple BundleSDF experiment runs (indicated by a BundleSDF run IDB
) store results for the same video dataset (indicated byDATASET
, e.g.cube_2
) and for multiple iterations of the BundleSDF-PLL pipeline (iteration number indicated byC
).The git submodule
cnets-data-generation
converts these outputs of BundleSDF poses to the expected input format and directory for PLL. This conversion can be run via:2. PLL pose inputs
PLL expects pose inputs:
*As long as the origin is consistent throughout all of the input trajectories for a given experiment, the choice of origin is inconsequential for PLL. We chose to use the TagSLAM origin so that the trajectories produced by BundleSDF are easily compared with TagSLAM trajectories.
These inputs are stored under
bundlenets/dair_pll/assets/vision_{OBJECT}/{DATASET}/toss/bundlesdf_iteration_{C}/bundlesdf_id_{B}/
. There is also a correspondingbundlenets/dair_pll/assets/vision_{OBJECT}/{DATASET}/toss/tagslam/
directory for poses generated with TagSLAM instead of BundleSDF for ease of comparison.dair_pll
is included as a git submodule. Runningdair_pll
performs the conversion from PLL pose inputs to PLL geometry outputs. This process can be run as a PLL experiment (with PLL run IDP
) via:3. PLL geometry outputs
PLL geometry outputs are expressed:
These outputs are stored per PLL experiment under
bundlenets/dair_pll/results/vision_{OBJECT}/{DATASET}/bundlesdf_iteration_{C}/pll_id_{P}/
. This structure lets multiple PLL experiment runs (indicated by PLL run IDP
) store results for the same BundleSDF run (indicated by BundleSDF run IDB
).Again, the git submodule
cnets-data-generation
converts these outputs of PLL geometry information to the expected input format and directory for BundleSDF. This conversion can be run via:4. BundleSDF geometry inputs
BundleSDF expects geometry inputs:
These inputs are stored under
bundlenets/geometry/{DATASET}/bundlesdf_iteration_{C}/pll_id_{P}/
.Running
bundlenets
performs the conversion from BundleSDF geometry inputs to BundleSDF pose outputs. This process can be run as a BundleSDF experiment (with BundleSDF run IDB2
) via:Testing performed
The following four use cases for the
bundlenets
code were tested in validation of this PR:run_video
without PLL inputs.results/cube_2/bundlesdf_iteration_1/bundlesdf_id_pr00/
.results/cube_2/bundlesdf_iteration_1/bundlesdf_id_pr00/nerf_runs/bundlesdf_id_pr00/
.test_loss
without PLL inputs.results/cube_2/bundlesdf_iteration_1/bundlesdf_id_pr00/nerf_runs/bundlesdf_id_pr01/
.run_video
with PLL inputs.results/cube_2/bundlesdf_iteration_2/bundlesdf_id_pr02/
.results/cube_2/bundlesdf_iteration_2/bundlesdf_id_pr02/nerf_runs/bundlesdf_id_pr02/
.test_loss
with PLL inputs.results/cube_2/bundlesdf_iteration_2/bundlesdf_id_pr02/nerf_runs/bundlesdf_id_pr03/
.The BundleSDF mode
run_video
performs sequentially a tracking experiment, then an object reconstruction experiment within the tracking experiment. Modetest_loss
performs just an object reconstruction experiment within a previously run tracking experiment.Tests were performed on the DAIR Lab desktop
cnets-vision
account. The repository was cloned with this development branch checked out at~/mengti_ws/structural_tests/bundlenets/
, though running the code reused the environment/docker settings from themengti_ws/BundleSDF/
folder. The following additional data was copied over:data/cube_2/
was copied frommengti_ws/BundleSDF/
without any contained.pt
files.geometry/cube_2/bundlesdf_iteration_1/pll_id_t03/
was copied from Bibit's laptop where a test was performed locally.Then tests for each of the four use cases above were run with:
Code review
The changes herein contain many formatting tweaks for easier viewing. There are also some changes that are just renaming of variables or functions. There are many files included in the changes, so below is a list to help bring attention to the functional changes.
bundlesdf.py
with_cnets
arguments, instead interpreting if PLL information is to be used based on the configuration settings.nerf_runs
folder.file_utils.py
nerf_helpers.py
nerf_runner.py
geometry/
directory based on configuration settings.geometry/
sub-directory.metrics
dictionary.run_custom.py
toss
' versions of the base configuration files.