Skip to content

Latest commit

 

History

History

tensorflow_code

3D-MiniNet: Tensorflow Implementation

The original code is the one implemented in pytorch. This is just a port to tensorflow.

Requirements

The instructions have been tested on Ubuntu 16.04 with Python 3.6 and Tensorflow 1.13 with GPU support.

Download the SqueezeSeg dataset as explained here in Section "Dataset". Then, in make_tfrecord_pn.py line 29, set the variable "semantic_base" to the path of the SqueezeSeg dataset folder.

semantic_base = "/path/to/squeezeseg/dataset/"

Train and validate 3D-MiniNet

You can generate the training and validation TFRecords by running the following command:

python make_tfrecord_pn.py --config=config/3dmininet.cfg 

Once done, you can start training the model by running:

python train.py --config=config/3dmininet.cfg --gpu=0

You can set which GPU is being used by tuning the --gpu parameter.

While training, you can run the validation as following:

python test.py --config=config/3dmininet.cfg --gpu=1

This script will run the validation on each new checkpoint as soon as they are created, and will store the scores in a text file.

During training, the code will produce logs for Tensorboard, as specified in the configuration file (see after). You can run Tensorboard while training with the following command:

tensorboard --logdir=training_path/logs

Data Augmentation

The current data augmentation is enable. You can disable commenting this line. The data augmentation explained in the paper is for a 360º view LIDAR and this dataset is not. For this dataset other data augmentation was implemented see the data augmentation file. The data augmentation is specific for this dataset and dataset format so if you are using other dataset, do not use this one. Besides, the current daat augmentation is done in the 2D space (images), not on the 3D space (point cloud) which is preferable.