A Vision Transformer with Locality Bias for Coffee Leaf Disease Detection on Small Datasets

Accurate identification of coffee leaf diseases is crucial for maintaining crop health and yield, yet deep learning models often struggle in agricultural settings due to limited annotated data. Vision Transformers (ViTs), though powerful on large datasets, perform poorly on small datasets due to their lack of spatial inductive bias. In this paper, we adapt a locality-biased ViT architecture-combining Shifted Patch Tokenization (SPT) and Locality Self-Attention (LSA)-to improve classification of coffee leaf diseases from a small dataset of 1,200 labeled images across five classes. Experimental results show that the enhanced ViT improves top- 1 accuracy by 4.0 % and top- 5 accuracy by 1.7 % over the baseline ViT, closely mirroring performance gains reported in previous studies. Our model also outperforms standard CNNs (e.g., ResNet18, EfficientNetB0) by up to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{4. 2 \%}$</tex> in F1-score, demonstrating that incorporating locality bias allows ViTs to better generalize on fine-grained disease patterns in data-constrained scenarios.

Authors

Institutions

Publication Details

Published
2025-07-25
DOI
https://doi.org/10.1109/atigb66719.2025.11142197
Citations
1
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
1.75
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Vision Transformer with Locality Bias for Coffee Leaf Disease Detection on Small Datasets

Quoc-Trinh Vo, Cao Vu Bui
1 citations
Smart Agriculture and AI
1.75
article

A Vision Transformer with Locality Bias for Coffee Leaf Disease Detection on Small Datasets

Quoc-Trinh Vo, Cao Vu Bui
article en
1 citations

Abstract

Accurate identification of coffee leaf diseases is crucial for maintaining crop health and yield, yet deep learning models often struggle in agricultural settings due to limited annotated data. Vision Transformers (ViTs), though powerful on large datasets, perform poorly on small datasets due to their lack of spatial inductive bias. In this paper, we adapt a locality-biased ViT architecture-combining Shifted Patch Tokenization (SPT) and Locality Self-Attention (LSA)-to improve classification of coffee leaf diseases from a small dataset of 1,200 labeled images across five classes. Experimental results show that the enhanced ViT improves top- 1 accuracy by 4.0 % and top- 5 accuracy by 1.7 % over the baseline ViT, closely mirroring performance gains reported in previous studies. Our model also outperforms standard CNNs (e.g., ResNet18, EfficientNetB0) by up to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{4. 2 \%}$</tex> in F1-score, demonstrating that incorporating locality bias allows ViTs to better generalize on fine-grained disease patterns in data-constrained scenarios.

FPT University (VN)
Openalex Percentile: Top 12%
Smart Agriculture and AI
1.75
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.