From 8317a39ccae43849c68588a04d53d13a53e8caea Mon Sep 17 00:00:00 2001 From: lukasuz Date: Wed, 3 Jan 2024 15:29:24 +0100 Subject: [PATCH] instruction for kinematic model only --- README.md | 9 +++++++-- skeletonizer.py | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 12e0fb3..e8194c4 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,11 @@ Download the datasets ([dnerf](https://github.com/albertpumarola/D-NeRF), [wim]( Note that you have to follow the pre-processing step as defined in [wim](https://github.com/NVlabs/watch-it-move) for the ZJU data to obtain the pickle files. + +### Kinematic Model Initialization Only +If you are only interested in extraction of the initial kinematic model (skeleton incl. skinning weights based on point-to-bone distance) check the _skeletonizer.py_ script. You can run that script with the sample data provided [here](https://drive.google.com/drive/folders/1iaHwsph0Z4RiS3Ugdcuz7D6NIE06jbHY?usp=sharing). The function generally expects a 3D density volume, for specifics please check the script. + + ### Train and Render **Train backbone & PCD representation:** @@ -101,12 +106,12 @@ This will generate a reposed video sequence with random bone rotations. Check th ## ToDos: - [x] Fix known errors (Will do in the next couple of days, 21.12.23) -- [ ] Add stand-alone instructions for initial kinematic model extraction based on point cloud +- [x] Add stand-alone instructions for initial kinematic model extraction based on point cloud ## Acknowledgements -This repository is partially based on [TiNeuVox](https://github.com/hustvl/TiNeuVox), [DirectVoxGO](https://github.com/sunset1995/directvoxgo), [D-NeRF](https://github.com/albertpumarola/D-NeRF). Thanks for their works. +This repository is partially based on [TiNeuVox](https://github.com/hustvl/TiNeuVox), [DirectVoxGO](https://github.com/sunset1995/directvoxgo), and [D-NeRF](https://github.com/albertpumarola/D-NeRF). Thanks for their works. diff --git a/skeletonizer.py b/skeletonizer.py index 32f4f2e..2c4becf 100644 --- a/skeletonizer.py +++ b/skeletonizer.py @@ -423,8 +423,8 @@ def visualise_skeletonizer(skeleton_points, root, joints, bones, pcd, weights, o gui.Application.instance.run() if __name__ == "__main__": - alpha_volume = np.load('./alpha_volume_f16.npy') - with open("grid.txt", 'r') as f: + alpha_volume = np.load('./data/alpha_volume_f16.npy') + with open("./data/grid.txt", 'r') as f: lines = f.readlines() for i in range(len(lines)): lines[i] = np.array(lines[i].replace('\n', '').split(','), dtype=float) @@ -445,5 +445,5 @@ def visualise_skeletonizer(skeleton_points, root, joints, bones, pcd, weights, o np.expand_dims(zv, axis=-1) ], axis=-1) - res = create_skeleton(alpha_volume, grid_xyz, bone_length=10., sigma=0.5, weight_theta=0.05) + res = create_skeleton(alpha_volume, grid_xyz, bone_length=10., sigma=1, weight_theta=0.03) visualise_skeletonizer(*res.values())