KPConv-PyTorch/doc/slam_segmentation_guide.md

49 lines
2.4 KiB
Markdown
Raw Normal View History

2020-04-27 23:06:34 +00:00
2020-04-27 23:21:01 +00:00
## Scene Segmentation on SemanticKitti
2020-04-27 23:06:34 +00:00
### Data
We consider our experiment folder is located at `XXXX/Experiments/KPConv-PyTorch`. And we use a common Data folder
loacated at `XXXX/Data`. Therefore the relative path to the Data folder is `../../Data`.
SemanticKitti dataset can be downloaded <a href="http://semantic-kitti.org/dataset.html#download">here (80 GB)</a>.
Download the three file named:
2020-04-27 23:14:30 +00:00
* [`data_odometry_velodyne.zip` (80 GB)](http://www.cvlibs.net/download.php?file=data_odometry_velodyne.zip)
* [`data_odometry_calib.zip` (1 MB)](http://www.cvlibs.net/download.php?file=data_odometry_calib.zip)
* [`data_odometry_labels.zip` (179 MB)](http://semantic-kitti.org/assets/data_odometry_labels.zip)
2020-04-27 23:06:34 +00:00
2020-04-27 23:14:30 +00:00
uncompress the data and move it to `../../Data/SemanticKitti`.
2020-04-27 23:06:34 +00:00
2020-04-27 23:21:01 +00:00
You also need to download the files
[`semantic-kitti-all.yaml`](https://github.com/PRBonn/semantic-kitti-api/blob/master/config/semantic-kitti-all.yaml)
and
[`semantic-kitti.yaml`](https://github.com/PRBonn/semantic-kitti-api/blob/master/config/semantic-kitti.yaml).
Place them in your `../../Data/SemanticKitti` folder.
2020-04-27 23:06:34 +00:00
N.B. If you want to place your data anywhere else, you just have to change the variable
2020-04-27 23:21:01 +00:00
`self.path` of `SemanticKittiDataset` class ([here](https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/c32e6ce94ed34a3dd9584f98d8dc0be02535dfb4/datasets/SemanticKitti.py#L65)).
2020-04-27 23:06:34 +00:00
### Training
Simply run the following script to start the training:
2020-04-27 23:21:01 +00:00
python3 training_SemanticKitti.py
2020-04-27 23:06:34 +00:00
2020-04-27 23:21:01 +00:00
Similarly to ModelNet40 training, the parameters can be modified in a configuration subclass called `SemanticKittiConfig`, and the first run of this script might take some time to precompute dataset structures.
2020-04-27 23:06:34 +00:00
### Plot a logged training
When you start a new training, it is saved in a `results` folder. A dated log folder will be created, containing many information including loss values, validation metrics, model checkpoints, etc.
In `plot_convergence.py`, you will find detailed comments explaining how to choose which training log you want to plot. Follow them and then run the script :
python3 plot_convergence.py
### Test the trained model
The test script is the same for all models (segmentation or classification). In `test_any_model.py`, you will find detailed comments explaining how to choose which logged trained model you want to test. Follow them and then run the script :
python3 test_any_model.py