Search for a command to run...
The detection and classification of tomato defects during cultivation and quality control are still primarily conducted through manual visual inspection. This process is labor-intensive, time-consuming, and susceptible to human error. Fine surface defects, such as hairline cracks, are often missed, leading to inconsistent quality standards and reduced market value. To address these challenges, we propose HySANet (Hyperspectral Attention Network), an automated defect classification framework that integrates hyperspectral imaging (HSI) with deep learning. Hyperspectral images of cherry tomatoes were preprocessed using a support vector machine (SVM) to remove background and specular reflections. Principal component analysis (PCA) was then applied for spectral dimensionality reduction. The processed image cubes were fed into a hybrid 2D–3D convolutional neural network (CNN) enhanced with a Convolutional Block Attention Module (CBAM). This architecture enables efficient extraction of spectral–spatial features for multi-class classification. HySANet categorizes tomatoes into three classes: normal, cracked, and visually unappealing. Experimental evaluation on 810 tomato samples demonstrated that HySANet achieved a classification accuracy of 97.69%, outperforming conventional machine learning and state-of-the-art deep learning methods. These results confirm HySANet’s robustness and practical value as a non-destructive, reliable, and scalable solution for smart agriculture and automated quality inspection.
Published in: Applied Food Research
Volume 6, Issue 1, pp. 101631-101631