Point Cloud Compression with Sibling Context and Surface Priors
Zhili Chen, Zian Qian, Sukai Wang, Qifeng Chen
European Conference on Computer Vision (ECCV) 2022
This repository is an official implementation of "Point Cloud Compression with Sibling Context and Surface Priors" (PCC-S). This is the initial version of PCC-S and this repo will be keep updated.
conda create --name PCC-S python=3.8
conda activate PCC-S
sudo apt install build-essential python3-dev libopenblas-dev
conda install pytorch cudatoolkit -c pytorch
export CUDA_HOME=/usr/local/cuda-11.4; # or select the correct cuda version on your system.
git clone https://github.com/NVIDIA/MinkowskiEngine.git
cd MinkowskiEngine
python setup.py install --blas_include_dirs=${CONDA_PREFIX}/include --blas=openblas
# To the root of the project folder
cd ..
bash requirements.sh
git submodule add https://github.com/ThibaultGROUEIX/ChamferDistancePytorch
-
Download the LiDAR point cloud data from Kitti Odometry Dataset.
-
Set the absolute paths for variables
ROOT_dir
,KITTI_BIN_dir
, and folder name for variablePROCESSED_DATA_dir
for saving the preprocessed data inconfig_ent.yml
.-
ROOT_dir
: Absolute path to this repo. -
KITTI_BIN_dir
: Absolute path to KITTI point cloud sequence. -
PROCESSED_DATA_dir
: Folder name for saving the preprocessed data.
-
-
Preprocess data with the following command.
python util/preprocess_data.py --n_workers 16
- Train the entropy model. Set the relative path for variable of
CKPT_DIR
to save checkpoint inconfig_ent.yml
.
CUDA_VISIBLE_DEVICES='0,1' python PCCS.py
- Evaluate the compression performance. Set the folder name for variable
CKPT_DIR
to the trained checkpoint of the entropy model inconfig_ent.yml
or set aspretrained
to use the provided pretrained model.
CUDA_VISIBLE_DEVICES='0' python PCCS.py --is_validation
-
Set folder name for variable
pre_cache_feats_dir
inconfig_ent.yml
for saving the cached predicted information from the entropy model. Then run the following command.CUDA_VISIBLE_DEVICES='0' python PCCS.py --to_cache_par_feats
-
Train the refinement model. Set the folder name for variable
CKPT_DIR
to save checkpoint inconfig_refine.yml
.CUDA_VISIBLE_DEVICES='0,1' python refine.py
-
Evaluate the reconstruction performance. Set the folder name for variable
CKPT_DIR
to the trained checkpoint of the entropy model inconfig_refine.yml
or set aspretrained
to use the provided pretrained model.CUDA_VISIBLE_DEVICES='0' python refine.py --is_validation
- Encode and decode. Set
compress_save_dir
inconfig_ent.yml
for saving the encoded files and reconstructed point cloud in the form ofply
.
CUDA_VISIBLE_DEVICES='0' python Encode_Decode.py
If you find this project useful for your research, please consider citing:
@article{chen2022point,
title={Point Cloud Compression with Sibling Context and Surface Priors},
author={Chen, Zhili and Qian, Zian and Wang, Sukai and Chen, Qifeng},
journal={arXiv preprint arXiv:2205.00760},
year={2022}
}
Feel free to contact me if there is any question. (Zhili Chen, [email protected] )