Skip to content
/ GRNet Public

The official implementation of "GRNet: Gridding Residual Network for Dense Point Cloud Completion". (Xie et al., ECCV 2020)


Notifications You must be signed in to change notification settings


Repository files navigation


This repository contains the source code for the paper GRNet: Gridding Residual Network for Dense Point Cloud Completion.

codebeat badge


Cite this work

  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},


We use the ShapeNet, Compeletion3D, and KITTI datasets in our experiments, which are available below:

Pretrained Models

The pretrained models on ShapeNet are available as follows:


Clone the Code Repository

git clone

Install Python Denpendencies

cd GRNet
pip install -r requirements.txt

Build PyTorch Extensions

NOTE: PyTorch >= 1.4, CUDA >= 9.0 and GCC >= 4.9 are required.


# Chamfer Distance
cd $GRNET_HOME/extensions/chamfer_dist
python install --user

# Cubic Feature Sampling
cd $GRNET_HOME/extensions/cubic_feature_sampling
python install --user

# Gridding & Gridding Reverse
cd $GRNET_HOME/extensions/gridding
python install --user

# Gridding Loss
cd $GRNET_HOME/extensions/gridding_loss
python install --user

Preprocess the ShapeNet dataset

cd $GRNET_HOME/utils
python /path/to/shapenet/train.lmdb /path/to/output/shapenet/train
python /path/to/shapenet/valid.lmdb /path/to/output/shapenet/val

You can download the processed ShapeNet dataset here.

Update Settings in

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'

Get Started

To train GRNet, you can simply use the following command:


To test GRNet, you can use the following command:

python3 --test --weights=/path/to/pretrained/model.pth


This project is open sourced under MIT license.