## 4 Application of HSI and AI in the Food Industry
### Solid Products  
The areas in which the HSI has also seen increasing adoption include the evaluation of several quality parameters of fruits, such as pH, SSC, TA, and TP. The studies show that the integration of ANN and PLS with SNV and MSC leads to the non-destructive prediction of apple varieties with a high degree of accuracy (Rcv \(\approx\) 0.99) \begin{table}
\begin{tabular}{p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt}} \hline \hline  
1D-CNN-RF & - & PCA &
\begin{tabular}{c} quantification of \\ Clostridium sponges \\ spores in food products \\ \end{tabular} & Overall accuracy: 86\% & [147] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._among all quality parameters [150]. Furthermore, in predicting spoiled blueberries, the MT-SIS method used in combination with SPA extracted decaying regions, leading to an accuracy of over 97% for the training set and test set accuracy [151]. The results indicate that the performance of this method is remarkable in the processing of fruits. It is suggested to investigate the AI in different processing steps, such as detecting the pesticide residuals on the surface of different fruits. In grains, successful classifications of bulk grain samples using modified ResNet architecture have been performed, exploiting both spatial and spectral information from HIS that demonstrated 99.75% accuracy [152]. In the classification of broken grains and calculating the ratios for mixing by HSI using a Back Propagation Neural Network (BPNN), an accuracy of over 99% was shown [138]. As a consequence, AI-based HIS processing can play a key role in the classification of broken and whole grains, which is a very useful tool in terms of quality control for producers, by allowing them to adjust processing parameters to maintain product consistency. The classification of seeds and other grains can be considered in further research. In the meat industry, the development of a new approach using HSI with a 3D convolutional neural network to classify different classes of minced meat based on myoglobin pigment retention in the meat spectra was introduced. Techniques that included preprocessing schemes before data analysis outcompeted traditional techniques that do not consider features in space at high accuracy in classification [14]. Moreover, the high accuracy of HSI processing in predicting intramuscular fat (IMF) and pH in different red meat species (beef, lamb, and venison) using PLSR and deep convolutional neural networks (DCNN) [153], assessing pork quality characteristics through ANN [154], and observing color changes and freshness quantification [87,155], offers precise classifications of meat authenticity and quality traits. These approaches improve accuracy by incorporating both spectral and spatial data. Future applications in the meat industry could focus on the rapid detection of freshness, the spatial analysis of fat content, and comprehensive models predicting moisture and protein distribution for a variety of meats. In the case of leafy vegetables, the detection of cadmium (Cd), as a metal with a toxic nature and potential health risks, was predicted accurately through a combination of VNIR HSI with different machine learning models, for example, such as ANN, ensemble learning (EL), and SVM. This achievement was facilitated by considering wavelengths affecting chlorophyll and internal structure changes in the leaves due to cadmium [156]. In another study, the detection of foreign materials in freshly cut vegetables was performed using short-wave infrared (SWIR) data combined with PLS-DA [157]. Finally, the detection of vegetables in complex food matrices was achieved alongside E-nose data and LDA preprocessing, with an accuracy as high as 97.50% [158]. The results highlight AI potential in food safety and external quality control, which are necessary steps for leafy vegetables to ensure their health. The detection of bacteria and toxins is the next step to be considered for vegetables.