
Vineyard Disease Classification
A field-image pipeline that filters for usable leaf captures, then classifies grapevine health conditions across nine visual classes.
Technologies
Technical summary
Project scope
This project handled multi-class grapevine health classification from unconstrained vineyard imagery. The pipeline first screened captures for usable leaf content, then passed valid samples into a disease classifier trained on nine visual classes.
I implemented this work with Philipp Ackermann and Helmut Grabner as part of ZHAW’s Intelligent Viticulture project.
The practical constraint was not just classification accuracy. Field images contain soil, trellis hardware, mixed canopy, harsh shadows, partial leaves, and symptoms at different stages. A single RGB image can be enough for high-contrast symptoms, but it breaks down when classes share the same early discoloration, spotting, or stress patterns.
Core stack
- Leaf-versus-background pre-filtering for field captures
- CNN-based multi-class image classification
- Class-wise validation across nine grapevine health categories
- Error analysis by symptom separability and field ambiguity
- Grad-CAM saliency maps for attention sanity-checking
Pipeline architecture and pre-filtering
Raw vineyard captures were filtered before disease inference. The pre-filter removed images where the dominant signal was not leaf tissue, reducing cases where the disease model could learn from soil color, row structure, shadows, or capture artifacts instead of plant symptoms.
Only leaf-centered samples moved into the nine-class classifier. This split kept the classification task closer to the biological signal of interest and made failure analysis easier: errors could be reviewed as symptom-level confusions rather than as obvious background failures.

Performance and failure mode analysis
The classifier reached 81% overall accuracy, but the aggregate score hides the useful part of the evaluation. The model was strongest where the label had visually stable expression in a single image, and weakest where field conditions or disease stage made the image evidence underdetermined.
High-separability classes
Red Blotch Virus was the strongest class at 91% accuracy. Healthy tissue and Leafroll Virus each reached 89%, and aged leaves reached 86%. These classes have more consistent visual signatures: broad pigment shifts, recognizable leafroll structure, or the absence of lesion-like symptoms.
That behavior is a good fit for screening. When the symptom morphology is distinct and visible in-frame, the classifier can separate classes with high confidence without needing vine-level context.
Ablation and field bottlenecks
The lower-performing classes show where the approach breaks down. Phosphorus deficiency reached 79%, nitrogen deficiency 68%, the generic sick class 63%, Pierce’s disease 51%, and mildew 49%.
Those errors are expected in field RGB data. Mildew, Pierce’s disease, early nutrient deficiencies, and generic stress can all present as pale tissue, speckling, edge discoloration, or low-contrast lesions depending on growth stage, lighting, and leaf angle. In those cases the image may not contain enough evidence to distinguish the causal condition from one view.
This limits the useful scope of the pipeline. It can support triage and help prioritize field review when symptoms are visually distinct. It is not sufficient as a standalone diagnostic system for subtle or early-stage conditions without additional context, repeated observations, or expert confirmation.

Interpretability and feature saliency
Grad-CAM was used as an engineering diagnostic, not as proof that a prediction was correct. The goal was to check whether high-confidence predictions activated on leaf tissue, lesions, discoloration, and structural symptoms rather than on soil, shadows, image borders, or other artifacts.
For false positives, the saliency maps helped separate plausible symptom confusions from shortcut behavior. If the model focused on the affected leaf region, the error pointed to class overlap or missing context. If it focused off-leaf, the failure belonged in preprocessing, data curation, or augmentation rather than in the disease taxonomy itself.

The related CanopyCover project handled the multispectral, thermal, and geospatial side of the same Intelligent Viticulture research program.