Skip to content

radiantearth/CropDetectionDL

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 2 commits ahead of karimmamer:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A Spatio-Temporal Deep Learning-Based Crop Classification Model for Satellite Imagery

First place solution for Crop Detection from Satellite Imagery competition organized by CV4A workshop at ICLR 2020.

Getting Started

A summarized description of the approach can be found here.

Prerequisites

Firstly, you need to have

  • Ubuntu 18.04
  • Python3
  • 20 GB RAM
  • 11 GB GPU RAM

Secondly, you need to install the challenge data and sample submission file by the following the instructions here.

Thirdly, you need to install the dependencies by running:

pip3 install -r requirements.txt

Running

Dataset Preparation

python3 prepare_data.py --data_path ...

This step generates patches around each crop field in the data and saves all of them in a numpy matrix along side their ground truth labels.

Generating a Submission File

python3 main.py --data_path ...

This step trains an ensemble of 10 instances of the same DL model on different train/valid splits then generate a submission file with results on test set.

All augmentations are used except for Mixup augmentation. In order to use it, run

python3 main.py --data_path ... --mixup_augmentation True

However it uses a lot of RAM (~50 GB) so I wouldn't recommend using it.

About

A Spatio-Temporal Deep Learning-Based Crop Classification Model for Satellite Imagery

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 96.6%
  • Dockerfile 2.9%
  • Shell 0.5%