Distributed Semi-Supervised Multispectral Scene Classification with Few Labels
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.
This is a brief example of setting up DistMSMatch.
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.
git clone https://github.com/gomezzz/DistMSMatch
distmsmatch
conda env create -f environment.yml
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.
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.
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.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Created by ESA's Advanced Concepts Team, $\Phi$-lab, and AI Sweden.
johan.ostman at ai.se
pablo.gomez at esa.int
(ACT)vinutha at ai.se
gabriele.meoni at esa.int
($\Phi$-lab)Project Link: https://www.esa.int/gsp/ACT/projects/semisupervised/
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},
}