/robosat.pink

Semantic Segmentation ecosystem for GeoSpatial Imagery

Primary LanguagePythonMIT LicenseMIT

RoboSat.pink

Semantic Segmentation for GeoSpatial imagery

RoboSat.pink buildings segmentation from Imagery

Purposes:

  • DataSet Quality Analysis
  • Change Detection highlighter
  • Features extraction and completion

Main Features:

  • Provides several command line tools, you can combine together to build your own workflow
  • Follows geospatial standards to ease interoperability and data preparation
  • Build-in cutting edge Computer Vision model and loss implementations (and allows to replace by your owns)
  • Support either RGB or multibands imagery (as multispectral or hyperspectral)
  • Allows Data Fusion (from imagery or rasterized vectors)
  • Web-UI tools to easily display, hilight or select results
  • High performances, PyTorch based, and native multi GPUs support

News:

Documentation:

Tutorials:

Config file:

Tools:

  • rsp compare Compute composite images and/or metrics to compare several XYZ dirs.
  • rsp cover Generate a tiles covering, in csv format: X,Y,Z
  • rsp download Downloads tiles from a remote server (XYZ, WMS, or TMS)
  • rsp extract Extracts GeoJSON features from OpenStreetMap .pbf
  • rsp predict Predict masks, from given inputs and an already trained model
  • rsp rasterize Rasterize vector geospatial features (GeoJSON or PostGIS), to raster tiles
  • rsp subset Filter images in a slippy map dir using a csv tiles cover
  • rsp tile Tile a raster
  • rsp train Trains a model on a dataset
  • rsp vectorize Extract simplified GeoJSON features from segmentation masks

Presentations slides:

Install:

With PIP

pip3 install RoboSat.pink

With Conda (using a virtual env)

conda create -n robosat_pink python=3.6
conda activate robosat_pink
pip install robosat.pink

Developper install (editable)

git clone https://github.com/datapink/robosat.pink
pip3 -e ./robosat.pink

Install from scratch:

Ubuntu 18.04:

sudo sh -c "apt update && apt install -y build-essential python3-pip"
pip3 install RoboSat.pink && export PATH=$PATH:~/.local/bin

CentOS 7:

sudo sh -c "yum -y update && yum install -y python36 wget && python3.6 -m ensurepip"
pip3 install --user RoboSat.pink

Add Nvidia GPU drivers:

wget http://us.download.nvidia.com/XFree86/Linux-x86_64/418.43/NVIDIA-Linux-x86_64-418.43.run 
sudo sh NVIDIA-Linux-x86_64-418.43.run -a -q --ui=none

NOTAS:

  • To test RoboSat.pink install, launch in a terminal: rsp -h
  • Upon your pip PATH setting, you could have to update it: export PATH=$PATH:.local/bin
  • To use the development version: pip3 install git+https://github.com/datapink/robosat.pink
  • Requires: Python 3.6 or later, and Nvidia GPU with at least 6Go RAM.

WorkFlows:

Data Preparation

  • Training and validation datasets have to be tiled, using XYZ tiles format.
  • A Dataset directory, so containing XYZ tiles, can be split as:
dataset
├── training
│   ├── images
│   └── labels
└── validation
    ├── images
    └── labels
  • Tiles images formats could be either: JPEG, WEBP, GeoTIFF, PNG.
  • Tiles labels are expected to be PNG with single band and indexed palette.
  • Tools producing XYZ tiles directory as output, also allows to easily generate a web map client, for visual inspection.
  • Following schema, show several paths to create your own training dataset from several kinds of input data.

Data Preparation

NOTA: several inputs connected to a single arrow point means a logical OR (e.g. WMS or XYZ or TMS).

Training

Training

Architecture:

Stacks

RoboSat.pink use cherry-picked Open Source libs among Deep Learning, Computer Vision and GIS stacks.

Related resources:

Bibliography:

Contributions and Services:

  • Pull Requests are welcome ! Feel free to send code... Don't hesitate either to initiate a prior discussion throught tickets on any implementation question.

  • If you want to collaborate through code production and maintenance on a long term basis, please get in touch, co-edition with an ad hoc governance can be considered.

  • If you want a new feature, but don't want to implement it, DataPink provide core-dev services.

  • Expertise and training on RoboSat.pink are also provided by DataPink.

  • And if you want to support the whole project, because it means for your own business, funding is also welcome.

Authors: