Home

Awesome

DeepCropMapping: A multi-temporal deep learning approach with improved spatial generalizability for dynamic corn and soybean mapping

This repository is the official implementation of DeepCropMapping: A multi-temporal deep learning approach with improved spatial generalizability for dynamic corn and soybean mapping.

Requirements

The code has been tested in the following environment: Ubuntu 16.04.4 LTS, Python 3.5.2, PyTorch 1.2.0

Data

The preprocessed data (.npy files) for model training and evaluation is not directly provided here due to the large data volume. You can download raw Landsat Analysis Ready Data (ARD) from EarthExplore and raw Cropland Data Layer (CDL) from CropScape, then follow the code in the preprocessing folder to generate the .npy files. The raw Landsat ARD and CDL data should be stored in a new data folder that has the following structure (specific downloaded file names may change):

data
├── Site_A
│   ├── ARD
│   │   ├── 2015
│   │   │   ├── LC08_CU_018007_20150424_20181206_C01_V01_PIXELQA.tif
│   │   │   ├── LC08_CU_018007_20150424_20181206_C01_V01_SRB2.tif
│   │   │   └── . . .
│   │   ├── . . .
│   │   └── 2018
│   └── CDL
│       ├── CDL_2015_clip_20190409130240_375669680.tif
│       ├── . . .
│       └── CDL_2018_clip_20190409125506_12566268.tif
├── Site_B
├── . . .
└── Site_F

The preprocessed data should be stored in the preprocessing/out folder that has the following structure:

preprocessing/out
├── Site_A
│   ├── x-2015.npy
│   ├── y-2015.npy
│   ├── . . .
│   ├── x-2018.npy
│   └── y-2018.npy
├── Site_B
├── . . .
└── Site_F

Training and evaluation

The specific training and evaluation process can be executed by running the .ipynb files in the experiments folder.

The hyperparameters for different sites in the paper are set as follows:

HyperparameterSite ASite BSite CSite DSite ESite F
Dimension of LSTM hidden features256512256512256256
Number of LSTM layers222223