Final Project V7 - Colored
Final Project V7 - Colored
Final Project V7 - Colored
A Final Project
Presented to the
Faculty of Electrical and Computer Engineering
Institute of Technology – Jimma University
Jimma, Ethiopia
In Partial Fulfillment
of the Requirements for the Degree
Bachelor of Science in Electrical Engineering
Major in Computer Engineering
DECLARATION
We certify that this Final Year Project, entitled “Ethio-MeditechScan v1.0: Facilitating Medical
Diagnostics with AI Image Analysis,” is our original work, and it has not been previously
submitted, either in its entirety or partially, for any academic degree or qualification. All
sources used in this project have been properly cited and acknowledged.
Adviser:
i
ACKNOWLEDGEMENT ii
ACKNOWLEDGEMENT
First and for most we are extremely grateful to the Faculty of Electrical and Computer
Engineering, for giving us the opportunity to carry out this project, which is an integral part of
the curriculum in Jimma University Institute of Technology. Secondly, we would like to express
our earnest gratitude and regards to our project advisor Engr. Kris C. Calpotura in the faculty
of Electrical and Computer Engineering, Computer stream for being the corner stone of our
project. It was his perpetual motivation and guidance during the period of doubts and
uncertainties that has helped us to carry on with this project. Finally, we extend our gratefulness
to one and all who are directly or indirectly involved in the successful completion of this project
work.
ii
ABSTRACT iii
ABSTRACT
Keywords: AI, medical image analysis, healthcare accessibility, convolutional neural network,
radiology, database.
iii
TABLE OF CONTENTS iv
TABLE OF CONTENTS
DECLARATION ....................................................................................................................... i
ACKNOWLEDGEMENT .......................................................................................................ii
LIST OF TABLES................................................................................................................... ix
ACRONYMS ............................................................................................................................ x
1. INTRODUCTION................................................................................................................ 1
iv
TABLE OF CONTENTS v
3. METHODOLOGY ............................................................................................................ 11
CHAPTER FOUR.................................................................................................................. 19
v
TABLE OF CONTENTS vi
vi
TABLE OF CONTENTS vii
REFERENCES....................................................................................................................... 47
APPENDICES ........................................................................................................................ 49
A.2 Letter for requesting dataset form Jimma Referral Hospital ........................................ 52
vii
LIST OF FIGURES viii
LIST OF FIGURES
Figure 4.12 Sequence Diagram for View and Download Data ................................................ 31
Figure 5.5: Image Displaying Detection Results on the Detection Page ................................. 38
Figure 5.7: shows the View Data page in Ethio-MeditechScan v1.0 ....................................... 39
Figure 5.8: Home Interface with Detection Types and Reading Section ................................. 40
Figure 5.9: File Selection and Result Display for the Selected Detection Type ...................... 41
viii
LIST OF TABLES ix
LIST OF TABLES
Table 5.2: Database Dictionary for the Patient Data Model .................................................... 34
ix
ACRONYMS x
ACRONYMS
AI - Artificial Intelligence
CT - Computed Tomography
ER - Entity–Relationship
FN - False Negative
FP - False Positive
PE - Pulmonary Embolism
TP - True Positive
x
ACRONYMS xi
TN - True Negative
UI - User Interface
xi
CHAPTER ONE 1
CHAPTER ONE
1. INTRODUCTION
Surveys conducted in Addis Ababa reveal a distressing reality where essential diagnostic
modalities such as CT scans and MRIs are scarcely available. However, even when these
machines are accessible, the problem persists due to the scarcity of trained radiologists to
interpret the medical images effectively. This shortage of skilled professionals significantly
prevents accurate diagnoses and this leading to delays in treatment which can pos serious risks
to patient health and well-being [1].
Our study aims to address these critical gaps in healthcare accessibility by introducing Ethio-
MeditechScan v1.0. This innovative solution leverages AI technologies to analyze medical
images swiftly and accurately, regardless of geographical location. By integrating AI-driven
image analysis, our project seeks to revolutionize medical diagnostics in Ethiopia, bridging the
gap in radiological services and ultimately saving lives.
1
1. INTRODUCTION 2
1.2 MOTIVATION
2
1. INTRODUCTION 3
1.5.1 SCOPE
The scope of the Ethio-MeditechScan v1.0 encompasses the development and implementation
of user-friendly web and mobile application to facilitate medical image diagnosis in Ethiopia.
The project aims to deal with the challenges posed via the shortage of radiologists, specifically
in rural regions, by way of leveraging AI generation to appropriately locate and classify
common diseases in chest and brain medical image. The system will enable healthcare experts
to upload medical image, acquire analysis result, and get disease classifications via an intuitive
interface. The scope also includes establishing database system for storing image, analyzed
result and other patient data, enhancing patient care and facilitating scientific studies
endeavors.
3
1. INTRODUCTION 4
1.5.2 LIMITATIONS
One major limitation of the Ethio-MeditechScan v1.0 project is its reliance on datasets from
platforms like Kaggle. We tried to obtain data from local Ethiopian hospitals, such as Jimma
Referral Hospital, but faced difficulties in accessing the needed medical images and their
corresponding reading results. As a result, we used external datasets from Kaggle, which may
not fully capture the diverse patient populations and medical conditions in Ethiopia. This can
introduce biases and affect the accuracy and generalizability of our AI algorithms in the local
context.
Furthermore, our focus on a limited set of diseases restricts the system’s usefulness. While
concentrating on specific conditions can improve performance, it limits the system's ability to
address a wider range of medical issues, potentially missing less common or emerging health
threats crucial for comprehensive healthcare. The quality of the Kaggle data can also vary, with
inconsistencies and inaccuracies in medical image labeling impacting the training process and
reducing the reliability of our AI model in clinical settings.
To address these limitations, we need to collaborate with local healthcare institutions to gather
representative medical datasets that reflect Ethiopia's unique medical landscape. Expanding the
range of diseases analyzed by the system is also essential to enhance its applicability and
effectiveness in addressing a broader array of health conditions. By tackling these challenges,
we can better meet the diverse healthcare needs of the Ethiopian population.
For patients, the implementation of this system means more equitable access to high-quality
healthcare services, regardless of geographical location. The AI-enhanced diagnostic tools
4
1. INTRODUCTION 5
ensure timely and precise medical image readings, allowing for prompt medical interventions.
Moreover, the creation of a comprehensive database that stores patient data and diagnostic
results will facilitate continuity of care, enabling healthcare providers to access historical data
quickly and make informed decisions about patient treatment plans.
The project also holds substantial significance for the research community. By establishing a
robust and accessible database of medical images and associated diagnostic results, the Ethio-
MeditechScan v1.0 project will support a wide range of research activities, from AI
development to epidemiological studies. Researchers will have access to high-quality data
necessary for advancing medical research and improving AI models. However, access to this
database will be controlled and facilitated through healthcare providers using the system,
ensuring data privacy and security while making critical data available for projects like AI
development and other medical research endeavors.
5
CHAPTER TWO 6
CHAPTER TWO
2. REVIEW OF RELATED LITERATURE
In recent years, there has been increasing interest in using technological advancements to tackle
healthcare challenges, especially in areas where specialized medical services are scarce. One
promising strategy is incorporating artificial intelligence (AI) into medical image analysis to
enhance diagnostic accuracy and improve patient outcomes. This literature review thoroughly
assesses various studies in this field, scrutinizing their methodologies, goals, and how they
relate to the Ethio-MeditechScan v1.0 project.
Zhang et al. [2] proposed a deep learning-based approach for the detection and classification
of pulmonary nodules using chest CT images. Their research focused on leveraging
convolutional neural networks (CNNs) to accurately identify and classify nodules, aiding in
the early diagnosis of lung cancer. While the study demonstrates promising results in nodule
detection, it may not emphasize the importance of storing analysis results for future research
and patient care, a critical aspect addressed by the Ethio-MeditechScan v1.0 project. Moreover,
the Ethio-MeditechScan v1.0 project extends its capabilities to encompass various thoracic
diseases beyond pulmonary nodules, ensuring a comprehensive solution for medical image
analysis in resource-limited settings.
Wang et al. [3] discussed the ChestX-ray14 dataset, which contains chest X-ray images labeled
with various thoracic diseases. Their research highlighted the challenges and potential solutions
in utilizing this dataset for AI-driven medical image analysis tasks. While the study addresses
the availability of labeled datasets for training deep learning models, it may not delve into the
storage and retrieval of analysis results for future research and patient care, as emphasized by
the Ethio-MeditechScan v1.0 project. Additionally, the Ethio-MeditechScan v1.0 project's
capabilities extend beyond chest X-ray images to include analysis of chest CT scans and brain
CT scans for a broader range of medical conditions, ensuring its applicability in diverse clinical
settings.
Kim et al. [4] developed an AI-driven approach for automated detection of pulmonary
embolism (PE) on CT pulmonary angiography. Their research focused on utilizing deep
6
2. REVIEW OF RELATED LITERATURE 7
learning algorithms to accurately identify and classify PE, aiding in prompt diagnosis and
treatment initiation. While the study demonstrates promising results in PE detection, it may not
emphasize the importance of storing analysis results for future research and patient care, a
critical aspect addressed by the Ethio-MeditechScan v1.0 project. Additionally, the Ethio-
MeditechScan v1.0 project's capabilities extend beyond PE detection to encompass various
thoracic diseases and brain conditions, ensuring a comprehensive solution for medical image
analysis in resource-limited settings.
Patel and Rosenberg [5] introduced RapidAI, an automated system for the identification and
quantification of intracranial hemorrhage (ICH) on head CT scans. Their research aimed to
streamline the diagnosis of ICH using AI-driven algorithms, enabling rapid and accurate
detection of hemorrhagic strokes. While the study focuses on ICH detection, it may not fully
address the need for comprehensive solutions that integrate accurate image analysis with secure
data storage and retrieval functionalities, as offered by the Ethio-MeditechScan v1.0 project.
Moreover, the Ethio-MeditechScan v1.0 project extends its capabilities to include analysis of
chest CT scans for various thoracic diseases, ensuring its applicability in diverse clinical
scenarios.
Wu et al. [6] provided a comprehensive review of deep learning applications in medical image
analysis. Their review covers various modalities and clinical tasks, including chest CT analysis
and brain CT analysis for different conditions. While the review discusses the technical aspects
of deep learning algorithms, it may not delve into the practical implementation of integrated
solutions that combine accurate image analysis with robust data storage and retrieval
functionalities, as offered by the Ethio-MeditechScan v1.0 project. By incorporating secure
data storage and retrieval, the Ethio-MeditechScan v1.0 project ensures that analysis results are
accessible for further research and patient care, augmenting its impact in clinical practice.
7
2. REVIEW OF RELATED LITERATURE 8
Despite these challenges, there are significant opportunities for integrating AI technologies into
the Ethiopian healthcare system. Artificial intelligence can be a powerful tool for healthcare
professionals in Africa, as it can help doctors make more accurate diagnoses faster, analyze
large amounts of data, and reduce errors in medication administration and surgical
procedures. The Ethiopian government has recognized the potential of AI in healthcare and has
established the Artificial Intelligence Center to promote the use of this technology [7].
AI applications in healthcare have literally changed the medical field, including imaging and
electronic medical records (EMR), laboratory diagnosis, treatment, augmenting the intelligence
of the physicians, new drug discovery, providing preventive and precision medicine, biological
extensive data analysis, speeding up processes, data storage and access for health organizations.
However, this field of science faces various ethical and legal challenges [9].
Despite tremendous strides made in the field of AI in communities, and its role in improving
the treatment process, it is not accessible to all societies. Many low-income and developing
countries still do not have access to the latest technologies. It should be noted that the ethical
dilemmas, privacy and data protection, informed consent, social gaps, medical consultation,
empathy, and sympathy are various challenges that we face in using AI. Therefore, before
8
2. REVIEW OF RELATED LITERATURE 9
integrating artificial intelligence with the healthcare system, practitioners and specialists
should consider all four medical ethics principles, including autonomy, beneficence,
nonmaleficence, and justice in all aspects of healthcare [10].
In recent years, there have been numerous innovations in medicine and new health technologies
for developing countries. These technologies target a large variety of issues including medical
testing, identifying safe drinking water, filtering dirty water and decreasing infant and maternal
mortality rates. Some innovations that have had a significant impact on global health and show
potential for future interventions include Hemafuse, Embrace Warmers, 3D printing in
medicine and SMS services to identify counterfeit medicine in Sub-Saharan Africa [11].
Technological innovation, particularly in the field of artificial intelligence (AI), plays a crucial
role in addressing healthcare challenges in developing countries like Ethiopia. AI technologies
have the potential to revolutionize healthcare by improving diagnostic accuracy, enhancing
treatment outcomes, and increasing access to quality care, especially in resource-limited
settings. These advanced solutions can help overcome the limitations posed by a shortage of
skilled healthcare professionals and inadequate medical infrastructure, which are common
challenges faced by many developing nations [11].
While Africa accounts for 12 percent of the world’s population, it faces 25 percent of the
world’s disease burden and only 3 percent of the world’s health workers. These statistics are
likely to worsen as a study by McKinsey estimates that 18 million health workers will be
needed globally by 2030. In addition, the lack of data storage infrastructure available to African
health facilities represents a barrier to AI adoption in the health sector. African governments
should work to facilitate investment in data centers and data acquisition readiness so they will
be able to fully benefit from this technology [9].
❖ Lack of infrastructure and human resources – both of which are required to successfully
implement AI solutions
9
2. REVIEW OF RELATED LITERATURE 10
❖ Lack of data – especially if it comes from a hospital that doesn’t participate in clinical trials
(which is necessary for many projects)
❖ Lack of trust – because people don’t feel like they’re getting their money’s worth from
these technologies
It’s also important to keep in mind that for any data-based initiative to be successful and
sustainable, medical security and privacy must take the necessary precautions to ensure the
infrastructure is secure. Countries will perform best when they are able to merge current
infrastructure while improving upon it by offering new tech-based advancements [9].
10
CHAPTER THREE 11
CHAPTER THREE
3. METHODOLOGY
The Rapid Application Development (RAD) methods take iterative ideas to the extreme.
Instead of using iterations lasting a year or two, their iterations last a month, a week, or even
less. Some RAD techniques also apply iteration to everything, not just to programming. They
apply iteration to requirement gathering, requirement validation, and design [12].
In Ethio-MeditechScan v1.0 RAD software process model was chosen for its significance on
quick iterations and flexibility. The RAD model accelerated the development process compared
to traditional waterfall models and its iterative nature allowed for adjustments to requirements
as the project progressed.
Requirements
planning
Cutover
Requirements planning: During this phase, the users, executive champion, management,
team leaders, and other stakeholders agree on the project’s general goals and requirements. The
requirements should be specified in a general way so that they don’t restrict later development
11
3. METHODOLOGY 12
unnecessarily. When the stakeholders agree on the requirements and the project receives
approval to continue, the user design phase begins [12].
In this phase the general objective of the project was defined and the functionalities of the AI
model, the website and the mobile app were outlined.
User design: The users and team members work together to convert the requirements into a
workable design. They use techniques such as focus groups, workshops, prototyping, and
brainstorming to come up with a workable design [12].
In user design phase the requirements were translated into design. Techniques like prototyping
like mockups of websites and app were used to refine user interfaces and functionalities.
Construction: The developers go to work building the application. The users continue to
review the pieces of the application as the developers build them to make corrections and
suggestions for improvements [12].
In construction phase the website and mobile app were built in short cycles focusing on specific
functionalities and each iteration was tested for course correction and improvement before
moving to next iteration.
Cutover: The developers deliver the finished application to the users. The usual cutover
strategies such as staged delivery, gradual cutover, or incremental deployment can be used [12].
The overall benefit of using the RAD model in this project were to reduce development time,
flexibility to change and add requirements, continuous testing after each iteration, easy to reuse
codes.
For the Ethio-MeditechScan v1.0 project, we tried to obtain medical imaging data with their
corresponding readings from Jimma University Specialized Hospital. However, we faced
challenges as the hospital did not have available data in the format required for our project's
objectives. So, we turned to Kaggle, a well-known platform for machine learning datasets, as
our primary data source. Kaggle provides a diverse array of medical imaging datasets,
including chest X-rays and brain MRIs, which align with our project's goals of developing AI
12
3. METHODOLOGY 13
algorithms for medical image analysis. While Kaggle datasets may not perfectly represent the
demographic characteristics and disease prevalence of the Ethiopian patient population, they
serve as a practical and accessible alternative, enabling us to proceed with the development and
validation of our AI models.
For the Ethio-MeditechScan v1.0 project, the data gathering procedure primarily involves
accessing and utilizing datasets sourced from Kaggle, a widely recognized platform for
machine learning datasets. Kaggle provides a diverse array of medical imaging datasets,
including chest X-rays and brain CT scans, which are directly relevant to the project's
objectives of developing AI algorithms for medical image analysis. The procedure for
accessing and utilizing Kaggle datasets typically involves the following steps:
➢ Dataset Identification: The project team identifies and selects Kaggle datasets that align
with the project's objectives and requirements. This may involve searching for datasets
containing medical images suitable for training AI models to detect and classify common
diseases such as tuberculosis, pneumonia, strokes, and various carcinomas.
➢ Data Acquisition: Once suitable datasets are identified; the project team obtains access to
the datasets through the Kaggle platform. Kaggle provides access to a wide range of
medical imaging datasets, many of which are freely available for download.
➢ Data Preprocessing: Before the data can be used for training AI models, preprocessing
steps may be necessary to clean and format the data. This may involve tasks such as image
resizing, normalization, and labeling to ensure consistency and compatibility with the AI
algorithms being developed.
13
3. METHODOLOGY 14
3.4.1 FLOWCHART
A flowchart is a type of diagram that represents a workflow or process. A flowchart can also
be defined as a diagrammatic representation of an algorithm, a step-by-step approach to solving
a task [13].
14
3. METHODOLOGY 15
3.4.2 ER DIAGRAM
A use case describes interactions between actors, which can be users or parts of the application,
often encompassing multiple screens for various tasks, each described by user stories. A use
case diagram represents the dynamic behavior of a system, encapsulating its functionality with
use cases, actors, and relationships, modeling tasks, services, and functions. It serves to capture
the system's dynamic aspect, gathering requirements and design influences, and when tasks are
analyzed, use cases are prepared and actors identified, with use case diagrams presenting an
external view of the system's functionalities [12].
The sequence diagram represents the flow of messages in the system and is also termed as an
event diagram. It helps in envisioning several dynamic scenarios. It portrays the
communication between any two lifelines as a time-ordered sequence of events, such that these
lifelines took part at the run time. In UML, the lifeline is represented by a vertical bar, whereas
the message flow is represented by a vertical dotted line that extends across the bottom of the
page. It incorporates the iterations as well as branching [12].
The class diagram depicts a static view of an application. It represents the types of objects
residing in the system and the relationships between them. A class consists of its objects, and
also it may inherit from other classes. A class diagram is used to visualize, describe, document
various different aspects of the system, and also construct executable software code [12].
15
3. METHODOLOGY 16
3.5.1 ACCURACY
Accuracy is the percentage of cases properly categorized within the dataset. A model with a
high accuracy score shows that the model correctly classifies the input across all classes. This
indicates that accuracy is a measure of the overall correctness of the neural network model in
predicting the class label for a given input [14].
The accuracy of a neural network model can be calculated using the formula below:
(𝑇𝑃 + 𝑇𝑁)
𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 =
(𝑇𝑃 + 𝑇𝑁 + 𝐹𝑃 + 𝐹𝑁)
3.5.2 PRECISION
Precision measures how accurately a model determines a positive output for given input data.
A high precision value shows that the neural network model avoids false positives. Models
with a high precision value are preferred in an environment where the cost of dealing with false
positives is high [14].
The precision of a neural network model can be calculated using the formula below:
𝑇𝑃
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =
(𝑇𝑃 + 𝐹𝑃)
Recall refers to the ability of the neural network model to detect positive class labels. A model
with a high recall value accurately captures the data associated with the positive class labels
and steers clear of false negative predictions. Models with high recall scores are necessary
when the costs of dealing with false negatives are high [14].
𝑇𝑃
𝑅𝑒𝑐𝑎𝑙𝑙 =
(𝑇𝑃 + 𝐹𝑁)
16
3. METHODOLOGY 17
3.5.4 F1 SCORE
The F1 score or F-measure is described as the harmonic mean of the precision and recall of a
classification model. The two metrics contribute equally to the score, ensuring that the F1
metric correctly indicates the reliability of a model. It’s important to note that calculating the
F1 score using arithmetic mean may not appropriately represent the model's overall
performance, especially when precision and recall have considerably varied values. That’s
because the arithmetic mean focuses on the sum of values and their average [14].
2 (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙)
𝐹1 = = 2×
1 1 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 + 𝑅𝑒𝑐𝑎𝑙𝑙
+ 𝑃𝑟𝑒𝑐𝑒𝑠𝑖𝑜𝑛 (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙) ×
𝑅𝑒𝑐𝑎𝑙𝑙 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙
=2×
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 + 𝑅𝑒𝑐𝑎𝑙𝑙
Receiver Operating Characteristic (ROC) Area Under the Curve (AUC) measures the ability of
a classification model to distinguish between classes. It plots the true positive rate against the
false positive rate across different threshold values and provides a single scalar value
representing the model's performance [15].
True Positive Rate (TPR) is a synonym for recall and is therefore defined as follows:
𝑇𝑃
𝑇𝑃𝑅 =
(𝑇𝑃 + 𝐹𝑁)
𝐹𝑃
𝐹𝑃𝑁 =
(𝐹𝑃 + 𝑇𝑁)
17
3. METHODOLOGY 18
An ROC curve plots TPR vs. FPR at different classification thresholds. Lowering the
classification threshold classifies more items as positive, thus increasing both False Positives
and True Positives. To compute the points in an ROC curve, we could evaluate a logistic
regression model many times with different classification thresholds, but this would be
inefficient. Fortunately, there's an efficient, sorting-based algorithm that can provide this
information for us, called AUC [15].
AUC stands for "Area under the ROC Curve." That is, AUC measures the entire two-
dimensional area underneath the entire ROC curve (think integral calculus) from (0,0) to (1,1).
18
CHAPTER FOUR 19
CHAPTER FOUR
4. SYSTEM DESIGN
➢ Client Layer: The client layer consists of the user interface components, including the
mobile app and web application, which healthcare professionals use to interact with the
system. This layer enables users to upload medical images and access analysis results.
➢ Server Layer: The server layer includes the backend servers that house the core
functionalities of the system. It comprises an application server that manages user requests,
interacts with the database, and invokes AI models for analyzing the uploaded medical
images.
➢ AI Image Analysis: The AI image analysis module processes the medical images to detect
and classify diseases. It generates analysis results that are sent back to the server for storage
and retrieval by users, ensuring timely and accurate diagnostics.
➢ Database: The database stores medical images uploaded by users and the corresponding
analysis results generated by the AI models.
19
4. SYSTEM DESIGN 20
Functional requirements define the behavior or function of the system. These requirements
describe the functions that the system must provide to meet need of health care protectional
and improve patient treatments. The functional requirement of the EthioMeditechScan v1.0
include;
➢ Account creation: The system should allow the admin to create accounts for users by
their personal detail like name, email and user name.
➢ User Authentication: The system must authenticate the users by their username and
password.
➢ Upload Medical Image: The system also allows the user to upload medical image such
as CT Scane and X- Ray through user-friendly user interface.
➢ Supported Format: The system supports different image formats like JPEG and PNG.
➢ Analyzing Medical Image: The system must automatically analyze medical image and
classify the image.
➢ Display Result: The system displays the analyzed result on user- friendly interface.
➢ Data Storage: The system also stores medical image and the analyzing result with
patient information in database.
➢ Search Functionality: the system allows the user to search the stored medical image
ether by patient ID or by reading result.
➢ Download functionality: The system also allows the user to download medical images.
Non-functional requirement is a requirement that specifies criteria that can be used to judge the
operation of a system, rather than specific behaviors. They are contrasted with functional
requirements that define specific behavior or functions. Below are nonfunctional requirements
for Ethio-MeditechScan v1.0.
➢ Performance: The system must analysis medical image at high speed to facilitate quick
medical decisions.
20
4. SYSTEM DESIGN 21
➢ Scalability: The system should be supporting increasing number of users and large number
of medical images without performance degradation.
➢ Security: Patient data and medical image stored must be protected from unauthorized
access.
➢ Usability: The system interface must be intuitive and easy to use for healthcare professional
and other users without requiring level of technical experts.
➢ Reliability: The system should be available and give function 24 hour to ensure continuous
access for healthcare providers.
Django is a free and open-source, Python-based web framework that runs on a web server. It
follows the model–template–views architectural pattern. It is maintained by the Django
Software Foundation, an independent organization established in the US as a 501 non-profit.
Django provides a robust set of tools, including an Object-Relational Mapping (ORM) system
for database interaction, an admin panel for database management, and a templating engine for
dynamic content creation [16].
In our project we have used Django for deploying the model of the project by webapp. Django
serves as a critical software requirement. With its rapid development capabilities and modular
architecture, Django enables us to quickly deploy a robust system capable of handling the
complexities of medical image analysis. Its built-in security features ensure the protection of
sensitive patient data, while its scalability allows for seamless growth as we anticipate an
increasing number of users and medical images.
4.2.3.2 FLUTTER
Flutter is a mobile app development platform created by Google. It allows developers to create
web, desktop, and cross-platform apps that run on Android and iOS devices. Flutter uses a
reactive programming language called Dart, making development faster and easier than
traditional methods. The Flutter framework makes it easy to build user interfaces that are
21
4. SYSTEM DESIGN 22
beautiful, fast, and responsive. The framework is also extensible, so someone can easily add
new features and functionality. In our project we have used flutter for creating android
application for our system.
4.2.3.2. VS CODE
Visual Studio Code, also commonly referred to as VS Code, is a source-code editor developed
by Microsoft for Windows, Linux and macOS. Features include support for debugging, syntax
highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Users
can change the theme, keyboard shortcuts, preferences, and install extensions that add
functionality [18]. VS Code is a versatile text editor that supports various programming
languages and has many helpful features for web and mobile development. In this project it is
used to build the website that is built for our system using python, HTML and CSS and mobile
application using flutter framework.
22
4. SYSTEM DESIGN 23
Data preprocessing transforms the data into a format that is more easily and effectively
processed. In our project we have used dataset from Kaggle which is categorized and labeled.
The dataset, sourced from Kaggle, encompasses a diverse range of medical images in varying
formats and qualities. To optimize performance of our AI model, the following preprocessing
steps are undertaken.
❖ Image Standardization: This involves resizing images to constant dimension and also
converting to a standard format.
❖ Image Enhancement: Enhancing the visibility of anatomical structures and abnormalities
within the medical images is crucial for accurate analysis. Image enhancement techniques,
including contrast adjustment and histogram equalization, are employed to optimize image
quality and enhance diagnostic features.
❖ Data Augmentation: Data augmentation strategies are implemented to augment the
dataset's diversity and robustness. Geometric transformations such as rotation and scaling,
along with random perturbations like adding noise and flipping, are applied to generate
additional training samples and enhance the model's generalization capabilities.
❖ Annotation and Labeling: The dataset is annotated and labeled with ground truth
information, providing essential context for supervised learning. Manual annotation tools
are utilized to label regions of interest within the images, enabling the AI model to learn
from labeled training data effectively.
Convolutional Neural Network (CNN), also called ConvNet, is a type of Artificial Neural Net-
work (ANN), which has deep feed-forward architecture and has amazing generalizing ability
as compared to other networks with FC layers, it can learn highly abstracted features of objects
especially spatial data and can identify them more efficiently. A deep CNN model consists of a
finite set of processing layers that can learn various features of input data (e.g. image) with
multiple level of abstraction [19].
23
4. SYSTEM DESIGN 24
In our project, we have employed Convolutional Neural Networks (CNNs) for training the AI
model to analyze medical images. By using CNNs, our system can efficiently detect and
classify common diseases in chest and brain medical images with high accuracy. The CNN
model processes the images through multiple layers, each extracting increasingly complex
features, ultimately enabling precise and reliable diagnostic predictions that are crucial for
improving healthcare accessibility and outcomes in Ethiopia.
The AI model for Ethio-MeditechScan v1.0 was trained focused on getting high accuracy in
medical image analysis. The process began with data preprocessing, where medical images
were resized to uniform size and normalized. Architecture of the model include initial
convolutional layer with 16 filter and a (3,3) kernel, followed by max-pooling layer, and a
second convolutional layer with 32 filters and a (2, 2) kernel followed by max-pooling. This
was designed to efficiently capture and refine features from the medical images.
For training the model, we utilized the Adam optimizer and the 'Sparse Categorical Cross
entropy' loss function, both suitable for classification tasks. The dataset was categorized into
training, test, and validation sets, with proportions of 70%, 20%, and 10% respectively. All
images were resized to a uniform size of 256x256 pixels with three channels. The training
process spanned multiple epochs, incorporating early stopping and model checkpointing
mechanisms to prevent overfitting and save the best model. These measures ensured the model
could effectively learn from the data, providing accurate diagnostic results to enhance
healthcare accessibility in Ethiopia.
4.3.4.1 ACCURACY
The figure 4.4 below shows the accuracy of the model per epoch. As observed in the graph the
accuracy increases as the epoch increases. The accuracy shown in the graph is training accuracy
and validation accuracy. The training accuracy of the model is about 99% while accuracy of
validation is about 95%.
24
4. SYSTEM DESIGN 25
We have evaluated the model performance of Ethio-MeditechScan v1.0 using precision, recall,
and F1-score. The results are visualized in the graph shown in Figure 4.5 below. These metrics
provide a comprehensive understanding of the model's effectiveness in accurately analyzing
medical images.
25
4. SYSTEM DESIGN 26
The ROC curve shown in Figure 4.6 demonstrates how well the model separates true positives
from false positives. A higher area under the curve (AUC) indicates better performance,
reflecting the model's ability to distinguish between the two classes effectively.
Business rules define the constraints and guidelines within which the Ethio-MeditechScan v1.0
system operates. Key business rules for this system include:
➢ An admin create account for many users, but each user is created by one admin.
➢ User may be doctor or secretary.
➢ A doctor can analysis many medical images.
➢ Each secretary can store many patients’ data.
➢ Each secretary can download many medial images.
26
4. SYSTEM DESIGN 27
4.4.2 ER DIAGRAM
Figure 4.6 below presents a class diagram highlighting the main system entities: Users (Admin,
Doctor, Secretary) and Medical Data. Users can be Admins, Doctors, or Secretaries, with each
role being a subset of User. Admins manage user accounts, Doctors analyze medical images,
and Secretaries store medical data, showcasing the system's efficient handling of user roles and
medical information.
27
4. SYSTEM DESIGN 28
The use case diagram shown in figure 4.7 below depicts user interactions with Ethio-
MeditechScan v1.0, a medical image analysis system. Doctors can upload images, select
disease types, and review analysis results; admins manage user access and system settings; and
secretaries can support data input.
28
4. SYSTEM DESIGN 29
The sequence diagram details the system workflow for user interactions. For each use case in
the use case diagram, a sequence diagram was created to visualize interactions and message
flows between users and system components. These diagrams help understand dynamic
behavior, identify potential issues, and ensure all requirements are met. Here are the use case
diagrams for each use case:
4.4.4.1 LOGIN
29
4. SYSTEM DESIGN 30
30
4. SYSTEM DESIGN 31
31
4. SYSTEM DESIGN 32
The Ethio-MeditechScan v1.0 class diagram outlines the system's core components and their
relationships. Key classes include User (doctors, admins, secretaries), MedicalImage and
Patient_Data.
32
CHAPTER FIVE 33
CHAPTER FIVE
5. RESULTS AND DISCUSSIONS
33
5. RESULTS AND DISCUSSIONS 34
This section provides a detailed description of the configuration developed, focusing on the
database installation and use of data models in the Django application.
34
5. RESULTS AND DISCUSSIONS 35
In this part, we present screen captures of the Ethio-MeditechScan v1.0 framework, to give a
visual understanding into its usefulness both on the website and on the Android application
interfaces.
The web application Ethio-MeditechScan v1.0 serves as a user-friendly platform for accessing
medical examination data powered by AI image analysis. It allows users to effortlessly upload
medical images, view search results, and organize their medical records through an intuitive
web interface.
➢ Login Interface
To ensure secure access to the Ethio-MeditechScan v1.0 system, users are required to log in
with their credentials. The login interface asks for a username and password, ensuring that only
authorized personnel can access the system's functionalities. This layer of security is critical in
maintaining the privacy and integrity of medical data analyzed by our AI-based system.
35
5. RESULTS AND DISCUSSIONS 36
➢ Home Page
After logging into Ethio-MeditechScan v1.0, users are greeted with the home page, designed
for ease of navigation. The interface allows users to choose from three detection types: Brain
Stroke Detection, Lung Disease Detection, and Lung Cancer Detection. A navigation bar
provides access to two main functions: "View Data" for reviewing stored patient data, including
medical images and their results, and "Add Data" for inputting new patient information and
images for diagnosis by the AI system.
➢ Upload Page
The upload page interface in Ethio-MeditechScan v1.0 is designed for ease of use, regardless
of the detection type selected (Brain Stroke Detection, Lung Disease Detection, or Lung Cancer
Detection). Users can upload a medical image by clicking on the "Choose File" button, and
then initiate the analysis by clicking on "Interpret". The result of the analysis is displayed on
this same interface.
36
5. RESULTS AND DISCUSSIONS 37
Below are sample results from the brain stroke detection feature.
37
5. RESULTS AND DISCUSSIONS 38
The Add Data page in Ethio-MeditechScan v1.0 is designed for users to input patient data,
upload medical images, and enter the results into the database. This ensures that all relevant
patient information and diagnostic results are systematically stored for future reference and
analysis.
38
5. RESULTS AND DISCUSSIONS 39
The View Data page in Ethio-MeditechScan v1.0 is designed for users to access stored patient
data, view detailed information, and download the data in both image and CSV formats. This
functionality allows for easy retrieval and analysis of past diagnostic results and medical
images.
The Ethio-MeditechScan v1.0 Android application offers an optional interface specifically for
uploading images, viewing results, and reading about brain stroke, lung diseases, and lung
cancers. This interface does not require login credentials or database functionality like the
website. Users can easily navigate the app, upload images, and receive real-time results, all
optimized for mobile devices to ensure a user-friendly experience. Within this interface, users
can select the desired detection type whether it's for brain stroke, lung diseases, or lung cancers
and upload their medical images directly from their mobile devices. This streamlined process
enhances accessibility and convenience, empowering users to engage with the diagnostic
functionalities seamlessly on their mobile device. In addition to this, the app provides
39
5. RESULTS AND DISCUSSIONS 40
informative reading materials related to each detection type, enabling users to learn more about
their medical conditions.
The interface contains the detection types to choose from along with reading materials.
Figure 5.8: Home Interface with Detection Types and Reading Section
40
5. RESULTS AND DISCUSSIONS 41
The image below illustrates the process of selecting a file from the gallery and viewing the
results for the chosen detection type within the Ethio-MeditechScan v1.0 Android application
interface.
Figure 5.9: File Selection and Result Display for the Selected Detection Type
41
5. RESULTS AND DISCUSSIONS 42
42
5. RESULTS AND DISCUSSIONS 43
2 System goes to Add Data page directly Add Data page is viewed
3 Fill the detail Fill the data of patient and the result to be
added in space provided
43
5. RESULTS AND DISCUSSIONS 44
44
CHAPTER SIX 45
CHAPTER SIX
6. CONCLUSIONS AND RECOMMENDATIONS
6.1 CONCLUSIONS
The challenges faced in examination of medical images was successfully identified and
addressed. We collected and prepared a dataset for training the AI model. Using a CNN
algorithm, we trained the AI model and evaluated its performance, determining its accuracy
and reliability. We developed both a website and a mobile application, integrating the trained
AI model into each platform. This allows users to access medical image analysis capabilities
using either a website or a mobile application. Additionally, a database was created for the
website to store analyzed images along with patient information reducing the problems of
switching and losing the results of the patients. The data is easily accessible for future studies
and researches. Specially for projects that require dataset that include medical image with their
readings this project offers numerous advantages. Therefore, this project has many benefits not
only for doctors and radiologists but also for researchers.
45
6. CONCLUSIONS AND RECOMMENDATIONS 46
6.2 RECOMMENDATIONS
46
REFERENCES 47
REFERENCES
47
REFERENCES 48
48
APPENDICES 49
APPENDICES
import tensorflow as tf
# Define constants
IMAGE_SIZE = 256
CHANNELS = 3
n_classes = 10
model = models.Sequential([
layers.InputLayer(input_shape=input_shape),
layers.MaxPooling2D((2, 2)),
layers.MaxPooling2D((2, 2)),
layers.MaxPooling2D((2, 2)),
layers.MaxPooling2D((2, 2)),
layers.MaxPooling2D((2, 2)),
49
APPENDICES 50
layers.MaxPooling2D((2, 2)),
layers.Flatten(),
layers.Dense(64, activation='relu'),
layers.Dense(n_classes, activation='softmax'),
])
learning_rate = 0.001
model.compile(
optimizer=optimizers.Adam(learning_rate=learning_rate),
loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=False),
metrics=['accuracy']
history = model.fit(
train_generator,
batch_size=64,
validation_data=validation_generator,
verbose=1,
epochs=100,
predictions = model.predict(validation_generator)
50
APPENDICES 51
# Calculate metrics
print('Accuracy:', accuracy)
print('Precision:', precision)
print('Recall:', recall)
print('F1-Score:', f1)
51
APPENDICES 52
52
APPENDICES 53
53