Fig. 3: Detection results of in situ measurements of 2D halide perovskites formation.

Diffraction patterns in (a) and (b) are annotated with Bragg reflections detected by the machine learning algorithm at t = 0 s and t = 60 s, respectively. Radial profiles above the images show the initial radial profiles calculated from the diffraction patterns (left images) and the profiles calculated based on the detected peaks (right images). c The distribution of the absolute error of radial peak positions location by the model with 50% and 95% percentiles. d The radial positions of the detected peaks over time. e The evolution of a lattice parameter b over time for n = 2 phase of (BA)2(MA)n−1PbnI3n+1 (denoted as BAMAI on the legend) perovskite calculated via the detected peaks positions. The error bars indicate the standard errors (s.e.m.) of the fit calculated using Hessian matrices.