0% found this document useful (0 votes)
45 views15 pages

Springer Nature LaTeX Template

The document discusses a deep learning framework for hemorrhage grading on an embedded machine. It describes intracranial hemorrhage and the need for timely diagnosis. Traditional detection methods are discussed alongside recent work using deep learning for classification. Different deep learning models are evaluated for accuracy on an embedded system for portable diagnosis.

Uploaded by

Shanu Nizar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views15 pages

Springer Nature LaTeX Template

The document discusses a deep learning framework for hemorrhage grading on an embedded machine. It describes intracranial hemorrhage and the need for timely diagnosis. Traditional detection methods are discussed alongside recent work using deep learning for classification. Different deep learning models are evaluated for accuracy on an embedded system for portable diagnosis.

Uploaded by

Shanu Nizar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Springer Nature 2021 LATEX template

Hemorrhage Grading using a Deep Learning Framework on an


Embedded Machine: an Intracranial Hemorrhage Detection
System
Shanu Nizarudeen1* and Ganesh Ramaswamy Shanmughavel2†
1* Department of Electronics, NI Centre for Higher Education, Kumaracoil, Tamilnadu,
India.
2 Department of Electronics, R.M.K Engineering College, Chennai, Tamilnadu, India.

*Corresponding author(s). E-mail(s): [email protected];


Contributing authors: [email protected];
† These authors contributed equally to this work.

Abstract
Intracranial hemorrhage is a life threatening condition that requires urgent medical attention. In
this condition, timely diagnosis and aggressive clinical management prevent severe catastrophe. Con-
ventionally, detecting hemorrhages in an emergency clinic involves manual inspection of computed
tomography scans, a time-consuming and error prone process. Mostly, high performing algorithms
applied to assist radiologists in grading hemorrhages are based on deep Convolutional Neural Network;
these methods are computationally expensive. Due to the hardware cost and portability issues, deep
learning algorithms have seen limited implementation, particularly in grading clinical images. The
proposed work shows the importance of five artificial intelligence algorithms in grading hemorrhages
on a portable and cost-effective embedded system. In this work, accuracy and area under the curve
(AUC) was systematically applied to analyse the classification performance of the algorithms. The
methods demonstrated an accuracy score, AUC of (0.956, 0.996), (0.96, 0.996), (0.93, 0.99), (0.932,
0.993), and (0.933, 0.995) for XceptioNet, EfficientNetB0, MobileNet, DenseNet, and CTNet respec-
tively. Further, these models were successfully executed on the Raspberry-Pi based embedded system.
Finally, the embedded system is capable of alerting the radiologist and prompting a triage change.

Keywords: intracranial hemorrhage, computed tomography, transfer learning, deep learning, embedded
system

1 Introduction aneurysm, coagulopathy, and tumour, the main


causes of ICH are hypertension, angiopathy, and
Intracranial hemorrhage (ICH) is a potentially anticoagulation [37, 48].
fatal condition characterised by bleeding inside There is strong evidence that ICH causes rapid
the skull or brain. Every year, 0.05 million peo- disease progression and patient deterioration, so
ple in the United States are affected by ICH, early detection and aggressive clinical manage-
which is devastating due to the high mortality rate ment are critical for quick recovery [3, 14, 20]. It
and severe disabilities [5]. In addition to trauma,

1
Springer Nature 2021 LATEX template

is observed that, in ICH 50% of deaths occur dur- categorised as epidural (EDH), intraparenchymal
ing the initial 24 hours and choice of treatment is (IPH), intraventricular (IVH), subdural (SDH),
made within the first 6 hours [15]. Additionally, and subarachnoid (SAH). Radiologists have tra-
in the initial six months after a hemorrhage the ditionally assessed ICH through visual inspection
mortality rate is 30 to 55 percent. Importantly, of non-contrast computed tomography (CT), mag-
detecting haematoma is crucial in clinical man- netic resonance imaging (MRI), and analysis cere-
agement and patient outcome. Depending on the brospinal fluid (CSF) [22]. Besides, due to its ease
location, size, and shape of the hematoma, ICH is of use and low cost, CT is the preferred modality
categorised as epidural (EDH), intraparenchymal for a quick evaluation.
(IPH), intraventricular (IVH), subdural (SDH), However, manual inspection of CT is error-
and subarachnoid (SAH). Radiologists have tra- prone and adverse prognosis increase mortality
ditionally assessed ICH through visual inspection and hemorrhagic consequences [46]. Due to the
of non-contrast computed tomography (CT), mag- difficulty in distinguishing similarly attenuated
netic resonance imaging (MRI), and analysis cere- features in CT, there are 13.5 percent errors in
brospinal fluid (CSF) [22]. Besides, due to its ease manual ICH detection, particularly in SDH and
of use and low cost, CT is the preferred modality SAH types [43]. On the other hand, automated
for a quick evaluation. ICH detection improved diagnostic accuracy and
However, manual inspection of CT is error- is effective in a hectic clinical environment [6]. Fur-
prone and adverse prognosis increase mortality ther, these artificial intelligence methods speed-up
and hemorrhagic consequences [46]. Due to the diagnosis [1], decrease report turnaround time,
difficulty in distinguishing similarly attenuated and shorten hospital admission[12].
features in CT, there are 13.5 percent errors in Traditional methods for ICH detection
manual ICH detection, particularly in SDH and includes fuzzy c-means[2], adaptive thresholding
SAH types [43]. On the other hand, automated [53], Bayesian [31], level-set [36] and morpholog-
ICH detection improved diagnostic accuracy and ical [17] methods. These methods, on the other
is effective in a hectic clinical environment [6]. Fur- hand, take longer duration because of the image
ther, these artificial intelligence methods speed-up complexity and similar intensity formations [17].
diagnosis [1], decrease report turnaround time, Moreover, these algorithms are application spe-
and shorten hospital admission[12]. cific and fail when confronted with real-time
Intracranial hemorrhage (ICH) is a potentially images obtained in a different environment [9, 36].
fatal condition characterised by bleeding inside In addition, these techniques are both operator
the skull or brain. Every year, 0.05 million peo- and equipment dependent. Another approach is
ple in the United States are affected by ICH, to apply data-driven methods; machine learn-
which is devastating due to the high mortality rate ing have outperformed conventional methods in
and severe disabilities [5]. In addition to trauma, detection problems particularly in breast cancer
aneurysm, coagulopathy, and tumour, the main [51], diabetic retinopathy [18], lung cancer [42],
causes of ICH are hypertension, angiopathy, and pneumonia in X-ray of Covid-19 patients [11],
anticoagulation [37, 48]. and mitosis in histopathology images [40]. Fur-
There is strong evidence that ICH causes rapid ther, DL is applied for segmentation of: vessel
disease progression and patient deterioration, so in retinal fundus images [16, 19], lesion in brain
early detection and aggressive clinical manage- MRI [38, 47], and also lymph mode biopsy[26].
ment are critical for quick recovery [3, 14, 20]. It Similarly, DL is significant in ICH detection
is observed that, in ICH 50% of deaths occur dur- [1, 7–9, 29, 33, 49, 52] and ICH segmentation
ing the initial 24 hours and choice of treatment is [22, 25, 50]. However, the lower adoption of deep
made within the first 6 hours [15]. Additionally, learning algorithms for clinical applications is
in the initial six months after a hemorrhage the likely due to fewer implementation studies on a
mortality rate is 30 to 55 percent. Importantly, portable system and higher hardware costs [1, 12].
detecting haematoma is crucial in clinical man- Several hospitals cannot afford the expense of
agement and patient outcome. Depending on the the hardware, especially those located in low-
location, size, and shape of the hematoma, ICH is and middle-income areas. The high-performing
Springer Nature 2021 LATEX template

classifiers on the ImageNet [13] and COCO [32] hemorrhages that even radiologists missed. Fur-
datasets are motivating. Consequently, the per- ther, when used to optimise triage workflow in a
formance comes at the expense of the hardware, busy clinic, the method reduced diagnosis time
making it unsuitable for use in a real-time setting. [1]. Besides, hybrid methods that combined CNN
This resulted in the development of computa- and LSTM were analysed by some groups. For
tionally efficient models, which, avoids redundant example, a group experimented hybrid CNN-
connections, use low-precision weights, or employ LSTM architecture on a 3D image generated from
more efficient network architectures. Some exam- images processed with three windows: subdural,
ples are VGG [44], XceptioNet [10], DenseNet bone and brain [34]. Features are extracted from
[24], MobileNet [21], and EfficientNet [45]. In the 3D image using ResNet/SE-ResNeXT and
transfer learning approach, the final weights of LSTM was applied for establishing the correla-
the network is preserved and later applied to tion across the slides. Similarly, Burduja et al.
extract features of another training data for [4] applied EfficientNet-B4 and ResNext-101 for
example the CT. feature extraction and they applied bi-directional
The purpose of this study is to evaluate the LSTM to detect inter-slice dependency. However,
performance of deep learning algorithms on an the method failed to identify multiple hemor-
embedded system, thus reducing the cost and rhages that occur on a single image. Another
making the hardware portable. For this, we anal- researcher proposed a dual-branch CNN inte-
ysed four transfer learning approaches and one grated with SVM/RF classifier [39]. The first
deep CNN architecture on the Raspberry-Pi, a branch processed CT with multiple intensities and
single-board computer that is portable, accurate, the second processed multiple slices of the same
and inexpensive. The algorithms were optimised scan. An ML classifier consolidated reposnces of
for operation on an embedded architecture. To the both branches. Since the data was highly imbal-
best of our knowledge, no autonomous, portable anced they tabulated F1-scores for various classes.
Raspberry-Pi system capable of grading haem- Contrary to the CNN-based approaches, another
orrhage, detecting sub-types, and alerting the study suggested classifying hemorrhages using
physician has been developed. ANN to three sub-types: EDH/SDH, SAH, and
The following is the order of this article: lit- IPH/IVH [30]. In order to reduce the computation
erature review is described in section 2, and complexity in back-propagation algorithm, they
the methodology and study cohort are shown in applied Monte-Carlo simulation to train the ANN.
section 3. The five artificial intelligence (AI) algo- This method observed a significant reduction in
rithms used in this study are also discussed in this diagnosis time.
section. Finally, performance analysis are provided Thus, a vast majority of researchers used
in the result section 4 and discussion in 5. The classifiers to detect the presence or absence of
work is concluded in section 6. a hemorrhage (binary classification) [35]. A few
researchers classified hemorrhages into only three
2 Previous works groups [8]. Another group applied 3D images to
detect hemorrhages [4, 27]. To the best of our
Several techniques for automatic detection of hem- knowledge, there has been no hardware implemen-
orrhage on CT scans have been presented in tation on an embedded platform.
pertinent works. These approaches are mainly
CNN-based operating on either a patch, one 3 Methodology
dimensional, or three dimensional images.
For instance, a study focused on hemorrhage This section discuss the cohort statistics and
detection and segmentation based on a dilated pre-processing techniques applied for training the
residual network. For efficient localisation and algorithm in the proposed work. This study anal-
accurate classification they applied patch-based ysed five AI algorithms: four based on transfer
FCN [29]. Recently, Arbabshirani et al. investi- learning and one based on deep-CNN that was
gated CT images with multiple CNN layers and labelled as CTNet.
two fully-connected layers; the algorithm detected
Springer Nature 2021 LATEX template

Table 1 Sample distribution of training data across


images per scan and to ensure zero data ”leak-
epidural, intraparenchymal, intraventricular,
subarachnoid, and subdural hemorrhages age” between the train, validation, and test data
sets, the data splitting was done at the patient
Hemorrhage type Number of images level. The initial sample distribution of train-
ing data is presented in Table 1. The dataset is
Epidural 2130
highly imbalanced, consisting of 2256 hemorrhagic
Intraparenchymal 13
Intraventricular 52 images and 533 normal images. Therefore, the
Subarachnoid 9 data was augmented using the ImageDataGenera-
Subdural 52 tor class from the Keras framework. Additionally,
Normal 533
the class provides a three-channel format required
in the transfer learning models by repeating val-
ues in the image across channels. Further, we
3.1 Cohort statistics normalized the mean and standard deviation of
The Physionet dataset comprised over 82 CT data.Analysing the data in Figure 3.2, we found
images of 46 male and 36 female subjects with a that the prevalence of positive cases varies signif-
mean age of 27.8 ± 19.5 [23]. There are 36 patients icantly across the different hemorrhage sub-types
with ICH sub-types – EDH, IPH, IVH, SAH, and If we use the cross-entropy loss function (1) with a
SDH. Each scan included 30 slices of 5 mm thick-
ness and two experienced radiologists delineated
the hemorrhage. The distribution of images across
various categories are displayed in Table 1.

Fig. 2 Original data distribution of positive and nega-


tive cases in each hemorrhage sub-type before balancing is
applied

Fig. 1 Representative examples of CT images in the highly imbalanced dataset, the algorithm will pri-
dataset, A.Subdural B. Epidural C. Subarachnoid D. Intra- oritise majority class because it contributes more
parecnhymal E. Intraventricular and F. Normal
to the loss.
The cross-entropy loss is defined as (1)

3.2 Pre-processing Lcross−entropy (xi ) = −(yi log(f (xi ))+


This part describes the pre-processing steps per- (1 − yi )log(1 − f (xi ))) (1)
formed before applying the images for training.
To prevent the network from learning redundant In this study, we used a weighted cross-entropy
features, the image was stripped of all non-brain loss function to ensure that the positive and neg-
structures. Further, due to hardware limitations ative labels in each class contributed the same
the image size is limited to 256 × 256 pixels. aggregate value to the loss function.
Following this, the data is split into training,
validation and test data sets using the 80:10:10 Lw
cross−entropy (xi ) = −(wp yi log(f (xi ))+
strategy. Each patient in the data set had multiple
Springer Nature 2021 LATEX template

wn (1 − yi )log(1 − f (xi ))) (2) function and β is the moving average parameter.
In RMSP, exponential moving averages are used.
where wp and wn are class-specific weights for
positive and negative labels. Our research anal- αt δL
wt+1 = wt − 1/2
(4)
(vt + ϵ) δwt

where,
 2
δL
vt = βvt−1 + (1 − β)
δwt

vt is the sum of square of previous gradients and


ϵ is a constant.
α
wt+1 = wt − m̂t √ (5)
vˆt + ϵ

where,
mt vt
m̂t = t vˆt = (6)
Fig. 3 Data distribution of positive and negative cases 1 − β1 1 − β2t
after balancing is applied β1 and β2 decay rates of average gradients in the
2 methods.
ysed five state of the art methods of automatic
hemorrhage detection. Classification accuracy of 3.3 Model performance
these algorithms were analysed and then executed
To asses the model performance, we computed
on an embedded system built on Raspberry-Pi.
accuracy (7) precision (8), recall (9), and F1-score
To grade the hemorrhages at first, we used the
(10). Accuracy is a measure of the total number
transfer learning approach; the approach is moti-
of correctly classified samples.
vated by the model’s depth and the diversity of
features acquired by cutting-edge algorithms[41].
Four advanced CNN-based networks were inves- Accuracy = P (correct/hemorrhage)+
tigated: XceptioNet, DenseNet, EfficientNetB0, P (correct/normal) (7)
and MobileNet. The models have up to 201 lay-
ers and were pretrained on the ImageNet data Precision is the ratio of correctly predicted pos-
set with 1000 classes. Moreover, this study anal- itive examples divided by the total number of
ysed a 17-layered CNN-based model that we positively predicted samples.
labelled as the CTNet inspired from [28]. In each
case, we applied the Adam optimizer function, TP
P recision = (8)
derived from the two gradient descent protocols: TP + FP
the Momentum (3) and the Root Mean Square
Recall is the fraction of positive samples divided
Propagation (RMSP)(5).
by total number of true positive and false nega-
tives .
wt+1 = wt − αmt (3) TP
Specif icity = (9)
TP + FN
where, F1-score provides a way to combine both precision
δL
mt = βmt−1 + (1 − β) and recall into a single measure that captures both
δwt properties.
where mt and mt−1 are aggregate of gradients at
time t and t − 1, wt and wt−1 are weights at time P recision ∗ Recall
δL
t and t − 1, δw is the partial derivative of Loss F 1-score = 2. (10)
t P recision + Recall
Springer Nature 2021 LATEX template

Before training the model, we modified the fol- 3.3.1 Transfer learning
lowing crucial parameters: loss function and the
In this paper, we used transfer learning to per-
optimiser. This project applied the Adam opti-
form localisation and grading on the hemorrhage
miser scheme and sparse-categorical cross-entropy
dataset. Features extracted using pre-trained net-
loss function. The sparse categorical loss function
works were applied to Global Average Pooling
compared prediction with target and the Adam
before applying to the final Dense layer with a
optimizer updated the weights based on the loss
Softmax classifier. Figure 3.3.1 depicts the general
score. The model was trained for 20 epochs and
framework for transfer learning. During training
in each epoch, we analysed both loss and accu-
racy. We noted that the algorithm saturated after
10 epochs with an accuracy of 0.99 and validation
accuracy of 0.94 as shown in Figure 4.
In order to assess the classification perfor-
mance, we computed both accuracy and the area
under the receiver operating characteristic curve
(ROC-AUC) scores. Prediction scores are utilised
to generate the ROC-AUC, and the accuracy score
is used to calculate subset accuracy. In order to
do this, we used the one-versus-one approach,
which calculates the average AUC of all potential
pairwise class combinations defined in (11).
c c
1 XX
(AU C(j/k) + AU C(k/j)) (11)
c(c − 1) j=1
k>j

where, c = 6 denotes the number of classes and


AU C(j/k) denotes the AU C with class j being
the positive class and class k being the negative
class.

Fig. 5 General framework for transfer learning using


XceptionNet, MobileNet, DenseNet, and EfficientNetB0.
CT: Computerised Tomography

phase, the pre-trained weights are used by TL


models for feature extraction. These features are
then flattened using Global Average Pooling and
applied to a dense classifier. In the testing phase,
the head CT is presented to the model and the
model predicts the label. This process is repeated
for the entire dataset and finally the results are
tabulated.

XceptioNet
Fig. 4 A. Training accuracy and validation accuracy B. The XceptioNet network is a 71-layer deep CNN
Training loss and validation loss trained on a 1000-class ImageNet data-set. The
Springer Nature 2021 LATEX template

fully-connected (FC) top layers of the model are


removed in this work while keeping the pretrained
base model. Additionally, two new layers are
added to the modified architecture before it is used
to grade hemorrhages. The first layer performed
global average pooling, while the second is a dense
layer (for classification) with 6 neurons. To train
the network, images of shape (150, 150, 3) are
applied to the input layer, and the base model gen-
erates a feature vectors of (5, 5, 2048) dimension.
The network had 12,294 trainable parameters and
Fig. 6 (a) Basic convolutional layer with batch normal-
was trained over a period of 20 epochs.
isation and ReLU. (b) Batch normalisation and ReLU
are applied after depth-wise separable convolution using
EfficientNetB0 depth-wise and point-wise layers. BN: batch normalisation

The EfficientNetB0 model is trained with input


images of shape (224,224,3). The top layers are own feature-maps to all subsequent layers. A sim-
frozen for computational speed, and global aver- plified scheme for classification based on DenseNet
age pooling was utilised to enforce the correlation is shown in Figure 7. In this work, we used a
between the feature maps and the hemorrhage pre-trained Densenet with 201 layers. The model
class. Out of a total of 4,057,257 parameters, there generates (4, 4, 1920) features for the training
are 7,686 trainable parameters. The categorical data. These characteristics are applied to global
loss function and Adam optimiser are used for average pooling before presenting it to the Dense
optimisation. The network is updated with two layer with Softmax function.
layers on top of the frozen baseline network. The
augmented FC layers receive the output feature
vector from the baseline network, which has a size
of (5,5,1280), and the network is trained for 20
epochs.
Fig. 7 DenseNet-based hemorrhage grading system
MobileNet
The ModileNet is tailored for portability; depth-
wise convolutions are employed to reduce the CTNet
number of parameters. There are two factors that
In this work, we benchmarked the performance
affect the design:α and depth multiplier. The α
of TL approaches with CTNet, a deep learning
denotes network width and depth multiplier spec-
architecture. The cohort size and sample repre-
ifies the depth convolutions. This study applied
sentation in each class are sub-optimal in this
an α of 0.75 and a depth multiplier of 1 because
experiment, the project used a 17-layered network
our model is based on a network that was previ-
with five convolution layers, five batch normali-
ously trained on ImageNet. In this model, 3 × 3
sation layers, five pooling layers, and two dense
convolutions were replaced with 3 × 3 depth-
layers. The characteristics of each layer, the out-
wise convolutions followed by batch normalisation,
put feature shape and the quantity of parameters
ReLu and 1 × 1 point-wise convolutions as shown
are explained in the Table 2. The architec-
in Figure 6.
ture includes a total 13,218,566 parameters of
which 13,215,814 are trainable. Figure 8 shows the
DenseNet architecture framework of the CTNet.
Standard CNN uses multiple convolutions to
extract high-level characteristics from the input
image. Each layer in DenseNet receives additional
input from all preceding layers and passes on its
Springer Nature 2021 LATEX template

Table 2 Layer description of CTNet


Sl.# Layer Output shape Param #
1 Convolution 35, 35, 96 34944
2 Batch normalization 35, 35, 96 384
3 Pooling 17, 17, 96 0
4 Convolution 17, 17, 256 614656
5 Batch Normalization 17, 17, 256 1024
6 Pooling 8, 8, 256 0
7 Convolution 8, 8, 384 885120
8 Batch Normalization 8, 8, 384 1536
9 Convolution 8, 8, 384 1327488
10 Batch Normalization 8, 8, 384 1536
11 Convolution 8, 8, 256 884992
12 Batch Normalization 8, 8, 256 1024
13 Pooling 3, 3, 256 0
14 Flatten 2304 0
15 Dense 4096 9441280
16 Dropout 4096 0
17 Dense 6 24582

Fig. 8 Architecture of CTNet

Hemorrhage grading system using


Raspberry-Pi
Fig. 9 Raspberry-Pi-4 with Camera V2.1
Raspberry-Pi is a Quad core Cortex A-72 64-
bit System-on-Chip based card-sized computer.
In this experiment, the Raspberry-Pi-4 model used to compress the model before it is exported
B, 2 GB version was used with Camera V2.1 to the RP module. The TF-lite module includes
(Picam); it that has an 8-megapixel Sony IMX219 a converter and an interpreter as its main com-
sensor. The model framework includes predom- ponents. The converter converts the TensorFlow
inantly three units as illustrated in Figure 10. model into an effective format suitable for the
It contains the modules for image acquisition, interpreter while also improving model perfor-
pre-processing, and the hemorrhage detection and mance. Furthermore, the interpreter provides the
grading (HDG). The acquisition unit consists of API for improved performance as well as plat-
a Picam that is directly attached to the Camera form compatibility with the Raspbian operating
Serial Interface port of Raspberry-Pi using a 15- system.
pin ribbon cable. Initially, this module recorded
the video and converted to frames before applying
to the image processing unit. This unit performs
two operations:cropping and resizing; the resized
frame is then applied to HDG for grading. The
HDG makes a prediction of the hemorrhage sub- Fig. 10 Raspberry-Pi hemorrhage grading system with
type and provides an audio alert. Figure 9 repre- audio alert
sents the hardware unit and Picam used in this
work.
The principal component of the HDG is a
model developed in TensorFlow with Google 4 Result
Colab Pro. In order to train the model on 2797
The performance of our five models on Phys-
CT images we downsized the 512 × 512 image
ionet, illustrated in Table 3, are measured using
to 224 × 224 pixels. TensorFlow-lite (TF-lite) is
the accuracy and ROC-AUC. The architectures
Springer Nature 2021 LATEX template

Fig. 11 ROC-AUC of ICH sub-type grading using Xcep-


tioNet, DenseNet, EfficientNetB0, MobileNet, and CTNet Fig. 12 Acccuracy score and ROC-AUC of classifier using
XceptioNet, DenseNet, EfficientNetB0, and MobileNet

in pre-trained mode produced the best overall


As a second part of the experiment, we imple-
accuracy of 96% in the multi-label classification
mented the TensorFlow models in Raspberry-Pi
exercise. The ROC-AUC score was 0.99, 0.993,
using TF-lite. The four transfer learning models
0.996, 0.997, and 0.995 for MobileNet, DenseNet,
and the CTNet were exported one-by-one to the
XceptioNet, EfficientNetB0, and CTNet respec-
Raspberry-Pi. When a CT image was presented to
tively. To assess the classification performance, we
the image acquisition module, the model predicted
computed ROC-AUC for each hemorrhage sub-
the hemorhhage and notified through an audio
type and obtained values from 0.81 to 1.00 as
engine-connected speaker. For this, the pyttsx3,
shown in Figure 11. In this assessment, the per-
a Python text-to-speech conversion module was
formance of EfficientNetB0 was superior to other
used. Further, we conducted an informal exper-
methods in each sub-type classification. Further,
iment on the Raspberry-Pi, and observed a 4%
we removed batch normalisation and tested the
variation in classification result compared to the
CTNet model with same input for precision, recall,
performance of the TensorFlow model in the orig-
and F1-score.
inal development environment. This variation can
Figure 12 shows the accuracy score and ROC-
be attributed to the lighting conditions during
AUC of the transfer learning algorithms with
image acquisition and also influenced by the dis-
Adam optimizer. Even with fewer parameters, the
tance from the camera unit. To test this, we fed
EfficientNetB0 outperformed XceptioNet in our
the image files directly into the Raspberry-Pi and
study. This is due to the depth of the Efficient-
the device performance improved significantly,
NetB0, which aids in more efficiently capturing
confirming our hypothesis.
prominent features.
In order to evaluate the predictive perfor-
mance, we computed precision, recall, and F1- 5 Discussion
score in Table 4. All four TL methods were
This work shows that deep learning models built
gauged with a deep CNN based CTNet and CTNet
into a cost-effective portable computer can classify
with no batch normalisation labelled as CTNet-
hemorrhage using head CT scans. Furthermore,
1. CTNet had superior performance in classifying
the alert mechanism in the system can notify
all types of bleeding. The performance of grading
the radiologist of a medical emergency, which can
algorithms on IVH was the worst. This may be
aid in workflow optimization. Initially, the four
due to the limited variability in training data. We
transfer learning methods-XceptioNet, DenseNet,
observed that the performance of CTNet on SAH
MobileNet and EfficientNetB0, was applied. In
was the worst while it outperformed TL methods
order to preserve the pre-trained weights and
in most bleeding type, particularly in SDH.
for computational efficiency feature extraction
method in transfer learning was executed. The TL
Springer Nature 2021 LATEX template

Table 3 Performance analysis of XceptioNet, DenseNet, EfficientNetB0, and CTNet using ROC-AUC

EDH IPH IVH NH SAH SDH


XceptioNet 0.97 0.99 0.99 0.97 0.81 1.00
DenseNet 0.93 0.98 1.00 0.95 0.89 1.00
EfficientNetB0 0.99 0.96 1.00 0.98 0.95 1.00
MobileNet 0.97 0.88 1.00 0.97 0.97 1.00
CTNet 0.94 0.98 1.00 0.95 0.94 1.00

Table 4 Benchmarking precision, recall and F1-score for Xception, EfficientNetB0, DenseNet, MobileNet, CTNet, and
CTNet-1

Xception EfficientNetB0
Precision Recall F1 score Precision Recall F1 score
EDH 0.85 0.83 0.84 0.89 0.76 0.82
IPH 0.83 0.87 0.85 0.77 0.87 0.82
IVH 0.50 0.83 0.62 0.50 0.83 0.62
NH 0.96 0.99 0.97 0.97 0.99 0.98
SAH 1.00 0.75 0.86 1.00 0.75 0.86
SDH 0.94 1.00 0.97 1.00 0.87 0.93
DenseNet MobileNet
Precision Recall F1 score Precision Recall F1 score
EDH 0.62 0.69 0.65 0.82 0.74 0.78
IPH 0.77 0.67 0.72 0.82 0.60 0.69
IVH 0.50 0.83 0.62 0.67 0.67 0.67
NH 0.97 0.96 0.96 0.97 0.96 0.96
SAH 0.75 0.75 0.75 0.8 0.65 0.72
SDH 0.79 1.00 0.88 0.73 1.00 0.84
CTNet CTNet-1
Precision Recall F1 score Precision Recall F1 score
EDH 0.95 0.90 0.92 0.68 0.55 0.61
IPH 0.74 0.91 0.82 0.70 0.47 0.56
IVH 0.80 0.7 0.75 1.00 0.33 0.50
NH 0.99 1.00 0.99 0.96 0.98 0.97
SAH 0.72 0.69 0.70 0.33 0.25 0.29
SDH 1.00 0.89 0.94 1.00 1.00 1.00

approaches achieved an ROC-AUC score in the classification and multi-class classification [52].
range of 0.99-0.997 which is significantly higher Similarly, the cohort data in this study was down-
in existing methodologies. Secondly, we applied sampled due to hardware restrictions from 512 ×
a deep CNN with 17-layers and used 20% of 512 to 224 × 224. Another study on the Qure25K
total 2814 images as validation data. The method and CQ500 datasets assessed the classifier perfor-
achieved 93.3% accuracy and 99.5 % ROC-AUC. mance using AUC and found superior values [8].
The success of these algorithms are due to their The AUC for the five methods we tested was in the
ability to collect both low-level and high-level 0.99-0.997 range, comparable with top ICH grad-
characteristics. In addition, these methods were ing algorithms. A more prominent study found
quicker and more effective because it required that using the ResNeXt architecture and Adam
fewer parameters to learn these features. optimizer, CT image accuracy lies in the 81.8
In a recent study on Asian population, % to 89.3 % range. In our study EfficientNetB0
researchers applied CNN-RNN to classify down- performed better than other TL methods as well
sampled images to a size of 256 × 256 for binary
Springer Nature 2021 LATEX template

11

Table 5 Epoch-wise performance

Time/step Validation Validation


Epoch # Loss Accuracy
(ms) Loss Accuracy
1 29256 0.6710 0.8534 0.5418 0.8927
2 346 0.4120 0.8820 0.3786 0.8927
3 347 0.3216 0.9017 0.3287 0.8945
4 346 0.2315 0.9236 0.2730 0.9088
5 346 0.1556 0.9486 0.2241 0.9267
6 345 0.1140 0.9629 0.1765 0.9410
7 345 0.0905 0.9732 0.2247 0.9231
8 346 0.0748 0.9741 0.2020 0.9320
9 346 0.0569 0.9803 0.2101 0.9320
10 347 0.0366 0.9884 0.1787 0.9356
11 346 0.0331 0.9924 0.1759 0.9392
12 346 0.0269 0.9924 0.1818 0.9410
13 346 0.0229 0.9942 0.1670 0.9445
14 346 0.0207 0.9951 0.1607 0.9463
15 346 0.0190 0.9964 0.1635 0.9463
16 346 0.0157 0.9969 0.1809 0.9392
17 345 0.0130 0.9982 0.1519 0.9481
18 345 0.0095 0.9987 0.1631 0.9499
19 346 0.0088 0.9982 0.1887 0.9445
20 346 0.0090 0.9987 0.1793 0.9463

as the CTNet. As seen in Figure 13, Efficient-


NetBo achieved superior AUC in all bleeding types
when compared to state-of-the-art methods. How-
ever, relatively weak performance was observed
in classifying SAH and IPH. This is because our
dataset contains a relatively small number of rep-
resentative samples of these types. Our study has
few limitations. The sample size is small and we
could not perform discrimination based on gender,
age, or ethnicity. Further, the dataset was highly
imbalanced particularly in SAH and IPH. Thus,
to verify our findings additional research using a
Fig. 13 Benchmarking AUC of state-of-the-art algorithms
balanced dataset is necessary. with two methods in this paper: CTNet and EfficientNetB0

6 Conclusion most visible application of this embedded hem-


orrhage detection tool is a triage system that
In this study, we developed a diagnostic approach
alerts doctors to examinations that may be hem-
for classifying various bleeding types using a
orrhage positive, leading to faster interpretation
low-cost embedded hardware platform. We anal-
and turnaround. The application is portable and
ysed the performance of four transfer learning
alerts radiologist in an emergency clinic favouring
approaches and a deep CNN-based algorithm. The
triage optimisation.
algorithms achieved up to 95.6 percent overall
accuracy and an AUC of 0.997. Accuracy in this
study ranges from 93% to 95.6%. Furthermore, we References
successfully tested transfer learning and a deep
[1] Arbabshirani, M.R., Fornwalt, B.K., Mongel-
CNN algorithms on an embedded system. The
luzzo, G.J., Suever, J.D., Geise, B.D., Patel,
Springer Nature 2021 LATEX template

A.A., Moore, G.J., 2018. Advanced machine [8] Chilamkurthy, S., Ghosh, R., Tanamala, S.,
learning in action: identification of intracra- Biviji, M., Campeau, N.G., Venugopal, V.K.,
nial hemorrhage on computed tomography Mahajan, V., Rao, P., Warier, P., 2018.
scans of the head with clinical workflow inte- Development and validation of deep learn-
gration. NPJ digital medicine 1, 1–7. ing algorithms for detection of critical find-
ings in head ct scans. arXiv preprint
[2] Bhadauria, N., Kumar, I., Bhadauria, H.S., arXiv:1803.05854 .
Patel, R., 2021. Hemorrhage detection using
edge-based contour with fuzzy clustering [9] Cho, J., Park, K.S., Karki, M., Lee, E., Ko,
from brain computed tomography images. S., Kim, J.K., Lee, D., Choe, J., Son, J., Kim,
International Journal of System Assurance M., et al., 2019. Improving sensitivity on
Engineering and Management 12, 1296–1307. identification and delineation of intracranial
hemorrhage lesion using cascaded deep learn-
[3] Broderick, J., Connolly, S., Feldmann, E., ing models. Journal of digital imaging 32,
Hanley, D., Kase, C., Krieger, D., Mayberg, 450–461.
M., Morgenstern, L., Ogilvy, C.S., Vespa, P.,
et al., 2007. Guidelines for the management [10] Chollet, F., 2017. Xception: Deep learn-
of spontaneous intracerebral hemorrhage in ing with depthwise separable convolutions,
adults: 2007 update: A guideline from the in: Proceedings of the IEEE conference on
american heart association/american stroke computer vision and pattern recognition, pp.
association stroke council, high blood pres- 1251–1258.
sure research council, and the quality of care
and outcomes in research interdisciplinary [11] Cohen, J.P., Dao, L., Roth, K., Morrison, P.,
working group: The american academy of Bengio, Y., Abbasi, A.F., Shen, B., Mahsa,
neurology affirms the value of this guideline H.K., Ghassemi, M., Li, H., et al., 2020. Pre-
as an educational tool for neurologists. Stroke dicting covid-19 pneumonia severity on chest
38, 2001–2023. x-ray with deep learning. Cureus 12.

[4] Burduja, M., Ionescu, R.T., Verga, N., 2020. [12] Davis, M.A., Rao, B., Cedeno, P.A., Saha, A.,
Accurate and efficient intracranial hemor- Zohrabian, V.M., 2020. Machine learning and
rhage detection and subtype classification in improved quality metrics in acute intracra-
3d ct scans with convolutional and long short- nial hemorrhage by noncontrast computed
term memory neural networks. Sensors 20, tomography. Current Problems in Diagnostic
5611. Radiology .

[5] Carter, J.A., Curry, W., 2017. Intracere- [13] Deng, J., Dong, W., Socher, R., Li, L.J., Li,
bral hemorrhage: pathophysiology and man- K., Fei-Fei, L., 2009. Imagenet: A large-scale
agement for generalists. Hospital Medicine hierarchical image database, in: 2009 IEEE
Clinics 6, 95–111. conference on computer vision and pattern
recognition, Ieee. pp. 248–255.
[6] Chan, T., 2007. Computer aided detection of
small acute intracranial hemorrhage on com- [14] Elliott, J., Smith, M., 2010. The acute
puter tomography of brain. Computerized management of intracerebral hemorrhage: a
Medical Imaging and Graphics 31, 285–298. clinical review. Anesthesia & Analgesia 110,
1419–1427.
[7] Chang, P.D., Kuoy, E., Grinband, J., Wein-
berg, B.D., Thompson, M., Homo, R., Chen, [15] Fujitsu, K., Muramoto, M., Ikeda, Y., Inada,
J., Abcede, H., Shafie, M., Sugrue, L., et al., Y., Kim, I., Kuwabara, T., 1990. Indications
2018. Hybrid 3d/2d convolutional neural for surgical treatment of putaminal hemor-
network for hemorrhage evaluation on head rhage: comparative study based on serial ct
ct. American Journal of Neuroradiology 39, and time-course analysis. Journal of neuro-
1609–1616. surgery 73, 518–525.
Springer Nature 2021 LATEX template

13

[16] Girard, F., Kavalec, C., Cheriet, F., 2019. Intracranial Hemorrhage Segmentation Using
Joint segmentation and classification of reti- A Deep Convolutional Model. Data 5.
nal arteries/veins from fundus images. Arti-
ficial intelligence in medicine 94, 96–109. [24] Huang, G., Liu, Z., Van Der Maaten, L.,
Weinberger, K.Q., 2017. Densely connected
[17] Gong, T., Liu, R., Tan, C.L., Farzad, N., convolutional networks, in: Proceedings of
Lee, C.K., Pang, B.C., Tian, Q., Tang, S., the IEEE conference on computer vision and
Zhang, Z., 2007. Classification of ct brain pattern recognition, pp. 4700–4708.
images of head trauma, in: IAPR Interna-
tional Workshop on Pattern Recognition in [25] Ironside, N., Chen, C.J., Mutasa, S., Sim,
Bioinformatics, Springer. pp. 401–408. J.L., Marfatia, S., Roh, D., Ding, D., Mayer,
S.A., Lignelli, A., Connolly, E.S., 2019.
[18] Gulshan, V., Peng, L., Coram, M., Stumpe, Fully automated segmentation algorithm for
M.C., Wu, D., Narayanaswamy, A., Venu- hematoma volumetric analysis in sponta-
gopalan, S., Widner, K., Madams, T., neous intracerebral hemorrhage. Stroke 50,
Cuadros, J., et al., 2016. Development and 3416–3423.
validation of a deep learning algorithm for
detection of diabetic retinopathy in retinal [26] Jin, Y.W., Jia, S., Ashraf, A.B., Hu, P.,
fundus photographs. Jama 316, 2402–2410. 2020. Integrative data augmentation with u-
net segmentation masks improves detection
[19] Hemelings, R., Elen, B., Stalmans, I., of lymph node metastases in breast cancer
Van Keer, K., De Boever, P., Blaschko, M.B., patients. Cancers 12, 2934.
2019. Artery–vein segmentation in fundus
images using a fully convolutional network. [27] Jnawali, K., Arbabshirani, M.R., Rao, N.,
Computerized Medical Imaging and Graphics Patel, A.A., 2018. Deep 3d convolution neural
76, 101636. network for ct brain hemorrhage classifica-
tion, in: Medical Imaging 2018: Computer-
[20] Hemphill III, J.C., Greenberg, S.M., Ander- Aided Diagnosis, International Society for
son, C.S., Becker, K., Bendok, B.R., Cush- Optics and Photonics. p. 105751C.
man, M., Fung, G.L., Goldstein, J.N., Mac-
donald, R.L., Mitchell, P.H., et al., 2015. [28] Krizhevsky, A., Sutskever, I., Hinton, G.,
Guidelines for the management of sponta- . Imagenet classification with deep con-
neous intracerebral hemorrhage: a guideline volutional networks, in: Proceedings of the
for healthcare professionals from the ameri- Conference Neural Information Processing
can heart association/american stroke associ- Systems (NIPS).
ation. Stroke 46, 2032–2060.
[29] Kuo, W., Hne, C., Mukherjee, P., Malik, J.,
[21] Howard, A.G., Zhu, M., Chen, B., Yuh, E.L., 2019. Expert-level detection of
Kalenichenko, D., Wang, W., Weyand, T., acute intracranial hemorrhage on head com-
Andreetto, M., Adam, H., 2017. Mobilenets: puted tomography using deep learning. Pro-
Efficient convolutional neural networks for ceedings of the National Academy of Sciences
mobile vision applications. arXiv preprint 116, 22737–22745.
arXiv:1704.04861 .
[30] Lee, J.Y., Kim, J.S., Kim, T.Y., Kim, Y.S.,
[22] Hssayeni, M., 2019. Computed tomography 2020. Detection and classification of intracra-
images for intracranial hemorrhage detection nial haemorrhage on ct images using a novel
and segmentation. PhysioNet. . deep-learning algorithm. Scientific Reports
10, 1–7.
[23] Hssayeni, M., Croock, M., Salman, A., Al-
khafaji, H., Yahya, Z., Ghoraani, B., 2020. [31] Li, Y.H., Zhang, L., Hu, Q.M., Li, H.W., Jia,
Computed tomography images for intracra- F.C., Wu, J.H., 2012. Automatic subarach-
nial hemorrhage detection and segmentation. noid space segmentation and hemorrhage
Springer Nature 2021 LATEX template

detection in clinical head ct scans. Interna- Sciences 10, 7577.


tional journal of computer assisted radiology
and surgery 7, 507–516. [40] Saha, M., Chakraborty, C., Racoceanu, D.,
2018. Efficient deep learning model for
[32] Lin, T.Y., Maire, M., Belongie, S., Hays, J., mitosis detection using breast histopathology
Perona, P., Ramanan, D., Dollár, P., Zit- images. Computerized Medical Imaging and
nick, C.L., 2014. Microsoft coco: Common Graphics 64, 29–40.
objects in context, in: European conference
on computer vision, Springer. pp. 740–755. [41] Sanagala, S.S., Nicolaides, A., Gupta, S.K.,
Koppula, V.K., Saba, L., Agarwal, S., Johri,
[33] Majumdar, A., Brattain, L., Telfer, B., Farris, A.M., Kalra, M.S., Suri, J.S., 2021. Ten
C., Scalera, J., 2018. Detecting intracranial fast transfer learning models for carotid
hemorrhage with deep learning, in: 2018 40th ultrasound plaque tissue characterization
annual international conference of the IEEE in augmentation framework embedded with
engineering in medicine and biology society heatmaps for stroke risk stratification. Diag-
(EMBC), IEEE. pp. 583–587. nostics 11, 2109.

[34] Nguyen, N.T., Tran, D.Q., Nguyen, N.T., [42] Shin, H., Oh, S., Hong, S., Kang, M., Kang,
Nguyen, H.Q., 2020. A cnn-lstm architecture D., Ji, Y.g., Choi, B.H., Kang, K.W., Jeong,
for detection of intracranial hemorrhage on ct H., Park, Y., et al., 2020. Early-stage lung
scans. arXiv preprint arXiv:2005.10992 . cancer diagnosis by deep learning-based spec-
troscopic analysis of circulating exosomes.
[35] Patel, A., Manniesing, R., 2018. A convolu- ACS nano 14, 5435–5444.
tional neural network for intracranial hemor-
rhage detection in non-contrast ct, in: Med- [43] Strub, W., Leach, J., Tomsick, T., Vagal, A.,
ical Imaging 2018: Computer-Aided Diagno- 2007. Overnight preliminary head ct inter-
sis, SPIE. pp. 301–306. pretations provided by residents: locations of
misidentified intracranial hemorrhage. Amer-
[36] Prakash, K., Zhou, S., Morgan, T.C., ican journal of neuroradiology 28, 1679–1682.
Hanley, D.F., Nowinski, W.L., 2012.
Segmentation and quantification of intra- [44] Szegedy, C., Ioffe, S., Vanhoucke, V., Alemi,
ventricular/cerebral hemorrhage in ct scans A.A., 2017. Inception-v4, inception-resnet
by modified distance regularized level set and the impact of residual connections on
evolution technique. International journal of learning, in: Thirty-first AAAI conference on
computer assisted radiology and surgery 7, artificial intelligence.
785–798.
[45] Tan, M., Le, Q., 2019. Efficientnet: Rethink-
[37] Qureshi, A.I., Tuhrim, S., Broderick, J.P., ing model scaling for convolutional neural
Batjer, H.H., Hondo, H., Hanley, D.F., 2001. networks, in: International Conference on
Spontaneous intracerebral hemorrhage. New Machine Learning, PMLR. pp. 6105–6114.
England Journal of Medicine 344, 1450–1460.
[46] Unnithan, A.K.A., Mehta, P., 2020. Hemor-
[38] Roy, S., Butman, J.A., Reich, D.S., Calabresi, rhagic stroke. StatPearls [Internet] .
P.A., Pham, D.L., 2018. Multiple sclero-
sis lesion segmentation from brain mri via [47] Valverde, S., Cabezas, M., Roura, E.,
fully convolutional neural networks. arXiv González-Villà, S., Pareto, D., Vilanova, J.C.,
preprint arXiv:1803.09172 . Ramió-Torrentà, L., Rovira, À., Oliver, A.,
Lladó, X., 2017. Improving automated mul-
[39] Sage, A., Badura, P., 2020. Intracranial hem- tiple sclerosis lesion segmentation with a
orrhage detection in head ct using double- cascaded 3d convolutional neural network
branch convolutional neural network, support approach. NeuroImage 155, 159–168.
vector machine, and random forest. Applied
Springer Nature 2021 LATEX template

15

[48] Vella, M.A., Crandall, M.L., Patel, M.B.,


2017. Acute management of traumatic brain
injury. Surgical Clinics 97, 1015–1030.

[49] Watanabe, Y., Tanaka, T., Nishida, A., Taka-


hashi, H., Fujiwara, M., Fujiwara, T., Ari-
sawa, A., Yano, H., Tomiyama, N., Naka-
mura, H., et al., 2021. Improvement of the
diagnostic accuracy for intracranial haemor-
rhage using deep learning–based computer-
assisted detection. Neuroradiology 63, 713–
720.

[50] Xu, J., Zhang, R., Zhou, Z., Wu, C., Gong,
Q., Zhang, H., Wu, S., Wu, G., Deng, Y.,
Xia, C., et al., 2021. Deep network for the
automatic segmentation and quantification of
intracranial hemorrhage on ct. Frontiers in
Neuroscience 14, 541817.

[51] Yala, A., Lehman, C., Schuster, T., Port-


noi, T., Barzilay, R., 2019. A deep learn-
ing mammography-based model for improved
breast cancer risk prediction. Radiology 292,
60–66.

[52] Ye, H., Gao, F., Yin, Y., Guo, D., Zhao,
P., Lu, Y., Wang, X., Bai, J., Cao, K.,
Song, Q., et al., 2019. Precise diagnosis of
intracranial hemorrhage and subtypes using
a three-dimensional joint convolutional and
recurrent neural network. European radiol-
ogy 29, 6191–6201.

[53] Zhang, Y., Chen, M., Hu, Q., Huang, W.,


2013. Detection and quantification of intrac-
erebral and intraventricular hemorrhage from
computed tomography images with adap-
tive thresholding and case-based reasoning.
International journal of computer assisted
radiology and surgery 8, 917–927.

You might also like