  Background and Aims: The electrocardiogram (ECG) is routinely used for
diagnosis and risk stratification following myocardial infarction (MI), though
its interpretation is confounded by anatomical variability and sex differences.
Women have a higher incidence of missed MI diagnosis and poorer outcomes
following infarction. Sex differences in ECG biomarkers and torso-ventricular
anatomy have not been well characterised, largely due to the absence of
high-throughput torso reconstruction methods.
  Methods: This work presents quantification of sex differences in ECG versus
anatomical biomarkers in healthy and post-MI subjects, enabled by a novel,
end-to-end automated pipeline for torso-ventricular anatomical reconstruction
from clinically standard cardiac magnetic resonance imaging. Personalised 3D
torso-ventricular reconstructions were generated for 425 post-MI subjects and
1051 healthy controls from the UK Biobank. Regression models were created
relating the extracted torso-ventricular and ECG parameters.
  Results: Half the sex difference in QRS durations is explained by smaller
ventricles in women both in healthy ($3.4 \pm 1.3$ms of $6.0 \pm 1.5$ms) and
post-MI ($4.5 \pm 1.4$ms of $8.3 \pm 2.5$ms) subjects. Lower baseline STj
amplitude in women is also associated with smaller ventricles, and more
superior and posterior cardiac position. Post-MI T wave amplitude and R axis
deviations are more strongly associated with a more posterior and horizontal
cardiac position in women rather than electrophysiology as in men.
  Conclusion: A novel computational pipeline enables the three-dimensional
reconstruction of 1476 torso-cardiac geometries of healthy and post-myocardial
infarction subjects, quantification of sex and BMI-related differences and
association with ECG biomarkers. Any ECG-based tool should be reviewed
considering anatomical sex differences to avoid sex-biased outcomes.
