/PC-NBV

PC-NBV: A Point Cloud Based Deep Network for Efficient Next Best View Planning, IROS, 2020

Primary LanguagePython

PC-NBV: A Point Cloud Based Deep Network for Efficient Next Best View Planning

Introduction

This repository is for our IROS 2020 paper "PC-NBV: A Point Cloud Based Deep Network for Efficient Next Best View Planning". The code is modified from pcn and PU-GAN.

Installation

This repository is based on Tensorflow and the TF operators from PointNet++. Therefore, you need to install tensorflow and compile the TF operators.

For installing tensorflow, please follow the official instructions in here. The code is tested under:

  • Tensorflow 1.12, Python 3.7, Ubuntu 16.04.
  • Tensorflow 1.15(with gpu), Python 3.6, Ubuntu 18.04.

For compiling TF operators, please check tf_xxx_compile.sh under each op subfolder in tf_ops folder. Note that you need to update nvcc, python and tensoflow include library if necessary.

Note

When running the code, if you have undefined symbol: _ZTIN10tensorflow8OpKernelE error, you need to compile the TF operators. If you have already added the -I$TF_INC/external/nsync/public -L$TF_LIB -ltensorflow_framework but still have cannot find -ltensorflow_framework error. Please use 'locate tensorflow_framework' to locate the tensorflow_framework library and make sure this path is in $TF_LIB.

Usage

  1. Setting up the Environment

    conda create -n "pc-nbv" python=3.6 ipython
    conda activate pc-nbv
    
    pip install -r requirements.txt
  2. Clone the repository:

    https://github.com/Smile2020/PC-NBV.git
    cd PC-NBV
  3. Compile the TF operators:

    Follow the above information to compile the TF operators.

  4. Generate the data:

    To generate your own data from ShapeNet, first Download ShapeNetCore.v1. Then, create partial point clouds from depth images (see instructions in render) and corresponding ground truths by sampling from CAD models (sample code).

    You can generate networks' inputs and supervision npy data using generate_nbv_data.py, then use lmdb_write_shapenet.py to make lmdb data.

  5. Train the model:

    python train.py 
  6. Evaluate the model:

    To test your trained model, you can run:

    python test.py --checkpoint model_path

Questions

Please contact 'zengr17@mails.tsinghua.edu.cn'