GIS-data and deep learning

drone_detector was originally a python package for automatic deadwood detection or segmentation from RGB UAV imagery. It contains functions and helpers to use various GIS data with fastai and detectron2.

Installation

Installing locally

Installing the required packages is fairly tricky, because some of them are easiest to install via conda (geopandas and GDAL), some via pip (pytorch) and for detectron2 it is ofrequired to specify which prebuilt package to use.

Repository contains two installation scripts, one for development environment which contains packages that are often needed and other for generating the deploy-environment.

Install miniconda and run bash -i install_dev_env.sh for dev environment and bash -i install_run_env.sh for deploy-env. Both scripts install all dependencies, create an editable install for this package and test all relevant code aside from examples.

Running with Apptainer/Singularity

Use provided dronecontainer.def definition file to build Singularity container. Follow instructions on https://cloud.sylabs.io/builder and build the image with

singularity build --remote dronecontainer.sif dronecontainer.def

CLI Usage

fastai

predict_segmentation_fastai runs pretrained U-Net model for larger image. So far we support only models saved with learner.export().

Detectron2

predict_bboxes_detectron2 and predict_instance_masks_detectron2 can be used to run batch-predictions on new images.

Citations

Publications using this repository

Other people’s work applied in this repository

This repository contains parts from