A new method to improve crop mapping: how to give two shifts

StanfordFoodSecurity
5 min readJun 21, 2021

--

Why map crop types?

A crop type map is a dataset indicating which crops are growing in each field within a specific geographical region and year. Above is a sketch of a crop type map in Occitanie, France from 2017. Crop type maps are a prerequisite for agricultural monitoring as well as for studying crop yields and farming practices. Therefore, constructing crop type maps is an important task given that researchers are trying to figure out how to ensure that our global food systems can feed a growing population and are resilient to changes in climate.

Challenges for constructing crop maps

While it may seem trivial to determine which crops are growing in each field, crop type maps have historically been constructed using expensive and time consuming on-the-ground field surveys. In many parts of the world, such field surveys are not conducted due to cost. To address this, there have been many recent efforts to construct crop type maps using a combination of cheap and abundant satellite imagery and a small number of crop type labels from the expensive field surveys. This can be done with supervised learning by training a classifier on the labelled fields to infer crop types from satellite observations.

Problematically, the expensive field surveys are often only conducted in constrained geographical regions, and the accuracy of supervised learning classifiers suffers when the labelled fields are not representative of all the fields in the region in which we would like to create a crop type map. For example, suppose that in Occitanie the labelled data is only available in Ariège and that we wish to construct a crop type map in all of Occitanie. A classifier trained on data from Ariège may struggle to accurately classify crops in a department such as Gard because Ariège and Gard have a very different composition of crop types. In addition, Gard could also have slightly different growing seasons, farm management practices, or climatic conditions than Ariège does.

Two types of shifts

We can describe why classifiers trained in one region can be less accurate in new regions by considering two types of shift: prior shift and feature shift. Both prior and feature shifts lead to reduced classification accuracy, and this phenomenon has been observed in previous studies.

Prior shift occurs when the distribution of the labels on the region where the classifier is trained is different from the distribution of the crop types in the region on which the classifier will be applied. For example, it is clear that prior shift occurs between Ariège and Gard, as Ariège has a very low proportion of fields that grow wine grapes whereas a plurality of the fields in Gard grow wine grapes. As a result, a classifier trained in Ariège will not often guess that a given field in Gard grows wine grapes, despite wine grapes being commonly grown in Gard.

Feature shift occurs when there is a systemic transformation of the satellite-based observations as one moves to nearby geographical regions. This can happen due to differing farm management practices, growing season starts and durations, or climatic conditions. For example, if we look at the average greenness of crops as measured by satellite (using one common measure, the GCVI), we can see that there is a systemic feature shift between Aude and Tarn. For each crop type, the GCVI measurements are consistently higher in Tarn (the abrupt dips in mid-spring for wheat and barley are due to clouds). Corn observations in Aude don’t look quite like they do in Tarn, and as a result, a classifier trained in Tarn might have reduced accuracy in Aude.

Our solution

In our recent paper (alternative link), we develop a method that can be used to construct crop type maps in settings where labelled data is constrained to one geographical region and the goal is to construct a crop type map in nearby regions. Our method, which we call the Feature and Prior Shift Adjustment (FPSA) method, is designed to correct a classifier for both prior and feature shifts, and we demonstrate that FPSA is both flexible and leads to increased classification accuracy.

Our FPSA method leverages aggregate-level data which gives the composition of crop types in each region of interest. This aggregate-level data is generally more widely available than the expensive field-level datasets with geolocated crop types (for example, over 35% of level 2 administrative units and over 60% of level 1 administrative units globally have aggregate-level data about crop type composition, and the availability of such data is increasing). The specifics of how FPSA uses aggregate-level data to correct a classifier for prior and feature shifts can be found in Section 2 of the paper.

Our FPSA method is flexible, can be used for any choice of features, and can be applied to an already-trained classifier. Further, FPSA can be applied for any choice of base classifier, whether it is Linear Discriminant Analysis (LDA), Random Forest, or Neural Networks, as long as the trained classifier returns estimated probabilities for being in each class (under the hood, most machine learning classifiers return such probabilities).

In the paper, we test the accuracy of our FPSA method in regions of both France and Kenya, with the latter representing a region with scarce field-level labels where FPSA could be especially useful.

Above we plot our results for the accuracy of our method, when we use LDA as the base classifier. For the results from France (left), we train the classifier on one department, and test it on the remaining 12 departments in Occitanie. Similarly, for the results in Kenya (right), we train the classifier on one region and test it on two nearby regions. The results demonstrate that adjusting only for prior shifts helps improve accuracy, but adjusting for both prior and feature shifts using FPSA helps improve accuracy further. We see that FPSA sometimes helps a lot, but sometimes it does not lead to noticeable accuracy improvements.

Overall we found that it is better to adjust for prior and feature shifts using FPSA (when the aggregate-level crop composition data is available) than to ignore prior and feature shifts completely. Another possible application of FPSA is for constructing historical crop maps in a region for which some years have labelled data but some years do not, as there can be prior and feature shifts across time that need to be accounted for.

About the author:

Dan Kluger is a Ph.D. candidate in the Department of Statistics at Stanford.

--

--

StanfordFoodSecurity

Stanford's Center on Food Security and the Environment (FSE) leads cutting-edge research on global issues of food, hunger, poverty and the environment.