Official code release for the paper:
Geometric-Prior Guided Segmentation of UAV LiDAR Point Clouds for Retrieving Clear Bole Height and Crown Architecture of Rubber Trees in Dense Rubber Plantations
GRTreeNet is a deep-learning framework for part-level segmentation of individual rubber-tree UAV LiDAR point clouds. The released implementation focuses on three semantic parts, crown, trunk, and ground clutter, and supports the model settings used in the paper.
GTAP: Geometric Template-Enhanced Analytic PriorCCF: Cooperative-Competitive FusionPTSP: Physics-inspired Transmittance and Sky-View Prior
This repository is a compact official release centered on the core training code, model definition, and released configurations:
examples/rubber_tree_partseg/main.py: main training and evaluation entrypointopenpoints/: model, dataset, and runtime code required by the releasecfgs/default.yaml: baseline configurationcfgs/GRTreeNet.yaml: full GRTreeNet configurationrequirements.txt: Python dependency listLICENSE: open-source license
The in-house rubber-tree UAV LiDAR dataset is not included due to data-management restrictions. Users may prepare their own point-cloud data in the following format.
The released code expects a dataset root such as data/YOUR_DATASET/ with a ShapeNetPart-style layout:
data/YOUR_DATASET/
├── synsetoffset2category.txt
└── <category_folder>/
├── sample_0001.txt
├── sample_0002.txt
└── ...
synsetoffset2category.txtshould map category names to folder names.- Each sample is stored as a
.txtfile. - Each row should contain at least
x y z nx ny nz label. - The loader uses the first 6 columns as point coordinates and normals, and the last column as the point-wise part label.
- In the GRTreeNet setting, each sample is interpreted as containing:
pos: point coordinates, shape[N, 3]x: input features, including coordinates / normals / height featuresy: point-wise labels
The semantic labels are:
| Label | Class |
|---|---|
| 0 | Crown |
| 1 | Trunk |
| 2 | Ground clutter |
This initial release includes the source code, model definitions, configuration files, and the main training/evaluation entrypoint of GRTreeNet.
The in-house rubber-tree UAV LiDAR dataset and pretrained model weights are not included in this repository. The main reason is that both the dataset distribution and the corresponding trained weights are currently constrained by data-management and project-policy restrictions. Since the released weights are tied to internally managed data assets, we do not redistribute them in this initial public version.
Install dependencies:
pip install -r requirements.txtTrain the full model:
python examples/rubber_tree_partseg/main.py --cfg cfgs/GRTreeNet.yamlTrain the baseline:
python examples/rubber_tree_partseg/main.py --cfg cfgs/default.yamlEvaluate from a checkpoint:
python examples/rubber_tree_partseg/main.py --cfg cfgs/GRTreeNet.yaml mode val pretrained_path /path/to/checkpoint.pthThe released configurations are set up for 5-fold cross-validation. The active fold is controlled in the config files through:
cross_validation:
enabled: True
num_folds: 5
fold: 0To run a different fold, change fold in cfgs/default.yaml or cfgs/GRTreeNet.yaml from 0 to one of 1, 2, 3, 4.
If you use this project, please cite the corresponding GRTreeNet paper.