Project · High-throughput phenotyping · 2025

PhenoSelect: Leaf-Level Trait Extraction

A two-stage deep-learning pipeline that segments individual leaves in phenotyping images and picks out the ones fit for closer analysis.

0.949 mAP50, RGB-NIR
30 images to adapt to hyperspectral

The problem

The images came from a gantry-based phenotyping platform that photographs plants from directly above in RGB and near-infrared, again and again over the season. A hundred plants with a few hundred leaves each is already tens of thousands of leaves per imaging date.

Existing tools could segment whole plants but could not separate the individual leaves. Many analyses only want a small share of the leaves anyway: fully visible from above, mature, healthy and well lit. So the per-leaf traits (area, shape, spectral response) were in the images but in no table, and checking leaves by hand, even at one second each, does not scale to a season.

What we built

PhenoSelect, a pipeline in two stages:

  • A YOLOv11x-seg instance segmentation model (pretrained on COCO, fine-tuned on leaves) finds the leaves and draws a pixel mask around each one.
  • A ResNet-18 with one output head per trait looks at each leaf cut-out and labels it for visibility, health, maturity and illumination. One filter on the results table then selects the leaves worth analysing. The traits are user-defined, so they can be relabelled and retrained.

The segmentation model takes three input channels, so we replace the blue channel of each image with the NIR1 band. Leaves reflect near-infrared strongly, which gives more contrast between leaf and background, especially in dense canopies where leaves overlap. Training used heavy augmentation (geometric, photometric, Mosaic, MixUp and Copy-Paste) so the model learns to separate overlapping leaves in cluttered scenes and at different plant sizes.

The segmentation labels were drawn in AnyLabeling with model-assisted polygons, in rounds: label, train overnight on a CUDA GPU, check, label more. The final set was about 120 images of three species: Hosta, lily of the valley and blueberry. For the classifier, Moritz Nelle wrote a keyboard-driven labelling tool and labelled 700 leaf cut-outs with it.

For every image the pipeline writes one row per leaf (position, mask, area and class labels), plus the leaf count, the mean and standard deviation of NDVI per leaf, and the canopy spread, measured as the convex hull around the leaf centres. From that table it runs mixed-effects statistics and plots each trait over time per treatment.

Canopy spread: the convex hull round the leaf centres.

What worked

On the multi-species RGB-NIR dataset the segmentation model reached mAP50 0.949.

We also moved the pipeline to a second sensor: hyperspectral images of blueberry from a different experiment, converted to RGB. After training continued on 30 labelled hyperspectral images, the model reached accuracy similar to the RGB-NIR model, so the existing model could be adapted to the new sensor with one small labelling round.

What didn't

  • Out of the box, the model performed poorly on the hyperspectral images. It needed those 30 extra labelled images first.
  • The per-leaf NDVI values are uncalibrated index values (see the NDVI figure below).

The numbers

  • mAP50 0.949 for leaf segmentation on the multi-species RGB-NIR dataset. mAP50 is a standard score for this kind of model; 1 would be perfect.
  • 30 labelled hyperspectral images were enough to bring the model to similar accuracy on the second sensor.

Photos and figures

Questions about this project? Send us an email.