  Background: Computational fluid dynamics (CFD) is increasingly used to assess
blood flow conditions in patients with congenital heart disease (CHD). This
requires patient-specific anatomy, usually obtained from segmented 3D
cardiovascular magnetic resonance (CMR) images. However, segmentation is
time-consuming and needs expert input. This study aims to develop and validate
a machine learning (ML) method for segmentation of the aorta and pulmonary
arteries (PAs) for CFD studies.
  Methods: 90 CHD patients were retrospectively selected for this study. 3D CMR
images were manually segmented to obtain ground-truth (GT) background, aorta
and PA labels. These were used to train and optimize a U-Net model.
Segmentation performance was primarily evaluated using Dice score. CFD
simulations were set up from GT and ML segmentations using a semi-automatic
meshing and simulation pipeline. Pressure and velocity fields were computed,
and a mean average percentage error (MAPE) was calculated for each vessel pair.
A secondary observer (SO) segmented the test dataset to assess inter-observer
variability. Friedman tests were used to compare segmentation metrics and flow
field errors.
  Results: The model's Dice score (ML vs GT) was 0.945 for the aorta and 0.885
for the PAs. Differences with the inter-observer Dice score (SO vs GT) and ML
vs SO Dice scores were not statistically significant for either aorta or PAs.
The ML vs GT MAPEs for pressure and velocity in the aorta were 10.1% and 4.1%
respectively, and for the PAs 14.6% and 6.3%, respectively. Inter-observer (SO
vs GT) and ML vs SO pressure and velocity MAPEs were of a similar magnitude to
ML vs GT.
  Conclusions: The proposed method can successfully segment the great vessels
for CFD, with errors similar to inter-observer variability. This reduces the
time and effort needed for CFD analysis, making it more attractive for routine
clinical use.
