Crop type mapping of small holder farms in Ghana, and South Sudan
# crop-type-mapping
Crop type mapping of small holder farms in Ghana and South Sudan
##### INSTALLATION INSTRUCTIONS #####
Install Python 3.6
Install conda and build the environment with the following command:
`conda env create -f environment.yaml`
##### DATASET / ENVIRONMENT SETUP #####
These datasets are now available for free on Radiant Earth's MLHub, and through Sustain Bench.
###### Radiant Earth MLHub
- The dataset for Ghana is here:
registry.mlhub.earth
- The dataset for South Sudan is here:
registry.mlhub.earth
- The dataset files are saved as tifs, and will need to be restructured to work as input to the model, which initially used an hdf5 file.
###### Sustain Bench
- Both dataset are available via pytorch data loaders
- See more information here:
sustainlab-group.github.io
##### RUN INSTRUCTIONS #####
To visualize training, open a separate terminal and run the following before running the main training code:
`python -m visdom.server`
Replace “localhost” with the static IP address provided on google cloud
To start training models, use the train.py script in the root directory of the code.
Example for CLSTM-only network:
```python train.py --model_name=only_clstm_mi --country=southsudan --var_length --name=southsudan_clstmonly --env_name=myenv --dataset=full --epochs=130 --batch_size=5 --optimizer=adam --lr=0.003 --weight_decay=0 --loss_weight=True --weight_scale=1 --seed=1 --s2_num_bands=10 --dropout=0.5 --clip_val=True```
Example for 3D UNet model:
```python train.py --model_name=unet3d --country=southsudan --num_timesteps=24 --lr=0.0003 --s2_agg=False --include_indices=True --include_doy=True --use_planet=True --planet_agg=False --name=southsudan_3dunet_use_planet_noagg --env_name=myenv --dataset=full --epochs=130 --batch_size=5 --optimizer=adam --weight_decay=0 --loss_weight=True --weight_scale=1 --seed=1 --s2_ …