This repository contains the source code for the paper GRNet: Gridding Residual Network for Dense Point Cloud Completion.
@inproceedings{xie2020grnet,
title={GRNet: Gridding Residual Network for Dense Point Cloud Completion},
author={Xie, Haozhe and
Yao, Hongxun and
Zhou, Shangchen and
Mao, Jiageng and
Zhang, Shengping and
Sun, Wenxiu},
booktitle={ECCV},
year={2020}
}
We use the ShapeNet, Compeletion3D, and KITTI datasets in our experiments, which are available below:
The pretrained models on ShapeNet are available as follows:
git clone https://github.com/hzxie/GRNet.git
cd GRNet
pip install -r requirements.txt
NOTE: PyTorch >= 1.4, CUDA >= 9.0 and GCC >= 4.9 are required.
GRNET_HOME=`pwd`
# Chamfer Distance
cd $GRNET_HOME/extensions/chamfer_dist
python setup.py install --user
# Cubic Feature Sampling
cd $GRNET_HOME/extensions/cubic_feature_sampling
python setup.py install --user
# Gridding & Gridding Reverse
cd $GRNET_HOME/extensions/gridding
python setup.py install --user
# Gridding Loss
cd $GRNET_HOME/extensions/gridding_loss
python setup.py install --user
cd $GRNET_HOME/utils
python lmdb_serializer.py /path/to/shapenet/train.lmdb /path/to/output/shapenet/train
python lmdb_serializer.py /path/to/shapenet/valid.lmdb /path/to/output/shapenet/val
You can download the processed ShapeNet dataset here.
config.py
You need to update the file path of the datasets:
__C.DATASETS.COMPLETION3D.PARTIAL_POINTS_PATH = '/path/to/datasets/Completion3D/%s/partial/%s/%s.h5'
__C.DATASETS.COMPLETION3D.COMPLETE_POINTS_PATH = '/path/to/datasets/Completion3D/%s/gt/%s/%s.h5'
__C.DATASETS.SHAPENET.PARTIAL_POINTS_PATH = '/path/to/datasets/ShapeNet/ShapeNetCompletion/%s/partial/%s/%s/%02d.pcd'
__C.DATASETS.SHAPENET.COMPLETE_POINTS_PATH = '/path/to/datasets/ShapeNet/ShapeNetCompletion/%s/complete/%s/%s.pcd'
__C.DATASETS.KITTI.PARTIAL_POINTS_PATH = '/path/to/datasets/KITTI/cars/%s.pcd'
__C.DATASETS.KITTI.BOUNDING_BOX_FILE_PATH = '/path/to/datasets/KITTI/bboxes/%s.txt'
# Dataset Options: Completion3D, ShapeNet, ShapeNetCars, KITTI
__C.DATASET.TRAIN_DATASET = 'ShapeNet'
__C.DATASET.TEST_DATASET = 'ShapeNet'
To train GRNet, you can simply use the following command:
python3 runner.py
To test GRNet, you can use the following command:
python3 runner.py --test --weights=/path/to/pretrained/model.pth
This project is open sourced under MIT license.