For those who need to train the model on their own dataset, here is our voxelization process.
-
Download and compile this mesh voxelization library, and put the executable file
voxelizeunder this directory. -
Organize the PartNet mesh data as follows, e.g.,
Bed/ 45/ # shape id 00.obj # part mesh, possibly not watertight 01.obj ... 04.obj ... 10967/ 00.obj 01.obj ... 16.obj ...
It's important to name each obj file as
xx.obj(xx being the index of part) as it is required when running voxelization. -
Convert .obj to .off and scale the shapes from
[-1, 1]^3to[0, 64]^3.python obj2off_scaled.py -i Bed -o Bed_off
-
Run voxelization.
run_voxelize.sh. This will voxelize each shape folder (containing part.objfiles) into a single h5 file (containting voxels of dimension(n_parts, 64, 64, 64)).bash run_voxelize.sh Bed_off Bed_off_h5 0 64
-
Run post-processing. This will post-process the above h5 files, e.g. fill inside voxels and scale each individual part to a
$64^3$ canonical space.bash run_postprocess.sh Bed_off_h5 Bed_off_h5_post
After the program finishes,
Bed_off_h5_postwill contain h5 data that can be used for training.