{'fraction_non_alphanumeric': 0.031178070726093327, 'fraction_numerical': 0.013461672595382576, 'mean_word_length': 5.047237452551666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Comparison of U-net-based Convolutional Neural Networks for Liver Segmentation in CT

Various approaches for liver segmentation in CT have been proposed: Besides statistical shape models, which played a major role in this research area, novel approaches on the basis of convolutional neural networks have been introduced recently. Using a set of 219 liver CT datasets with reference segmentations from liver surgery planning, we evaluate the performance of several neural network classifiers based on 2D and 3D U-net architectures. An interesting observation is that slice-wise approaches perform surprisingly well, with mean and median Dice coefficients above 0.97, and may be preferable over 3D approaches given current hardware and software limitations.


Introduction
Liver segmentation has long been investigated, as it plays an important role when planning surgeries or catheter-based interventions [1,2,3]. Several clinical workflows require a volumetric analysis of the liver. The size and complex shape of the organ make manual delineation very time-consuming. On the other hand, its appearance in computed tomography scans varies a lot, for instance, when it contains hypo-or hyperdense tumors, necrosis, calcifications, cirrhosis, cysts, or contrast agent. Furthermore, several adjacent structures (e.g., heart, stomach, intestines) may have very similar appearance, causing low boundary contrast.
Proposed methods for liver segmentation range from semi-interactive [4] to fully automatic [5,6,7,8,9], and one of the first "challenges" organized for a fair and reproducible comparison of segmentation methods in medical image computing was on liver segmentation [3]. Many successful approaches employed statistical shape models as a representation of typical liver shapes for guiding the segmentation in the presence of the above difficulties [5,6,7]. More recently, convolutional neural networks (CNN) have received a lot of attention due to their ability to solve segmentation problems formulated as voxel classification tasks with sometimes impressive performance. Fully-convolutional network architectures (FCN) became very popular, because they allow for very efficient training and classification on many voxels at once [10]. In particular, so-called "U-nets" were proposed as a deep segmentation architecture supporting efficient end-to-end training of a multiresolution model in 2D [11] and 3D [12,13]. Other methods create the multi-resolution representation in the external preprocessing pipeline, feeding parallel low-and high-resolution streams into the neural network, which saves GPU memory and thus allows for larger training batches [14]. For liver segmentation, 2D U-nets were applied slice-wise, optionally combined with 3D conditional random fields [8]. Other authors applied a simple 3D CNN architecture to this task [9], with fewer layers, larger kernels, and smaller numbers of convolutional filters. An interesting compromise using three orthogonal 2D CNNs was proposed for cartilage segmentation in MRI [15].
The goal of this work was to quantitatively and qualitatively compare the performance of different U-net-based neural network architectures. Our evaluation includes various existing 2D and 3D variants of U-nets, and a novel approach using an ensemble of fully convolutional slice-wise classifiers operating on different view directions.

Methods
CT Datasets We evaluated our method on a dataset comprising 219 liver CT volumes for surgery planning, acquired on different scanners with a resolution of about 0.6 mm in-plane and a reconstructed slice thickness of 0.8 mm. Iodinated contrast agent was applied in all cases. The data included healthy livers, organs with benign and/or malignant liver lesion, and pre-resected cases. Liver Segmentation and further planning was performed on the venous phase for two types of surgery: living donor liver transplantation [16], n = 52, 24% and liver resection [2], n = 167, 76%. Patient age ranged from 10-85 years (IQR 55-72) and 133 of the patients were male, 81 female. All cases were carefully annotated using a slice-wise approach based on live-wire, shape-based interpolation and interactive contour correction [4] and were reviewed by radiological experts.
After import, the DICOM rescale parameters were applied to get 16 bit Hounsfield integer values for the network's input layer. Subsequently, for models using a fixed voxel size (2 mm or 1 mm, depending on the experiment), we rescaled the volumes to an isotropic voxel size with a Lanczos window for the CT data and a nearest neighbor interpolator for the corresponding binary mask.
Training vs. Test Sets All available cases were randomly assigned to three disjunct groups for training, validation, and testing. The training cases were the largest group (comprising two thirds of the cases) and were directly used for deriving our models. Separate validation cases were used for evaluating performance during training. The test cases were not used for either of these, maximizing the likelihood of being able to predict generalization performance.
Neural Network Architectures All neural network architectures discussed in this work are fully convolutional architectures [10], which means that we can both train and apply each network efficiently on many voxels at once by feeding larger patches into the network. The effect is the same as training on many overlapping patches, but it is much more efficient because many convolutions are re-used. Batch normalization was applied before all ReLu activations for faster training.
Our baseline architecture is the "U-net" [11], named after the characteristic shape of its architecture diagram (figure 1) with a downscaling path on the left and an upscaling path on the right. The depicted variant with four resolution levels has a receptive field of 99 voxels, which amounts to roughly 20 cm after resampling to a voxel size of 2 mm. The size of the receptive field is important, because it specifies the "window" through which the classification is performed. For instance, if this window is too small, the classifier cannot see the border of the liver and performs substantially worse when the tissue appearance is anormal, e.g. within large tumors. In order to evaluate the influence of downsampling, we also trained networks with a reduced voxel size of 1 mm, restoring the U-net's fifths resolution level [11] to keep the receptive field at about 20 cm (203 voxels). Note that the effective receptive field is even smaller [17], but this is an upper bound.
Finally, we trained a 3D U-net [12] on this problem, which not only increases the dimensionality of the operations, but also requires a series of modifications: Due to memory limitations, the number of resolution levels is only four, the number of filters is halfed in the downscaling pathway, and the number of filters is increased before each max pooling layer in order to prevent early bottle-  necks [12]. As an alternative approach to reducing the memory requirements, we also trained a 3D U-net with zero-padding in the convolutional layers (labeled 3D pad ). This alleviates the need for additional input padding during training and causes the network to learn from all input voxels. During classification, we use convolution layers without padding, in order to prevent boundary artifacts. We expect the benefits from larger mini-batches to outweight the missing real image context at the patch borders.
No artificial data augmentation was performed, but the networks learned to capture exactly the variability occurring in our data set.
Segmentation Approaches For segmentation purposes, we applied the U-nets slice-wise, without sophisticated postprocessing (such as CRF [8]), but discarding all connected foreground components except the largest (in 3D). We chose the transversal viewing direction as default, but noticed that networks trained on coronal or sagittal slices would be able to prevent certain errors of the transversal approach. Therefore, we also evaluated ensemble classifiers based on the softmax outputs from three orthogonal U-nets. We report results from a simple averaging (subsequently thresholded at 1 /2, results labeled "mean"), as well as from an ensemble including a final two-layer CNN that performs 5 × 5 × 5 convolutions in 3D (128 and 64 filters, results labeled "ensemble"). This is similar to previous triplanar approaches [15], but differs in one important aspect: Our method is based on the softmax output only, allowing all four networks to be trained and executed fully convolutionally [10], which is much more efficient.
We used the Adam optimizer [18] for training the network, and we evaluated a binary cross entropy loss function L CE and a Dice-based loss function L DSC The liver typically only covers between 5 and 10 % of all voxels, so the two classes are severely imbalanced. The Dice coefficient was suggested as a novel loss function for segmentation problems [13] because it only depends on foreground voxels (including false positives and false negatives, but excluding all true negatives) and elegantly alleviates the need for class balancing.

Results and Discussion
Quantitative Evaluation We compared the algorithm output against the reference masks and computed several performance criteria, the medians of which are presented in table 1, such as the volumetric overlap error (VOE in %), the relative volume error ∆ vol in %, mean / max / rms surface distances in mm, and the task-specific MICCAI score φ MICCAI which averages these criteria con-  Example segmentations of the 2D U-net ensemble (2 mm) are illustrated in figure 3. Contour precision is limited by the resampling, but the model nicely excludes the vena cava and large hilar vessels much like in our training set. This hinders comparison against the state-of-art, since the reference masks from the SLIVER07 challenge (dashed in figure 3, right) partially include these vessels.
In most cases, the purely slice-wise application of the 2D U-net (dashed contours in figure 4) does not show any comb artifacts in orthogonal views. However, the ensemble classifier (solid contours) performs significantly better when the appearance is severely abnormal and 3D context is needed. In some cases, it locally performs worse, but has an overall better volumetric overlap (Wilcoxon signed-rank test, p < 0.05). The ensemble models performed significantly better than the purely 2D transversal model on the same voxel size.
We observed some problems with narrow fissures and gaps ( figure 5 left, center), and hypothesized that reducing the resampling target voxel size from 2 mm to 1 mm isotropic could help here. We could not observe qualitative changes, and the volumetric overlap did not change significantly. The MICCAI scores, however, showed significant improvements (Wilcoxon p < 0.05) due to reduced surface distances, at the expense of higher GPU memory requirements and longer training and classification times.
Lastly, we evaluated 3D U-nets, because slice-wise segmentation of volumetric images may lead to characteristic artifacts in general. However, both 3D U-nets performed significantly worse than the 2D ensembles. The 3D models performed better in some of the problematic areas of the 2D approaches (which were not many), but also brought new problems (figure 5 right). We attribute this to the limits imposed by the available GPU memory on training batch sizes (table 2). U-nets with four resolution levels need 44 voxels of padding on each side, and when naively going from 2D to 3D (without reducing the number of filters [11,12]), 8 GiB of memory are just enough to train with mini batches containing a single patch of 20³ voxels each, which does not suffice for stochastic gradient estimates stable enough for convergence. The ratio between the number of output voxels the loss is computed on and the number of input voxels after padding is given in the last column of table 2. Consequently, the 3D pad U-net performed significantly better than the 3D U-net with unpadded convolutions (Wilcoxon p < 0.05).
With respect to the two loss functions that we investigated, we found that the Dice loss L DSC did not improve performance significantly in our experiments over binary cross entropy, even without any kind of class balancing. We offer the following explanation of this observation, considering a simple segmentation problem with perfect reference segmentations, but 95 % background class. Although a classifier always assigning the background class would achieve a low L CE , all wrong voxels do contribute to L CE , and the gradient ∇L CE points into the right direction. Only when given faulty or imprecise reference segmentations, or when the problem is ill-posed for some other reason, the classifier cannot perform well and will start to show a bias towards the more frequent class. We could observe this problem with other datasets, but not with the expert liver segmentations used here, which are of unusually high quality.

Conclusion
We have successfully implemented several CNN architectures for liver segmentation in CT, based on high-quality reference segmentation from surgery planning. We proposed an ensemble classifier comprising three 2D U-nets trained on orthogonal slices, which performed significantly better than a single 2D U-net, and was even more robust in the presence of abnormal cases such as resected or polycystic livers. Mean and median volumetric overlap was above 95 %, the MICCAI scores were higher than untrained humans, but apparently limited by the resampling we performed for efficiency, which impaired the surface distances.
Surprisingly, ensembles of orthogonal 2D U-nets performed even better than 3D U-nets trained on an NVIDIA GeForce GTX 1080 GPU, which we attribute to limits imposed by the available memory (8 GiB). Therefore, we conclude that a 2D classifier ensemble is an efficient approach for the time being, in particular when taking into account deployment scenarios in clinical environments without high-end hardware.
In the future, we want to improve the ensemble classifier by rescaling back to the original resolution and taking the original CT into account. Furthermore, we will investigate more efficient 3D CNNs [14] and extend the classifier towards vessels and tumors.