Repository of work submitted to RRPR 2020:
Tree Defect Segmentation usingGeometric Features and CNN
the run of the methods can be done without any installation with this online demonstration here
This repository allow users to segment wood log surface defects on meshs. First, we compute a relief map based on height and circumference of the log. Then, segmentation is done on the relief map by our trained CNN model. Finally, segmentation result is send on mesh. Below, there is a pipeline of the project :
The program uses some C++ 14 feature, so we recommend the use of gcc 4.7 or later to compile. The program requires these libraries to be installed (we add instruction to install for ubuntu and debian users):
DGtal version 1.0.0 or later, see [DGtal installation] (https://github.com/DGtal-team/DGtal/blob/master/README.md)
sudo apt install libeigen3-dev
sudo apt install libgsl-dev
sudo apt install libpcl-dev
Morover if you want to use our trained CNN model to make segmentation, you need theses dependencies to be installed (virtual environnement is recommanded):
tensorflow2.2, see [TensorFlow installation] (https://www.tensorflow.org/install/pip)
tensorflow-addons, see [TensorFlow addons installation] (https://www.tensorflow.org/addons/overview)
openCV for python, see [OpenCV installation] (https://pypi.org/project/opencv-python/)
mkdir build
cd build
cmake .. -DDGtal_DIR=/path/to/DGtal
make
Download using torrent files in your favourite torrent client :
models-ipol.torrent : download pre-trained models
examples-ipol.torrent : download meshes and groundtruth id points
direct download for meshes and groundtruth :
https://floriandelconte.github.io/data_TLDC/data_ipol/examples.tar.gz
Generate a relief map (for example PathToMesh can be : ../examples/INRAE1b/Alder1.off ) :
./segunroll -i *PathToMesh* -n
Generate all relief map from all mesh in an directory (for example PathToMeshDirectory can be : ../examples/INRAE1a/) :
cd mesures/
./makeAllRm.sh *PathToMeshDirectory*
Reproduct result exposed in RRPR article :
cd mesures/
./testINRAE1A.sh
./testK_folds.sh