Source-linked AI summary

Reducing the Hausdorff Distance in Medical Image Segmentation with Convolutional Neural Networks

Davood Karimi, Septimiu E. Salcudean

arXiv:1904.10030v1eess.IVcs.LGstat.ML

TL;DR

Medical image segmentation methods commonly evaluate Hausdorff Distance without directly optimizing it, despite HD capturing the largest segmentation error. This paper proposes three HD-estimation approaches and corresponding CNN loss functions, which reduce HD by 18–45% across four datasets without significantly changing Dice similarity. The authors conclude that these losses can help reduce large segmentation errors, while noting that other organs and applications may require modifications.

  • Problem

    Existing medical image segmentation methods rarely optimize Hausdorff Distance directly, although HD measures the largest segmentation error.

  • Method

    The paper estimates HD from CNN probability maps using distance transforms, morphological erosion, or circular/spherical convolutions, then derives three HD-based training losses.

  • Results

    18–45% reduction in mean HD was achieved across four datasets, without significant differences in Dice similarity compared with pure Dice loss.

  • Takeaways & Limitations

    The proposed losses can reduce large segmentation errors in 2D and 3D medical image segmentation across different imaging modalities.

  • Takeaways & Limitations

    The authors cannot claim success for all medical image segmentation tasks; other organs or applications may require application-specific modifications.

Abstract

from arXiv · show

The Hausdorff Distance (HD) is widely used in evaluating medical image segmentation methods. However, existing segmentation methods do not attempt to reduce HD directly. In this paper, we present novel loss functions for training convolutional neural network (CNN)-based segmentation methods with the goal of reducing HD directly. We propose three methods to estimate HD from the segmentation probability map produced by a CNN. One method makes use of the distance transform of the segmentation boundary. Another method is based on applying morphological erosion on the difference between the true and estimated segmentation maps. The third method works by applying circular/spherical convolution kernels of different radii on the segmentation probability maps. Based on these three methods for estimating HD, we suggest three loss functions that can be used for training to reduce HD. We use these loss functions to train CNNs for segmentation of the prostate, liver, and pancreas in ultrasound, magnetic resonance, and computed tomography images and compare the results with commonly-used loss functions. Our results show that the proposed loss functions can lead to approximately 18-45 % reduction in HD without degrading other segmentation performance criteria such as the Dice similarity coefficient. The proposed loss functions can be used for training medical image segmentation methods in order to reduce the large segmentation errors.

I. INTRODUCTION

Medical image segmentation supports visualization, measurement, treatment, and intervention, but commonly used segmentation algorithms rarely target the largest boundary error measured by Hausdorff Distance directly. The paper introduces HD-focused CNN losses and evaluates them across diverse medical imaging datasets.

  • Medical image segmentation delineates organs or regions of interest for visualization, measurement, atlases, targeted treatment, and image-guided intervention.
  • Hausdorff Distance measures the largest boundary error between estimated and ground-truth segmentations, complementing criteria such as Dice similarity and mean boundary distance.
  • Existing deformable-model, atlas-based, and machine-learning segmentation methods generally optimize aggregate or global losses rather than the largest segmentation error.
  • Direct HD minimization is challenging because HD depends solely on the largest error, so focusing on it may harm overall segmentation performance.
  • The paper proposes three novel HD-based loss functions for CNN segmentation and tests them across four datasets involving different organs and imaging modalities.
  • The proposed losses are designed as HD-inspired objectives because directly minimizing HD may produce unstable training.

II. MATERIALS AND METHODS

The methods estimate Hausdorff Distance from CNN segmentation outputs using distance transforms, then construct a smooth probability-map loss for training. The distance-transform estimate closely matches exact HD, while the resulting loss is strongly correlated with exact HD despite substantial computational cost.

  • A. Notations: CNN output probabilities q are thresholded at 0.50 to form binary segmentations, whose boundaries are denoted δq; ground-truth boundaries are denoted δp.
  • B. Estimation of the Hausdorff Distance Based on Distance Transforms: The distance-transform method assigns each pixel its distance to a segmentation boundary and uses the maximum bidirectional boundary discrepancy to estimate HD.
  • B. Estimation of the Hausdorff Distance Based on Distance Transforms: The distance-transform HD estimate has Pearson correlation above 0.99 with exact HD for 3D MR prostate and brain white matter segmentations.
  • B. Estimation of the Hausdorff Distance Based on Distance Transforms: The proposed LossDT smoothly penalizes larger errors, uses unthresholded probability maps, and applies a squared difference rather than an absolute difference.
  • B. Estimation of the Hausdorff Distance Based on Distance Transforms: LossDT has Pearson correlation approximately 0.93 with exact HD for both prostate and brain data, indicating that reducing it should reduce HD.
  • B. Estimation of the Hausdorff Distance Based on Distance Transforms: Distance-transform computation is costly, especially in 3D, because the prediction distance transform must be recomputed after each training epoch.

C. Estimation of the Hausdorff Distance Using Morphological Operations

The morphological method estimates Hausdorff distance from the thickness of the symmetric difference between true and predicted segmentations. It offers efficient convolution-based computation, though its estimate is a lower bound and less accurate than the distance-transform approach.

  • Erosion-based HD estimation: Morphological erosion of the symmetric difference between true and estimated segmentations provides an approximate Hausdorff distance.The approximation reflects the largest thickness remaining after erosion.
  • Approximation properties: HDER is a lower bound on the true HD and can be substantially smaller in pathological examples.If erosion does not produce an empty set, the true HD exceeds the corresponding erosion radius.
  • Approximation properties: 0.93 and 0.91: HDER correlated with exact HD for prostate and brain data, respectively.These are the Pearson correlation coefficients for fitted linear functions.
  • Computational trade-offs: HDER is less accurate than HDDT but can be computed more efficiently using convolutional operations and thresholding.The relaxed loss can be implemented by stacking K convolutional layers onto a CNN.
  • Training loss: The erosion-based loss uses successive erosions of the relaxed squared difference between ground-truth and predicted probability maps.The number of erosions K must be chosen according to the expected range of segmentation errors; the experiments used K = 10.

D. Estimation of Hausdorff Distance using Convolutions with Circular/Spherical Kernels

The convolutional method estimates Hausdorff distance by applying circular or spherical kernels of varying radii to segmentation probability maps. Its HD estimate closely tracks exact HD, while the corresponding loss trades precision for differentiable CNN training and incurs increasing computational cost for larger kernels.

  • HD estimation: Circular or spherical convolution kernels of radius r estimate Hausdorff distance through convolution and thresholding operations.The kernels are normalized so their elements sum to one, and complementary boundary terms are evaluated symmetrically.
  • HD estimation: hdCV(δq, δp) = max(r1, r2) for the kernel radii determining the convolutional estimate.The schematic identifies the radii r1 and r2 used in Equation (13).
  • Approximation accuracy: Approximately 0.99: HDCV correlated with true HD for both prostate and brain image sets.The value is the Pearson correlation coefficient for the fitted linear function.
  • Limitations: Continuous-domain estimation is exact, but discrete-grid computation introduces pixel-size and kernel-discretization errors.The spread from the exact relationship is greater for smaller HD values and smaller circles or spheres.
  • Training loss: LossCV uses relaxed thresholding to smoothly penalize larger errors rather than focusing only on the largest error.Its implementation uses convolution and soft thresholding, with α selected as 2.0 in the experiments.
  • Computational trade-offs: Large convolutional filters can make LossCV computationally expensive, especially in 3D.The experiments limited kernel radii to 18 pixels in 2D and 9 voxels in 3D, using steps of 3.

E. Data

The experiments used four datasets: one consisting of 2D images and three consisting of 3D images.

  • Four datasets were used in the experiments, including one 2D dataset and three 3D datasets.

1) 2D ultrasound images of prostate:

The 2D prostate dataset comprised trans-rectal ultrasound images from 675 patients, with expert delineations affected by reliability issues at the prostate base and apex. The analysis therefore focused on mid-gland slices.

  • Dataset: The dataset contained trans-rectal ultrasound images from 675 patients, with 7–14 images per patient.Each image measured 415 × 490 pixels with a pixel size of 0.15 × 0.15 mm2.
  • Dataset: The study used mid-gland slices because base and apex delineations were biased or unreliable.Bias arose from the semi-automatic annotation software and unclear anatomical landmarks.

2) 3D MR images of prostate:

The prostate MRI dataset contained 80 training and 30 test images from the PROMISE12 and Medical Segmentation Decathlon challenges. Preprocessing included bias correction, isotropic resampling, and cropping.

  • The dataset included 80 training images and 30 test images.
  • Data came from the PROMISE12 and Medical Segmentation Decathlon challenges.
  • Prostate MR preprocessing included bias correction, resampling to 1 mm3 isotropic voxels, and cropping.

3) 3D CT images of liver:

The liver CT dataset contained 131 images, split into 100 training and 31 test images, with standardized intensity mapping, resampling, and cropping.

  • The liver CT dataset contained 131 images, with 100 used for training and 31 for testing.
  • Voxel values from [−1000, 1000] Hounsfield Units were linearly mapped to [0, 1], with out-of-range voxels cropped.
  • Images were resampled to 2 mm3 isotropic voxels and cropped to 192 × 192 × 128 voxels.

4) 3D CT images of pancreas:

The pancreas CT dataset contained 282 images, split into 200 training and 82 test images, using preprocessing similar to the liver CT dataset.

  • The pancreas CT dataset contained 282 images, with 200 used for training and 82 for testing.
  • The preprocessing was similar to that used for the liver CT images.
  • The dataset therefore used the liver CT preprocessing protocol described above.

F. CNN Architecture and Training Procedures

The experiments compared DSC with three HD-based losses and trained each using Adam while tuning the learning rate. The HD losses were combined with DSC loss for more stable training, with equal weighting set adaptively.

  • The experiments compared the DSC loss with three HD-based loss functions.
  • The three HD-based losses used distance transform, erosion, and circular or spherical convolution operations.
  • The HD-based losses were augmented with a DSC loss term to produce more stable training, especially at the start.
  • The weighting parameter λ was updated after each epoch so the HD-based and DSC loss terms received equal weights.
  • All loss functions were minimized with Adam, while 10 learning rates logarithmically spaced from 10^-3 to 10^-5 were evaluated for 50 epochs.
  • The implementation used Python 3.6, TensorFlow 1.2, Linux, and NVIDIA DGX1 and GeForce GTX TITAN X GPUs.

III. RESULTS AND DISCUSSION

Across four datasets, the proposed HD-based losses reduced Hausdorff distance while generally preserving Dice performance. Distance-transform loss achieved the best HD results among the proposed losses, but required longer training than erosion-based and DSC losses.

  • Overall results: 18–45%: Mean HD decreased significantly on all four datasets with the three proposed HD-based losses.Maximum and 90th-percentile HD also decreased in many cases, often by 30–50%.
  • Overall results: DSC: Proposed HD-based losses showed no significant difference from pure DSC loss on the paired tests.This indicates that the HD reductions were not accompanied by a measured degradation in Dice similarity.
  • Comparison of HD-based losses: fDT_HD achieved the lowest HD among the three proposed losses, while fER_HD required approximately half the 3D training time.The longer training time of fDT_HD was approximately twice that of fER_HD and fDSC.
  • Comparison of HD-based losses: Equal training time did not make fER_HD match fDT_HD, because test performance plateaued well before 100 training epochs for all losses.Thus, the training-time difference was not explained by insufficient epochs for the faster method.
  • Comparison of HD-based losses: fER_HD significantly reduced HD relative to fDSC while adding little computational overhead, despite sometimes underestimating HD.The authors attribute its lower performance than fDT_HD partly to less accurate HD estimation, which can greatly underestimate HD on some images.
  • LossCV analysis: The radius set R in LossCV trades off segmentation accuracy against computational time and should be selected for each application.The authors describe R as a hyper-parameter based on the expected range of segmentation errors.
  • Additional comparisons: The alternative boundary-weighted loss slightly improved DSC on some datasets but generally had no significant positive effect on HD.On 2D TRUS prostate data, it achieved DSC 0.938 ± 0.035 and HD 4.0 ± 2.7 mm, with HD significantly larger than for the proposed losses.
  • Scope and limitations: The study was not designed to establish state-of-the-art organ-specific segmentation, and applying the losses to other organs may require modifications.The authors note that anatomical shapes and levels of detail vary widely across medical image segmentation tasks.

IV. CONCLUSION

All three HD-based loss functions significantly reduce Hausdorff Distance across 2D and 3D medical images, with trade-offs among accuracy, computational cost, and training time.

  • All three proposed HD-based loss functions significantly reduce HD across 2D and 3D medical images from different imaging modalities.
  • The distance transform-based loss f_DT_HD is intuitive and effective but substantially increases computational load.
  • The morphological erosion loss f_ER_HD is computationally less expensive but less effective than the other two losses.
  • The increasing-kernel convolution loss f_CV_HD achieves very good results and can reduce computational demand when kernel size and count are limited.
  • For 2D images, f_DT_HD may be suitable; for 3D images, f_ER_HD or f_CV_HD may be preferable, while f_CV_HD offers better performance at longer training times.
  • The authors identify faster implementations, more accurate morphological-erosion estimation, and extension to applications such as vessel segmentation as future improvements.
Loading 1904.10030v1…