Example computational workflows to classify tree/non-tree pixels in Zurich using DetecTree.
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
The notebooks are stored in the notebooks
folder. If you have trouble reproducing them, see the "Instructions to reproduce" section below.
Example use case:
Overview of the train/test split methods:
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:
git clone https://github.com/martibosch/detectree-examples
cd detectree-examples
# you can also use mamba
conda env create -f environment.yml
# the above command creates a conda environment named `detectree`
conda activate detectree
detectree
environmentpython -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.
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.