Swin Transformer V2 para clasificación de café lojano

Read full text
Authors: Patricio Bolívar Betancourt Ludeña, Oscar M. Cumbicus-Pineda
Cited by: 0

Abstract

This study presents a binary classification model for green coffee beans of the Arabica variety from the Loja region in Ecuador, based on the Swin Transformer V2 architecture. Two datasets were used, the public USK-COFFEE dataset of Indonesian origin and a proprietary dataset captured under controlled conditions. Two training strategies were evaluated: sequential transfer learning and unified training, with the latter achieving a validation accuracy of 98.30%. After hyperparameter optimization, the model reached 100% accuracy on a test set of 150 images and 93% accuracy on an external generalization set of 400 images with varying lighting conditions and backgrounds. Model interpretability was validated using Grad-CAM, demonstrating that the network focuses on actual defective regions rather than background information. An ablation analysis revealed that performance degradation in unconstrained scenarios is mainly due to sensitivity to noise and extreme lighting conditions. The main contributions of this work include the creation of a specialized dataset for Arabica green coffee from Loja and the development of an efficient model for its automatic classification.

Fields of Study & Subjects

Coffee research and impacts Smart Agriculture and AI Remote Sensing in Agriculture

Publication details

Journal / source
Ingenius
Issue
35
Pages
138–148
Publication date
1 January 2026
Language
ES