Official code for :rocket: Unsupervised Change Detection of Extreme Events Using ML On-Board :rocket:

Overview

RaVAEn

Project sample The RaVÆn system
We introduce the RaVÆn system, a lightweight, unsupervised approach for change detection in satellite data based on Variational Auto-Encoders (VAEs) with the specific purpose of on-board deployment. It flags changed areas to prioritise for downlink, shortening the response time. We show that the proposed method outperforms pixel-wise baselines and we test it on resource-limited hardware. We also release the annotated dataset of extreme events. Work conducted at the FDL Europe 2021.

NeurIPS workshop papervideo from AI+HADR'21Quick Colab Example


Unsupervised Change Detection of Extreme Events Using ML On-Board

Flooding event example

Abstract: In this paper, we introduce RaVAEn, a lightweight, unsupervised approach for change detection in satellite data based on Variational Auto-Encoders (VAEs) with the specific purpose of on-board deployment. Applications such as disaster management enormously benefit from the rapid availability of satellite observations. Traditionally, data analysis is performed on the ground after all data is transferred - downlinked - to a ground station. Constraint on the downlink capabilities therefore affects any downstream application. In contrast, RaVAEn pre-processes the sampled data directly on the satellite and flags changed areas to prioritise for downlink, shortening the response time. We verified the efficacy of our system on a dataset composed of time series of catastrophic events - which we plan to release alongside this publication - demonstrating that RaVAEn outperforms pixel-wise baselines. Finally we tested our approach on resource-limited hardware for assessing computational and memory limitations.

Dataset

The full annotated dataset used for evaluation is hosted on Google Drive here. It contains 5 locations for each of the Landslide, Hurricane, Fire events and 4 locations for Floods events. For more details see the paper (we use the Sentinel-2 mission, level L1C data).

Map of the events

For dataset inspection use the prepared Colab Dataset Exploration demo .

Code examples

Install

# This will create a ravaen_env conda environment:
make requirements
conda activate ravaen_env
# Add these to open the prepared notebooks:
conda install nb_conda
jupyter notebook
# This will open an interactive notebook in your browser where you can navigate to the training or inference demo

Inference

To start using our model for inference, it's best to start with the prepared Colab Inference demo , which downloads our annotated dataset and evaluates a pre-trained model on a selected event type.

# Check possible parameters with:
!python3 -m scripts.evaluate_model --help 

# Example evaluation script used for the paper results for "small size" VAE model (remeber to adjust paths to the dataset and to the saved model checkpoints)
./bash/eval_run_papers_v3_VAE_128_D_small.sh

Training

For a fast demo on how to train these models on a custom folder of locations, check the Training demo as that presents an easy entry point to this repository. To reproduce the same training process as reported in the paper, you will need to download the whole WorldFloods dataset (see here) and prepare the same folder structure as we chose for the validation datasets.

# Check possible parameters with:
!python3 -m scripts.train_model --help

# Run the same training script used for the paper results for "small size" VAE model (remember to adjust the paths to the training datasets)
./bash/train_run_papers_v3_VAE_128_small_D.sh

Generality of the solution

Hurricane event example

Name "RaVAEn"

Our project is named after the two ravens in Norse mythology who are helping spirits of the god Odin and also highlights the usage of a Variational Auto-Encoder (VAE) as the main model:

Two ravens sit on his (Odin’s) shoulders and whisper all the news which they see and hear into his ear; they are called Huginn and Muninn. He sends them out in the morning to fly around the whole world, and by breakfast they are back again. Thus, he finds out many new things and this is why he is called ‘raven-god’ (hrafnaguð). (source)

Citation

If you find RaVAEn useful in your research, please consider citing the following paper:

@inproceedings{ravaen2021,
  title = {Unsupervised {Change} {Detection} of {Extreme} {Events} {Using} {ML} {On}-{Board}},
  url = {http://arxiv.org/abs/2111.02995},
  booktitle = {Artificial {Intelligence} for {Humanitarian} {Assistance} and {Disaster} {Response} {Workshop}, 35th {Conference} on {Neural} {Information} {Processing} {Systems} ({NeurIPS} 2021), {Vancouver}, {Canada}},
  author = {Růžička, Vít and Vaughan, Anna and De Martini, Daniele and Fulton, James and Salvatelli, Valentina and Bridges, Chris and Mateo-Garcia, Gonzalo and Zantedeschi, Valentina},
  month = nov,
  year = {2021},
  note = {arXiv: 2111.02995}
}
You might also like...
This is the code for our paper DAAIN: Detection of Anomalous and AdversarialInput using Normalizing Flows

Merantix-Labs: DAAIN This is the code for our paper DAAIN: Detection of Anomalous and Adversarial Input using Normalizing Flows which can be found at

Official implementation of Character Region Awareness for Text Detection (CRAFT)
Official implementation of Character Region Awareness for Text Detection (CRAFT)

CRAFT: Character-Region Awareness For Text detection Official Pytorch implementation of CRAFT text detector | Paper | Pretrained Model | Supplementary

Official PyTorch implementation for "Mixed supervision for surface-defect detection: from weakly to fully supervised learning"

Mixed supervision for surface-defect detection: from weakly to fully supervised learning [Computers in Industry 2021] Official PyTorch implementation

Source code of RRPN ---- Arbitrary-Oriented Scene Text Detection via Rotation Proposals

Paper source Arbitrary-Oriented Scene Text Detection via Rotation Proposals https://arxiv.org/abs/1703.01086 News We update RRPN in pytorch 1.0! View

Code for the paper STN-OCR: A single Neural Network for Text Detection and Text Recognition

STN-OCR: A single Neural Network for Text Detection and Text Recognition This repository contains the code for the paper: STN-OCR: A single Neural Net

The code for “Oriented RepPoints for Aerail Object Detection”
The code for “Oriented RepPoints for Aerail Object Detection”

Oriented RepPoints for Aerial Object Detection The code for the implementation of “Oriented RepPoints”, Under review. (arXiv preprint) Introduction Or

Text Detection from images using OpenCV

EAST Detector for Text Detection OpenCV’s EAST(Efficient and Accurate Scene Text Detection ) text detector is a deep learning model, based on a novel

color detection using python

colordetection color detection using python In this color detection Python project, we are going to build an application through which you can automat

An advanced 2D image manipulation with features such as edge detection and image segmentation built using OpenCV

OpenCV-ToothPaint3-Advanced-Digital-Image-Editor This application named ‘Tooth Paint’ version TP_2020.3 (64-bit) or version 3 was developed within a w

Comments
  • Running inference notebook locally

    Running inference notebook locally

    Hi,

    I am trying to run the inference notebook locally on jupyter notebook. At first I was experiencing problems with the creation of the environment from the env.yaml. I was able to find a solution to that problem.

    Now trying to run the inference notebook: In this section found code below:

    Code

    ===== Parameters to adjust ===== Note: adjust these to where you downloaded the datasets and the pretrained models

    event="floods" # change this accordingly to which dataset you downloaded ID = "/datasets" checkpoint="/pretrained/D_train_VAE_128small/3k0vhd2o/epoch_00-step_29653.ckpt" dataset_root_folder = "/datasets/" + event

    name="VAE_128small_DemoTest"

    ===== Parameters to keep the same ======

    evaluation="vae_paper" training="simple_vae" module="deeper_vae" plot_sequences="true"

    ========================================

    !python3 -m scripts.evaluate_model
    +dataset=floods_evaluation
    ++dataset.root_folder=$dataset_root_folder
    +training=$training
    +normalisation=log_scale
    +channels=high_res
    +module=$module
    +checkpoint=$checkpoint
    +project="FDL21_RaVAEn_model_128small"
    +evaluation=$evaluation
    ++evaluation.plot_sequences=$plot_sequences
    +name="{name}_{event}"
    +dataset.test_overlap=[0,0] module.model_cls_args.latent_dim=128 module.model_cls_args.extra_depth_on_scale=0 module.model_cls_args.hidden_channels=[16,32,64]
    ++evaluation.save_plots_locally=true
    training.num_workers=2 training.batch_size_train=64 training.batch_size_valid=64 training.batch_size_test=64

    # the last few args set the same architecture as the one we used when training
    # and some hw specs settings:
    #training.num_workers=2 training.batch_size_train=64 training.batch_size_valid=64 training.batch_size_test=64
    

    Error experienced:

    zsh:1: no matches found: +dataset.test_overlap=[0,0]

    Steps to reproduce the problem.

    Running inference notebook locally

    Operating system

    MacOS Ventura ; MacBook Pro M1 Pro - processor

    opened by PelopG 4
Owner
SpaceML
SpaceML
(CVPR 2021) ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection

ST3D Code release for the paper ST3D: Self-training for Unsupervised Domain Adaptation on 3D Object Detection, CVPR 2021 Authors: Jihan Yang*, Shaoshu

CVMI Lab 224 Dec 28, 2022
learn how to use Gesture Control to change the volume of a computer

Volume-Control-using-gesture In this project we are going to learn how to use Gesture Control to change the volume of a computer. We first look into h

Diwas Pandey 49 Sep 22, 2022
This project modify tensorflow object detection api code to predict oriented bounding boxes. It can be used for scene text detection.

This is an oriented object detector based on tensorflow object detection API. Most of the code is not changed except for those related to the need of

Dafang He 30 Oct 22, 2022
Morphological edge detection or object's boundary detection using erosion and dialation in OpenCV python

Morphologycal-edge-detection-using-erosion-and-dialation the task is to detect object boundary using erosion or dialation . Here, use the kernel or st

Tamzid hasan 3 Nov 25, 2022
A novel region proposal network for more general object detection ( including scene text detection ).

DeRPN: Taking a further step toward more general object detection DeRPN is a novel region proposal network which concentrates on improving the adaptiv

Deep Learning and Vision Computing Lab, SCUT 151 Dec 12, 2022
YOLOv5 in DOTA with CSL_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)

YOLOv5_DOTA_OBB YOLOv5 in DOTA_OBB dataset with CSL_label.(Oriented Object Detection) Datasets and pretrained checkpoint Datasets : DOTA Pretrained Ch

null 1.1k Dec 30, 2022
deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications

Automatic Weapon Detection Deployment of a hybrid model for automatic weapon detection/ anomaly detection for surveillance applications. Loved the pro

Janhavi 4 Mar 4, 2022
Shape Detection - It's a shape detection project with OpenCV and Python.

Shape Detection It's a shape detection project with OpenCV and Python. Setup pip install opencv-python for doing AI things. pip install simpleaudio fo

null 1 Nov 26, 2022
🔎 Like Chardet. 🚀 Package for encoding & language detection. Charset detection.

Charset Detection, for Everyone ?? The Real First Universal Charset Detector A library that helps you read text from an unknown charset encoding. Moti

TAHRI Ahmed R. 332 Dec 31, 2022
Hand Detection and Finger Detection on Live Feed

Hand-Detection-On-Live-Feed Hand Detection and Finger Detection on Live Feed Getting Started Install the dependencies $ git clone https://github.com/c

Chauhan Mahaveer 2 Jan 2, 2022