All Projects → jackkwok → neural-road-inspector

jackkwok / neural-road-inspector

Licence: MIT License
After a hurricane, roads are often flooded or washed out, making them treacherous for motorists. Using state of the art deep learning methods, I attempted to automatically annotate flooded, washed out, or otherwise severely damaged roads. My goal is create a tool that can help detect and visualize anomalous roads in a simple user interface.

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects
HTML
75241 projects

Projects that are alternatives of or similar to neural-road-inspector

trends.earth
trends.earth - measure land change
Stars: ✭ 69 (+86.49%)
Mutual labels:  remote-sensing
rsMove
Remote Sensing for Movement Ecology
Stars: ✭ 25 (-32.43%)
Mutual labels:  remote-sensing
moveVis
An R package providing tools to visualize movement data (e.g. from GPS tracking) and temporal changes of environmental data (e.g. from remote sensing) by creating video animations.
Stars: ✭ 104 (+181.08%)
Mutual labels:  remote-sensing
dea-coastlines
Extracting tidally-constrained annual shorelines and robust rates of coastal change from freely available Earth observation data at continental scale
Stars: ✭ 24 (-35.14%)
Mutual labels:  remote-sensing
LoveDA
[NeurIPS2021 Poster] LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation
Stars: ✭ 111 (+200%)
Mutual labels:  remote-sensing
GGHL
This is the implementation of GGHL (A General Gaussian Heatmap Label Assignment for Arbitrary-Oriented Object Detection)
Stars: ✭ 309 (+735.14%)
Mutual labels:  remote-sensing
pytorch-psetae
PyTorch implementation of the model presented in "Satellite Image Time Series Classification with Pixel-Set Encoders and Temporal Self-Attention"
Stars: ✭ 117 (+216.22%)
Mutual labels:  remote-sensing
FDCNN
The implementation of FDCNN in paper - A Feature Difference Convolutional Neural Network-Based Change Detection Method
Stars: ✭ 54 (+45.95%)
Mutual labels:  remote-sensing
ExtendedMorphologicalProfiles
Remote sensed hyperspectral image classification with Spectral-Spatial information provided by the Extended Morphological Profiles
Stars: ✭ 32 (-13.51%)
Mutual labels:  remote-sensing
biodivMapR
biodivMapR: an R package for α- and β-diversity mapping using remotely-sensed images
Stars: ✭ 18 (-51.35%)
Mutual labels:  remote-sensing
CRC4Docker
Python scripts for the textbook "Image Analysis, Classification and Change Detection in Remote Sensing, Fourth Revised Edition"
Stars: ✭ 84 (+127.03%)
Mutual labels:  remote-sensing
ChangeDetectionRepository
This repository contains some python code of some traditional change detection methods or provides their original websites, such as SFA, MAD, and some deep learning-based change detection methods, such as SiamCRNN, DSFA, and some FCN-based methods.
Stars: ✭ 311 (+740.54%)
Mutual labels:  remote-sensing
massive-change-detection
QGIS 2 plugin for applying change detection algorithms on high resolution satellite imagery
Stars: ✭ 18 (-51.35%)
Mutual labels:  remote-sensing
DSMSCN
[MultiTemp 2019] Official Tensorflow implementation for Change Detection in Multi-temporal VHR Images Based on Deep Siamese Multi-scale Convolutional Neural Networks.
Stars: ✭ 63 (+70.27%)
Mutual labels:  remote-sensing
remote-sensing-workshops
2017 workshop content for http://wenfo.org/wald/advanced-remote-sensing
Stars: ✭ 23 (-37.84%)
Mutual labels:  remote-sensing
spectral
Awesome Spectral Indices for the Google Earth Engine JavaScript API (Code Editor).
Stars: ✭ 68 (+83.78%)
Mutual labels:  remote-sensing
land-cover-to-land-use-classification
Satellite image processing pipeline to classify land-cover and land-use
Stars: ✭ 64 (+72.97%)
Mutual labels:  remote-sensing
open-impact
To help quickstart impact work with Satellogic [hyperspectral] data
Stars: ✭ 21 (-43.24%)
Mutual labels:  remote-sensing
Landsat578
Very simple API to download Landsat [1-5, 7, 8] data from Google
Stars: ✭ 54 (+45.95%)
Mutual labels:  remote-sensing
modape
MODIS Assimilation and Processing Engine
Stars: ✭ 19 (-48.65%)
Mutual labels:  remote-sensing

Motivation

Devastating hurricanes are occurring with higher frequency due to global climate change. After a hurricane, roads are often flooded or washed out, making them treacherous for motorists.

Using state of the art deep learning methods, I attempted to automatically annotate flooded, washed out, or otherwise severely damaged roads. My goal is create a tool that can help detect and visualize anomalous roads in a simple user interface.

For details, please read Blog

Getting Started

Prerequisites

Code written for Python 2.7. Minor modification may be necessary for use with Python 3.

To install required Python libs, in your shell, run:

pip install -r requirements.txt

Training Data

My model is trained purely with retina (512x512) satellite imagery and corresponding street map images from MapBox API but this code will accept training images of other sizes or other sources. Because I do not own the training images, no training data is copied here. Consider signing up for a MapBox account to get an access token. Please observe the licensing terms of any image you use for training.

I chose to train images from zoom level 16 (Open Street Map Slippy Map Format). It is recommended to use training images from zoom 16 or above.

Training the Road Segmentation Neural Network Model

Once you have training data, you are ready to train the model.

For an in-depth technical discussion of the model, please see blog post.

Command to train the model:

python RoadSegmentor.py [config file]

You must provide a config file containing file paths to the training datasets along with neural network training hyper-parameters. See cfg/default.cfg for an example.

You must also supply a plaintext file listing satellite image relative filepath under column label 'img'. See data/tile_log.csv for an example.

With a Nvidia Quadro P5000 GPU (16MB GPU RAM), training with a batch size of 16 took about 5 hours on a dataset with about 9000 images.

Generating Road Segmentation Tiles

For road change detection, you will need to generate 2 sets of road segmentations: pre-hurricane and post-hurricane.

Post Hurricane satellite imagery (in GeoTiff format) can be downloaded via the DigitalGlobe Open Data Program. For convenience, you can use data/tiffDownloader.py to download a set of geotiff files. The script takes in a text file containing a list of http urls on separate lines.

In a data pre-processing step, GDAL2Tiles can be used to cut the GeoTiff files into standard OSM square tiles (use matching zoom level as the training set).

Command line tool:

python roadSegmentationMaskGen.py [satellite_images_dir] [output_dir] [keras_model_filepath]

Note: If you use my pre-trained Keras/Tensorflow model, input images must be sized 512x512.

Generating Annotated Map Tiles

After both the pre-hurricane segmentation tiles and post-hurricane segemntation tiles have been generated, the next step is generating the difference.

This project comes with a command line tool that generates a pyramid hierarchy of annotated map tiles following the same hierarchy structure of the input directories.

python postprocessing/anomalyMapGen.py [pre_event_segment_dir] [post_event_segment_dir] [street_map_dir] [output_dir]

Demo

Demo

License

Code: MIT License

Road Segmentation Weight File: CC-BY-SA

Map Artifacts: CC-BY-SA

Disclaimer

This project should be used for research purposes only. Further testing and improvement is needed for use in the field.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].