Skip to content
forked from rlee360/PLaTYPI

ECE471 Final Project: Pixel-Wise Crop Yield Prediction from County-Wise Labels

Notifications You must be signed in to change notification settings

yuvalofek/SPPPACY

 
 

Repository files navigation

Python 3.7

SPPACY - Satellite Prediction of Pixel-wise Aggregate Crop Yield

ECE471 Final Project: Crop Yield Prediction

Presentation: ppt

Report: report

SPPACY is a tool to predict pixel-wise corn yield independently of current land cover usage through the use of histograms. It is authored by Richard Lee and Yuval Ofek.

Results

Comparison to baseline

MAE MSE
Baseline 20.637 734.300
Ours 10.703 203.604

Pixel-wise yield prediction for counties

pixel-wise yield prediction for Calhoun, Iowa, in 2015
Pixel-wise yield prediction (in bushels/acre) for Calhoun, Iowa using 2015 data

Overview:

The goal of this work is to predict locations that, should corn be planted there, increase aggregate yield without being biased by current crop locations. The work outlined in this repository is a proof of concept of such a method, using aggregate corn yield data from Iowa.

The main benefit of such a project is to predict locations for new corn farms in order to maximize yield. The tool can also be used to analyze current corn farm locations and predict how much yield the farm generates (in bushels/acre). This is important in order to identify under/over-performing farms and farm locations for investments of any future yield analysis.

Two main concerns are addressed:

  • Remaining unbiased by current crops and landscape
  • Generating pixel-wise maps from coarse county-wise yield data

Main Tools:

Google Earth Engine Python API, Rasterio, TensorFlow, Geemap, Multiprocessing, Numpy, Pandas, Scikit-Learn, Matplotlib, Seaborn, Pickle

Data

Visualization of the Corn Yield Dataset

Code File Breakdown:

  • download_from_ee.py - Parallelizes file download from google earth engine - loops over year, image collection, county and downloads
  • counties.py - returns the FPS code for each county in Iowa in a dict (FPS code: county)
  • make_hists.py - For each county-year pair downloaded, generates a spatial-temporal histogram of the data
  • make_one_county.py - For testing, generates a temporal histogram for each pixel in a specified county-year pair
  • Masked_Yield_Prediction_PoC.ipynb - Takes yield data and histogram, preprocesses data, generates and trains a tf model, saves model, and then evaluates model on one-county's pixel-wise temporal histograms
  • proof_of_concept.ipynb - An attempt to create histograms directly from google earth engine API - NOT FUNCTIONING
  • proof_of_concept_2.ipynb - Another attempt to to create histograms directly from google earth engine API, somewhat limited and slow (and susceptible to crs of image collections).

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.3%
  • Python 1.5%
  • JavaScript 1.2%