- Open Access
Defect detection in magnetic systems using U-Net and statistical measures
APS Open Sci. 1, 000103 – Published 24 August, 2026
DOI: https://doi.org/10.1103/czsp-gnmy
Abstract
Local material inhomogeneities can strongly influence magnetization dynamics and macroscopic magnetic properties, yet detecting such defects from magnetic imaging data remains challenging when thermal fluctuations and experimental noise obscure static contrast. Here, we investigate defect detection in strongly fluctuating magnetization regimes, where signatures of inhomogeneities largely average out in time-resolved measurements. Using finite-temperature micromagnetic simulations with randomly distributed defects and material parameters representative of , we compute per-pixel temporal mean, temporal standard deviation, and latent entropy and use them as inputs for U-Net-based semantic segmentation models. We find that the most effective descriptor depends on the noise level and, importantly, that robust detection requires training data that reflect the expected noise statistics. These results provide practical guidance toward designing noise-robust defect-detection workflows in magnetic imaging.
Physics Subject Headings (PhySH)
Article Text
References (26)
- M. Katter, J. Weber, W. Assmus, P. Schrey, and W. Rodewald, A new model for the coercivity mechanism of (Co,Fe,Cu,Zr) magnets, IEEE Trans. Magn. 32, 4815 (1996).
- G.-P. Zheng and M. Li, Influence of impurities on dynamic hysteresis of magnetization reversal, Phys. Rev. B 66, 054406 (2002).
- P. Kühn, Y. Yang, G. Chen, S. N. Foster, H. Egger, and B.-X. Xu, Microstructural influence on hysteresis and eddy-current losses of additively manufactured electrical steel: A multiphysical approach, Comput. Mater. Sci. 263, 114408 (2026).
- H. Chen, F. Yun, J. Qu, Y. Li, Z. Cheng, R. Fang, Z. Ye, S. P. Ringer, and R. Zheng, Coercivity degradation caused by inhomogeneous grain boundaries in sintered Nd-Fe-B permanent magnets, Phys. Rev. Mater. 2, 054404 (2018).
- Y. Yang, T. D. Oyedeji, X. Zhou, K. Albe, and B.-X. Xu, Tailoring magnetic hysteresis of additive manufactured Fe-Ni permalloy via multiphysics-multiscale simulations of process-property relationships, npj Comput. Mater. 9, 103 (2023).
- Y. Yang, P. Kühn, M. Fathidoost, and B.-X. Xu, Micromagnetics and multiscale hysteresis simulations of permanent magnets, COMPEL 42, 993 (2023).
- F. Scheibel, T. Gottschall, A. Taubel, M. Fries, K. P. Skokov, A. Terwey, W. Keune, K. Ollefs, H. Wende, M. Farle, M. Acet, O. Gutfleisch, and M. E. Gruner, Hysteresis design of magnetocaloric materials—From basic mechanisms to applications, Energy Technol. 6, 1397 (2018).
- O. Gutfleisch, T. Gottschall, M. Fries, D. Benke, I. Radulov, K. P. Skokov, H. Wende, M. Gruner, M. Acet, P. Entel, and M. Farle, Mastering hysteresis in magnetocaloric materials, Philos. Trans. R. Soc. A 374, 20150308 (2016).
- H. Sepehri-Amin, L. Liu, T. Ohkubo, M. Yano, T. Shoji, A. Kato, T. Schrefl, and K. Hono, Microstructure and temperature dependent of coercivity of hot-deformed Nd–Fe–B magnets diffusion processed with Pr–Cu alloy, Acta Mater. 99, 297 (2015).
- J. Lyubina, R. Schäfer, N. Martin, L. Schultz, and O. Gutfleisch, Novel design of alloys towards high magnetic refrigeration performance, Adv. Mater. 22, 3735 (2010).
- C. S. Arnold, M. Dunlavy, and D. Venus, Magnetic susceptibility measurements of ultrathin films using the surface magneto-optic Kerr effect: Optimization of the signal-to-noise ratio, Rev. Sci. Instrum. 68, 4212 (1997).
- M. Kopp, S. Harmeling, G. Schütz, B. Schölkopf, and M. Fähnle, Towards denoising XMCD movies of fast magnetization dynamics using extended Kalman filter, Ultramicroscopy 148, 115 (2015).
- I. Horenko, D. Rodrigues, T. O’Kane, and K. Everschor-Sitte, Scalable computational measures for entropic detection of latent relations and their applications to magnetic imaging, Commun. Appl. Math. Comput. Sci. 16, 267 (2021).
- D. R. Rodrigues, K. Everschor-Sitte, S. Gerber, and I. Horenko, A deeper look into natural sciences with physics-based and data-driven measures, iScience 24, 102171 (2021).
- X. Cao, B. Chen, and W. He, Unsupervised defect segmentation of magnetic tile based on attention enhanced flexible U-Net, IEEE Trans. Instrum. Meas. 71, 1 (2022).
- I. Labrie-Boulay, T. B. Winkler, D. Franzen, A. Romanova, H. Fangohr, and M. Kläui, Machine-learning-based detection of spin structures, Phys. Rev. Appl. 21, 014014 (2024).
- A. R. C. McCray, A. Bender, A. Petford-Long, and C. Phatak, Simulation-trained machine learning models for Lorentz transmission electron microscopy, APL Mach. Learn. 2, 026120 (2024).
- W. F. Brown, Micromagnetics, Interscience Tracts on Physics and Astronomy (Interscience Publishers, New York, 1963), Vol. 18.
- A. Lyberatos, D. V. Berkov, and R. W. Chantrell, A method for the numerical simulation of the thermal magnetization fluctuations in micromagnetics, J. Phys.: Condens. Matter 5, 8911 (1993).
- J. Leliaert, J. Mulkers, J. De Clercq, A. Coene, M. Dvornik, and B. Van Waeyenberge, Adaptively time stepping the stochastic Landau-Lifshitz-Gilbert equation at nonzero temperature: Implementation and validation in , AIP Adv. 7, 125010 (2017).
- A. Vansteenkiste, J. Leliaert, M. Dvornik, M. Helsen, F. Garcia-Sanchez, and B. Van Waeyenberge, The design and verification of , AIP Adv. 4, 107133 (2014).
- J. M. D. Coey, Micromagnetism, domains and hysteresis, in Magnetism and Magnetic Materials (Cambridge University Press, Cambridge, UK, 2010), Chap. 7, pp. 231–263.
- O. Ronneberger, P. Fischer, and T. Brox, U-Net convolutional networks for biomedical image segmentation, in Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015: 18th International Conference, Munich, Germany, October 5–9, 2015, Proceedings, Part III 18 (Springer, Cham, 2015), pp. 234–241.
- H. Zunair and A. Ben Hamza, Sharp U-Net: Depthwise convolutional network for biomedical image segmentation, Comput. Biol. Med. 136, 104699 (2021).
- A. Kamath, J. Willmann, N. Andratschke, and M. Reyes, The impact of U-Net architecture choices and skip connections on the robustness of segmentation across texture variations, Comput. Biol. Med. 197, 111056 (2025).
- R. Knapman, A. Majumdar, N. Bazazzadeh, K. N. Kalkan, K. J. Ollefs, O. Gutfleisch, and K. Everschor-Sitte, Supplementary code for “Defect detection in magnetic systems using U-Net and statistical measures”, Zenodo, 2026, doi:10.5281/zenodo.21809287.