Home

Awesome

Clouds-Segmentation-Project

AMS poster

Project Description:

The task is semantic segmentation of cloud satellite images. The dataset consists of IR & Visual Grayscale images of clouds with their corresponding masks. Each mask consists of 5 classes: Open clouds, Closed clouds, Disorganized clouds, Other clouds and Ocean (no clouds). The main objective is to be able to separate between Open clouds, Closed clouds and no clouds - so eventually this task is a 3 class semantic segmentation task. The available architectures are Pytorch's "DeepLabV3-ResNet101" and "Unet" and the number of output classes are 2/3/4/5.

Some results:

img_15

img_12

Reproducing results

Directory structure:

In order to run the available experiments in this project, one requires a specific directory structure: The main directory must contain:

Running experiments:

Running an experiment requires several arguments:

If we wish to run an experiment, we must pass a data directory in the specific structure describe above and an output directory. The rest of the arguments are optional and will take default values unless passed explicitly.

Example (using the command line from the project main directory):

python main.py data output --epochs 50 --batchsize 2 --num_classes 5 --using_unet 0 --train_all 1

After running this command the training process initiates, which during you will see loss and different metrics statistics. When the training ends, 2 files named 'weights.pt' and 'log.csv' will appear in your output directory - move 'weights.pt' to your 'weights' directory.

Visualizing results:

In order to visualize segmentation on training & test images, edit 'predict_all_data.py' file and do the following:

Now in your 'results' directory you can see all the train & test images; for each you can see the original image and mask, and the trained model segmentation of the image.

For a visualization of an end-to-end process please refer to the Visualization notebook.