Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Diagnosis of Neuromuscular Diseases via Deep

Learning
Submitted in partial fulfilment of the requirements for the award of the degree of
BACHELOR OF TECHNOLOGY IN CHEMICAL ENGINEERING
BTP Part-1
By

Abhishek Shringi
(2018CH10187)

Department of Chemical Engineering


Indian Institute of Technology Delhi
Nov 2021

Department of Chemical Engineering


Indian Institute of Technology Delhi
Checklist for Project Reports
---------------------------------------- To be filled up by student--------------------------------------------------------
Plagiarism checkpoint:
Yes / No
1.
2. Whether the figures/tables/flowsheets etc. are drawn by student himself/herself? Yes / No
3. Whether the source of text/figures/tables if taken from literature, properly
acknowledged? Yes/ No

Signature of student:

Name: Abhishek Shringi


---------------------------------------- To be filled up by supervisor--------------------------------------------------------
Formatting checkpoint:
4. Whether the report includes the following items?
Title page X Yes / No
Checklist X Yes / No
Certificate X Yes / No
Abstract X Yes / No
Table of contents X Yes / No
List of Figures X Yes / No
List of Tables X Yes / No
Nomenclature X Yes / No
Introduction X Yes / No
Literature Survey/Review X Yes / No
Description of Experimental Setup / Software / Procedure X Yes / No
Results & Discussion X Yes / No
Conclusion X Yes / No
Scope for future work X Yes / No
References X Yes / No

5. Whether the references are written in standard acceptable format? X Yes / No


6. Overall rating of the quality of report:
X Excellent Good Average Poor Unacceptable

Signature of Supervisor:

Name of Supervisor: Hariprasad Kodamana


Certificate

This is to certify that the report submitted by Abhishek Shringi(2018CH10187)


describes the work carried out by him in the Course CLD 411 - Major Project-
Part 1 under my overall supervision.

(Signature of supervisor)
Prof. Hariprasad Kodamana
Assistant Professor
Department of Chemical Engineering
(Jointly with) School of AI
IIT Delhi

ii | P a g e
Declaration

I do certify that this report explains the work carried out by me in the Course
CHD 411 - Major Project Part-1 under the overall supervision of Prof. Hariprasad
Kodamana. The contents of the report including text, figures, tables, etc. have not
been reproduced from other sources such as books, journals, reports, manuals,
websites, etc. Wherever limited reproduction from another source had been made
the source had been duly acknowledged at that point and also listed in the
References.

(Signature of student)
Abhishek Shringi
2018CH10187

iii | P a g e
Acknowledgements

I would like to take this opportunity to express my deep sense of gratitude and
profound feeling of admiration to my supervisor. I would like to express my
special thanks of gratitude to Prof. Hariprasad Kodamana who gave me the
golden opportunity to do this wonderful project on the topic Deep Learning
based diagnosis of Neuromuscular Diseases which also helped me in doing a
lot of research. I gained valuable knowledge working on the project. I am really
thankful to him and for his guidance. His willingness to share his vast knowledge
made me understand this project and its manifestations in great depths and helped
us to complete the assigned tasks. I would like to express my gratitude towards
my parents for their belief in me and encouragement which help me in completion
of this project. I express my love and gratitude to my beloved family and friends;
for their understanding & endless love, through the duration of the project.

iv | P a g e
Abstract
The manual diagnosis of neuro-muscular diseases like muscle dystrophy in thighs
can be very much time consuming and tedious process. This thesis provides
details insights about our work aimed towards the automated diagnosis of Neuro-
muscular diseases in thighs leveraging the use of deep learning on the fat-water
decomposition MRI. A pipeline of segmentation and classification on the MRI
image was deployed to serve the purpose of diagnosis.
The dataset used in this pipeline is known as MyoSegmentum Thighs. It consists
of 25 MRI scans (3 scans of patients and 21 scans of healthy volunteers).
For the segmentation purpose, U-Net model was used and for classification
purpose, ResNet50 was used. IOU score was used as a metric in segmentation,
and we are able to obtain a IOU-score as high as .901.
Further work is required and is being continued in hyperparameter tuning and
training the classification model, so that our pipeline gives us the optimum
results.
Thus, we propose our novel segmentation classification pipeline for the
diagnosis purpose at the clinical level. This work is is in collaboration with
AIIMS Delhi.

Keywords: Deep Learning , Quantitative MRI , Diagnosis, Neuro-muscular


disease,Segmentation, Classification, U-Net, ResNet-50

v|Page
Contents

Certificate................................................................................................................................................ ii

Declaration ............................................................................................................................................. iii

Acknowledgements ................................................................................................................................ iv

Abstract ................................................................................................................................................... v

List of Figures ....................................................................................................................................... vii

Nomenclature ....................................................................................................................................... viii

1. Introduction ..................................................................................................................................... 1

2. Literature Review............................................................................................................................ 2

3. U-Net Model ................................................................................................................................... 3

4. ResNet Model ................................................................................................................................. 4

5. Dataset ............................................................................................................................................ 5

6. Softwares & Libraries Used ............................................................................................................ 6

7. Pipeline ........................................................................................................................................... 7

8. Results & Discussion .................................................................................................................... 11

9. Conclusion: ................................................................................................................................... 13

10. Scope for Future Work................................................................................................................ 13


11. References ................................................................................................................................... 14

vi | P a g e
List of Figures

Figure 1 ...................................................................................................................................... 1

Figure 2 ...................................................................................................................................... 1

Figure 3 ...................................................................................................................................... 2

Figure 4 ...................................................................................................................................... 3

Figure 5 ...................................................................................................................................... 4

Figure 6 ...................................................................................................................................... 5

Figure 7 ...................................................................................................................................... 5

Figure 8 ...................................................................................................................................... 6

Figure 9 ...................................................................................................................................... 7

Figure 10 .................................................................................................................................... 7

Figure 11 .................................................................................................................................... 8

Figure 12 .................................................................................................................................... 9

Figure 13 .................................................................................................................................. 10

Figure 14 .................................................................................................................................. 10

Figure 15 .................................................................................................................................. 11

Figure 16 .................................................................................................................................. 12

Figure 17 .................................................................................................................................. 12

vii | P a g e
Nomenclature

Symbol Meaning
NMD Neuromuscular Disease

ROI Region of Interest

DMD Duchenne Muscular Dystrophy

MRI Magnetic Resonance Imaging

QF Quadriceps Femoris

GR Gracilis

SA Sartorious

HA Hamstring

viii | P a g e
1. Introduction
Neuromuscular Diseases (NMDs) forms a rare class of diseases. One of the
examples of NMD is Duchenne
Muscular Dystrophy(DMD). It has been
reported that over 350 Million[1] people
are suffering from DMD ,worldwide.
India has over 0.8 million children
suffering from DMD [1]
These are the numbers that have been
diagnosed , it is highly likely that many
people remain undiagnosed to such a Figure 1

deadly disease for a long time because the diagnosis of DMD is not only very
time consuming and tedious but also prone to knowledge of subject matter expert.
This situation clearly demands for a better and faster way for diagnosis of this
disease in patients.
Recently, computer vision is finding a lot
of applications in diagnosis of various
diseases like COVID-19, Pneumothorax
etc. that can be but are hard to diagnose by
understand medical imaging techniques
like magnetic resonance imaging (MRI)
and X-rays. Not only computer vision is
successfully applied but have achieved
remarkable success in diagnosis of these
Figure 2
diseases.
So, it makes a sense to dive into computer vision to find a solution to our problem.
Not to mention computer vision have been able to achieve such a landmark only
after the advent of various deep learning models. So, we decided to use deep
learning as a tool for the diagnosis of NMDs.
The thesis starts by presenting the literature review of how this problem have
been approached till now. This is followed by detailed mathematical explanation
of the deep learning models like U-Net, ResNet50, that have been used in this
work. Then a detailed explanation of the dataset (Myosegmentum Thighs) have
been provided. Then a vivid description of various software/libraries used in my
work. Finally , results obtained have been discussed , followed by conclusion and
then future work to be done is presented.

1|Page
2. Literature Survey[2]
Fat Infiltration
Literature[3] reports that the person having NMD has been observed to have
fat infiltration (which means higher fat fraction in muscles). Hence, fat-
fraction would serve as a better marker for the disease diagnosis.
Quantitative MRI analysis
This bring us in search of an effective quantitative MRI technique, so that fat
fraction in the muscle can be estimated non-invasively. One of the suitable
technique reported in the literature is Fat-Water Decomposition MRI. This
technique was first invented by Dixon[4]. It can differentiate MRI signals
from water and fat protons based on their chemical shift differences, making
it ideal for fat-fraction estimates. Now, Multipoint Dixon sequences are
clinically used and widely used in research studies to assess intramuscular fat
infiltration in the thigh.
Figure 3
Segmentation
This is a crucial step
for fat-fraction
estimation after
obtaining fat-water
decomposition MRI.
It severely limits the
application of fat
water decomposition
MRI for fat fraction
estimation as the manual segmentation of various muscle is not only time
consuming and complex process but also subjected to various errors and
reproducibility issues. A study reported that for a scan it takes about 6 hrs on
an average to manually segment the 4 muscle regions in thighs namely QF,
GR, SA, HA.
To overcome the limitation of manual segmentation, Ding et al. proposed a
very novel method of segmenting the regions with the U-Net Model and then
classifying the normal & abnormal thighs on the basis of mean fat fraction.

Taking inspiration from the paper, we propose a segmentation-classification


pipeline based on deep learning models ,in order to automatically segment and
diagnose the NMD from the fat-water decomposition MRI. So it is basically
divided into two phases, ie. benchmarking and improving the results of
segmentation by U-Net and develop a robust classification model based on the
deep learning.

2|Page
3. U-Net Model
Biomedical Image Segmentation
The U-Net was developed by Olaf Ronneberger et al. for Bio Medical
Image Segmentation in 2015. [5]

Encoder-Decoder Architecture
The architecture contains two paths. First path is the contraction path (also
called as the encoder) which is used to capture the context in the image. The
encoder is just a traditional stack of convolutional and max pooling layers.
The second path is the symmetric expanding path (also called as the
decoder) which is used to enable precise localization using transposed
convolutions. Thus it is an end-to-end fully convolutional network (FCN),
i.e. it only contains Convolutional layers and does not contain any Dense
layer because of which it can accept image of any size.

Figure 4

We decided to use U-Net for the segmentation purpose because:


i) It can handle images of high resolution (672*672 in our case)
ii) It is known to have won various segmentation competitions and is found
to be excellent at biomedical image segmentation.
In our U-Net model, we have chosen ResNet34 as the encoder architecture,
which is explained in the subsequent section.

3|Page
4. ResNet
ResNets are deep residual networks,
which were invented in 2012[6],
they were one of the most ground
breaking invention in the field of
computer vision, since they allowed
the training of the deeper networks
more efficiently and correctly.
They are based upon simple fact that
identity matrices can be stacked over
each other, so it is just required to
train the residual and not the whole
functions , which usually lead to
problems of vanishing and
exploding gradients. They utilised
the skip connections as shown in the
figure, in order to take this problem
into account and solve it efficiently.

these skip connections allow the


network to get efficiently trained,
which can be easily understood from
the fact that training error
continuously decreases as the
network gets deeper and deeper.
However, if we choose to have more
no. of layers, then overfitting may
occur. Various layers can be given
to have any no. of layers, like
ResNet34 contain 34 layers,
ResNet50 contains 50 layers and so
Figure 5 on.
Now , we decided to use ResNet34 as the backbone of UNet Model since it is
known to get best results with deeper networks , as is usually with the case of
U-Net encoder.
For the classification between healthy and unhealthy patients ,we used
ResNet50 model , since it has known to win various classification competition.

4|Page
5. Dataset
Magnetic Resonance
Imaging (MRI) can
help to evaluate
muscle anatomy and
diagnose various
disorders and Neuro-
muscular diseases. In
addition to this,
quantitative MRIs
with chemical shift
encoding fat-water
images can also help
to estimate the muscle
Figure 6
volume and the fat fraction in the muscles.

The dataset used for our thesis is known as MyoSegmenTUM thigh. This
contains the MRI images of left & right thighs with a voxel size of 3.2x2x4
mm3 of 15 healthy volunteers and 4 patients having NMD[7]. The dataset
contains PDFF maps , Fat images , Water images of the thigh region, the file
.
training and testing purpose for our model.The thighs have been manually
segmented into quadriceps femoris muscle, sartorius muscle, gracilis muscle
and hamstring muscles, and have been provided format. The data
provided is volumetric in nature , while we have extracted 2D slices from the
data for our analysis. This dataset is specially designed so as to facilitate
research in the area of automatic segmentation of muscles.
The following tables provide details of healthy & unhealthy patients:

Figure 7

5|Page
6. Software and Libraries Used
The following table describes various software and libraries used in this work:

Figure 8

6|Page
7. Pipeline
This section describes about the pipeline that have been proposed for the
diagnosis of NMDs via deep learning

Figure 9

The fundamental idea of this novel pipeline is that it is based on segmentation


followed by classification. In layman terms, following procedure is applied:

1. Fat-water decomposition MRI is given as input to the pipeline .


2. Then Data cleaning & pre-processing is done to make it suitable for
segmentation purpose,
3. The Segmentation Model(U-Net) delineates the ROIs (ie. the muscles
regions), required for classification purpose.
4. The classification is done on the masks obtained from the Segmentation
Model using ResNet50 Model.
5.
advice
7.1 Dataset:
The dataset used in this work is MyoSegmentum
Thigh. It has been explained in detail in previous
sections. It is specifically designed to be used for
research in automatic segmentation of the muscles
in the thigh region. The image shown beside gives
us an overview of what is contained in a particular
slice of the MRI Image. It consists of a water image,
fat images ,PDFF Map & Segmented Mask. Figure 10

7|Page
7.2 Data Pre-Processing :

Remove Skin The obtained


Remove Via Ordered mask was put
Subcutaneous Statistic
Input Image on the Fat map
fat via filtering i.e. to get the
Thresholding Median Filter required

Figure 11

The image pre-processing was done mainly on water images:

Thresholding:
It is one of the simplest methods to segment and process the images
digitally. In this a grayscale image is converted into a binary image (i.e.
image having only black and white pixels)[8]. In thresholding, a particular
threshold intensity is chosen say T and the image having various intensity
over the space, suppose at a particular position (xi , yj) the intensity is I. If
I is greater than T then the pixel is assigned white pixel else black pixel.
In consideration with our data we used it to remove the subcutaneous fat,
the extra fat that is present between skin region and thigh region.

Ordered Statistic Filtering:


It is the process in which a non linear spatial filter replaces the value in the
center pixel with the value obtained from the ordering of pixels in the
image area covered by the filter. In our case we have used median filter ,
which replaces the pixel value by the median of pixel values in its
neighbourhood.[9] Median filtering is most popular for image processing.
For our data we removed skin region with the help of Median filter.
For the Fat images following pre-processing was done:
Cropping:
In this process, only those indices for water image were taken out that were
not black and then these indices were extracted out for fat image, thus
making the pre-processing of fat image faster and in sync with that of water
image.

8|Page
For the pre-processing of mask images , the following step was done:
Combination:
In the dataset MyoSegmentum, masks of 4 muscles namely QF,GR,HA,SA
are given for both left and right thighs separately. So , we combined all the
individual muscle and made a mask out of that using a self written python
script. The following image explains how it has been done:

Figure 22

The pre-processing of all images was done using a python script , and pre-
processed images were stored in separate folder in pickle format, so that they
could be retrieved easily during training of the deep learning model.
7.3 Segmentation Model:
In order to perform ,delineation of 4 ROIs namely QF,GR,HA,SA, U-Net is used,
working of which has been explained in previous section. Now for the
segmentation both water & fat image should be important , so we stacked them
over each other and formulated the training data and testing data in various ratios.
We used Segmentation_Models library for the implementation of U-Net and used
ResNet34 as its backbone. IOU-score was used as the metric for the segmentation
accuracy. Basically IOU-score is the ratio of overlapping area of segmented mask
to the union of the area of predicted and actual mask.

9|Page
The learning parameter was set to 10^-6 , while the number of epochs and batch
size were varied and its effect on training and testing error was observed using
plots (given in results section) .

Figure 33

7.4 Classification model


The classification has been carried out using the segmented mask, the segmented
masks were labelled as healthy and unhealthy and thus target set was generated.
It is but obvious that classification has to be done for a person, but since the data
present with us was less and also not enough resources to train on 3D data, so we
chose this path that , we will input all the 2D slices of the segmented masks
separately and predict on it whether it is a healthy or unhealthy slice. Now ,
suppose, we have 65 slices[10] of the segmented masks , now we predict for each
slice whether it is healthy or unhealthy , now we set a threshold say T, and
suppose we predict H healthy slices out of 65 and H>T , then the patient is healthy
and vice versa
The following schematic shows how our model works
Figure 14
Healthy

65 * ResNet50

Unhealthy

We have used ResNet50 for the classification of 2D images and the later part of
it is simple python script. However training and hyperparameter tuning is yet to
be done for the classification model.

10 | P a g e
8. Results & Discussion

Experiment with Segmentation Model(U-Net):

The value of learning parameter was taken to be 10^(-6). For the training data
5 stacks of MRI Images of healthy volunteers were taken and 2 stacks of
unhealthy patients were taken, having 65 slices in each stack & each slice is
672*672 pixel2. For the testing Since this was initial part of our work , we
have set the batch size to be 32 and no. of epochs were varied and variation of
training error & IOU score was observed.

Qualitative Analysis of results:

The images shown below gives a qualitative idea of our predictions on the
unseen data. One can clearly observe striking similarity between the predicted
and the actual masks. And clearly puts the authenticity of U-Net in carrying
out automatic segmentation for biomedical images.

Figure 14

Figure 15

11 | P a g e
Quantitative analysis of results:

The training was carried out firstly for 10 epochs and the loss function with
no. of epochs was plotted , the IOU-score clearly increases with more no. of
epochs , while the loss decreases. We were able to achieve the IOU score of
around .85 with 10 epoch, and that is a reasonable accuracy of segmentation.

Figure 46

Then we went ahead and trained out model for 200 epochs , so we were able
to get a segmentation accuracy as high as 90% , which is exceptional, but the
curve gets saturated around 80 epochs, so there exists a lot of scope for
improvement in training other parameters.
Figure 57

12 | P a g e
9. Conclusion
With our novel pipeline which includes segmentation followed by
classification, we are able to develop a system for automated diagnosis of
NMDs (particularly muscular dystrophies). It has a clear advantage of very
smooth and efficient automated segmentation which takes only around 10s
for to delineate ROIs, whilst for manual segmentation it was around 6h,
that is a remarkable achievement. It also provides non-invasive strategy for
diagnosis of muscular dystrophy, as opposite to the invasive techniques
like biopsy which is a painful and time taking process.

10. Scope for future work


Hyperparameter tuning of Segmentation
Tuning of various parameters of U-Net model needs to be done in order to
increase the accuracy of the model. Also training parameters like batch size
needs to be tuned properly to get more higher accuracy, we plan to reach
IOU-score of at least 0.95 after hyperparameter tuning.
For this step we plan to use various tools like Optuna and Keras Tuner for
efficient & precise tuning.

Training & Tuning for Classification


We need to train and tune the ResNet50 model for the classification with
the strategy explained in the previous sections, we hope to achieve a good
classification accuracy from this model. In future, we also plan to more
advanced models for classification like ResNeXt, EfficientNet etc.

AIIMS Dataset
Since this project is in collaboration with AIIMS, we will be getting MRI
images for various patients having NMD , which in-turn will make our
model more generalisable in future. We have submitted joint proposal for
ethical clearance of the same.

End to End Software


We plan to develop a full fledged software ,having gui , non technical
person can also take advantage of our work. There is a lot of room in
medical market for a software that provides automated diagnosis based on
cutting edge tech like deep learning

13 | P a g e
Bibliography

[1]
https://www.thepharmaletter.com/article/india-s-first-medicine-to-treat-duchenne-
muscular-dystrophy-cleared-for-
testing?__cf_chl_jschl_tk__=pmd_dpqlZGM8yZqfqaGSKMvko.0U7oD4kWeBrqwkg6jw89U-
1633660988-0-gqNtZGzNArujcnBszQcR (accessed Nov. 14, 2021).

[2] M. Yang et al.


BMC Neurology, vol. 21, no. 1, p. 13, 2021, doi: 10.1186/s12883-020-02036-0.

[3] J. Burakiewicz, C. D. J. Sinclair, D. Fischer, G. A. Walter, H. E. Kan, and K. G. Hollingsworth,


Journal
of neurology, vol. 264, no. 10, pp. 2053 2067, Oct. 2017, doi: 10.1007/S00415-017-8547-3.

[4] Radiology, vol. 153, no. 1, pp. 189 194,


1984, doi: 10.1148/RADIOLOGY.153.1.6089263.

[5] -Net: Convolutional Networks for Biomedical


Lecture Notes in Computer Science (including subseries Lecture Notes
in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 9351, pp. 234 241, 2015,
doi: 10.1007/978-3-319-24574-4_28.

[6]
Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern
Recognition, vol. 2016-December, pp. 770 778, Dec. 2015, doi: 10.1109/CVPR.2016.90.

[7] S. Schlaeger et al. -based water-fat


PloS one, vol. 13, no.
6, Jun. 2018, doi: 10.1371/JOURNAL.PONE.0198200.

[8] Image Pr -
processing/07-thresholding/ (accessed Nov. 14, 2021).

[9]
Nov. 14, 2021).

[10] M. Abadi et al. A system for large-


Nov. 14, 2021. [Online]. Available: https://research.google/pubs/pub45381/

14 | P a g e

You might also like