Multi-Region Transfer Learning for Segmentation of Crop Field Boundaries in Satellite Images with Limited Labels
Authors: Hannah Rae Kerner, Saketh Sundar, Manthan Satish
This repository contains the code implementation for the paper "Multi-Region Transfer Learning for Segmentation of Crop Field Boundaries in Satellite Images with Limited Labels" accepted at the 2023 AAAI Workshop on AI to Accelerate Science and Engineering (AI2ASE) 2023.
To create a new environment, utilize the provided YAML file:
conda env create -f environment.yml
Use the links below to download the data for each region. Some contain only the labels while others contain the images as well
Place the downloaded data in the data
folder.
Utilize the .js
script located in data_helpers/gee_images_downloader.js
to download images from Google Earth Engine.
The data should be stored in the data
folder. It will be stored in the following structure:
- images_mar, images_jun, images_sep: Directories containing satellite images corresponding to different months (March, June, September).
- masks: Directory containing labeled masks or ground truth data for crop field boundaries.
- masks_filled: Directory potentially filled with processed or augmented mask data if applicable.
It will look something like this:
data
├── country
│ ├── images_mar
│ │ ├── image_1.png
│ │ ├── image_2.png
│ │ ├── ...
│ ├── images_jun
│ │ ├── image_1.png
│ │ ├── image_2.png
│ │ ├── ...
│ ├── images_sep
│ │ ├── image_1.png
│ │ ├── image_2.png
│ │ ├── ...
│ ├── masks
│ │ ├── image_1.png
│ │ ├── image_2.png
│ │ ├── ...
│ ├── masks_filled
│ │ ├── image_1.png
│ │ ├── image_2.png
│ │ ├── ...
├── ...
To train the model, run the following command:
python train.py --config config.yaml
To fine tune the model, run the following command:
python fine_tune.py --config config.yaml
To test the model, run the following command:
python test.py --config config.yaml
To run inference on the model, run the following command:
python inference.py --config config.yaml
If you find this repository useful in your research, please cite our paper:
@article{hkerner2023multitlf,
title={Multi-Region Transfer Learning for Segmentation of Crop Field Boundaries in Satellite Images with Limited Labels},
author={Kerner, Hannah Rae and Sundar, Saketh and Satish, Manthan},
journal={AAAI Workshop on AI to Accelerate Science and Engineering (AI2ASE)},
year={2023}
}