https://github.com/prbonn/forest_inventory_pipeline
Pipeline for segmenting trees and estimating traits from LiDAR data.
https://github.com/prbonn/forest_inventory_pipeline
Last synced: about 1 year ago
JSON representation
Pipeline for segmenting trees and estimating traits from LiDAR data.
- Host: GitHub
- URL: https://github.com/prbonn/forest_inventory_pipeline
- Owner: PRBonn
- License: mit
- Created: 2024-02-21T10:26:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-03T08:08:16.000Z (about 2 years ago)
- Last Synced: 2024-05-04T00:37:17.567Z (about 2 years ago)
- Language: Python
- Size: 1.17 MB
- Stars: 12
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Tree Instance Segmentation and Traits Estimation for Forestry Environment Exploiting LiDAR Data Collected by Mobile Robots
## Setup
A docker image is provided and details are described in the [Docker](#docker) section below.
### Dependencies
This code has been developed and tested on Ubuntu 22.04 LTS using Python 3.10.
System dependencies:
- libegl1 libgl1 libgomp1 (required by Open3D)
```bash
sudo apt install libegl1 libgl1 libgomp1
```
- build-essential (Gives g++ make libc among others)
```bash
sudo apt install build-essential
```
CMake is not needed to build the package. This is handled by the python build system.
### forest_inventory_pipeline
After you clone the repository, installing it is a simple
```bash
pip install -v .
```
or
```bash
make [install] # install is the default target
```
### Docker
Please check the `docker/` folder.
A simple Dockerfile is provided that sets up the project in a base Ubuntu 22.04 image.
A `compose.yaml` file is provided for convenience as well.
This also has services to run some different experiments on data.
You can run a container with `forest_inventory_pipeline` setup by running the following from inside `docker/`
```bash
docker compose run fip
```
## Usage
The CLI entrypoint `fip` covers most of the relevant information needed to use the package.
Additionally, parameters are described and their default values are given in corresponding files under `config/`.
```bash
fip --help
fip instance --help
fip dbh --help
```
Example runs:
```bash
# relevant output of the following is an instance_segmented_cloud.ply
fip instance /data/input_cloud.ply --output /output -c config/instance.yaml
```
In case some stages have been run earlier, corresponding skip flags can be used.
```bash
# relevant output of the following is cylinders.pickle and tree_dbh.csv
fip dbh /data/input_cloud.ply --output output -c config/dbh.yaml --skip_gs --skip_norm --skip_cluster
```
If the `--output` flag is specified, only then do results get written to disk.
### Example Experiments
To test and use the approach, you can use the provided Docker image and some simple experiment scripts in `scripts/evaluation`.
These scripts need the data in a slightly specific format detailed further in their documentation (use `--help` when running the cli).
Please see the [DigiForests dataset](https://github.com/PRBonn/digiforests) for some forestry data you can run the approach on.
To run an instance segmentation experiment, `cd` into the `docker/` folder, modify the `compose.yaml` file to have the appropriate data mount, and then run:
```bash
docker compose run fip_instance
```
The results will get printed to the console.
To run a DBH estimation experiment, `cd` into the `docker/` folder and then run:
```bash
docker compose run fip_dbh
```
## Publication
If you use our code in your academic work, please cite the corresponding [paper](https://www.ipb.uni-bonn.de/pdfs/malladi2024icra.pdf):
```
@inproceedings{malladi2024icra,
author = {M.V.R. Malladi and T. Guadagnino and L. Lobefaro and M. Mattamala and H. Griess and J. Schweier and N. Chebrolu and M. Fallon and J. Behley and C. Stachniss},
title = {{Tree Instance Segmentation and Traits Estimation for Forestry Environments Exploiting LiDAR Data Collected by Mobile Robots}},
booktitle = icra,
year = 2024,
codeurl = {https://github.com/PRBonn/forest_inventory_pipeline}
}
```
## License
This project is free software made available under the MIT license. For details, see the [LICENSE](LICENSE) file.