TRW Assignment 1
TRW Assignment 1
TRW Assignment 1
(Islamabad Campus)
Name: Zainulabidin
Enrollment: 01-133162-099
Section: 7-D
Date: 29/10/2019
TRW Assignment # 2
Topic: X-ray fracture detection using Machine learning
Abstract:
Computer-aided diagnosis is an active area of research.
Specifically, making use of medical images such as X-ray scans, MRI scans,
CAT scans etc. for quick, accurate & cost-effective diagnosis. Previous
works have also addressed problem of identifying fractures in X-ray
images via Machine learning. Automated detection of common fractures
can help reduce screenings done by doctors & let them analyze more
delicate cases. Our paper will build on the work done previously in
identifying fractures in X-ray scan images to address this problem. In the
1st stage, we start with pre-processing scan images. Then we move onto
extracting discriminative features. Lastly, these features are given as input
to different state-of-the-art classification algorithms to detect existence of
fracture. Experiments conducted on test images show our proposed system
to be accurate & effective.
Introduction:
A lot of people suffer from bone fractures worldwide. One of the
most common cause is osteoporotic fractures. International Osteoporosis
Foundation reports [1] that worldwide women have 30-40% risk of getting
osteoporotic fractures while men have a low 13% risk. In clinical practice,
radiologists in hospitals are required to visually inspect X-ray scan images in
order to determine area where fracture has occurred & its precise nature.
Usually radiologists have been found to miss areas of fracture after getting tired
of looking through images of healthy ones. Radiologic error is mainly divided
into cognitive and perceptual errors. Cognitive error accounts for 20-40 % of
the total whereas perceptual error account roughly for 20-40 % of total error
[2].
A computer vision can be developed to assist radiologists by screening images
for common cases & flagging suspicious/complex cases for it to be examined by
a radiologist. Automated screening can help us reduce workload, improve
timeliness & accuracy by directing doctors to complex cases. Therefore,
proposed system is extremely useful for radiologists & has become feasible now
that most of clinical radiology is going digital.
Fractures of a bone can occur in lots of different ways. There isn’t a single
algorithm that addresses and is able to classify all kinds of fractures. Our
approach is to develop a model specifically for detection of osteoporotic
fractures. Our paper presents our current research work on the detection of
fractures from X-ray scan images.
Methodology:
Image Dataset:
For our experimental design of our proposed system, we’re making
use of X-ray scan images dataset provided to us by University of
Orleans, France [7]. This dataset can be used free for research
purposes. Our dataset consists of 140 X-ray scan images of 70
patients, of which 35 subjects are healthy(normal) and remaining
contain abnormalities(fractures). We have divided our dataset
randomly into 2 categories. 10% of it is our test dataset, 90%
remaining is our training dataset, 10-fold cross-validation.
Dataset pre-processing:
In order to apply machine learning techniques, we
made sure our image dataset is refined & pre-processed. We made use of
Python’s scikit-image, which is an open-source image processing library. We
applied Log transformation, an Image intensity transformation technique to
enhance images and make them suitable for next stage. Log transformation, a
type of logarithmic transformation can be defined by this formula
s = c log (r + 1).
Where s and r represent the pixel values of the output & input image and c is a
constant. The value 1 is added to each pixel value of the input image to make
sure that if there is a pixel intensity of 0 in the image, then log (0) is equal to
infinity. So, 1 is added, to make the minimum value at least 1.
During log transformation, the dark pixels in an image are expanded as
compare to the higher pixel values. The higher pixel values are kind of
compressed in log transformation. The value of c in the log transform adjust the
kind of enhancement you are looking for. This helps us increase the dynamic
range of grey level pixels for better visualization & differentiation of
foreground with background.
To further pre-process images, we applied Image segmentation techniques.
Image segmentation is the process of partitioning a digital image in our case X-
ray scans into multiple image segments which are sets of pixels, also known as
image objects [8]. We used image segmentation to simplify the representation
of our images into something that is more meaningful and easier to analyze for
our machine learning algorithms. We made use of balanced histogram
equalization, a very simple method used for automatic image thresholding [9]. In
this approach, our image is divided into 2 main classes namely background and
foreground.
The BHT method tries to find the optimum threshold level that divides the
histogram in two classes.
Feature Extraction & Selection:
The purpose of feature extraction is to convert a 2D
image into a feature vector, which is further utilized as input for the mining phase
of the classifier [10]. The extracted features provide characteristics of the input
image type to the classifier by considering the description of the relevant
properties of the image into feature vectors. We extracted 2 types of features
to describe the structure information, namely texture & frequency.
Texture features contains important information regarding underlying structural
arrangement of the surface of an image. A lot of texture features can be
extracted using Gray-level co-occurrence matrix (GLCM), which describes
patterns of gray-level repetition and is a well-known texture extraction method
[11].
We’ll be extracting contrast, correlation, energy, and homogeneity from it [12].
2. We can judge that the test data is a certain category when it has more
representatives than a certain category of data.
Larger values of ‘k’ reduce the effect of noise on the classification, but it makes
boundaries between classes less distinctive. A good ‘k’ can be selected by cross-
validation, running the nearest neighbor classifier on the learning set only.
Application of these algorithms and tuning of hyperparameters in Python is
performed by scikit-learn, a machine learning python library.
In the classification process, the X-ray scan images are classified as normal and
abnormal. Feature selection is carried out using SFS method to remove
redundancy due to highly correlated features. The selected features are from
the textural and frequency domains which are useful for the classification.
During the classification processes, SFS selected 17 appropriate features out of
37 features. The first few principal components typically account for most of the
variance in the original image data. The performance of SVM is better than kNN
as we can observe from the results. The best classification performance was
achieved when the SVM classifier and SFS selection are employed.
Combination of SVM classifier and SFS selection achieved an AUC of 95.7%,
Accuracy of 97.6%, Precision of 94.5% and recall of 92%. While combination
of kNN classifier and SFS selection achieved an AUC of 93.2%, Accuracy of
90.3%, Precision of 92.1% and recall of 88.7%.
Conclusion:
Computer-aided diagnosis for assistance of a radiologist has
become more realizable with passage of time. This paper presents a computer-
aided diagnosis system with image processing and pattern recognition in
diagnosing fractures in bones by using X-ray scan images. The differences of
experience, knowledge, and skills among individual physicians may affect the
diagnosis results. Our experimental work, the proposed methodology of machine
learning techniques has yielded results that show the unbiased objective way
machine learning algorithms analyze what they see and in common cases
perform better than a trained radiologist. The original images, including
normal(healthy) images, abnormal (fractured bone) images, were first pre-
processed using image enhancement & transformation techniques including
Logarithmic transformation and balanced histogram equalization method. Then,
37 features were obtained from images using three different techniques, which
include textural and frequency domains. SFS methods was applied to select the
input features for classification. Furthermore, the normal/abnormal images were
classified via SVM and KNN classifiers. The classifiers were validated by a 10-
fold cross-validation strategy. The classification performance was evaluated in
terms of the AUC values, accuracy, precision, and recall, respectively.
From the results section we can observe and conclude that Support Vector
machines (SVM) with sequential forward selection (SFS) is better at doing the
given task in our case than k-nearest neighbor(kNN). Limitations of the study are:
1. X-ray scan images were captured correctly, perfectly illuminated and
captured from the right angle. In practical use, sometimes there is variance
in terms of illumination & angle of capture, that may require human
interference, a radiologist to verify right capture of image.
Future Work:
An improvement over this current method could be to employ modern state-
of-the-art deep learning techniques such as convolutional neural networks and
observe results based on it. Furthermore, a robust detection could be
established in verifying parameters that signify correct capture of X-ray scan
images.
References
[2] J. V. Forrest and P. J. Friedman, "Radiologic errors in patients with lung cancer.," The Western
journal of medicine, vol. 134, no. 6, pp. 485-90, 6 1981.
[4] D. &. C. Y. &. L. W. K. &. H. T. &. P. M. -. Yap, "Detecting Femur Fractures by Texture Analysis of
Trabeculae.. Proceedings," in International Conference on Pattern Recognition. 3. 730-733.
10.1109/ICPR.2004.292., 2004.
[5] S. &. X. Y. &. C. Y. &. L. W. K. &. H. T. &. P. M. Lim, "Detection of femur and radius fractures in
x-ray images.," Proc. 2nd Int. Conf. on Advances in Medical Signal and Information Processing.,
no. 2nd, 2004.
[12] F. Yang, M. Hamit, C. B. Yan, J. Yao, A. Kutluk, X. M. Kong and S. X. Zhang, "Feature extraction
and classification on esophageal x-ray images of xinjiang kazak nationality," Journal of
Healthcare Engineering, vol. 2017, 2017.
[15] "Chapter 2 : SVM (Support Vector Machine) — Theory - Machine Learning 101 - Medium,"
[Online]. Available: https://medium.com/machine-learning-101/chapter-2-svm-support-
vector-machine-theory-f0812effc72.