Peanuts with fungal contamination may contain aflatoxin, a highly carcinogenic substance. We propose the use of hyperspectral imaging to quickly and noninvasively identify fungi-contaminated peanuts. The spectral data and spatial information of hyperspectral images were exploited to improve identification accuracy. In addition, successive projection was adopted to select the bands sensitive to fungal contamination. Furthermore, the joint sparse representation based classification (JSRC), which considers neighboring pixels as belonging to the same class, was adopted, and the support vector machine (SVM) classifier was used for comparison. Experimental results show that JSRC outperforms SVM regarding robustness against random noise and considering pixels at the edge of the peanut kernel. The classification accuracy of JSRC reached 99.2% and 98.8% at pixel scale, at least 98.4% and 96.8% at kernel scale for two peanut varieties, retrieving more accurate and consistent results than SVM. Moreover, fungicontaminated peanuts were correctly marked in both learning and test images.
Aflatoxins in moldy peanuts are seriously toxic to humans. These kernels need to be screened in the production process. Hyperspectral imaging techniques can be used to identify moldy peanuts. However, the changes in spectral information and texture information caused by the difference in moisture content in peanuts will affect the identification accuracy. To reduce and eliminate the influence of this factor, a data augmentation method based on interpolation was proposed to improve the generalization ability and robustness of the model. Firstly, the near-infrared hyperspectral images of 5 varieties, 4 classes, and 3 moisture content gradients with 39,119 kernels were collected. Then, the data augmentation method called the difference of spectral mean (DSM) was constructed. K-nearest neighbors (KNN), support vector machines (SVM), and MobileViT-xs models were used to verify the effectiveness of the data augmentation method on data with two gradients and three gradients. The experimental results show that the data augmentation can effectively reduce the influence of the difference in moisture content on the model identification accuracy. The DSM method has the highest accuracy improvement in 5 varieties of peanut datasets. In particular, the accuracy of KNN, SVM, and MobileViT-xs using the data of two gradients was improved by 3.55%, 4.42%, and 5.9%, respectively. Furthermore, this study provides a new method for improving the identification accuracy of moldy peanuts and also provides a reference basis for the screening of related foods such as corn, orange, and mango.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.