Shape Completion
June 6, 2020 ยท View on GitHub
We present a simple yet effective deep learning approach for completing the input noisy and incomplete shapes or scenes. Our network is built upon the octree-based CNNs (O-CNN) with U-Net like structures and novel output-guided skip-connections.
Following the instructions below to conduct the shape completion experiment.
-
Generate the datasets for training. The data is originally provided by [Dai et al. 2017] and we convert the data to point clouds in the format of
ply, which can be visualized via viewers likemeshlab. Run the following command to download the point clouds used for training and testing.python data/completion.py --run generate_dataset -
Train the network. Change the working directory via
cd ./scriptand run the following command to train the network.python run_completion.py --config configs/completion_train.yamlTo train a pure autoencoder without the proposed output guided skip connections, run the following command.
python run_completion.py --config configs/completion_train.yaml \ MODEL.skip_connections False SOLVER.logdir logs/completion/ae -
Test the network. The testing dataset contains 12k partial scans, run the following command to test the trained model, and the output shapes in the format of
octreeare contained in the folderlogs/completion/skip_connections_test.python run_completion.py --config configs/completion_test.yamlTo test the autoencoder, run the following command, and the output shapes in the format of
octreeare contained in the folderlogs/completion/ae_test.python run_completion.py --config configs/completion_test.yaml \ MODEL.skip_connections False SOLVER.logdir logs/completion/ae_test \ SOLVER.ckpt logs/completion/ae/model/iter_320000.ckptWe also provide the pre-trained models, run the following command to have a quick test.
python run_completion.py --config configs/completion_test.yaml \ SOLVER.ckpt dataset/ocnn_completion/models/skip_connections/iter_320000.ckpt -
Get the completion results. Change the working directory via
cd ... Run the following command to convert the octree in the folderlogs/completion/skip_connections_testto point cloud in the format of points/ply in the folderscript/dataset/ocnn_completion/output.pointsandscript/dataset/ocnn_completion/output.ply.python data/completion.py --run rename_output_octree python data/completion.py --run convert_octree_to_points