## 2 Materials and Methods
### VGG16 Classification Network  
In this study, VGG16 was chosen as the backbone of the 3D fluorescence samples classification network model, and the model diagram is shown below in Figure 4.  
The VGG16 network consists of 13 convolution layers and 3 fully connected layers. In this paper, the VGG16 model's input size is 1 \(\times\) 224 \(\times\) 224 pixels (grayscale image), and  
Figure 4: 3D-EEMs classification network based on VGG16. The size of the image is interpolated from size (60 \(\times\) 60) to size (224 \(\times\) 224) using the bilinear interpolation method. Grayscale images are converted into 3-channel RGB images using the Python Pillow function: Image.convert (”RGB”), which uses the Floyd–Steinberg dither method [29].  
Figure 3: 3D-EEMs are decomposed into PARAFAC components.  
the cross-entropy function is used as the loss function for model training, and the model training is optimized by Adam optimizer. The cross-entropy loss function is formulated as follows:  
\[L=\frac{1}{N}\sum_{i}L_{i}=-\frac{1}{N}\sum_{i}\sum_{c=1}^{M}y_{ic}\log(p_{ic}) \tag{5}\]  
where \(M\) represents the number of categories. \(y_{ic}\) represents the symbolic function (0 or 1). If the real category of sample \(i\) is equal to \(c\), take 1, otherwise, take 0. \(p_{ic}\) represents the prediction probability that the observation sample \(i\) belongs to category \(c\).  
Before training the VGG16 network using 3D-EEMs data, we need to preprocess the 3D-EEMs data to conform to the input and output requirements of the VGG16 network. Through the previous data preprocessing section, the four types of 3D fluorescence datasets have been adjusted to a unified excitation-emission interval, and the Raman normalization operation has been performed on samples. Although this operation was completed, since the excitation interval and emission interval of fluorescence measurement equipment were different during the measurement process of 3D-EEMs, we need to adjust the interval of four types of 3D-EEMs data to be consistent by using interpolation. After interpolation, the size of 3D-EEMs is uniformly transformed to 60 \(\times\) 60. Figure 5 shows the changes in 3D-EEMs data before and after interpolation. The interpolation method uses bilinear interpolation and the mathematical expression is as follows:  
\[f(R_{1})=\frac{x_{2}-x}{x_{2}-x_{1}}f(Q_{11})+\frac{x-x_{1}}{x_{2}-x_{1}}f(Q_{ 21}) \tag{6}\]  
\[f(R_{2})=\frac{x_{2}-x}{x_{2}-x_{1}}f(Q_{12})+\frac{x-x_{1}}{x_{2}-x_{1}}f(Q_{ 22}) \tag{7}\]  
where \(f(Q_{11})\), \(f(Q_{21})\), \(f(Q_{12})\) and \(f(Q_{22})\) represent the values of function \(f\) at 4 points: \(Q_{11}\) = (\(x_{1}\), \(y_{1}\)), \(Q_{12}\) = (\(x_{1}\), \(y_{2}\)), \(Q_{21}\) = (\(x_{2}\), \(y_{1}\)), and \(Q_{22}\) = (\(x_{2}\), \(y_{2}\)). In our experiment, \(x\) represents the position of emission-excitation wavelength, and \(f\) represents the fluorescence intensity at a certain position.  
Figure 5: Comparison before and after 3D-EEMs interpolation. (**a**) Before interpolation; and (**b**) After interpolation. In (**b**), emission and excitation from 1 to 60 represent the number of wavelengths and excitation wavelengths, and the range of wavelengths is still consistent with that in (**a**).  
After data normalization, use Python code to convert 3D-EEMs into grayscale images (1 \(\times\) 60 \(\times\) 60). The emission interval is the length of the grayscale image, and the excitation interval is the width of the grayscale image, and the fluorescence intensity is the grayscale value. The transformation relationship is as follows:  
\[y=\frac{x-x_{min}}{x_{max}-x_{min}}*255 \tag{8}\]  
where \(x\) represents the intensity value of fluorescence in 3D-EEMs, and \(y\) represents the grayscale value after conversion to a grayscale image. The data are linearly mapped to the [0, 1] interval using dispersion standardization. \(x_{min}\) is the minimum fluorescence intensity, \(x_{max}\) is the maximum fluorescence intensity.