SALaD (Semi-Automatic Landslide Detection) is a landslide mapping system

Related tags

Image ProcessingSALaD
Overview

SALaD

SALaD (Semi-Automatic Landslide Detection) is a landslide mapping system. SALaD utilizes Object-based Image Analysis and Random Forest to map landslides. It requires optical imagery, a DEM, corner coordinates of a training area, and manually mapped landslides within the training area. The code is built to run primarily on a Linux.

Installation

  1. Install Singularity

User can find thorough instruction for installation of Singularity >=3.0.0 on different operating systems (Linux, Windows or Mac) here: https://sylabs.io/guides/3.0/user-guide/installation.html

  1. Build a Singularity container from Singularity definition file

Singularity definition files can be used as the target when building a container. Assuming user has the definition file called SALaD.def (see below), the container (named ilab-salad.sif) can be built with the command:

$ sudo singularity build ilab-salad.sif SALaD.def

For more details, check:
https://sylabs.io/guides/3.0/user-guide/build_a_container.html

If you don’t have root access on a Linux machine or want to host your container on the cloud, you can build the container on the Remote Builder: https://cloud.sylabs.io/builder

Executing SALaD from a container

singularity run -B < path_to_singularity_container>/ilab-salad.sif python /driver.py -i "image.tif" -d "srtm.tif" -l "manual_landslide.shp" -lx 308335 -ly 3114295 -rx 312440 -ry 3109225 -rmi 2 -rma 32 -s 2 -p " " -op " " -r "landslide_SALaD.shp"

Example definition file (SALaD.def)

Bootstrap: docker
FROM: nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04


%labels
    Author Remi Cresson 
   
    
    Version v1.0.0


%help
========================================================================
        - Orfeo Toolbox (without Tensor Flow)
========================================================================


%environment
    # ------------------------------------------------------------------
    # Add important environment variables
    # ------------------------------------------------------------------
    export PATH="$PATH:/work/otb/superbuild_install/bin/"
    export PYTHONPATH="/work/otb/superbuild_install/lib/otb/python:$PYTHONPATH"
    export OTB_APPLICATION_PATH="/work/otb/superbuild_install/lib/otb/applications"
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/work/otb/superbuild_install/lib/:/work/tf/installdir/lib/"
    # set PYTHONPATH for access to OTB application
    export PYTHONPATH="/usr/local/otb/src/innovation-lab:$PYTHONPATH"


%post
apt-get update -y \
 && apt-get upgrade -y \
 && apt-get install -y --no-install-recommends \
        git


    # retrieve OTB source from git repository and open permissions
    mkdir -p /usr/local/otb
    git clone --single-branch --branch otb-container https://github.com/nasa-nccs-hpda/innovation-lab.git /usr/local/otb
    chmod a+rwx -R /usr/local/otb


apt-get update -y \
 && apt-get upgrade -y \
 && apt-get install -y --no-install-recommends \
        sudo \
        ca-certificates \
        curl \
        make \
        cmake \
        g++ \
        gcc \
        git \
        libtool \
        swig \
        xvfb \
        wget \
        autoconf \
        automake \
        pkg-config \
        zip \
        zlib1g-dev \
        unzip \
 && rm -rf /var/lib/apt/lists/*


# ---------------------------------------------------------------------------
# OTB and TensorFlow dependencies
# ---------------------------------------------------------------------------
apt-get update -y \
 && apt-get upgrade -y \
 && apt-get install -y --no-install-recommends \
        freeglut3-dev \
        libboost-date-time-dev \
        libboost-filesystem-dev \
        libboost-graph-dev \
        libboost-program-options-dev \
        libboost-system-dev \
        libboost-thread-dev \
        libcurl4-gnutls-dev \
        libexpat1-dev \
        libfftw3-dev \
        libgdal-dev \
        libgeotiff-dev \
        libglew-dev \
        libglfw3-dev \
        libgsl-dev \
        libinsighttoolkit4-dev \
        libkml-dev \
        libmuparser-dev \
        libmuparserx-dev \
        libopencv-core-dev \
        libopencv-ml-dev \
        libopenthreads-dev \
        libossim-dev \
        libpng-dev \
        libqt5opengl5-dev \
        libqwt-qt5-dev \
        libsvm-dev \
        libtinyxml-dev \
        qtbase5-dev \
        qttools5-dev \
        default-jdk \
        python3-pip \
        python3.6-dev \
        python3.6-gdal \
        python3-setuptools \
        libxmu-dev \
        libxi-dev \
        qttools5-dev-tools \
        bison \
        software-properties-common \
        dirmngr \
        apt-transport-https \
        lsb-release \
        gdal-bin \
 && rm -rf /var/lib/apt/lists/*


# ---------------------------------------------------------------------------
# Python packages
# ---------------------------------------------------------------------------
ln -s /usr/bin/python3 /usr/bin/python \
 && python3 -m pip install --upgrade pip \
 && python3 -m pip install pip six numpy wheel mock keras future


# ---------------------------------------------------------------------------
# Build OTB: Stage 1 (clone)
# ---------------------------------------------------------------------------
mkdir -p /work/otb \
 && cd /work/otb \
 && git clone https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb.git otb \
 && cd otb \
 && git checkout release-7.0


# ---------------------------------------------------------------------------
# Build OTB: Stage 2 (superbuild)
# ---------------------------------------------------------------------------
mkdir -p /work/otb/build \
 && cd /work/otb/build \
 && cmake /work/otb/otb/SuperBuild \
        -DUSE_SYSTEM_BOOST=ON \
        -DUSE_SYSTEM_CURL=ON \
        -DUSE_SYSTEM_EXPAT=ON \
        -DUSE_SYSTEM_FFTW=ON \
        -DUSE_SYSTEM_FREETYPE=ON \
        -DUSE_SYSTEM_GDAL=ON \
        -DUSE_SYSTEM_GEOS=ON \
        -DUSE_SYSTEM_GEOTIFF=ON \
        -DUSE_SYSTEM_GLEW=ON \
        -DUSE_SYSTEM_GLFW=ON \
        -DUSE_SYSTEM_GLUT=ON \
        -DUSE_SYSTEM_GSL=ON \
        -DUSE_SYSTEM_ITK=ON \
        -DUSE_SYSTEM_LIBKML=ON \
        -DUSE_SYSTEM_LIBSVM=ON \
        -DUSE_SYSTEM_MUPARSER=ON \
        -DUSE_SYSTEM_MUPARSERX=ON \
        -DUSE_SYSTEM_OPENCV=ON \
        -DUSE_SYSTEM_OPENTHREADS=ON \
        -DUSE_SYSTEM_OSSIM=ON \
        -DUSE_SYSTEM_PNG=ON \
        -DUSE_SYSTEM_QT5=ON \
        -DUSE_SYSTEM_QWT=ON \
        -DUSE_SYSTEM_TINYXML=ON \
        -DUSE_SYSTEM_ZLIB=ON \
        -DUSE_SYSTEM_SWIG=OFF \
        -DOTB_WRAP_PYTHON=OFF \
 && make -j $(grep -c ^processor /proc/cpuinfo)


# ---------------------------------------------------------------------------
# Build OTB: Stage 3 (bindings)
# ---------------------------------------------------------------------------
cd /work/otb/otb/Modules/Remote \
 && git clone https://github.com/remicres/otbtf.git \
 && cd /work/otb/build/OTB/build \
 && cmake /work/otb/otb \
        -DOTB_WRAP_PYTHON=ON \
        -DPYTHON_EXECUTABLE=/usr/bin/python3.6 \
        -Dopencv_INCLUDE_DIR=/usr/include \
        -DModule_OTBTensorflow=ON \
        -DOTB_USE_TENSORFLOW=OFF \
        -DTENSORFLOW_CC_LIB=/work/tf/installdir/lib/libtensorflow_cc.so \
        -DTENSORFLOW_FRAMEWORK_LIB=/work/tf/installdir/lib/libtensorflow_framework.so \
        -Dtensorflow_include_dir=/work/tf/installdir/include/ \
 && cd /work/otb/build/ \
 && make -j $(grep -c ^processor /proc/cpuinfo)




# ---------------------------------------------------------------------------
# Install Packages and Retrieve Source Code
# ---------------------------------------------------------------------------
    pip3 install --upgrade richdem==0.3.4
    pip3 install --upgrade fiona==1.8.13
    pip3 install --upgrade geopandas==0.7.0
    pip3 install --upgrade numba==0.49.1
    pip3 install --upgrade pandas==1.0.3
    pip3 install --upgrade peakutils==1.3.3
    pip3 install --upgrade rasterstats==0.14.0
    pip3 install --upgrade scikit-learn==0.21.3


# Below added 7/15/21


     sudo apt-get update
     sudo apt-get install -y libspatialindex-dev


     pip3 install Pysal==1.14.4 
     pip3 install rtree==0.8.3 

   
Owner
NASA
Read about NASA's Open Data initiative here: https://www.nasa.gov/open/ & Members Find Instructions here: http://nasa.github.io/
NASA
An python script to convert images to upscaled versions made out of one-colour emojis.

ABOUT This is an python script to convert png, jpg and gif(output isnt animated :( ) images to scaled versions made out of one-colour emojis. Please n

0 Oct 19, 2022
HCaptcha solver using requests and an image recognition package!

HCaptcha solver using requests and an image recognition package! Report Bug · Request Feature Features Image recognition Requests base

dropout 6 Oct 22, 2021
Panel Competition Image Generator

Panel Competition Image Generator This project was build by a member of the NFH community and is open for everyone who wants to try it. Relevant links

Juliano Mendieta 1 Oct 22, 2021
将位图转为彩色矢量 svg 图片

一个将位图描摹为彩色矢量 svg 图片的程序,是一个命令行工具,使用 Python 脚本实现,运行环境 Python3.8+。 ✨ 效果 以一个字帖图片为例,这是 png 格式的位图(370KB): 这是颜

Haujet Zhao 104 Dec 30, 2022
Seaborn-image is a Python image visualization library based on matplotlib and provides a high-level API to draw attractive and informative images quickly and effectively.

seaborn-image: image data visualization Description Seaborn-image is a Python image visualization library based on matplotlib and provides a high-leve

48 Jan 05, 2023
Multiparametric Image Analysis

Documentation The documentation is available on populse_mia's website here Installation From PyPI, for users By cloning the package, for developers Fr

Populse 9 Dec 14, 2022
Generate different types of random avatars.

avatar-generator Generate different types of random avatars. Requirements Python3 pytorch=1.6 cv2=3.4 tqdm 1. Github-like avatars python generate_gi

Ming 11 Apr 02, 2022
Python pygame project that turns your images to matrix rain

Matrix-Rain-An-Image This project implements the classic Matrix digital rain effect in python with pygame to build up an image provided with multiple

7 Dec 11, 2022
🖼️ Draw Images or GIFs in your terminal

Drawitor Draw Images/GIFs in your terminal. Install pip install drawitor CLI Tool drawitor cat_dancing.gif Library The library is written in a simple

Eliaz Bobadilla 7 Dec 15, 2022
This will help to read QR codes using Raspberry Pi and Pi Camera

Raspberry-Pi-Generate-and-Read-QR-code This will help to read QR codes using Raspberry Pi and Pi Camera Install the required libraries first in your T

Raspberry_Pi Pakistan 2 Nov 06, 2021
Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures.

WADs Out For [The] Ladies Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures. Development mostly focused on L

5 Apr 09, 2022
Image-Viewer is a Windows image viewer based on Python 3.

Image-Viewer Hi! Image-Viewer is a Windows image viewer based on Python 3. Using You must download Image-Viewer.exe from the root of the repository. T

2 Apr 18, 2022
The coolest python qrcode maker for small businesses.

QR.ify The coolest python qrcode maker for small businesses. Author Zach Yusuf Project description Python final project. Built to test python skills P

zachystuff 2 Jan 14, 2022
A linear stairs generation add-on for Blender

Linear Stairs Generator Table of Contents Installation Usage Screenshots Important Notes Requirements Blender 3.0 or newer. Installation: Download a z

Elhanan Flesch 4 May 17, 2022
python app to turn a photograph into a cartoon

Draw This. Draw This is a polaroid camera that draws cartoons. You point, and shoot - and out pops a cartoon; the camera's best interpretation of what

Dan Macnish 2k Dec 19, 2022
Image2scan - a python program that can be applied on an image in order to get a scan of it back

image2scan Purpose image2scan is a python program that can be applied on an image in order to get a scan of it back. For this purpose, it searches for

Kushal Shingote 2 Feb 13, 2022
Simple Python image processing & automatization project for a simple web based game

What is this? Simple Python image processing & automatization project for a simple web based game Made using only Github Copilot (except the color and

SGeri 2 Aug 15, 2022
HtmlWebShot - A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features.

A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features

Danish 24 Dec 14, 2022
DP2 graph edit codes.

必要なソフト・パッケージ Python3 Numpy JSON Matplotlib 動作確認環境 MacBook Air M1 Python 3.8.2 (arm64) Numpy 1.22.0 Matplotlib 3.5.1 JSON 2.0.9 使い方 draw_time_histgram(

1 Feb 19, 2022
Manipulate EXIF and IFD metadata.

Tyf Copyright Distribution Support this project Buy Ѧ and: Send Ѧ to AUahWfkfr5J4tYakugRbfow7RWVTK35GPW Vote arky on Ark blockchain and earn Ѧ weekly

16 Jan 21, 2022