| Food safety is an important issue related to people’s life and property and national security and stability.In actual production and life,a large number of potential safety hazards are caused by long-term storage of food.Food inspection and testing are the most direct and effective means to ensure food safety.Improving the existing food safety inspection and testing technology and establishing a strict and effective food inspection and testing system is the key to ensuring food safety.In real life,part of food safety problems are caused by the expiration of food deadlines.Studies have found that the nutrients contained in food will be lost in large quantities with the storage time increases,and more importantly,microorganisms multiply at the same time.Therefore,the technical research on food freshness detection is full of potential and significance.Since the twentieth century,terahertz technology has developed rapidly,and many studies have introduced it into the field of food safety testing,which has become a promising method.At the same time,deep learning technology has gradually become a research hotspot and mainstream development direction in the field of artificial intelligence.Deep learning represents the main development direction of machine learning and artificial intelligence research,and has brought revolutionary progress to the fields of machine learning and computer vision.This article aims to realize the non-invasive automatic detection and classification of fruits and vegetables by combining terahertz technology and deep learning technology.This paper studies the changes of the spectral parameters of fruits and vegetables and the changes of spectrograms in different types and different storage durations of terahertz waves,and detects the freshness of fruits and vegetables and classifies them according to the changing laws and trends combined with deep learning algorithms.Firstly,this paper introduces the electromagnetic characteristics of food and the reason of its change with storage time,the physical principle of electromagnetic wave propagation in the object,the physical significance of dielectric constant and scattering parameters,and the interaction relationship between THz radiation and hydrogen bond in water.Using fruits and vegetables as experimental samples,an experimental system was built,and the scattering parameters of the experimental samples in the 0.75-1.10 THz frequency band were measured by a vector network analyzer containing a waveguide.Then,the pre-processing work after data collection is carried out.The data is optimized through denoising,effective reference area establishment and support vector regression model fitting method,and the experiment is verified by combining evaluation functions from different angles.After that,the quasiNewton method was used to obtain the dielectric constant through the scattering parameters.Finally,combined with the characteristics of the electromagnetic parameter sequence of the experimental samples in the THz frequency band,a long-and short-term neural network is selected for learning,so as to detect and classify vegetable tissues.In order to associate the spectrogram identification process with the characteristics of the sample tissue,the analysis and identification of the sample tissue was realized from the perspective of the analysis of the spectrogram mechanism,so as to improve the interpretation and diversity of the sample tissue terahertz detection.This article then proposes a detection and classification method based on terahertz spectrogram.It provides new research ideas for terahertz detection.The frequency domain,time domain,and time-frequency domain characteristics are obtained by preprocessing the signal,and then combined with the experimental data to select the network and improve the network.The proposed network learns the time-spectrum diagram of the experimental sample in the THz frequency band.Fruits are detected and classified,and the experimental results show that the proposed detection system based on terahertz spectrogram is feasible and has certain advantages. |