Skip to content

buildseg is a building extraction plugin of QGIS based on PaddlePaddle.

Notifications You must be signed in to change notification settings

geoyee/buildseg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buildseg

Python 3.8 PaddlePaddle 2.2 QGIS 3.16.11

buildseg is a Building Extraction plugin for QGIS based on PaddlePaddle.

Note: This repo will not be updated, and relevant work and maintenance updates are in deepbands/buildseg.

fds

How to use

  1. Download and install QGIS and clone the repo :
git clone git@github.com:geoyee/buildseg.git
  1. Install requirements :

    • Enter the folder and install dependent libraries using OSGeo4W shell (Open As Administrator) :
    cd buildseg
    pip install -r requirements.txt
    • Or open OSGeo4W shell as administrator and enter :
    pip install opencv-python paddlepaddle>=2.2.0 paddleseg --user
  2. Copy folder named buildseg in QGIS configuration folder and choose the plugin from plugin manager in QGIS (If not appeared restart QGIS).

    • You can know this folder from QGIS Setting Menu at the top-left of QGIS UI Settings > User Profiles > Open Active Profile Folder .
    • Go to python/plugins then paste the buildseg folder.
    • Full path should be like : C:\Users\$USER\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\buildseg.
  3. Open QGIS, load your raster and select the parameter file (*.pdiparams) then click ok.

Model and Parameter

Model Backbone Resolution mIoU Params(MB) Inference Time(ms) Links
OCRNet HRNet_W18 512x512 90.64% 46.4 / Static Weight
  • Train/Eval Dataset : Link.
  • We have done all testing and development using : Tesla V100 32G in AI Studio.

TODO

  • Extract building on 512x512 remote sensing images.
  • Extract building on big remote sensing images through splitting it into small tiles, extract buildings then mosaic it back (merge) to a full extent.
  • Replace the model and parameters (large-scale data).
  • Convert to static weight (*.pdiparams) instead of dynamic model (*.pdparams).
  • Add a Jupyter Notebook (*.ipynb) about how to fine-tune parameters using other's datasets based on PaddleSeg.
  • Hole digging inside the polygons.
  • Convert raster to Shapefile/GeoJson by GDAL/OGR (gdal.Polygonize) instead of findContours in OpenCV.
  • Update plugin's UI :
    • Add menu to select one raster file from QGIS opened raster layers.
    • Select the Parameter path one time (some buggy windows appear when importing the *.pdiparams file).
    • Define the output path of the vector file (Direct Path or Temporary in the memory).
  • Accelerate, etc.
  • Add another model, like Vision Transform.