Skip to content

Commit

Permalink
instruction for kinematic model only
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasuz committed Jan 3, 2024
1 parent 358da56 commit 8317a39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down Expand Up @@ -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.



Expand Down
6 changes: 3 additions & 3 deletions skeletonizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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())

0 comments on commit 8317a39

Please sign in to comment.