Automated Heartbeat Detection for Self-Gated Fetal Cardiac MRI
Robin Demesmaeker1, Tobias Kober1,2,3, Jérôme Yerly3,4, Jérôme Chaptinel3, Milan Prsa5, Yvan Mivelaz5, Leonor Alamo3, Yvan Vial6, Gregoire Berchier3, Chantal Rohner3, Matthias Stuber3,4, and Davide Piccini1,2,3

1Advanced Clinical Imaging Technology, Siemens Healthcare AG, Lausanne, Switzerland, 2LTS5, École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland, 3Department of Radiology, University Hospital (CHUV) and University of Lausanne (UNIL), Lausanne, Switzerland, 4Center for Biomedical Imaging (CIBM), Lausanne, Switzerland, 5Department of Pediatrics, University Hospital (CHUV) and University of Lausanne (UNIL), Lausanne, Switzerland, 6Department of Gynecology-Obstetrics, University Hospital (CHUV) and University of Lausanne (UNIL), Lausanne, Switzerland


Fetal cardiac cine MRI requires an MRI-based cardiac gating signal since recording a fetal ECG is fraught with significant challenges. Existing approaches usually extract the signal from real-time image series and mandate semi-manual user interaction. However, these give often inconsistent results or suffer from reduced spatio-temporal resolution. We propose a novel algorithm which automatically localizes the fetal heart on real-time low-resolution images, and provides a precise frequency estimate of the cardiac motion signal that can be used for gating. We show that this automated method leads to images with equal or better quality than those obtained with the manual approach.


As a fetal ECG cannot be reliably recorded using external devices, one of the main challenges in high-resolution fetal cardiac cine MRI is to obtain a clean cardiac gating signal directly from the acquired images1. Existing approaches use either Pearson correlation coefficients2 or adapted metric-optimized gating3. However, not only do both these semi-manual methods require the manual definition of an ROI encompassing the fetal heart based on visual inspection, but they also suffer from high noise sensitivity2 and reduced spatio-temporal resolution3. To overcome these drawbacks, a fully automated algorithm that detects the fetal heart and derives a precise frequency estimate of the cardiac gating signal was developed, implemented, and tested on real patient data.


Data acquisition: N=10 cardiac fetal cine datasets were acquired in pregnant patients using a prototype 2D non-ECG-triggered bSSFP radial golden-angle sequence on a 1.5T clinical scanner (MAGNETOM Aera, Siemens Healthcare). Sequence parameters included: TE/TR=1.99/4.1ms, field-of-view=(260x260)mm2, matrix size=(256x256)pixel, voxel size=(1.0x1.0x4.0)mm3, RF-excitation angle=60°-70°, bandwidth=1028Hz/pixel, acquisition time=7-10s in a single breath-hold of the mother2.

Real-time reconstruction: A high temporal resolution real-time cine reconstruction (18.5ms/frame, 15 readouts/frame, 70% view-sharing) was performed using a k-t sparse SENSE algorithm with spatial TV and temporal wavelet regularization4,5.

Heart detection: The fetal heart is automatically localized on the real-time reconstruction using both spatial and temporal features. We assume the fetal heart to be roughly in the center of the field-of-view and the fetal cardiac frequency to range between 110-180bpm, while remaining constant during the acquisition time of <10s. Hence, the frequency spectrum of pixel magnitude time-courses will exhibit a peak within the above frequency range. However, streaking artifacts stemming from the radial acquisition scheme also appear in this frequency range. To mask them out, a binary mask is generated by pre-processing both phase and magnitude real-time image series as illustrated in Fig.1. The position of the heart is then automatically detected by selecting the area that: (I) is within the above frequency range and (II) consists in the largest group of pixels with the same frequency and closest to the center of the field-of-view.

Cardiac frequency estimation: The Fourier frequency corresponding to the selected cardiac mask provides a first rough estimate (the resolution is limited by the FFT spacing) for the true fetal cardiac frequency. A subsequent least-square fitting of the pixel time-courses within this mask with frequencies close to the rough estimate value provides the final and more accurate estimate of the cardiac frequency.

Self-retro-gated reconstruction: Data from multiple cardiac cycles are retrospectively reordered into cardiac cine frames of a single cycle4, using the fetal cardiac frequency obtained in the previous step. This reconstruction is performed with a k-t sparse SENSE algorithm4 (12.5ms/frame, ~150 readouts/frame, 50% view sharing).

Analysis: We visually compared the automatically estimated cardiac gating signal with the results of the previously published cross-correlation algorithm, after manual segmentation2. Furthermore, blinded comparison was performed by an expert (M.P., 4 years of experience in CMR) to assign "better", "equal" or "worse" image quality between datasets reconstructed (self-retro-gated) with both the proposed and semi-manual technique.


The automated detection algorithm succeeded in localizing the fetal heart and extracting the fetal cardiac frequency in all datasets. Fig.2 shows three examples of automated localization of the fetal heart in the real-time series. Fig.3 shows an example of the real-time reconstruction with the respective cross-correlation curves and automated frequency estimate. Here, the two estimates have a very high visual correlation. Fig.4 shows an example where the manual method did not detect a clear mono-frequency oscillation and where the estimation is noisy and uncertain. On the contrary, the automated cardiac frequency estimation performed well also in this case. Fig.5 shows a direct comparison between the final self-retro-gated datasets obtained with the two methodologies (manual and automated). Expert comparison showed the automated detection to be equal to the manual detection in 9/10 cases, and superior in 1/10 (inferior in none).

Discussion and Conclusion

The proposed algorithm robustly detects the fetal heart in real-time cine image series. The cardiac frequency was reliably estimated in all available datasets. The algorithm is independent of the cardiac view, i.e. 2-chamber, 3-chamber, 4-chamber, and short-axis views can all be used. As it has been shown that the final retro-reconstructed image quality is at least as good as with the manual correlation-based approach, we argue that the latter can be safely replaced by the automated algorithm. Given the diagnostic image quality obtained in our cohort, we can also conclude that the assumption of a constant heartbeat frequency within the given timeframe is valid in all studied cases.


This work was supported by the Swiss National Science Foundation grants 320030_143923 and 326030_150828


1. Votino C, et al. Magnetic resonance imaging in the normal fetal heart and in congenital heart disease. Ultrasound Obst Gyn. 2012;39(3):322-329.

2. Chaptinel J, et al. A Golden-Angle Acquisition Coupled with K-T Sparse SENSE Reconstruction for Fetal Self Retro-Gated Cine Cardiac MRI: An in Vivo Feasibility Study. ISMRM. 2016;24:459.

3. Van Ameron JFP, et al. Fetal cardiac cine imaging from motion-corrected super-resolution reconstruction of highly-accelerated real-time MRI. ISMRM. 2016;24:458.

4. Yerly J, et al. Coronary endothelial function assessment using self-gated cardiac cine MRI and k-t sparse SENSE. Magn Reson Med. 2016; Early view

5 Feng L, et al. Highly accelerated real-time cardiac cine MRI using k-t SPARSE-SENSE. Magn Reson Med. 2013;70(1):64-74.


Figure 1: Automated cardiac mask and frequency detection. First, the magnitude image series is saturated and spatially smoothed (Gaussian filter, width=2px) to enhance the signal from blood and fat (A). This is then masked by discarding all pixels with standard-deviation over the time series in the phase images larger than pi/16 (B). The heart is detected by 1D Fourier-transforming the pixels time-courses (C) and selecting the frequency belonging to the group of pixels with largest area closest to the center of the field-of-view (D) (M.M.= mathematical morphology: operations for hole filling). Finally, an accurate frequency estimate is performed (E).

Figure 2: Examples of heart detection. The algorithm for the automated estimation of a cardiac mask worked successfully in all cases. Regardless of the position of the fetus or of the cardiac view, a mask encompassing the fetal heart could always be segmented (green line). The fetal images displayed here were pre-processed with the steps described in Fig.1 prior to the automated heart localization.

Figure 3: Cardiac frequency estimation. This example shows the automated detection of the heart position in the real-time images (green mask) and extraction of the self-gating cardiac signal. Comparison among the self-gating signals obtained with: manual segmentation and cross-correlation (black-continuous line), automated segmentation and cross-correlation (black-dotted line) and cardiac frequency estimation (red line) is shown (right). In this example of good quality real-time images, cross-correlation detects a reliable cardiac signal in both cases (manual and automated mask) with high correlation between the two. The automated frequency detection estimates a sinusoidal signal which is also highly correlated with the other two.

Figure 4: Cardiac frequency estimation. This example is similar to that of Fig.3. The graph on the right side shows the comparison between the self-gating signals obtained with: manual segmentation and cross-correlation (black-continuous line), automated segmentation and cross-correlation (black-dotted line) and the cardiac frequency estimation (red line). In this example of real-time images with lesser quality, cross-correlation cannot reliably detect the cardiac gating signal. The two cross-correlation signals are still visually highly correlated, but extremely noisy. The automated frequency detection, however, can still estimate a reliable sinusoidal signal in this difficult scenario as well.

Figure 5: Results. Comparison between self-retro-gated datasets obtained with the manual segmentation plus cross-correlation method2 (left) and with the automated technique described in this work (right). No visual difference can be noticed, other than the fact that the loops are not synchronized. This is due to the fact that the automated algorithm does not make use of a specific reference cardiac phase to compute the cardiac signal. The comparison by expert opinion showed that the automated technique performed always at least equally well as the manual detection.

Proc. Intl. Soc. Mag. Reson. Med. 25 (2017)