Biofilms are ubiquitous in aqueous environments, exerting significant influence on diverse surfaces, including metals prone to microbiologically influenced corrosion (MIC). This multifaceted phenomenon demands interdisciplinary collaborations to combat its far-reaching implications. In this context, our research delves into the intricate characterization of twodimensional (2D) materials, particularly hexagonal boron nitride (hBN), which is crucial for advancing corrosion prevention coatings. The nanoscale dimensions of 2D materials pose challenges in microstructural analysis and defect identification, necessitating labor-intensive traditional techniques. To address these complexities, we utilized two unsupervised machine learning models, namely, (a) K-means clustering, and (b) Gaussian Mixture Model (GMM), which enabled clear differentiation between multilayer hBN (MLhBN) and cracks. Our approach will streamline the characterization process and facilitate the extraction of thin layers with enhanced accuracy.