Skip to content

aloui-mathias/ecoTeka-deepforest-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo for ecoTeka DeepForest

This project is a demonstration of DeepForest (https://github.com/weecology/DeepForest) capabilities with IGN Orthoimagery. The goal is to show the potential of DeepForest for tree detection in urban area with aerial images from the open and free IGN data.

Linked projects

This project use a custom script to access the IGN data base :

https://github.com/aloui-mathias/pyqgis_IGN_WMTS

An API is developped to use DeepForest inside larger project :

https://gitlab.com/natural-solutions/ecoteka-deepforest

The goal of this project is to be a demonstration for the tree detection part of the ecoTeka project :

https://gitlab.com/natural-solutions/ecoteka

Installation

To use this script, you need the python version of QGIS available with anaconda.

# Creation of the conda environment
conda env create -f environment.yml

Usage

You can print the script usage with the command :

python script/main.py --help

Geojson Input

The script use a geojson input from overpass-turbo.eu with a request like :

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“park”
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “park”
  node["leisure"="park"]({{bbox}});
  way["leisure"="park"]({{bbox}});
  relation["leisure"="park"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

Output

  • one .json with the coordinates of the polygon projected on the image.

  • two .tiff with the image from the IGN with and without the predictions

  • two .pgn which are the compressed version of the .tiff

  • one .csv with the predictions projected on the image

If you have multiple features (with the previous request multiple parks), the script will run on each feature and you will have these 5 files for each feature and also a .gejson with only the selected feature.

Example

You can run the example in docs :

# Command to run the script
python script/main.py --example

# High resolution is vailable for the example
python script/main.py --example --high-resolution

The files in docs are the results of the above command and here is the .png :

Figure_1

Video

ecoteka-deepforest-demo-video.mp4

Development known issues

  • The Qt application in QGIS can have troubles depending on your display settings. If you have an error with :

    qt.qpa.plugin: could not load the qt platform plugin "xcb" in "" even though it was found.
    

    You need to set your environment variable QT_QPA_PLATFORM to an available plugin for your setup. The plugin "offscreen" is available for all os :

    conda env config vars set QT_QPA_PLATFORM=offscreen
    
  • If you ave an error file not found for the default geojson file, check :

    • That you are inside "ecoteka-deepforest-demo/" folder
    • That you have placed an "export.geojson" from overpass-turbo.eu (like the one in docs) inside "ecoteka-deepforest-demo/data/" folder

TODO

  • The predictions are also converted back to the initial coodinates system
  • The predictions are converted into points
  • The points are also converted back to the initial coodinates system

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages