Reflection High-Energy Electron Diffraction (RHEED) is a standard in situ characterization technique used to monitor surface crystal structure during thin film deposition methods such as Molecular Beam Epitaxy (MBE). RHEED patterns contain rich information about the surface ordering, but their interpretation is often manual or restricted to simple intensity tracking, which fails to fully capture the evolution of the surface. This work presents an approach to automating RHEED pattern analysis using semantic segmentation (pixel-wise labeling) to detect and classify diffraction features, including spots, streaks, and Kikuchi lines.
To enable such analysis, we compiled and annotated a ground-truth dataset of diverse RHEED patterns. This dataset was utilized to conduct a comparative study of modern deep learning architectures, benchmarking Convolutional Neural Networks (CNNs) and Transformer-based architectures paired with various encoder backbones. The goal of this comparison is to identify and optimize the architecture that maximizes accuracy to ensure reliable pattern monitoring. Results demonstrate that the optimized models robustly isolate diffraction features from complex backgrounds. Furthermore, the method exhibits strong generalization capabilities, successfully recognizing RHEED patterns of different material systems and imaging conditions not present in the training data. In addition, the image processing achieves frame rates suitable for real-time monitoring. The procedure enables the extraction of quantitative diffraction features from raw RHEED images and videos, paving the way for automated control in industrial RHEED workflows, as well as facilitating post-growth analysis.