The circulation of hazardous chemicals has seriously threatened people’s safety,such as ammonium nitrate substances and nitroglycerin explosives,which have caused social unrest.Common detection methods include X-ray,gas chromatography(GC),neutron detection technology,etc.These detection methods have problems such as complicated operation and long detection time.Raman spectroscopy(RS)has become a valuable technique for rapid chemical analysis due to the advantages of simple operation,weak water interference and the ability to distinguish the types of substances based on highly specific vibration spectrum characteristics.At present,Raman spectroscopy technology has been used in the detection and analysis of a variety of harmful chemicals.With the introduction of deep learning into Raman spectroscopy data analysis,it effectively compensates for the problem of inconsistent optimization targets in spectroscopy analysis and solves various tasks in spectroscopy analysis.In order to preserve the continuity of the spectrum,the convolution mode of the two-dimensional convolution layer is changed to the one-dimensional convolution form.In practical work,Raman spectral data is very limited,and the customized network model will greatly increase the workload and waste energy.In this study,surface-enhanced Raman spectroscopy(SERS)and RS are used to detect drug residues in urine and hazardous chemicals in the field of public safety.Firstly,the network architecture was designed manually,and the application of various deep learning networks in the detection of drug residues in urine was discussed.Then the neural network architecture search(NAS)was used to generate a reasonable and excellent network,and then to realize the rapid and accurate analysis of harmful chemicals.The main content of this article is as follows:(1)Feedforward neural network(FNN),convolutional neural network(CNN),full convolutional network(FCN)and principal component analysis network(PCANet)combined with surface-enhanced Raman technology to identify drugs in urine.The network in this study is based on the existing network model,artificially expands the network width and depth,and determines the network architecture and optimal network weight through training;a comparative experiment is constructed,K-nearest neighbor(KNN),Support vector machine(SVM),random forest(RF).The spectral data in the article will be input into the network in two forms,one-dimensional vector or two-dimensional matrix.The results show that SVM performs best among the three machine learning models,with test set accuracy(ACCp)of97.76%.When the spectral data is input into CNN in the form of a one-dimensional vector,CNNaobtains good results.The accuracy rates of the training set accuracy(ACCC),validation set accuracy(ACCV)and test set accuracy(ACCP)are 99.56%,94.93%and 94.58,respectively.When the spectral data is input into CNNbin the form of a two-dimensional matrix,the drug identification results in the urine will be the best,ACCC=99.90%,ACCV=%98.17%,ACCP=98.05%.The above results show that the deep learning network has better performance than the machine learning method,and the operation is more convenient,which provides a rapid detection method for the identification of drugs in the urine.In addition,in the case of using the same network,two-dimensional matrix input is better than one-dimensional input.(2)Detect hazardous chemicals by fusion of Raman spectroscopy and NAS method.In this study,the NAS method was used to generate a network model for identifying harmful chemicals,and then compared with traditional machine learning algorithms(KNN,SVM,RF)and classic deep learning networks(VGG-16,Dense Net-BC).Experimental results show that in the study of RS data for identifying 300 hazardous chemicals,SVM and Dense Net-BC perform better,and their recognition accuracy is ACCP=95.46%and ACCP=98.60%,respectively.NAS stands out with 100%recognition accuracy on the prediction set,which is better than the other 5 machine learning and deep learning methods.The feature extraction of methamphetamine and ketamine is performed using the network generated by NAS.It can be seen from the feature map that the main features extracted by the network are located on the main peaks of 652 and 1001 cm-1,which indicates that the network generated by NAS has strong feature extraction capabilities,and the generated network model is reasonable and desirable.This paper fully demonstrates the great potential of RS in the detection and analysis of hazardous chemicals,combined with NAS provides a new detection method for the automatic identification of hazardous chemicals.In addition,it provides an efficient,simple and feasible scheme for spectral data analysis in practical work. |