In this paper, the effect of defects density on vortex penetration of thin superconducting film is investigated using the time-dependent Ginzburg–Landau (TDGL) equations. Thermal effects from superconductor energy dissipation are included by coupling the TDGL equations with heat equations. We studied a thin square-shaped superconducting film under a ramping magnetic field and considered the effects of geometry variations by edge dent. It is shown that the density of defects has a strong influence on the penetration and trajectories of vortices and we correlate them with traces of magnetization and Gibbs free energy density. We further demonstrate that these traces can be used in an artificial neural network (ANN) model to enable efficient and accurate characterization of defects density and achieved a reduced characterization error of 6.96% and 7.6% for superconducting films without and with edge dent. This work will provide new insights into the understanding of superconducting vortex dynamics, and into the implementation of deep learning to accelerate superconducting material characterization and development.