Home

Awesome

GitHub license Binder pre-commit.ci status

DetecTree example

Example computational workflows to classify tree/non-tree pixels in Zurich using DetecTree.

Citation

Bosch M. 2020. “DetecTree: Tree detection from aerial imagery in Python”. Journal of Open Source Software, 5(50), 2172. doi.org/10.21105/joss.02172

Notebooks

The notebooks are stored in the notebooks folder. If you have trouble reproducing them, see the "Instructions to reproduce" section below.

Pre-trained model

Training

Example use case:

Overview of the train/test split methods:

Background

Instructions to reproduce

The materials of this repository make use of a set of external libraries, which are listed in the environment.yml file. The easiest way to install such dependencies is by means of a conda environment:

  1. Clone the repository and change directory to the repository's root:
git clone https://github.com/martibosch/detectree-examples
cd detectree-examples
  1. Create the environment (this requires conda/mamba) and activate it:
# you can also use mamba
conda env create -f environment.yml
# the above command creates a conda environment named `detectree`
conda activate detectree
  1. Register the IPython kernel of the detectree environment
python -m ipykernel install --user --name detectree --display-name "Python (detectree)"

You might now run a jupyter server (e.g., running the command jupyter notebook) and execute the notebooks of this repository.

Makefile workflow

Some of the tasks of DetecTree's computational flow (e.g., computing image descriptors, training the classifiers...) can be computationally expensive. While Jupyter notebooks are a great medium to overview DetecTree's features, they are less convenient when it comes to managing complex computational workflows. In view of such shortcoming, this repository also includes a Makefile implementation of the computational workflow, which ensures the correct execution of the workflow and caches expensive intermediate results so that the workflow can be efficiently resumed at any point.

Acknowledgments

References

  1. Yang, L., Wu, X., Praun, E., & Ma, X. (2009). Tree detection from aerial imagery. In Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems (pp. 131-137). ACM.