Deep Learning-Based Detection of Aflatoxin B1 Contamination in Almonds Using Hyperspectral Imaging: A Focus on Optimized 3D Inception–ResNet Model - Md. Ahasan Kabir; Ivan Lee; Sang-Heon Lee (Toxins)
Aflatoxin B1, a toxic carcinogen frequently contaminating almonds, nuts, and food products, poses significant health risks. Therefore, a rapid and non-destructive detection method is crucial to detect aflatoxin B1-contaminated almonds to ensure food safety. This study introduces a novel deep learning approach utilizing 3D Inception–ResNet architecture with fine-tuning to classify aflatoxin B1-contaminated almonds using hyperspectral images. The proposed model achieved higher classification accuracy than traditional methods, such as support vector machine (SVM), random forest (RF), quadratic discriminant analysis (QDA), and decision tree (DT), for classifying aflatoxin B1 contaminated almonds. A feature selection algorithm was employed to enhance processing efficiency and reduce spectral dimensionality while maintaining high classification accuracy. Experimental results demonstrate that the proposed 3D Inception–ResNet (Lightweight) model achieves superior classification performance with a 90.81% validation accuracy, an F1-score of 0.899, and an area under the curve value of 0.964, outperforming traditional machine learning approaches. The Lightweight 3D Inception–ResNet model, with 381 layers, offers a computationally efficient alternative suitable for real-time industrial applications. These research findings highlight the potential of hyperspectral imaging combined with deep learning for aflatoxin B1 detection in almonds with higher accuracy. This approach supports the development of real-time automated screening systems for food safety, reducing contamination-related risks in almonds.