Few-shot learning for avocado ripeness detection: A transformer-based NIR approach

This study explores Few-Shot Learning (FSL) to improve a pre-trained Transformer model for classifying avocado ripeness using Near-Infrared (NIR) spectral data from a portable, low-cost scanner. The goal is to allow users in the field to customise the model with little local data, decreasing reliance on centralised retraining while keeping predictive accuracy intact. A dataset was created with spectral scans from the AS7265x sensor, capturing 18 wavelengths for each sample. The population consists of Buccaneer avocado samples at three ripeness stages: raw, aged, and ripe. Subsets of different sizes were extracted for simulation to represent various k-shot support scenarios, from 2% to 50% of the total labelled data per class. A few-shot Transformer architecture classified samples in episodic learning conditions. We assessed performance through average F1-score, ROC AUC, and confusion matrices using 5-fold cross-validation. Findings show that with as little as 20% labelled support data per class, the model achieves over 80% F1-score, demonstrating a clear performance gain through minimal shot expansion. Classification accuracy keeps improving until it levels off around 40–50% shot ratios. This study advances embedded agricultural AI by demonstrating the effective use of few-shot adaptation in portable NIR scanners for localised model improvement. Limitations involve possible sensitivity to class imbalance and noise in low-shot scenarios, necessitating strong sampling and calibration.

Authors

Institutions

Publication Details

Journal
Smart Agricultural Technology
Published
2025-09-23
DOI
https://doi.org/10.1016/j.atech.2025.101448
Primary Topic
Spectroscopy and Chemometric Analyses
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Few-shot learning for avocado ripeness detection: A transformer-based NIR approach

Prasert Luekhong, Chokemongkol Nadee, Krisda Yingkayun, Panudech Tipauksorn
Smart Agricultural Technology
Spectroscopy and Chemometric Analyses
article

Few-shot learning for avocado ripeness detection: A transformer-based NIR approach

Prasert Luekhong, Chokemongkol Nadee, Krisda Yingkayun, Panudech Tipauksorn
article en

Abstract

This study explores Few-Shot Learning (FSL) to improve a pre-trained Transformer model for classifying avocado ripeness using Near-Infrared (NIR) spectral data from a portable, low-cost scanner. The goal is to allow users in the field to customise the model with little local data, decreasing reliance on centralised retraining while keeping predictive accuracy intact. A dataset was created with spectral scans from the AS7265x sensor, capturing 18 wavelengths for each sample. The population consists of Buccaneer avocado samples at three ripeness stages: raw, aged, and ripe. Subsets of different sizes were extracted for simulation to represent various k-shot support scenarios, from 2% to 50% of the total labelled data per class. A few-shot Transformer architecture classified samples in episodic learning conditions. We assessed performance through average F1-score, ROC AUC, and confusion matrices using 5-fold cross-validation. Findings show that with as little as 20% labelled support data per class, the model achieves over 80% F1-score, demonstrating a clear performance gain through minimal shot expansion. Classification accuracy keeps improving until it levels off around 40–50% shot ratios. This study advances embedded agricultural AI by demonstrating the effective use of few-shot adaptation in portable NIR scanners for localised model improvement. Limitations involve possible sensitivity to class imbalance and noise in low-shot scenarios, necessitating strong sampling and calibration.

Smart Agricultural TechnologyVol. 12
Rajamangala University of Technology Lanna (TH)
Openalex Percentile: Top 71%
Spectroscopy and Chemometric Analyses
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.

Few-shot learning for avocado ripeness detection: A transformer-based NIR approach — Prasert Luekhong, Chokemongkol Nadee, et al. · Smart Agricultural Technology (2025) | TGRS Research Map | TGRS