| As a major vegetable,broccoli is widely cultivated in China,not only supplying domestic residents,but also exporting to the international market.The application of pesticides cannot be avoided during the planting process.Nowadays,gas or liquid chromatography are the most common methods.However,such traditional detection methods require cumbersome pre-treatment steps,expensive instruments and professional technical personnel.So it cannot be widely used.Nowadays,due to the characteristics of simplicity,rapidity,low cost and non damage,hyperspectral technology get more and more attention.However,when faced with samples such as broccoli,which have dense and uneven pores,hyperspectral technology still has certain technical difficulties,requiring complex spectral data analysis.Therefore,based on hyperspectral imaging technology,this paper compares various algorithms to find a better method.This paper uses three pesticides(imidacloprid,cypermethrin and chlorpyrifos).Refers to the latest national standards,obtain samples of broccoli pesticide residues,and uses broccoli samples sprayed with distilled water of the same quality as a comparison group.Use hyperspectral instrument to take hyperspectral photos of 40samples(30 samples with residues+10 samples without residues).Each sample captures35 regions of interest(ROI)of 30×30 pixels.Finally,1400 regions of interest are obtained,and their average spectra are calculated as data samples.To avoid sensor noise,this paper uses some different algorithms to process data,such as MSC,1D,SNV.Three models(SVM,RF,CNN)are used to evaluate different algorithms.Select the three best preprocessing algorithms from each model for the next step of feature wavelength screening.Three algorithms(PCA,CARS and SPA)are used to reduce the dimensions of the data,and select the most suitable method.Compared to using all feature data to participate in modeling,CARS and SPA are have better model effect.CARS filters a large number of bands,and there is still some redundant information in the band data.The accuracy of the model has not improved significantly.The number of features screened by SPA is stable,and the selected wavelength is mostly located at the trough position of the spectral curve,which conforms to the spectral reflection characteristics of biochemical substances.It reduces a large amount of redundant information and simplifies the model and performs well.However,PCA algorithm drop some important information when removing noise and redundant information.Through horizontal comparison of classification accuracy of different recognition models.Compared to SVM and RF,CNN has the ability to automatically extract spectral features.According to the characteristics of spectral data,use 1D-CNN.The accuracy of 1D-CNN is higher than that of SVM and RF.It can be seen that when targeting broccoli samples,the integration of deep learning and hyperspectral technology can not only avoid the process of manually selecting preprocessing algorithms and dimensionality reduction algorithms,thereby simplifying the modeling steps of hyperspectral technology.The overall accuracy of CNN is 95.36%,which is2.50% and 5.71% higher than SVM and RF,respectively,giving full play to the advantages.Hyperspectral possess both image information and spectral information,so this paper visualizes the pesticide residue identification model,and samples can be identified by the pictures.In the practical application,visualization results are more convenient for users,which is conducive to its spread. |