Skip to content

gomezzz/DistMSMatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DistMsMatch

Distributed Semi-Supervised Multispectral Scene Classification with Few Labels

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. FAQ
  5. Contact

About The Project

This is the code to realize DistMSMatch, a distributed version of MSMatch. The repository includes an implementation of FixMatch for the semi-supervised training of different convolutional neural networks, including a U-Net Encoder, EfficientNet and EfficientNet Lite to perform scene classification on the EuroSAT dataset. The code builds on and extends the FixMatch-pytorch implementation based on PyTorch.

Built With

Getting Started

This is a brief example of setting up DistMSMatch.

Prerequisites

We recommend using conda to set-up your environment. This will also automatically set up CUDA and the cudatoolkit for you, enabling the use of GPUs for training, which is recommended.

  • conda, which will take care of all requirements for you. For a detailed list of required packages, please refer to the conda environment file.

Installation

  1. Get miniconda or similar
  2. Clone the repo
    git clone https://github.com/gomezzz/DistMSMatch
  3. Setup the environment. This will create a conda environment called distmsmatch
    conda env create -f environment.yml

Set up datasets

To launch the training on EuroSAT (rgb), it is necessary to download the corresponding datasets. Please place the dataset in /data/EuroSAT_RGB. Alternatively, you can change the root_dir variable in the datasets/EurosatRGBDataset.py to point to the dataset. The dataset can be download here.

Run training

The training is performed using the mpi4py package and utilizes multiple processes to control the different spacecraft. Different configurations files in .toml format can be used to set-up DistMsMatch in swarm or federated mode. The federated mode may be performed using a ground station or a geostationary satellite as parameter server.

To run the training using 8 spacecraft, you can proceed as follows:

mpiexec -n 8 python main.py --cfg_path path_to_cfg_file 

If path_to_cfg_file is not specified, the default swarm learning scenario will be run using eight spacecraft.

Contributing

The project is open to community contributions. Feel free to open an issue or write us an email if you would like to discuss a problem or idea first.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Created by ESA's Advanced Concepts Team, $\Phi$-lab, and AI Sweden.

  • Johan Östman - johan.ostman at ai.se
  • Pablo Gómez - pablo.gomez at esa.int (ACT)
  • Vinutha Magal Shreenath - vinutha at ai.se
  • Gabriele Meoni - gabriele.meoni at esa.int ($\Phi$-lab)

Project Link: https://www.esa.int/gsp/ACT/projects/semisupervised/

Reference

If you have used DistMSMatch, please cite the following paper DistMSMatch:

@article{ostman2023distmsmatch,
  author = {Östman, Johan and Gómez, Pablo and Shreenath, Vinutha Magal and Meoni, Gabriele},
  title = {Decentralised Semi-supervised Onboard Learning for Scene Classification in Low-Earth Orbit},
  journal = {arXiv:2305.04059 [cs.LG]},
  year = {2023},
}

About

A MPI-distributed version of MSMatch integrating the PASEOS framework for physical modelling

Resources

License

Stars

Watchers

Forks

Languages