Abstract
3D Cardiac Magnetic Resonance Imaging (MRI) is widely used for the diagnosis of cardiac diseases such as congenital heart defect, left ventricular hypertrophy and left atrium hypertrophy etc. It is one of the noninvasive technique to examine cardiac anatomy. However this technique is semi- automatic, i.e. the images obtained directly from MRI machine have to be segmented manually. This includes the segmentation of chambers and vessels, which is quite complex and requires specialized technical knowledge. Without proper segmentation, it is extremely difficult for medical staff to examine the data. This paper suggest a fully automatic method for cardiac chamber segmentation (Left Atrium and Left Ventricle pair) in 3D cardiac MRI based on artificial intelligence. The proposed method identifies the junction of Left Atrium (LA) and Left Ventricle (LV) using neural networks. The features used for this purpose are based on shape, size and position. Then it uses traditional methods to track and stack the upper and lower slices based on neighborhood. I.e. a 3D model of the segmented LA and LV is reconstructed from the 2D format. This enhanced 3D image model helps in deducing quality information for the diagnosis of various heart diseases. The proposed algorithm shows acceptable performances for all planes of LV and LA. We have achieved 91.57% mean segmentation accuracy. The proposed algorithm is not effected by the thickness of the slices. It is simple and computationally less intensive than existing algorithms.
Keywords
Introduction
Cardiac imaging plays a major role in the diagnostics of various cardio vascular diseases and abnormalities [1–6], such as ventricular tachycardia, atrial fibrillation and myocardial infraction etc. These medical imaging techniques include echo diagram, intravascular ultrasound, 2-D and 3D cardiac MRI, nuclear imaging and CC [7]. Some of these techniques are invasive i.e. use physical catheter which are injected in to a patient body. There are patients who have little or non-significant form of disease. They may not require invasive techniques. These patients can be dealt with non-invasive techniques like ECHO or MRI. The problem with ECHO cardiograph is that it is based on geometrical assumptions and have poor spatial resolution. On the other hand magnetic resonance cardiac imaging has good resolution and provides the necessary information in term of anatomy. However, magnetic resonance imaging is made difficult by both respiratory motion and cardiac motion occurring at the same time and the poor contrast between adjacent blood pools.
Techniques like breath-hold and fast acquisition for 3-D MRI have made drastic improvement to cardiac MRI [8–10]. These techniques have made the diagnostic process more accurate, precise and easy for physicians and patients. However this process still require manual segmentation in order to make raw 3D cardiac MRI readable for physicians. This includes cardiac chamber segmentation (Ventricles and Atrium) and vessels segmentation (includes RCA, LCA, and LAD). For this purpose specific technical and medical training is required to understand and segment raw 3D MRI. The technician also needs to know about the sophisticated post processing softwares. Which means that the pre-diagnosing process depends on the technical skills of the technicians. It is also time consuming for physicians to identify the target anatomy and to perform examination and diagnostics. Therefore it is important for the pre-diagnostic process to have fully automatic segmentation in cardiac images. Although some of the semi-automatic techniques [11–18] have been developed, these methods require some human interaction. Artificial intelligence and fuzzy logic is extensively used to provide solutions to various image and video processing tasks [19–21]. In this paper we propose a solution to the segmentation of left atrium and left ventricle from 3D MRI images using artificial neural networks in conjunction with traditional image processing approaches. This method identifies and segments the chambers intelligently by an automated system. We aim to develop a simple automatic diagnostic system. These diagnostics can act as a second opinion to the physician and medical staff along with manual segmentation.
Literature review
A few techniques have been developed for cardiac chamber segmentation which includes statistical, shape based morphological, contouring and training approaches [13], [22–27]. Each technique is effective only for specific scenario [28, 29]. For example the shape based [17] technique is appropriate for left ventricle segmentation due to the fact that left ventricle shape resembles ellipse. Shape based methods may include elliptical Hough transform. Haar classifiers are also used for this purpose. But such type of shape based morphological and contouring methods would not work effectively in case of abnormal or irregular cardiac anatomy.
In learning based shape model, first the cardiac images are manually segmented and then the system is trained with the manually segmented data [30]. It uses Mumford-Shah function for shape estimation. The authors manually mark the points for applying shape based mask at start. It that it is not entirely based on neural network. Rather it’s a combination of AI and traditional methods. They have used lesser resolution dataset and the reconstruction is only limited to 2D. To improve this method further, deep neural network (DNN) models are identified [31]. With the help of these trained shapes various vessels and LV/RV chambers are segmented. However [31] have not been used for LV and LA pair. Also DNN based methods require large amount of data for training and testing, which in case of cardiac data is not available. Less data may lead to high error rate and inefficient segmentation. However if network is carefully trained with large data, the results may be improved to a high degree. One possible way to tackle this dataset issue is to use other traditional methods along with neural networks.
Previous countering method use the fact that the shape of cardiac chambers remain almost same in subsequent slices [32]. Example of subsequent slices can be seen in Figure 1, where red arrow point out the LV. A simple approach for chamber segmentation in 3D is to use the manually segmented contours to locate the contour or the boundary in the preceding slice. This type of method can be very effective for chamber segmentation as in each subsequent slices the contours remain almost same. Only the size of the object is changed. So once the chamber is segmented at initial axial slice, it’s not tough to follow it in the preceding slices. However this procedure fails in case of coronal slices, in which the data is not consistent, especially for LV (As shown in Figure 2).

Example of consecutive axial slices.

Example of consecutive coronal.
Deformable models [33, 34] or active contours technique is a popular model-driven technique. It is similar to contour based technique and is based on the parametric curves, surfaces or volumes which deforms under various conditions i.e. external and internal energy. The external energy forces the contour to move toward boundary (or an edge), while the internal energy forces the contour towards smoothness constraint. Adding other energy terms can force the deformable model to achieve better result in case of chamber segmentation. However the biggest disadvantage of this method is that it cannot handle images with more noise. In cardiac images rib cage, backbone and other closely connected vessels act as a noise. Rib cage and backbone can be eliminated but the packed vessels are still a matter of concern for this technique. Example of thenoise effect on segmentation can be seen in Fig. 3. The red circle in the Fig. 3 shows the segmented vessel.

Example of a noisy active contour.
From the above review it can be seen that various attempts have been made to segment cardiac chambers. These methods have been organized in Tables 1–3 in detail. This paper targets the segmentation of Left Atrium and Left Ventricle (i.e. LA and LV pair). The proposed method is divided into two parts i.e. Junction detection and tracking. The junction detection part is based on AI, where we extract various features and then train a neural network with the extracted features to locate the junction between LV and LA. Once the junction is located we use traditional tracking methods to segment LA and LV. We follow the LV and LA in the subsequent slices and stack the layers to make a 3D segmented model.
The proposed algorithm consist of training and testing phases. During the first phase neural network is trained for LV and LA junction. Before using neural network some preprocessing is performed. After preprocessing various shape based features are extracted from each objects in the slice. These features are fed into the neural network and after rigorously training the network, it is able to identify the LA/LV junction. After identifying the junction the LV is followed in subsequent slices and LA is followed in preceding slices. After the LA/LV segmentation in all of the slices, the segmented fractions are stacked in order to make a complete 3D model. The complete framework is shown in Fig. 4 in the form of a block diagram. The various modules of the flowchart are described as follows.

Flowchart of proposed framework.
3D MRI consists of 3 different slices i.e. axial, coronal and sagittal (Fig. 5).
Pre-processing step includes thresholding of images in all three slices. This is done in order to remove noise and prepare the data to extract features for further processing. The noise which need to be removed in this case are the muscular tissues. Some of the noise may still exist in form of bones which is catered in the feature selection part. Thresholding is done by setting the limit to 85% of the maximum brightness level. This limit has been obtained from vigorous experimentation on various data sets. The 85% threshold provides a good tradeoff between accuracy and effort for feature extraction. Other thresholding methods such as adaptive threshoding and Otsu method do not perform well in this case. Effect of various types of thresholding can be seen in Fig. 6.

MRI slices (a) Axial (b) Sagittal (c) Coronal.

(a) Original image (b) Adaptive thresholding (c) Simple thresholding (d) Otsu thresholding.
From Fig. 7 it can be seen that the size of the LA and LV along with its junction is much greater than almost all other objects in all three slices. Analyzing the data set it is observed that the shape of the LV and LA resembles to an ellipse at the junction. Figure 7 shows LA and LV junction in red color. The ellipse in blue color shows that they resembles the chamber shape. With the help of this observation some common features can be suggested, which may include parameters related to ellipse, i.e. eccentricity, major axis and area of object (in terms of pixels). Simulations with these features shows that the LA and LV junction can be identified with acceptable accuracy. However our simulations suggests that adding two more features (minor axis and position of object) further improves the segmentation accuracy (Table 5). The results shows that using these five features the algorithm becomes more robust towards noise which is caused due to bones and small vessels.

LV and LA junction in (a) Axial (b) Coronal and (c) Sagittal slices.
First all objects are detected in a slice by using connectivity algorithm (which is based on connected components algorithms [40] in binary image). The connectivity algorithm performs detection on the binary images which we got from preprocessing phase. The connected component algorithm provides us the list of pixels of individual object in the slice. Using this pixel list all of the five properties of ellipse (area, eccentricity, major axis, minor axis and position) are found for each object in all of the slices. For example for area of individual object we add all the binary pixels of this object. These five features are then used as an input to the neural network.
LV and LA junction detection is based on neural network, which uses a simple back propagation algorithm for the training purpose. A sigmoid function is used as an activation function. The network receives five numerical inputs from the feature extraction phase (Fig. 8). The network provides a single output, either 1 (the object possess a junction) or 0 (this is not the required object).

Neural network for LA and LV junction detection.
The network is implemented and tested for various hidden layers, where each hidden layer have same number of neurons. It is observed that for five hidden layers with each layer having five neurons, the maximum performance was achieved (Table 4).
During testing phase similar steps are applied as training. First 3D data is loaded and preprocessing is performed. Then features are extracted from all slices and fed into the trained neural network. The network identifies the slice where the LA and LV junction is present.
Reconstruction of 3D volume
After LA and LV junction is detected, first LV is followed in subsequent slices. For this purpose first slice which is just after the junction is loaded (Fig. 9).

3D slices of segmented images.
Preprocessing is applied to this slice and various objects are detected using connected component algorithm. Now the object which have maximum size and whose center have minimum Euclidean distance from the junction is declared as LV. After this the next slice is loaded and similar process is followed except that now Euclidean distance is calculated from the previously detected LV. This process continues until the end of LV. In order to detect the end of LV, we set a min threshold on area. If in some slice no object have the area more than the specified threshold, we declare it the end of LV. It is due to the fact that as we move downward, the size of LV gets smaller. Similarly the whole process is repeated for LA, except now we move upward and load preceding slices. After segmentation of LA and LV in all individual slices, all of the segmented slices are simply stacked above each other to generate a 3D segmented shape.
The experimental setup consist of the standard data set having total of 21400 3D Cardiac MRI images of normal and abnormal human subjects. The dataset is in DICOM format. It contains all three slices, i.e. axial, coronal and sagittal. The data set consist of high resolution slices, whose details are given in Table 6.
As stated earlier in neural network subsection, it was found that the five layer neural network showed best performance for junction detection. Figure 10 shows training, testing and validation process and their respective error histogram for axial, coronal and sagittal slices. Here the performance of the network is evaluated using cross entropy loss function, which is widely used to measures the performance of a neural network model [41]. Cross entropy increases as the predicted probability of the network diverges from the actual label. For example predicting LA and LV junction with probability of.001 when the actual observation label is 1, would cause a high rate of cross entropy. For an ideal model the cross entropy is always zero. In our case at each epoch the network is trained and cross entropy is calculated. The training and validation process is stopped when minimum cross entropy is achieved in the consecutive epochs. The cross entropy graph in Figure 10 shows the min achieved cross entropy for axial, coronal and sagittal slices which is respectively, 0.012502, 0.004408 and 0.00041564 and which was achieved in 28, 32 and 10 epochs respectively. It can be seen that the achieved cross entropy is almost equivalent to zero. The error histogram is also used as a performance evaluator in machine learning [41]. It classify the error into various bins and then it draws the histogram of these bins. It shows the max possible error that can occur. In our case it can be seen that the max error that occurred during training, testing and validation is 0.02306 in axial slices (Fig. 10 (a)). The error histogram also shows the number of testing, training and validating instances where this error occurred.
After junction detection the algorithm is tested for LV and LA segmentation. Figure 11 shows some of the results of segmentation in axial plane. Figure 11(c) shows the LA and LV junction slice is segmented. Figure 11 (a) and (b) show examples of the segmented LA while Figure 11 (d) and (f) show examples of the segmented LV. After segmentation all slices are then stacked above each other to generate a complete 3D model of both chambers (Fig. 12). All axial slices are compared with the manually segmented model after stacking. During comparison the non-chamber mass (non-chamber tissue such as

Validation and testing accuracy curves and their respective error histogram for junction detection in (a) Axial, (b) Coronal and (c) Sagittal slices.

Simulation results of segmentation in axial slices (a) Left Atrium(220thslice) (b) Left Atrium(270thslice) (c) Junction of LV and LA is segmented (d) Left Ventricle(405thslice) and (e) Left Ventricle(490thslice).

D reconstruction of LV and LA from segmented slices.
List of acronyms
Comparison of various cardiac chambers segmentation techniques
Complexity analysis of various cardiac chamber segmentation techniques
associated arteries etc.) is measured in terms of pixels. The percentage of non-chamber mass is consider as segmentation error (SE) (Eq. (1)). Ref. [37] Have used mean segmentation error (MSE) as a performance evaluation matrix. The percent inverse of segmentation error is the accuracy (SA). SA can be calculated using Eq. (2). The mean of all the accuracies of three slices is known as the mean segmentation accuracy (MSA).
Junction detection accuracy based on number of hidden layers
Junction detection accuracies based on number of features
Dataset details
Evaluation of our proposed algorithm based on mean square accuracy and dice coefficient
The effect of non-chamber mass in individual slices can be seen in Fig. 13. Figure 13 also shows our segmentation accuracy in all three slices. The achieved accuracy for axial slices is 94.4%, for coronal slices the accuracy is 91.71% while for sagittal the accuracy is 88.61%. The overall mean segmentation accuracy is 91.57%. We have also compared our mean segmentation accuracy with the existing techniques which can be seen in Table 7. The results of the proposed method is also validated by computing the dice coefficient (dc) [42], [43], which is widely used for performance evaluation in medical images segmentation. Dice coefficient measures the spatial overlap between manually segmented image (A) and segmented image (B) obtained from the proposed method. Dice coefficient can be found using Eq. (4).

Actual chamber mass segmentation in each of the segmented slices (Axial, Coronal and Sagittal).
In our case we find the individual dice coefficient of each slice and then find the average for all of the slices. Table 7 shows that the proposed method have the highest dice coefficient as compared to the rest of the techniques. Table 7 also shows that the proposed method is far much better than the existing techniques in all aspects. Our technique segment and reconstruct both chambers i.e. LA and LV more accurately.
In this paper we have proposed a new technique to segment cardiac chambers i.e. LA and LV in a 3D cardiac MRI. Our technique is based on object based features, which include size, shape and position. It uses neural network and other hybrid techniques. The proposed algorithm have shown good performance in terms of segmentation accuracy in axial, coronal and sagittal slices of both LA and LV. It is also observed that the technique is fully automatic and independent of slices depth. This gives the proposed technique an edge over the existing techniques, which mostly use manual segmentation at the start and are also dependent on slices depth. The future work may include the improvement in sagittal and coronal slices of LA. The proposed technique may also be extended to other two chambers (RA and RV) and vascular segmentation which may help to make a complete 3D model of cardiac anatomy.
Footnotes
Acknowledgment
This work was supported by the Incheon National University (International Cooperative) Research Grant in 2016 and NRF-2016K1A3A1A25003543.
