| With the improvement of the economic level and the growth of health awareness,the demand for apples in my country is increasing.The rapid inspection and grading of apple quality is especially important for improving production efficiency and increasing farmers’income.Quality inspection is not only the current need for fresh food,but also the basis for its reprocessing.In this context,it is of great significance to realize the non-destructive testing of apple quality.The optical characteristic parameters of fruit tissue are closely related to the components contained in the fruit,and mainly reflect the internal chemical information of the fruit tissue and the structure or physical properties of the surface.Therefore,the measured optical characteristic parameters can be used for non-destructive testing of fruit quality,and the realization of optical parameter inversion based on hyperspectral data has become an important link in the research of fruit quality testing.At present,there are several problems in the field of non-destructive testing of apple quality.1)The acquisition of spectral images and optical parameter data in the research has high requirements on the light source and measurement equipment.It must be carried out in a completely dark environment,and the interference of natural light cannot be avoided during the actual measurement process,which will cause certain Experimental error.At the same time,measuring data requires a lot of manpower and material resources,and the number of samples collected is limited.2)The universality of the model is poor,and the coverage of the sample is small.Once the variety of the sample changes,it is necessary to re-measure the data and build the model.3)The technical route is relatively traditional.At present,most of the foundations of model establishment are traditional machine learning methods,and the inversion accuracy is limited.In response to the above problems,this paper proposes a method of apple quality detection based on photon transmission simulation under surface light source.The specific research content is as follows:1)the sample data is collected.The hyperspectral imaging system is used to collect the spectral images of 118 apple samples under the surface light source condition,the double integrating sphere system is used to collect the optical characteristic parameter data of the peel and pulp,and the sugar content of the apple is collected using the brix meter and hardness meter.And hardness data.2)the Monte Carlo method was used to simulate the motion trajectory of photons in biological tissues,and an apple double-layer flat panel model based on the surface light source mapping method was established.The parameter input of the simulation program was determined according to the measured apple optical parameter range,and 20,000 apple tissues were quickly obtained.Surface brightness distribution map,3)use the optical parameters as the label,and input the apple simulation spectrum image into the convolutional neural network for training.The best training effect is achieved by adjusting the region of interest and the network structure.The final optical characteristic parameter inversion result is:the pulp absorption coefficientμa2is 90.15%,The pulp scattering coefficientμs2is 81.10%.A small amount of measured data is input into the pre-training model based on simulation data,and the final result is:the pulp absorption coefficientμa2is 83.63%,and the pulp scattering coefficientμs2is 80.41%.4)In order to improve the accuracy of optical parameter inversion,the obtained pre-trained model is fine-tuned and transferred to a small number of data sets of measured apple spectral images.Based on the idea of model migration,the network parameters of the first few layers are fixed,and only the last layer is changed.Laminate layers and fully connected layers to obtain the MTL-CNN model to realize the inversion of the optical characteristic parameters of the measured spectrum data.The final inversion result of the MTL-CNN method is that the pulp absorption coefficientμa2is 93.24%,and the pulp scattering coefficientμs2is 92.54%.Compared with the result of direct training,the results are improved by 9.61%and 12.13%.The results show that the transfer learning method can effectively improve the accuracy of optical parameter inversion.5)Finally,the output result of the fully connected layer of the network model is associated with the apple quality,and the error back propagation artificial neural network(BP-ANN)algorithm is used to construct the apple quality classification and regression model to realize the non-destructive detection of apple sugar content and hardness.The result is:the accuracy of apple sugar content and hardness for classification using the depth feature of the surface light source is 92.22%and 86.97%,which are 6.54%,5.87%,8.25%,6.48%higher than the hyperspectral data and optical parameter data methods,respectively.Compared with the point light source model,it has increased by 1.88%and 3.71%.The coefficient of determination R2of apple sugar content and hardness obtained from the apple quality regression model based on the depth characteristics of the surface light source is 0.9144 and 0.8131,respectively,which are increased by 0.1549,0.1397 and 0.1095,0.088,respectively,compared with the regression method using hyperspectral and optical parameters alone.Compared with the point light source model,it is improved by 0.0121 and 0.0349.It is proved that the method based on photon transmission simulation under surface light source can provide an important reference for nondestructive testing of apple quality. |