Case study · Crop phenotyping · 2024

Canopy Coverage Pipeline

The measurement called for canopy cover per plot from weekly drone flights over a potato field experiment: not hand-drawn annotations, not rough estimates, but a number per plot and flight date from a pipeline that runs without re-tuning.

0.97 Dice score (validation)
150 images labelled in 2 days
CPU-only U-Net training

The Situation

The field experiment tested soil heating on a single potato variety, Innovator: twelve plots in four blocks, each block holding an unheated control and two heating treatments, one starting at emergence and one at tuber initiation. A DJI Matrice 350 RTK flew the field once a week through the season. Canopy cover was needed per net plot, the two centre rows of each plot, as a measure of how the crop developed under each treatment.

Colour thresholding was the obvious shortcut, and it struggled where the field was hardest to read: in deep shadow and in bright sunlit patches it counted soil and overexposed areas as canopy. The classifier had to hold up across the whole season without re-tuning thresholds for every flight.

The Approach

The training set came from random cut-outs of the orthomosaics. Using AnyLabeling with its Segment Anything-assisted mode, 150 images were labelled in two days and split 80/20 into training and validation data.

The classifier is a plain U-Net implemented in PyTorch, trained CPU-only on a 32-core AMD Threadripper 2990WX workstation, a deliberate choice so the pipeline runs on machines without a GPU. After each training run the validation output was checked and the hyperparameters adjusted.

The imagery workflow runs through Agisoft Metashape, whose Python API batch-stitches the RTK-referenced images into a georeferenced orthomosaic per flight. In QGIS each net plot is drawn once as a polygon and cut out of every orthomosaic. The U-Net turns each cut-out into a binary canopy mask, and a Python script counts canopy pixels to give cover as a percentage per plot and flight date.

The net plot: the two centre rows of each plot, where canopy cover was measured.

The Result

On the validation images the model reached a Dice score of about 0.97, and it separates canopy from soil in the shadowed and sunlit patches where thresholding struggled. The manual steps left are flying the drone, drawing the plot polygons once, and checking the output; stitching, segmentation and pixel counting run as scripts.

Because the classifier is learned from labelled examples rather than a colour rule, a new crop or camera needs new labels and a retraining run, not hand-tuned thresholds. The output is a time series of cover per plot, ready for the downstream statistics.

Pipeline in pictures

Got something similar?

If you have trial plots, a drone, and a measurement question, Haystack Imaging can build the pipeline from raw imagery to analysis-ready numbers.