pointtree
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.0%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: ai4trees
- License: mit
- Language: Python
- Default Branch: main
- Size: 1.28 MB
Statistics
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 1
Metadata Files
README.md

A Python Package for Tree Instance Segmentation in 3D Point Clouds.
The package contains implementation of the following tree instance segmentation algorithms:
- TreeXAlgorithm
- CoarseToFineAlgorithm
It contains the official source code of the paper "Burmeister, Josafat-Mattias, et al. "Tree Instance Segmentation in Urban 3D Point Clouds Using a Coarse-to-Fine Algorithm Based on Semantic Segmentation." ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences 10 (2024): 79-86.
Package Documentation
The documentation of our package is available here.
Project Setup
The setup of our package is described in the documentation.
How To Use the Package
The TreeXAlgorithm segments individual tree instances from point clouds of forest areas. It assumes that the input point cloud contains only terrain and vegetation points. If your data includes other objects (e.g., man-made structures), the algorithm can still be applied, but its accuracy may be reduced.
1. Creating an Algorithm Instance
To get started, create an instance of the TreeXAlgorithm class. All parameters have default values, but you can override them by passing keyword arguments to the constructor. For a complete list of parameters and their descriptions, see the documentation.
```python from pointtree.instance_segmentation import TreeXAlgorithm
Optional: specify a folder for saving visualizations of intermediate results
Note: generating visualizations slows down processing and is recommended only for small datasets
visualization_folder = "./visualizations" # or set to None to disable
algorithm = TreeXAlgorithm(visualizationfolder=visualizationfolder) ```
2. Using Presets
We provide presets tailored to typical point cloud characteristics from different laser scanning modalities: terrestrial (TLS), and UAV-borne (ULS). These presets simplify setup for common use cases.
```python from pointtree.instance_segmentation import TreeXPresetTLS, TreeXPresetULS
preset = TreeXPresetTLS() # or use TreeXPresetULS() algorithm = TreeXAlgorithm(**preset) ```
3. Running the Algorithm
The algorithm requires a numpy array of shape (n_points, 3) as input, containing the xyz-coordinates of the point cloud. If available, you can also pass reflection intensity values which may improve segmentation accuracy.
The algorithm returns a tuple of three numpy arrays:
- instance IDs: an array of instance labels (points that belong to the same tree have the same ID, points not belonging to any tree have the ID -1),
- trunk positions: 2D coordinates of the detected tree trunks at breast height
- trunk diameters: diameters of the detected trunks at breast height.
```python from pointtorch import read
Load your point cloud (supports .txt, .csv, .las, .laz, .ply)
filepath = "./demo.laz" pointcloud = read(file_path)
Run the algorithm
instanceids, trunkpositions, trunkdiameters = algorithm( pointcloud[["x", "y", "z"]].tonumpy(), intensities=pointcloud["intensity"].tonumpy(), pointcloud_id="test-point-cloud", # Optional: Used for naming visualization / intermediate outputs crs="EPSG:4326" # Optional: Used for georeferencing intermediate outputs )
Add results to the point cloud and save to a new file
pointcloud["instanceid"] = instanceids pointcloud.to("./demosegmented.laz", columns=["x", "y", "z", "instanceid"]) ```
How to Cite
If you use our code, please consider citing our paper:
@article{Burmeister_Tree_Instance_Segmentation_2024,
author = {Burmeister, Josafat-Mattias and Richter, Rico and Reder, Stefan and Mund, Jan-Peter and Döllner, Jürgen},
doi = {10.5194/isprs-annals-X-4-W5-2024-79-2024},
journal = {ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences},
pages = {79--86},
title = {{Tree Instance Segmentation in Urban 3D Point Clouds Using a Coarse-to-Fine Algorithm Based on Semantic Segmentation}},
volume = {X-4/W5-2024},
year = {2024}
}
Owner
- Name: ai4trees
- Login: ai4trees
- Kind: organization
- Repositories: 1
- Profile: https://github.com/ai4trees
Citation (citation.cff)
preferred-citation:
type: article
authors:
- family-names: "Burmeister"
given-names: "Josafat-Mattias"
orcid: "https://orcid.org/0000-0003-1890-844X"
- family-names: "Richter"
given-names: "Rico"
orcid: "https://orcid.org/0000-0001-5523-3694"
- family-names: "Reder"
given-names: "Stefan"
orcid: "https://orcid.org/0000-0002-2899-6191"
- family-names: "Mund"
given-names: "Jan-Peter"
orcid: "https://orcid.org/0000-0002-4878-5519"
- family-names: "Döllner"
given-names: "Jürgen"
orcid: "https://orcid.org/0000-0002-8981-8583"
doi: "10.5194/isprs-annals-X-4-W5-2024-79-2024"
journal: "ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences"
start: 79 # First page number
end: 86 # Last page number
title: "Tree Instance Segmentation in Urban 3D Point Clouds Using a Coarse-to-Fine Algorithm Based on Semantic Segmentation"
volume: X-4/W5-2024
year: 2024
GitHub Events
Total
- Release event: 2
- Watch event: 4
- Delete event: 103
- Issue comment event: 97
- Push event: 664
- Pull request event: 183
- Create event: 96
Last Year
- Release event: 2
- Watch event: 4
- Delete event: 103
- Issue comment event: 97
- Push event: 664
- Pull request event: 183
- Create event: 96
Packages
- Total packages: 1
-
Total downloads:
- pypi 29 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: pointtree
A Python Package for Tree Instance Segmentation in 3D Point Clouds.
- Homepage: https://github.com/ai4trees/pointtree
- Documentation: https://ai4trees.github.io/pointtree/
- License: MIT License Copyright (c) 2024 Josafat-Mattias Burmeister Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 0.1.0
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- AutoModality/action-clean v1.1.0 composite
- actions/checkout v4 composite
- AutoModality/action-clean v1.1.0 composite
- actions/checkout v4 composite
- actions/checkout v4 composite
- actions/configure-pages v5 composite
- actions/deploy-pages v4 composite
- actions/upload-pages-artifact v3 composite
- numba *
- numba-kdtree *
- numpy *
- pandas *
- pyclesperanto-prototype *
- scikit-image *
- scipy *
- actions/checkout v4 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite