| Milk is an essential drink in daily life,as it is rich in nutrients such as proteins,lactose,and fats.With the improvement of people’s living standards,milk quality issues have gradually received public attention.The quality of milk can be judged by the content of protein,fat and other components in milk,and it is also necessary to detect whether the milk contains adulterated substances to provide protection for the safety of milk quality.Hyperspectral imaging technology can realize rapid,deep and all-round detection,so it is widely used in food safety detection.Hyperspectral images contain rich spatial and spectral information,which can be combined with various algorithms to form nondestructive spectral detection technology.Therefore,this thesis attempts to use hyperspectral imaging technology to detect the content of milk protein and fat as well as milk adulteration.By preprocessing and band selection of independently collected milk hyperspectral image data,various models are established to detect the content of milk protein and fat,so as to achieve non-destructive testing of milk quality.At the same time,a model was established to analyze the milk adulteration qualitatively and quantitatively.The main research contents and conclusions are as follows:(1)Collect and construct milk hyperspectral data set and process it.The spectral images of Yili QQ star milk,Mengniu high calcium milk,Telunsu milk,Yili skim milk,Yili Zhennong milk and adulterated milk were collected respectively.Data acquisition will produce more redundant information and interference factors,which is not conducive to the experiment,so it is necessary to preprocess the hyperspectral image to remove interference factors.In the experiment,derivative method,S-G smoothing method,multiple scattering correction(MSC)and other methods were used to preprocess the milk hyperspectral data,and bands were selected by methods such as uninformative variable elimination(UVE)and competitive adapative reweighted sampling(CARS).The experimental results were satisfactory,which could remove redundant data and find the key bands.(2)A two-channel three-level prediction model based on Alexnet convolutional neural network(Alex2-3Dnet)was proposed and applied to the detection of milk protein content.Alexnet’s network structure is improved,2D double-channel convolutional layer and 3D convolutional layer are added,and information of multiple dimensions is extracted and fused,and then the fused information is mined.The results showed that the protein content of Yili QQ Star milk detected by Alex2-3Dnet was 3.13g/100 ml.The protein content of Mengniu high calcium milk was 3.01g/100 ml.The protein content of Telensul milk was 3.49g/100 ml.The protein content of Yili skim milk was 3.14g/100 ml.The protein content of Yili Zhennong milk was 3.19g/100 ml.The experimental results show that the Alex2-3Dnet model proposed in this thesis is ideal for the detection of protein content in milk spectral images,and the detection values of all 5 kinds of milk are close to the true values,with an error of less than or equal to 0.11g/100 ml.The experimental results show that the Alex2-3Dnet model proposed in this thesis is suitable for the detection of milk protein content.(3)An optimized Alex2-3Dnet prediction model(IHHO-Alex2-3Dnet)based on the improve harris hawks optimization(IHHO)was proposed and applied to the detection of milk fat content.IHHO can find the optimal solution more effectively by using the modified energy linear decline control mechanism,introducing the random contraction index function and adaptive weight to balance the relationship between global search and local mining.The experimental results showed that the detection value of fat content of Telensu milk by the IHHO-Alex2-3Dnet model proposed in this thesis was 4.39g/100 ml,that of Yili QQ Star milk was 3.67g/100 ml,and that of Mengniu high-calcium milk was 3.62g/100 ml.The detected value of fat content of Yili skim milk was 0.05g/100 ml,and the detected value of fat content of Yili Zhennong milk was 4.57g/100 ml.The experimental results show that the Alex2-3Dnet model optimized by IHHO algorithm has a better prediction effect,and the predicted value of fat is very close to the real value,with an error less than or equal to0.08g/100 ml.The experimental results show that the IHHO-Alex2-3DNET model proposed in this thesis is suitable for the detection of milk fat content.(4)A qualitative analysis model of long short-term memory network(LSTM)optimized by elite opposition-based learning improved Aquila Optimizer(EOBL-AO)algorithm(EOBL-AO-LSTM)is proposed and applied to the identification of adulterated species in milk.In order to enhance the global optimization ability of AO algorithm,an elite reverse learning algorithm is introduced to generate the initial population.The EOBL-AO algorithm is used to optimize the LSTM model,and the performance of the model is improved effectively.The experimental results show that the proposed EOBL-AO-LSTM model has the best detection effect on adulterants,with Kappa coefficient 1.0,F1_score 1.0 and accuracy 1.0.The experimental results show that this method can be used for qualitative analysis of milk adulteration quickly and accurately.(5)An optimized LSTM prediction model(SSA-LSTM)based on sparrow search algorithm(SSA)was proposed and applied to the detection of adulterants in milk.The experimental results show that the LSTM model optimized by Sparrow search algorithm has achieved significant improvement on the test set,with the determination coefficient R2 of0.9983 and the root-mean-square error RMSE of 0.0132.The experimental results show that the optimized LSTM model can accurately predict and identify the content of adulterants in milk quickly and non-destructively. |