Cylinder3D Documentation

repository·master·Indexed 21 days ago

https://github.com/xinge008/cylinder3d

Cylinder3D implements Cylindrical and Asymmetrical 3D Convolution Networks for high-performance LiDAR semantic segmentation. The library supports training and evaluation on the SemanticKITTI and nuScenes datasets, providing tools for data preparation, model training via shell scripts, and a demo for performing semantic segmentation on folders of LiDAR scans.

Tokens
673
Snippets
2
Records
8
Agent score
26%

What's inside Cylinder3D

  1. Prepare nuScenes data for training

    master

    Organize your nuScenes data according to the following directory structure. The path_to_data_shown_in_config must match the path specified in your configuration file.

    path_to_data_shown_in_config/
    ├── v1.0-trainval
    ├── v1.0-test
    ├── samples
    ├── sweeps
    └── maps
  2. Workflow for training on nuScenes dataset

    master

    Follow these three steps to prepare and run training for the nuScenes dataset:

    1. Pre-processing: Prepare the nuscenes_info files (nuscenes_infos_train.pkl, nuscenes_infos_val.pkl, and nuscenes_infos_test.pkl). You can follow the SECOND data pre-processing method or download the pre-generated files from the provided links.
    2. Custom Configuration: Update the paths in your configuration files to match your local environment and settings.
    3. Execution: Run the training script using the provided shell script.
    bash train_nusc.sh
  3. Train the Cylinder3D network on SemanticKITTI

    master

    To train the model on the SemanticKITTI dataset:

    1. Modify config/semantickitti.yaml with your custom settings and data paths.
    2. Execute the training script using the provided shell script.
    sh train.sh
  4. Prepare SemanticKITTI data for training

    master

    Organize your SemanticKITTI data according to the following directory structure. The path_to_data_shown_in_config must match the path specified in your configuration file.

    path_to_data_shown_in_config/
    ├── sequences
    │   ├── 00/
    │   │   ├── velodyne/
    │   │   │   ├── 000000.bin
    │   │   │   └── ...
    │   │   └── labels/
    │   │       ├── 000000.label
    │   │       └── ...
    │   ├── 08/ # validation
    │   ├── 11/ # testing (11-21)
    │   └── ...
  5. Install Cylinder3D and its requirements

    master

    To use Cylinder3D, ensure you have the following dependencies installed:

    • PyTorch: version >= 1.2
    • yaml
    • Cython
    • torch-scatter
    • spconv: tested with spconv==1.2.1 and cuda==10.2
    • nuScenes-devkit: (Optional, only required if working with the nuScenes dataset)
  6. Run semantic segmentation demo on a folder of LiDAR scans

    master

    Use demo_folder.py to perform semantic segmentation on a directory of LiDAR scans.

    Basic usage:

    python demo_folder.py --demo-folder YOUR_FOLDER --save-folder YOUR_SAVE_FOLDER

    Usage with labels (for validation): If you want to validate against your own dataset, provide the label folder using the --demo-label-folder flag.

    python demo_folder.py --demo-folder YOUR_FOLDER --save-folder YOUR_SAVE_FOLDER --demo-label-folder YOUR_LABEL_FOLDER