Aflatoxin is a highly toxic substance dispersed in peanuts, which seriously harms the health of humans and animals. In this paper, we propose a new method for aflatoxin B1(AFB1) detection inspired by quantitative remote sensing. Firstly, we obtained the relative content of AFB1 at the sub-pixel level by subpixel decomposition (endmember extraction, nonnegative matrix decomposition). Then we modified the transfer learning models (LeNet5, AlexNet, VGG16, and ResNet18) to construct a deep learning regression network for quantitative detection of AFB1. There are 67,178 pixels used for training and 67,164 pixels used for testing. After subpixel decomposition, each aflatoxin pixel was determined to contain content, and each pixel had 400 hyperspectral values (415–799 nm). The experimental results showed that, among the four models, the modified ResNet18 model achieved the best effect, with R2 of 0.8898, RMSE of 0.0138, and RPD of 2.8851. Here, we implemented a sub-pixel model for quantitative AFB1 detection and proposed a regression method based on deep learning. Meanwhile, the modified convolution classification model has high predictive ability and robustness. This method provides a new scheme in designing the sorting machine and has practical value.
Read full abstract