To assess the utility of machine learning algorithms for automatically estimating prognosis in patients with repaired tetralogy of Fallot (ToF) using cardiac magnetic resonance (CMR).We included 372 patients with ToF who had undergone CMR imaging as part of a nationwide prospective study. Cine loops were retrieved and subjected to automatic deep learning (DL)-based image analysis, trained on independent, local CMR data, to derive measures of cardiac dimensions and function. This information was combined with established clinical parameters and ECG markers of prognosis.Over a median follow-up period of 10 years, 23 patients experienced an endpoint of death/aborted cardiac arrest or documented ventricular tachycardia (defined as >3 documented consecutive ventricular beats). On univariate Cox analysis, various DL parameters, including right atrial median area (HR 1.11/cm, p=0.003) and right ventricular long-axis strain (HR 0.80/%, p=0.009) emerged as significant predictors of outcome. DL parameters were related to adverse outcome independently of left and right ventricular ejection fraction and peak oxygen uptake (p<0.05 for all). A composite score of enlarged right atrial area and depressed right ventricular longitudinal function identified a ToF subgroup at significantly increased risk of adverse outcome (HR 2.1/unit, p=0.007).We present data on the utility of machine learning algorithms trained on external imaging datasets to automatically estimate prognosis in patients with ToF. Due to the automated analysis process these two-dimensional-based algorithms may serve as surrogates for labour-intensive manually attained imaging parameters in patients with ToF.