Resumen:
This study addresses the early classification of defects in apples, a key factor in reducing
economic losses and improving quality throughout the supply chain. It proposes an approach
based on multispectral images combining four spectral bands: red (RE), blue (BL), green (GR),
and infrared (IR), overcoming the limitations of previous studies focused solely on the visible
spectrum.
The methodology employs convolutional neural networks (DenseNet121, MobileNetV1,
and MobileNetV2) with fine-tuning, data augmentation, and channel-wise attention (SE) to automatically
highlight the most relevant spectral features. Additionally, a band ablation analysis
was conducted to evaluate the contribution of each band to the detection of three types of defects
(rot, bruises, and climate-stress spots) as well as to the anatomical classes of the fruit (stem and
calyx) and healthy apples.
Results showed that MobileNetV2 + SE achieved the best overall performance, with an
accuracy of 95% and precision, recall, and F1-score values above 91 %. MobileNetV1 + SE
reached 94 %, while DenseNet121 + SE achieved 89 %, significantly improving over the version
without attention (84 %). Ablation analysis revealed that the green band (GR) was the most
informative, providing greater contrast between healthy and affected areas.
Furthermore, an interactive platform was developed, allowing users to upload multispectral
apple images and automatically receive a report with the defect classification and the
most relevant spectral band.
Keywords: Apple defects, Multispectral imaging, Convolutional neural networks, Attention
modules, Transfer learning, Spectral bands.
Descripción:
Este estudio aborda la clasificación temprana de defectos en manzanas, un aspecto clave
para reducir pérdidas económicas y mejorar la calidad en la cadena de suministro. Se propone
un enfoque basado en imágenes multiespectrales que combinan cuatro bandas espectrales: roja
(RE), azul (BL), verde (GR) e infrarroja (IR), superando las limitaciones de investigaciones
previas centradas únicamente en el espectro visible.
La metodología emplea redes neuronales convolucionales (DenseNet121, MobileNetV1
y MobileNetV2) con fine-tuning, data augmentation y mecanismo de atención por canal (SE),
que permiten resaltar automáticamente las características espectrales más relevantes. Además,
se realizó un análisis de ablación de bandas para evaluar la contribución de cada una en
la detección de los tres tipos de defectos (podredumbre, magulladuras y manchas por estrés
climático), así como en las clases anatómicas del fruto (tallo y cáliz) y en manzanas sanas.
Los resultados mostraron que MobileNetV2 + SE alcanzó el mejor desempeño, con un
accuracy del 95% y valores superiores al 91% en precisión, recall y F1-score. MobileNetV1
+ SE obtuvo 94%, y DenseNet121 + SE 89%, mejorando significativamente respecto a la
versión sin atención (84 %). La ablación indicó que la banda verde (GR) fue la más informativa,
proporcionando mayor contraste entre zonas sanas y afectadas.
Además, se ha puesto en marcha una plataforma interactiva que permite cargar imágenes
multiespectrales de manzanas y recibir automáticamente un informe con la clasificación del
defecto y la banda espectral más relevante.