Official implementation for
Rockfall Detection Using LiDAR and Deep Learning (Engineering Geology)
3D ML Rockfall Detection is a point cloud classification method with PointNet and PointNet++ models. The project aims at separating between rockfalls an other deformation clusters detected within rock slope change detection programs. Detailed applications of the models and analysis results on real rockfall monitoring cases are demonstrated in the associated research paper. The repository includes components of the TensorFlow 2 layers provided here and the TensorFlow operations provided here.
This project was tested with:
- Linux OS (Ubuntu 18.04)
- 64G RAM
- NVIDIA GeForce RTX 2070 8G
- CUDA 10.1
- conda 23.3.1
Simply run install.sh to install all dependencies in a new
conda environment named 3d-ml-rd.
# Creates a conda env named '3d-ml-rd' env and installs dependencies
./install.shThe training data for the models should represent individual deformation clusters resulted from point cloud based change detection after de-noising, clustering, and meshing. Details on the data generation workflow are provided here. When both rockfall and non_rockfall data are available in .off format and split into train, dev, test sets, copy them in the respective folders following the steps below:
- Create a folder called
data - In
data, create two folders namedrockfallandnon_rockfall - In each of the folders created in (2), create 3 folders named
train,dev, andtestand copy the.offfile there in
Now, you are ready to parse the data into TensorFlow records by executing:
python parser.py --num_points ####
where #### is the number of points to be sampled from the surface of each deformation cluster (default=500).
To train a model with the parsed data, simply run the train.py script with the following arguments:
- model: string data type that can be either
pointnet,pointnet++_ssg, orpointnet++_msg - epochs: integer defining the number of training epochs
- batch_size: intereger defining the size of each batch of data (default=16)
- num_points: integer defining the number of points sampled from each cluster's surface model and MUST be same with parser (default=500)
- bn: boolean defining whether batch normalization is applied (default=True)
- momentum: float defining the momentum in batch normalization (default=0.99)
- dropout: float defining the keep probabilify for dropout layers (default=0.3)
- lr: float defining the learning rate (default=0.001)
- logdir: directory to save the trained models in a folder called
logs(default=the selected model name)
Here is an example for training a PointNet++ model with Multi-Scale Grouping (MSG) for 100 epochs and the default settings:
python train.py --model pointnet++_msg --epochs 100The weights of every epoch are saved in the logs folder under the subfolder named by the logdir input argument (pointnet++_msg in the example above as it uses the defaults value).
The training logs can also be viewed by executing:
tensorboard --logdir=logsand navigate to http://localhost:6006/.
To evaluate the model on the test dataset, run the <evaluate.py script with the following arguments:
- model: string data type that can be either
pointnet,pointnet++_ssg, orpointnet++_msg - epoch: integer defining the epoch which's the trained weights will be used to make predictions
- batch_size: intereger defining the size of each batch of data (default=16)
- num_points: integer defining the number of points sampled from each cluster's surface model and MUST be same with parser (default=500)
- logdir: directory of the saved trained models in the folder called
logs(default=the selected model name)
Here is an example for evaluating the performance of the above PointNet++_MSG model on the 50th epoch:
python evaluate.py --model pointnet++_msg --epoch 50