Plane segmentation pipeline with spherical projection
Download Semantic Kitti dataset. You will need sequence 00.
Download EVOPS plane labels for Semantic Kitti dataset.
Put velodyne and labels as well as evops labels renamed to plane_labels into one directory. In the end the directory with data should look like this.
├── labels
│ └── 000000.label
├── plane_labels
│ └── label-000000.npy
└── velodyne
└── 000000.bin
You can find an example in examples/data/kitti/00
.
The next step is running data preprocessing script. This can be done with the preprocessing.py
script.
It takes the following parameters:
--dataset
path to your dataset folder--dataset_len
length of your dataset--save_path
path to store ready to use data
By default, preprocessing applies ransac filtering and considers road labels as planes. However, you can change that.
--no_ransac
turns off ransac filtering--no_road
road labels will not be considered as planes--visualise_ransac
ransac filtering steps will be visualised
An example of preprocessing script run, applied to the data in examples directory:
python3 preprocessing.py --dataset examples/data/kitti/00/ --save_path examples/data/dataset_ready/ --dataset_len 1
A train run is configured with a config file in a .yaml
format. You can find an example in
runs_configs directory. If you wish to train the network with your own parameters create a copy of an existing run
and change the parameters you like.
This project uses wandb for logging data during train. In order to use it too you need:
- Log into your wandb account
- Set
use_wandb
to True in config - Fill in
wandb_project
with your project name In case you don't want to use wandb train pipline will log with the help of console.
In order to run train successfully you also need to fill the following variables in config:
dataset_dir
- the path to your prepared datasetcheckpoint_save_path
- the path where to store your network checkpoints
After the run is configured you can run train with run_network.py
.
This script takes only one required parameter - path to your config file. Here is an example:
python3 run_network --config runs_configs/exp1_basic.yaml
The results can be visualized with visualise_prediction.py
. It takes the following parameters.
--chpt
path to your network checkpoint--dataset
path to the dataset you used to train your network--config
path to the config you used for network training
--device
by default the network prediction is run on cpu for visualizing results on any device. You can change this.--step
you can skip similar frames of the dataset configuring step. Default value is 5.--iterations
number of samples you wish to visualise. Default is 1.
An example of visualising script run will produce 3 visualisations (15 samples with step 5) :
python3 visualise_prediction.py --chpt exp_2_basic_unet_ransac_14 --dataset dataset/kitti/prep/ransac_01 --iterations 15