Skip to content

Latest commit

 

History

History

yield

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Yield Estimation

Task-Informed Meta-Learning applied to yield estimation, using the yield dataset first described in Deep Gaussian Process for Crop Yield Prediction Based on Remote Sensing Data. We recreate this dataset using the PyTorch implementation, rerun with all default arguments.

Getting started

Anaconda running python 3.6 is used as the package manager. To get set up with an environment, install Anaconda from the link above, and (from this directory) run

conda env create -f environment.yml

This will create an environment named timl-yield with all the necessary packages to run the code. To activate this environment, run

conda activate timl-yield

The main script to train the models is then deep_learning.py, with the model configurations controlled by the config. Running this script will automatically download the data into the data folder from Zenodo.

To use the trained models from Zenodo, download them to the data folder and untar them. The following code loads a learner from the state dictionaries:

from src.timl import Learner


learner = Learner.load_from_folder(
    "data",
    model_name="yield_cnn_timl",
    model_folder="data/yield_cnn_timl/TIML_cnn_2011",
)

Specifically, this returns the TIML-CNN learner trained on data up to 2011.