# Pattern Recognition in Dried Milk Droplets Using Lacunarity and Deep Learning
## 4 Discussion  
Our work investigated the role of NaCl in the structural differentiation of dried milk droplets, focusing on the classification of whole and lactose-free milk and the detection of water adulteration. The findings demonstrated that NaCl modulates the crystallization process, inducing morphological changes such as amorphous, cross-shaped, and dendritic structures. The different variations were quantified using lacunarity and further analyzed using a convolutional neural network (CNN)-based model to assess their discriminatory power. The classification performance of both approaches, based on confusion matrix evaluations, was assessed through ROC curve analysis for the lacunarity-based method and precision for the CNN model, establishing a robust framework to compare the effectiveness between lacunarity and deep learning in milk differentiation. A key observation was that lacunarity-based classification achieved high accuracy (95.04% \(\pm\) 6.66%), with deep learning providing a slight improvement (95.22% \(\pm\) 4.47%). The highest accuracy was obtained at 2% NaCl, where lacunarity reached 97.08% \(\pm\) 2.27% and deep learning 96.88% \(\pm\) 2.8%. The results suggest that NaCl enhances structural differentiation primarily in adulterated milk deposits. Furthermore, the consistency between both approaches demonstrates that the structural variations induced by NaCl are inherently discernible and confirm the reliability of lacunarity analysis as a classification tool. Notably, the lowest classification performance for both methods was observed in the detection of 20% added water in whole milk and lactose-free milk without NaCl. This outcome can be attributed to the uniformity of the resulting deposits, which significantly impairs the differentiation between sample groups. In the absence of NaCl, the drying dynamics of milk are governed by capillary-driven flow and Marangoni recirculation; however, the complex interplay between proteins, lipids, and residual salts leads to heterogeneous deposition patterns, which arise from phase separation, protein aggregation, and structural rearrangements during solvent evaporation. The final effect of such interplay is the introduction of spatial variability in the final dried deposit. As far as the NaCl addition is concerned, it induces localized crystallization and anisotropic structural variations that enhance pattern differentiation. The resulting hetero  
Figure 11: Accuracy of CNN-based water detection in milk. Efficiency levels in detecting different water concentrations (20%, 40%, 60%, and 80%) in whole and lactose-free milk samples under three NaCl conditions: \(\phi_{N}=0\) wt% (**a**), 2 wt% (**b**), and 4 wt% (**c**). The deep learning-based model demonstrates a high capacity for detecting milk adulteration, maintaining precision above 90% in most cases. Compared to the lacunarity approach (Figure 10), the machine learning model exhibits a more homogeneous and stable performance across varying NaCl concentrations and water content, particularly improving sensitivity in cases with 20% and 40% added water. geneous morphologies exhibit increased textural contrast and regional inhomogeneities, thereby amplifying the discriminatory power of both analytical techniques. The reduced classification sensitivity in water detection for salt-free samples suggests that the method's effectiveness relies on the presence of structural discontinuities or solute-driven phase separation events, which are absent in uniformly deposited films. Therefore, the results show that the morphology of the deposit plays a key role in classification accuracy; when the deposits are too uniform, both methods struggle to differentiate between samples, which reinforces the idea that structural variations are essential for effective pattern recognition. For higher NaCl concentrations, the deep learning-based model maintained precision values above 90% in most evaluated scenarios and exhibited a more homogeneous and consistent performance across varying salt concentrations and water content.