Skip to content

Repository to automatically deploy a JupyterLab instance on the Maastricht University DSRI Cluster

Notifications You must be signed in to change notification settings

Abeldewit/DSRI-SatClass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

174 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Satellite Crop Classification

Supporting code for the master thesis "Satellite Crop Classification" written by Abel de Wit


Introduction

This code is the support for the research performed in the master thesis "Satellite Crop Classification", written by Abel de Wit in combination with Capgemini.

In the research, different models and data-types are compared to benchmark the performance of the models. The models are trained on the PASTIS dataset, wich is a satellite dataset of satellite images containing annotated images for 18 different crop types.


Models used

The following models are used:


Replicate experiments

In order to replicate the results of the research, the code is used in the following way:

  • Install the dependencies using the command pip install -r requirements.txt
  • Run the code using the command python src/main.py
  • There are several options available to the user:
    • Data:

      • path (str): The path to the PASTIS Dataset
      • batch_size (int): Overwrite the batch size used (is also defined in src/experiments/experiments.json)
      • norm (bool): Whether to use normalise the images (default: True)
      • fold (int): The fold to train on, if None all folds will be used (default: None)
      • num_workers: The number of workers used for the DataLoader (default: 0)
    • Experiments:

      • begin (int): The index of the first experiment to run (default: 0)
      • end (int): The index of the last experiment to run (default: None)
      • model_only (str): The name of the model to run (default: '')
    • Pytorch Lightning trainer:

      • epochs (int): The number of epochs to train (default: 500)
      • accelerator (str): The name of the accelerator to use (default: 'cpu')
      • devices (int): The amount of devices available (in the case of GPU training)
      • fast_dev (bool/int): This is a flag to use to quickly debug the whole training process (default: False). See: Lightning Debugging
      • overfit_batches (int): This is a flag to use to see whether the model is able to overfit on a small subset of the data (default: 0). See: Overfit Batches
      • log_every_n_steps (int): When overfitting batches, the logging interval should be shortened if you want to make use of the logs (default: 50)
    • Deep learning options:

      • learning_rate: The learning rate used for the optimizer (default: 0.001)
      • patience: The patience used for the early stopping (default: 10)
      • min_delta: The minimum change in the validation loss before early stopping (default: 0.0)
      • monitor: The metric to monitor for early stopping and learning rate decay (default: 'metrics/val/loss')
      • monitor_mode: The mode to use for the early stopping and learning rate decay (default: 'min')

Example command when training UTAE on GPU: python src/main.py --path=./data/PASTIS --num_workers=8 --accelerator=gpu --devices=1 --model_only=UTAE


Folder structure

The folder structure is as follows:

  • gfx: The folder containing the graphics used in the report
  • notebooks: Notebooks used for data exploration and model evaluation
  • src: The folder containing the code
    • backbones: The folder containing the models that are tested:
      • UNet
      • UTAE
      • Vit
    • data: This folder is not included on github as it contains the PASTIS dataset
    • experiments: The folder containing the code to create the experiments.json file
    • utilities: Several helper functions such as downloading and visualising the dataset.

About

Repository to automatically deploy a JupyterLab instance on the Maastricht University DSRI Cluster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published