Logo Lanfrica

sbackmann/rwanda-segmentation

Domain:

geospatial

Record type:

software
Creator:
sba
Host:
An instance segmenation approach on a Rwandan Tree dataset based on OpenMMLab's MMDetection # Detection and Segmentation of Tree Instances on a Rwandan Satellite Dataset ## Introduction Rwanda-Instance provides the code for the Bachelor Thesis _Detection and Segmentation of Tree Instances on a Rwandan Satellite Dataset_. It uses MMDetection 2.25.0, an open source object detection toolbox based on PyTorch. The code that was added in the course of this thesis can be found in the folder ``TreeSegmentation-Rwanda``. The directory MMDetection contains the MMDetection model library, parts of its code were modified to better work with the project. Additionally, the folder ``cocoapi`` is a modified version (e.g., an increased number of detections for AP calculation) of github.com. ## Installation **Step 1:** Install PyTorch 1.10 with the PyTorch CUDA version matching the compiling CUDA version. E.g., for CUDA 11.1: ```shell pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f download.pytorch.org ``` **Step 2:** Install MMCV using MIM (it might be necessary to restart the shell after installing openmim, so that the mim command is recognized). ```shell pip install -U openmim mim install mmcv-full==1.5.0 ``` **Step 3:** Clone repository and install MMDetection. ```shell git clone github.com cd rwanda-segmentation pip install -v -e MMDetection pip install cocoapi/PythonAPI ``` ## Getting Started After finishing the installation steps, the satellite images and the annotations should be pasted into the respective folders (``TreeSegmentation-Rwanda/data/Training_Images_RGB`` for the images and ``TreeSegmentation-Rwanda/data/Training_tree_polygons`` for the annotation files including the ``.shp`` file). Within the ``TreeSegmentation-Rwanda`` folder, two notebooks are available. ``Training.ipynb`` enables to reproduce the training that led to the models evaluated in the thesis. ``Testing.ipynb`` lets the user inference with the trained model we …