Aflatoxin detection in naturally contaminated peanuts based on vision transformer and multi-scale convolutional fusion.

Journal: Food chemistry
Published Date:

Abstract

Aflatoxin is a highly toxic substance found in peanuts, posing a serious threat to human health. To address this issue, an improved 1D-MCFViT model combining the Vision Transformer with multi-scale convolutional fusion is proposed to detect aflatoxin-contaminated peanuts under natural conditions. After data cleaning, indistinguishable samples in RGB images were obtained, and their spectral curves were extracted. Data generation was performed using autoencoder network and Gaussian resampling techniques, significantly enhancing the model's feature discrimination capability. This approach achieved 92.6 % accuracy and 94.4 % recall on the validation set, improving accuracy by 1.23 % over the 1D-ViT model. The performance of traditional machine learning and deep learning models before and after data generation was compared, demonstrating this method outperforms traditional machine learning models as well as mainstream deep learning models. This approach improves aflatoxin detection accuracy and provides a robust foundation for developing online detection devices.

Authors

  • Cong Wang
    Department of Vascular Surgery, Xuanwu Hospital, Capital Medical University, Beijing, China.
  • Yifan Zhao
    HBISolutions Inc., Palo Alto, CA 94301, USA.
  • Hongfei Zhu
    School of Information and Communication Engineering, Hainan University, Haikou 570100, China.
  • Weiming Shi
    State Key Laboratory of Soil and Sustainable Agriculture, Changshu National Agro-Ecosystem Observation and Research Station, Institute of Soil Science, Chinese Academy of Sciences, Nanjing, China.
  • Qiong Wu
    Key Laboratory of Flexible Electronics (KLOFE) and Institute of Advanced Materials (IAM), Nanjing Tech University (NanjingTech), 30 South Puzhu Road, Nanjing 211816, P. R. China.
  • Huayu Fu
    College of Science and Information, Qingdao Agricultural University, Qingdao 266109, China.
  • Zhongzhi Han
    School of Science and Information, Qingdao Agricultural University, Qingdao 266109, China.