Repo containing the code to run pose estimation to detect whorls in individual tree point clouds according to the method described in Puliti, Fischer, and Astrup (2024).
This is a continuation of the work done by Puliti et al.(2023) on whorl detection for coniferous trees. In this second version we replaced the bounding box detector model with a pose estimation model aimed at detecting the geometry of each whorl (see image below), with branches on the left side of the tree (๐ต), the whorl in the center in correspondence of the tree trunk (๐ ), and branches on the right side of the tree (๐ข).
To install, first clone the repo
git clone https://github.com/stefp/BranchPoseNet
Create and activate a new conda environment
conda create -n BranchPoseNet python
conda activate BranchPoseNet
Then install the required libraries
cd whorl_pose_detector
pip install -r requirements.txt
In the 'data' folder You can find a demo dataset showing how the data should look like. The *.las or *.laz file should include a treeID and semantic column. These instance and semantic labels can be obtained for example using ForAINet or SegmentAnyTree.
For predicting on your own data just point the --dir_root to the path to the folder where the point cloud data is stored.
python whorl_pose_detect_CLI.py --dir_root data --my_model whorl_pose_nano_1000px/weights/best.pt --alpha 0.5 --min_internodal_d 0.3 --tree_id_label treeID --semantic_label semantic
The 'demo_predict_whorl_pose' notebook aims to provide a more detailed understanding of the different steps of the method, including some nice plots
