## 5 Discussion  
The findings highlight the significant challenges associated with applying machine learning techniques to bainite recognition in steel microstructures. Among the tested approaches, the random forest algorithm delivered the best overall performance; however, its dependence on engineered features derived from histogram data constrains its ability to adapt to more intricate image characteristics. This limitation underscores the importance of exploring advanced deep learning methods, such as CNNs, which excel at automatically extracting features directly from raw image data. Additionally, it is essential to evaluate algorithms capable of generating or incorporating novel features to enhance model robustness.  
The current study involves a broad range of tested parameters. It is important to note that these models are not typically used in conventional image analysis. However, the primary objective of this paper is to highlight that the selected application--histogram analysis--has the potential to provide new features for more advanced models. These features could assist in reducing the search space for future parameter optimization, particularly in models such as CNNs that need much more computational capacity than the presented methods.  
The analysis also revealed that datasets that comprise large segments yielded inconsistent and unstable results. An increase in the segment area corresponds to a decrease in the size of the dataset. The suboptimal performance of the model for small datasets is attributable to more than just the limited size of the datasets. Large segments covered a greater sample area by encompassing a broader spectrum of microstructures. In such instances, the binary classification of segments becomes challenging. As the volume of data to be analyzed by the expert increases, the decision boundary becomes less distinct, and rudimentary image analysis techniques, such as the histogram, may not adequately reflect the characteristics of the heterogeneous microstructure. Given the previously indicated characteristics of large segments, increasing the amount of data in the datasets by generating them or applying augmentation using only histograms may not result in a significant improvement in model performance. Potential solutions include the extraction of additional, more descriptive features of the segments, based on which it will be possible to classify them more accurately, but further investigation is needed in the context of segment size optimization. This study also emphasizes the need to implement more rigorous cross-validation strategies. These strategies are necessary to ensure robust performance evaluations.  
Classification based on histograms has a higher explanatory power than when using black-box models, such as CNNs. The proposed method is conducive to the creation of a knowledge base that can be used to accelerate and improve the quality of the microstructure analysis process in the industry. However, reliance on histogram bins as the  
Figure 5: Summary of model performance for different numbers of segments.  
primary features for classification may overlook critical spatial and textural details that are fundamental to accurately distinguishing bainite from other microstructural components. To address these shortcomings, future research should prioritize feature extraction techniques [2] capable of capturing the nuanced patterns present in microstructural images. This could involve integrating spatial context, texture analysis, and advanced machine learning frameworks to achieve more reliable and accurate bainite classification.  
This study demonstrated the feasibility of providing potential support for experts in the sample validation process. This support could result in more consistent validation results and a reduction in the time necessary to analyze samples.