Home

Awesome

Tree species segmentation and classification algorithm for SwissimageRS 2018 (Swisstopo)

Created by Raffael Bienz

The example orthophoto (test_area.tif) was kindly provided by Federal Office of Topography swisstopo (©swisstopo).

The other example data was kindly provided by the Kanton of Aargau.

Algorithms

Two different neural networks are used: One for the segmentation of the tree crowns and one for the classification of the segmented crowns by tree species.

Tree crown segmentation

Tree crown classification

Usage

Clone repository and download data

git clone https://github.com/RaffiBienz/arborizer.git

Download example data and put it in the data folder: https://drive.google.com/file/d/1VJGAITIG_-k09earWOdKSjAnBkIJNyoO/view?usp=sharing

Download parameters for the neural networks and put the two folders in the src folder: https://drive.google.com/file/d/1KNfZpznJMOB9c8DNh1U-JT9gnzEsU3dw/view?usp=sharing

Setup Python

Example setup with Anaconda

Open Anaconda Powershell Prompt and type:

conda create -y -n arborizer python==3.6.7
conda activate arborizer
pip install -r .\requirements.txt

Open config_template.R, save as config.R and add the path to the conda environment in config.R. Typically: C:/Users/USERNAME/.conda/envs/arborizer/python.exe

Setup R

Docker

Alternatively to the above setup you can also use the Dockerfile provided.

Required data

Execute script

Performance

Segmentation achieved a mean average precision of 30.9 on the validation dataset. Evergreen trees are not detected as well as deciduous trees. This may be due to the relatively small crowns of evergreen trees. Regaring deciduous trees, the algorithm has the tendency to conjoin the crowns of multiple trees.

Classification achieved an accuracy of 86 % on the validation dataset. However, the algorithm works better for evergreen trees than for deciduous trees.

Change Log

Update January 2023

The model was improved as follows: