# Spectroscopy Imaging Techniques as In Vivo Analytical Tools to Detect Plant Traits
## 3 Hyper- and Multispectral Imaging
### Model Validation  
Most researchers have commonly used a few mathematical formulas to evaluate the performance of their employed models. The importance is to establish that the proposed models show good satisfaction, as indicated by errors and/or linearity relationship. Based on our review, researchers have often conducted various chemometric methods in comparative study. For instance, different mask segmentations were performed to estimate chlorophyll contents in wheat using MSI combined with PLSR [87]; various models were applied to predict alfalfa yield using MSI [88]; and VI models were established to assess nitrogen status in winter oilseed rape using MSI [89]. The equations that are most commonly used are R-squared (R\({}^{2}\)) and root mean squared error (RMSE), which are expressed in Equations (3) and (4), respectively:  
\[\text{R}^{2}=1-\frac{\sum_{i=1}^{n}\left(\text{y}_{1,\text{es}}-\text{y}_{1, \text{ref}}\right)^{2}}{\sum_{i=1}^{n}\left(\hat{\text{y}}-\text{y}_{1,\text{ es}}\right)^{2}} \tag{3}\] \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Crop**} & **Research** & **Wavelength** & **Measurement** & \multirow{2}{*}{**DL Models**\({}^{**}\)**} & **Ref.** \\  & **Emphasis** & **Range (nm)** & **Technique** & & \\ \hline \multirow{3}{*}{Cucumber} & Leaf nitrogen & \multirow{3}{*}{400–1000} & Hyperspectral & ANN-PSO, PLSR, & \multirow{3}{*}{[82]} \\  & prediction & & imaging & and CNN & \\ \multirow{3}{*}{Potato} & \multirow{3}{*}{Potato multi-defect} & \multirow{3}{*}{676–952} & Multispectral & YOLO-v5x, YOLOv3-tiny, & \\  & & detection & & imaging & DY2 TNet, and MDDNet & \\ \multirow{3}{*}{Wheat} & \multirow{3}{*}{Fusarium head} & \multirow{3}{*}{400–750} & \multirow{3}{*}{Hyperspectral} & DarkNet 19, EfficientNet & \multirow{3}{*}{[83]} \\  & & & & & B0 GoogLeNet MobileNet & \\ \multirow{3}{*}{Citrus} & \multirow{3}{*}{Plant biochemical} & \multirow{3}{*}{400–1000} & \multirow{3}{*}{Imaging} & V2, ResNet 18 ResNet 50, & \multirow{3}{*}{[84]} \\  & & & & & ShuffleNet, & \\ \multirow{3}{*}{Lettuce} & \multirow{3}{*}{Plant biochemical} & \multirow{3}{*}{400–1000} & Hyperspectral & \multirow{3}{*}{2 DCNN and FCNN} & \multirow{3}{*}{[80]} \\  & features & & imaging & & \\ \multirow{3}{*}{Lead (Pb)} & \multirow{3}{*}{480.46–1001.61} & \multirow{3}{*}{Hyperspectral} & \multirow{3}{*}{WT-SAE and WT-MC-SAE} & \multirow{3}{*}{[85]} \\  & & lettuce leaf & & imaging & \\ \multirow{3}{*}{Citrus} & Healthy and & \multirow{3}{*}{460, 520, 680, 740,} & Multispectral & Lightweight CNN & \\  & unhealthy leaf & & reflectance & (MobileNetV3) and & \\ \multirow{3}{*}{inspection} & \multirow{3}{*}{480, and 940} & imaging & transfer learning & \\ \hline \hline \end{tabular}  
* ANN-PSO = artificial neural network–particle swarm optimization; CNN = convolutional neural network; 2 DCNN = two-dimensional convolutional neural network; FCNN = fully convolutional neural network; WT-SAE = wavelet transform coupled to stacked auto-encodes; WT-MC-SAE = Monte Carlo wavelet transform coupled to stacked auto-encodes.  
\end{table} 
Table 2: Application of deep learning related to HSI/MSI for monitoring plant growth status. where n corresponds to the total dataset; \(y_{i,\text{es}}\) and \(y_{i,\text{ref}}\) refer to the estimated and referenced values at the \(i\)th element, respectively; and \(\overline{y}\) is the average value of the reference data (destructive value). The value of R\({}^{2}\) ranges between \(-\infty\) and 1 [90]. A model with the closest value to 1 has excellent goodness-of-fit performance. However, we do not recommend evaluating models based on R\({}^{2}\) itself. This is due to the fact that R\({}^{2}\) represents the connection between the x-axis (reference) and y-axis (predicted). Additionally, RMSE can be calculated to make the decision:  
\[\text{RMSE}=\sqrt{\frac{1}{n}\sum_{i=1}^{n}\left(y_{i,\text{es}}-y_{i,\text{ ref}}\right)^{2}} \tag{4}\]  
In contrast, the decision based on RMSE is in selecting a smaller value.