To realize the quick, nondestructive detection of pesticide residues in lettuce leaves, a new method based on deep brief network (DBN) combined with near‐infrared transmission spectroscopy, was studied in this article. Two kinds of pesticide residues (fenvalerate and triazoline) and distilled water were sprayed on the surface of lettuce leaves, respectively. In addition, near infrared transmission spectroscopy was used for collecting spectral data of 240 lettuce samples. Furthermore, Savitzky–Golay combined with multiplicative scatter correction was used to denoise the raw spectral data. Then, after preprocessing spectral data, DBN was used to extract features and identify kinds of pesticide residues in lettuce leaves. Moreover,successive projection algorithm (SPA) was used to select characteristic wavelengths. After all, support vector machine (SVM), PLS‐DA, and k‐nearest neighbor were carried out to establish classification models based on full spectral data, data extracted by DBN and data extracted by SPA. Consequently, DBN–SVM performed best and the accuracy of training set and test set reached 98.89 and 95.00%, respectively. Hence, the method of near infrared transmission spectroscopy combined with DBN–SVM is practical for the qualitative analysis of pesticide residues in lettuce leaves.
Practical applications
Using near infrared spectroscopy could detect the kinds of pesticide residues in lettuce leaves quickly and effectively. A new method involving deep brief network (DBN) was proposed to extract the features of spectral data. Results in this study showed that the DBN is feasible and effective for building classification models of different pesticide residues.