Skip to content

philippmwirth/Predicting-Rain-from-Satellite-Images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Predicting Rain from Satellite Images

How to train a neural network to predict precipitation based on satellite images pulled from the Meteomatics API.

Usage

Download Data

In order to download data from the Meteomatics API, you need to have a user and password. Then, you can simply use the download.py script:

usage: download.py [-h] [--data DATA] user pwd

This script will download a single input/output pair for each of the three predefined regions (Central Europe, North America, and Mexico) at the current timestamp. In order to use this data for training, it needs to be processed first, see Process Data.

Process Data

To process the data, use

usage: convert.py [-h] [--mode MODE] [--data DATA] region

where --data is the path to the data downloaded above and region is one of central_europe, north_america, or mexico. If you want to mask out all convective or stratiform areas, use modes stratiform or convective respectively.

Train

To train a model on the downloaded data, use the following commands:

cd Pytorch-ENet
python main.py \
    --save-dir ./save/ \
    --dataset meteomatics \
    --dataset-dir PATH/TO/YOUR/DATASET \
    --with-unlabeled \
    --weighing mfb
cd ..

Test

To test a model, use:

cd Pytorch-ENet
python main.py \
    -m test  \
    --save-dir ./save/ \
    --dataset meteomatics \
    --dataset-dir PATH/TO/YOUR/DATASET \
    --with-unlabeled \
    --imshow-batch
cd ..

Links

About

Code for the TDS article "Predicting Rain from Satellite Images"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages