Final Project V7 - Colored

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

Ethio-MeditechScan v1.

0: Facilitating Medical Diagnostics with AI Image


Analysis

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

Name of Members ID Signature


1. Milkiyas Tariku RU 1607/12 ……………………….
2. Mintesnot Mengesha RU 2192/12 ………………………..
3. Mesfin Damitew RU 0941/12 ………………………..
4. Tafa Gebisa RU 1366/12 ………………………..
5. Nardos Yitayih RU 0444/12 ………………………..

Date of Submission: May 31/ 2024


DECLARATION i

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.

Name of Members ID Signature


1. Milkiyas Tariku RU 1607/12 ……………………….
2. Mintesnot Mengesha RU 2192/12 ………………………..
3. Mesfin Damitew RU 0941/12 ………………………..
4. Tafa Gebisa RU 1366/12 ………………………..
5. Nardos Yitayih RU 0444/12 ………………………..

Adviser:

Engr. Kris C. Calpotura, MSME, MIT


FECE, Computer Stream

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

In Ethiopia, the accessibility of radiological services is severely hindered by a lack of trained


professionals and inadequate infrastructure, particularly in rural areas. The Ethio-
MeditechScan v1.0 project addresses these challenges by leveraging AI technology to improve
medical image interpretation. The study developed and integrated a convolutional neural
network (CNN) model into a web and mobile application to facilitate timely and accurate
medical diagnostics. Utilizing datasets from Kaggle, the AI model achieved a training accuracy
of 99% and a validation accuracy of 95%. Additionally, the project includes a database to store
medical images, analysis results, and patient information, enhancing both patient care and
research capabilities. The project significantly enhances healthcare accessibility by enabling
remote medical image analysis and creating a comprehensive database for future research.
Despite the limitations posed by reliance on external datasets, the project offers substantial
benefits to healthcare providers and researchers, improving patient outcomes across Ethiopia.
Future work should focus on incorporating locally sourced datasets to enhance the model's
applicability and accuracy within the Ethiopian healthcare context.

Keywords: AI, medical image analysis, healthcare accessibility, convolutional neural network,
radiology, database.

iii
TABLE OF CONTENTS iv

TABLE OF CONTENTS

DECLARATION ....................................................................................................................... i

ACKNOWLEDGEMENT .......................................................................................................ii

ABSTRACT ............................................................................................................................ iii

TABLE OF CONTENTS ........................................................................................................ iv

LIST OF FIGURES ............................................................................................................. viii

LIST OF TABLES................................................................................................................... ix

ACRONYMS ............................................................................................................................ x

CHAPTER ONE ...................................................................................................................... 1

1. INTRODUCTION................................................................................................................ 1

1.1 Background of the Study ................................................................................................. 1

1.2 Motivation ........................................................................................................................ 2

1.3 Statement of the Problem ................................................................................................. 2

1.4 Objectives of the Study .................................................................................................... 3

1.4.1 General Objectives .................................................................................................... 3

1.4.2 Specific Objectives.................................................................................................... 3

1.5 Scope and Limitations of the Study ................................................................................. 3

1.5.1 Scope ......................................................................................................................... 3

1.5.2 Limitations ................................................................................................................ 4

1.6 Significance of the Study ................................................................................................. 4

1.7 Outline of the Report ....................................................................................................... 5

CHAPTER TWO ..................................................................................................................... 6

2. REVIEW OF RELATED LITERATURE ......................................................................... 6

2.1 AI Image Analysis in Medical Diagnostics...................................................................... 6

2.2 Ethiopian Healthcare Landscape ..................................................................................... 8

iv
TABLE OF CONTENTS v

2.3 Ethical and Societal Implications of AI in Healthcare ..................................................... 8

2.4 Technological Innovation in Developing Countries ........................................................ 9

2.5 Implementation Challenges and Solutions ...................................................................... 9

CHAPTER THREE ............................................................................................................... 11

3. METHODOLOGY ............................................................................................................ 11

3.1 Software Process Model ................................................................................................ 11

3.2 Sources of Data .............................................................................................................. 12

3.3 Data Gathering Techniques ............................................................................................ 13

3.4 Data Analysis ................................................................................................................. 14

3.4.1 Flowchart ................................................................................................................ 14

3.4.2 ER Diagram ............................................................................................................ 15

3.4.3 Use case Diagram ................................................................................................... 15

3.4.4 Sequence Diagram .................................................................................................. 15

3.4.5 Class Diagram ......................................................................................................... 15

3.5 Performance Evaluation Metrics ................................................................................... 16

3.5.1 Accuracy ................................................................................................................. 16

3.5.2 Precision .................................................................................................................. 16

3.5.3 Recall (Sensitivity).................................................................................................. 16

3.5.4 F1 Score .................................................................................................................. 17

3.5.5 ROC AUC ............................................................................................................... 17

CHAPTER FOUR.................................................................................................................. 19

4. SYSTEM DESIGN ............................................................................................................. 19

4.1 System Architecture ....................................................................................................... 19

4.2 System Requirements .................................................................................................... 20

4.2.1 Functional Requirements ........................................................................................ 20

v
TABLE OF CONTENTS vi

4.2.2 Nonfunctional Requirements .................................................................................. 20

4.2.3 Software Requirements ........................................................................................... 21

4.3 AI Model Design ............................................................................................................ 23

4.3.1 Dataset preprocessing ............................................................................................. 23

4.3.2 Model Selection ...................................................................................................... 23

4.3.3 Training the Model .................................................................................................. 24

4.3.4 Model Evaluation .................................................................................................... 24

4.3.4.1 Accuracy .............................................................................................................. 24

4.3.4.2 Precision, Recall (Sensitivity), F1 Score ............................................................. 25

4.3.4.3 ROC AUC ............................................................................................................ 26

4.4 Software Design ............................................................................................................. 26

4.4.1 Business Rules ........................................................................................................ 26

4.4.2 ER Diagram ............................................................................................................ 27

4.4.3 Use case Diagram ................................................................................................... 28

4.4.4 Sequence Diagram .................................................................................................. 29

4.4.5 Class Diagram ......................................................................................................... 32

CHAPTER FIVE ................................................................................................................... 33

5. RESULTS AND DISCUSSIONS....................................................................................... 33

5.1 Hyperparameter Optimization ....................................................................................... 33

5.2 The Developed System .................................................................................................. 34

5.2.1 Database Dictionary ................................................................................................ 34

5.2.2 Screenshots of the System ...................................................................................... 35

5.3 Test case Scenarios ........................................................................................................ 42

5.3.1 Test case: Login....................................................................................................... 42

5.3.2 Test case: Create account ........................................................................................ 42

vi
TABLE OF CONTENTS vii

5.3.3 TEst case: Choose detection ................................................................................... 43

5.3.4 Test case: Add Data ................................................................................................. 43

5.3.5 Test case: view Data ................................................................................................ 44

5.3.6 Test case: About us .................................................................................................. 44

5.3.7 Test case: contact us ................................................................................................ 44

5.3.8 Test case: logout ...................................................................................................... 44

CHAPTER SIX ...................................................................................................................... 45

6. CONCLUSIONS AND RECOMMENDATIONS ........................................................... 45

6.1 Conclusions .................................................................................................................... 45

6.2 Recommendations .......................................................................................................... 46

REFERENCES....................................................................................................................... 47

APPENDICES ........................................................................................................................ 49

A.1 Source Code for Training the Model ............................................................................ 49

A.2 Letter for requesting dataset form Jimma Referral Hospital ........................................ 52

vii
LIST OF FIGURES viii

LIST OF FIGURES

Figure 3.1: The Rapid Application Development (RAD) ........................................................ 11

Figure 3.2: The flowchart for Ethio-MeditechScan v1.0 project. ............................................ 14

Figure 3.3: AUC (Area under the ROC Curve) ....................................................................... 18

Figure 4.1: System Architecture .............................................................................................. 19

Figure 4.2: Google COLLAB .................................................................................................. 22

Figure 4.3: Model Accuracy Over Epochs ............................................................................... 25

Figure 4.5: ROC Curve ............................................................................................................ 26

Figure 4.6: ER Diagram ........................................................................................................... 27

Figure 4.7: Use Case Diagram ................................................................................................. 28

Figure 4.8: Sequence Diagram for Login Use Case ................................................................ 29

Figure 4.9: Sequence Diagram for Create Account ................................................................. 29

Figure 4.10: Sequence Diagram for Analyzation Process ....................................................... 30

Figure 4.11: Sequence Diagram for Add Data ......................................................................... 30

Figure 4.12 Sequence Diagram for View and Download Data ................................................ 31

Figure 4.13: Class Diagram ..................................................................................................... 32

Figure 5.1: User Login Page for Ethio-MeditechScan v1.0..................................................... 35

Figure 5.2: Home Page UI ....................................................................................................... 36

Figure 5.3: Upload page for Detection System ........................................................................ 37

Figure 5.4: File Selection ......................................................................................................... 37

Figure 5.5: Image Displaying Detection Results on the Detection Page ................................. 38

Figure 5.6: Add Data Page for Ethio-MeditechScan v1.0 ....................................................... 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.1: Hyper-Parameter ..................................................................................................... 33

Table 5.2: Database Dictionary for the Patient Data Model .................................................... 34

Tabel 5.3: Database Dictionary for Django's User Model ....................................................... 34

Table 5.4: Login Test Case Scenario ........................................................................................ 42

Table 5.5: Create Account Test Case ....................................................................................... 42

Table 5.6: Choose Detection Test Case .................................................................................... 43

Table 5.7: Add Data Test Case ................................................................................................. 43

Table 5.8: View Data Test Case ............................................................................................... 44

Table 5.9: About Us Test Case ................................................................................................. 44

Table 5.10: Contact Us Test Case ............................................................................................ 44

Table 5.11: Logout Test Case ................................................................................................... 44

ix
ACRONYMS x

ACRONYMS

AI - Artificial Intelligence

AUC - Area Under the Curve

CNN - Convolutional Neural Network

COLAB - Google Collaboratory

CSV - Comma-Separated Values

CT - Computed Tomography

EMR - Electronic Medical Records

ER - Entity–Relationship

FN - False Negative

FP - False Positive

GPU - Graphics Processing Unit

ICH - Intracranial Hemorrhage

ORM - Object-Relational Mapping

PE - Pulmonary Embolism

PRC - Precision-Recall Curve

RAD - Rapid Application Development

RGB - Red Green Blue

ROC - Receiver Operating Characteristic

TP - True Positive

x
ACRONYMS xi

TN - True Negative

UI - User Interface

UML - Unified Modeling Language

VS Code - Visual Studio Code

xi
CHAPTER ONE 1

CHAPTER ONE
1. INTRODUCTION

1.1 BACKGROUND OF THE STUDY

In Ethiopia, healthcare accessibility faces significant challenges, particularly in radiological


services. The inadequacy of trained professionals, coupled with a lack of infrastructure and
limited access to diagnostic imaging, presents a pressing issue. In particular rural areas suffer
from delayed diagnoses, leading to preventable deaths due to the unavailability of timely
medical image readings.

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].

Historical data underscores a consistent pattern of underinvestment in healthcare


infrastructure, this makes worse the challenges faced by healthcare professionals in providing
timely and accurate diagnoses. This chronic underinvestment not only affects the availability
of essential medical equipment but also the shortage of trained professionals, particularly
radiologists, further hindering the interpretation of medical images. Furthermore, debates
surrounding resource allocation and the prioritization of healthcare initiatives within national
agendas add complexity to the existing challenges, requiring urgent attention and innovative
solutions [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

The Ethio-MeditechScan v1.0 project is motivated by the urgent need to revolutionize


healthcare accessibility and outcomes in Ethiopia. The current challenges in medical image
reading, exacerbated by the scarcity of radiologists, especially in rural areas, demand
immediate attention. Patients in underserved regions often experience very long waiting times
for accurate diagnoses, as medical images are transmitted via informal channels to centralized
facilities, risking delays and potential loss of lives. Furthermore, the absence of comprehensive
data repositories containing both medical images and their corresponding reading results
hampers both patient care and medical research endeavors.

1.3 STATEMENT OF THE PROBLEM

The healthcare center in Ethiopia is challenged by a scarcity of radiologists, particularly in rural


areas, this leads to significant delays and potential risks in medical image interpretation. In
response to this shortage, medical images are often transmitted via informal channels, such as
social media platforms like Telegram, from rural areas to centralized facilities for reading.
However, this process is time-consuming and can take many days, make long the wait for
accurate diagnoses and jeopardizing patient outcomes. Furthermore, the lack of comprehensive
data repositories containing both medical images and their corresponding reading results poses
additional challenges. Such data is essential for both research purposes and patient care,
particularly in cases where medical images are lost and reading results are needed. Addressing
these multifaceted challenges is imperative to enhance healthcare accessibility and outcomes
across Ethiopia.

2
1. INTRODUCTION 3

1.4 OBJECTIVES OF THE STUDY

1.4.1 GENERAL OBJECTIVES

The general objective of the Ethio-MeditechScan v1.0 project is to enhance healthcare


accessibility and outcomes in Ethiopia by utilizing AI image analysis to improve the efficiency
and accuracy of medical image interpretation, particularly in areas with limited access to
radiologists.

1.4.2 SPECIFIC OBJECTIVES

➢ To gather the required dataset and pre-process the dataset.


➢ To train the AI model using the pre-processed dataset with a CNN algorithm and adjust
its parameters for optimal performance.
➢ To evaluate the performance of the model on a dataset of medical images to determine
its accuracy and reliability.
➢ To develop a website and mobile application.
➢ To integrate the CNN algorithm model into the website and mobile app to perform
medical image analysis.
➢ To build a database to save the analyzed images along with their corresponding results
and patient information.

1.5 SCOPE AND LIMITATIONS OF THE STUDY

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.

1.6 SIGNIFICANCE OF THE STUDY

The Ethio-MeditechScan v1.0 project promises to revolutionize healthcare delivery in Ethiopia


by addressing critical gaps in medical image interpretation and data accessibility. For
healthcare providers, the integration of AI-driven diagnostics will streamline the workflow,
significantly reducing the time required for image analysis and enabling faster, more accurate
patient diagnoses. This efficiency is particularly crucial in rural areas where the scarcity of
radiologists has traditionally led to long waiting times and delayed treatments, ultimately
improving patient outcomes and saving lives.

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.

1.7 OUTLINE OF THE REPORT

This report is structured to provide a comprehensive understanding of the Ethio-MeditechScan


v1.0 project. Chapter One serves as an introduction, detailing the background, problem
statement, objectives, methodology, and scope of the project. Chapter Two delves into the
review of related literature, covering topics such as AI image analysis in medical diagnostics
and the Ethiopian healthcare landscape. Chapter Three outlines the methodology, including the
software process model, data sources, gathering techniques, and analysis methods. In Chapter
Four, the system design is discussed, encompassing system architecture, requirements, AI
model design, and software design. Chapter Five presents the results and discussions, including
hyperparameter optimization, the developed system, and test case scenarios. Finally, Chapter
Six offers’ conclusions drawn from the project outcomes and provides recommendations for
future enhancements. This structured approach ensures a thorough exploration of the project's
components and findings, guiding the reader through each stage of the Ethio-MeditechScan
v1.0 development process.

5
CHAPTER TWO 6

CHAPTER TWO
2. REVIEW OF RELATED LITERATURE

2.1 AI IMAGE ANALYSIS IN MEDICAL DIAGNOSTICS

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

2.2 ETHIOPIAN HEALTHCARE LANDSCAPE

The current state of healthcare infrastructure and diagnostic capabilities in Ethiopia is


characterized by significant challenges. While Ethiopia has made strides in improving access
to healthcare, the country still faces a shortage of qualified healthcare providers and facilities,
particularly in rural areas. This inequality in medical services between urban and rural areas is
a serious problem. Additionally, the lack of data storage infrastructure available to many
African health facilities represents a barrier to the adoption of AI technologies in the healthcare
sector [7].

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].

Additionally, the country's growing telecommunications infrastructure, with 95% population


coverage and 50% density, provides a foundation for the deployment of digital health
technologies [8]. Leveraging these opportunities could help address the challenges in Ethiopia's
healthcare system and improve access to quality care for all Ethiopians.

2.3 ETHICAL AND SOCIETAL IMPLICATIONS OF AI IN HEALTHCARE

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].

2.4 TECHNOLOGICAL INNOVATION IN DEVELOPING COUNTRIES

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].

2.5 IMPLEMENTATION CHALLENGES AND SOLUTIONS

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].

Some of the challenges being faced to date are:

❖ 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].

To address challenges in adopting AI solutions in African healthcare, strategic investments in


infrastructure and human resources are essential. Collaborative efforts to share data, promote
participation in clinical trials, and build trust in AI technologies through transparent
communication are crucial. Prioritizing medical security and privacy with robust data
protection measures is key. By tackling these challenges, African countries can leverage AI to
improve healthcare outcomes and access across the continent.

10
CHAPTER THREE 11

CHAPTER THREE
3. METHODOLOGY

3.1 SOFTWARE PROCESS MODEL

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

User design Construction

Cutover

Figure 3.1: The Rapid Application Development (RAD)

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.

3.2 SOURCES OF DATA

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.

3.3 DATA GATHERING TECHNIQUES

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 DATA ANALYSIS

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].

Figure 3.2: The flowchart for Ethio-MeditechScan v1.0 project.

14
3. METHODOLOGY 15

3.4.2 ER DIAGRAM

An entity–relationship model (or ER model) describes interrelated things of interest in a


specific domain of knowledge. A basic ER model is composed of entity types (which classify
the things of interest) and specifies relationships that can exist between entities (instances of
those entity types. In software engineering, an ER model is commonly formed to represent
things a business needs to remember in order to perform business processes. Consequently, the
ER model becomes an abstract data model, that defines a data or information structure that can
be implemented in a database, typically a relational database [12].

3.4.3 USE CASE 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].

3.4.4 SEQUENCE DIAGRAM

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].

3.4.5 CLASS DIAGRAM

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 PERFORMANCE EVALUATION METRICS

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:

𝑇𝑃
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =
(𝑇𝑃 + 𝐹𝑃)

3.5.3 RECALL (SENSITIVITY)

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].

Recall of a neural network can be calculated using the formula below:

𝑇𝑃
𝑅𝑒𝑐𝑎𝑙𝑙 =
(𝑇𝑃 + 𝐹𝑁)

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].

The F1 score formula is

2 (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙)
𝐹1 = = 2×
1 1 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 + 𝑅𝑒𝑐𝑎𝑙𝑙
+ 𝑃𝑟𝑒𝑐𝑒𝑠𝑖𝑜𝑛 (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙) ×
𝑅𝑒𝑐𝑎𝑙𝑙 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙

𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑅𝑒𝑐𝑎𝑙𝑙
=2×
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 + 𝑅𝑒𝑐𝑎𝑙𝑙

3.5.5 ROC AUC

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:

𝑇𝑃
𝑇𝑃𝑅 =
(𝑇𝑃 + 𝐹𝑁)

False Positive Rate (FPR) is 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).

Figure 3.3: AUC (Area under the ROC Curve) [15]

18
CHAPTER FOUR 19

CHAPTER FOUR
4. SYSTEM DESIGN

4.1 SYSTEM ARCHITECTURE

Figure 4.1: System Architecture

➢ 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

4.2 SYSTEM REQUIREMENTS

4.2.1 FUNCTIONAL REQUIREMENTS

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.

4.2.2 NONFUNCTIONAL REQUIREMENTS

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.

4.2.3 SOFTWARE REQUIREMENTS

Software requirement for Ethio-MeditechScan v1.0. define necessary software components


and frameworks to build and deploy the system.

4.2.3.1 DJANGO WEB APP FRAMEWORK

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.1 GOOGLE COLLAB

Google Collaboratory, commonly known as Google COLAB, is a cloud-based Jupyter


notebook environment that provides a platform for writing and executing Python code through
browser. It's especially popular in the data science and machine learning communities. Google
Collab is essentially a Jupyter notebook that runs in the cloud, allows to write and execute code,
and the results are displayed within the notebook. Google COLAB offers free access to a T4
graphics processing unit (GPU), which is particularly useful for training deep learning models
due to their parallel processing capabilities [17]. In this project it was used to train our machine
learning model which is used to build our system.

Figure 4.2: Google COLLAB

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

4.3 AI MODEL DESIGN

4.3.1 DATASET PREPROCESSING

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.

4.3.2 MODEL SELECTION

4.3.2.1 CONVOLUTIONAL NEURAL NETWORK (CNN)

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.

4.3.3 TRAINING THE MODEL

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 MODEL EVALUATION

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

Figure 4.3: Model Accuracy Over Epochs

4.3.4.2 PRECISION, RECALL (SENSITIVITY), F1 SCORE

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.

Figure 4.4: Performance Metrics Over Epochs (Precision, Recall, F1-Score)

25
4. SYSTEM DESIGN 26

4.3.4.3 ROC AUC

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.

Figure 4.5: ROC Curve

4.4 SOFTWARE DESIGN

4.4.1 BUSINESS RULES

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.

Figure 4.6: ER Diagram

27
4. SYSTEM DESIGN 28

4.4.3 USE CASE DIAGRAM

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.

Figure 4.7: Use Case Diagram

28
4. SYSTEM DESIGN 29

4.4.4 SEQUENCE DIAGRAM

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

Figure 4.8: Sequence Diagram for Login Use Case

4.4.4.2 CREATE ACCOUNT

Figure 4.9: Sequence Diagram for Create Account

29
4. SYSTEM DESIGN 30

4.4.4.3 ANALYZATION PROCESS

Figure 4.10: Sequence Diagram for Analyzation Process

4.4.4.4 ADD DATA

Figure 4.11: Sequence Diagram for Add Data

30
4. SYSTEM DESIGN 31

4.4.4.5 VIEW AND DOWNLOAD DATA

Figure 4.12 Sequence Diagram for View and Download Data

31
4. SYSTEM DESIGN 32

4.4.5 CLASS DIAGRAM

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.

Figure 4.13: Class Diagram

32
CHAPTER FIVE 33

CHAPTER FIVE
5. RESULTS AND DISCUSSIONS

5.1 HYPERPARAMETER OPTIMIZATION

In this section, we provide a detailed overview of the various hyperparameters utilized in


constructing and training our Convolutional Neural Network (CNN) model. Hyperparameter
optimization is paramount for enhancing the effectiveness and efficiency of machine learning
models. Each hyperparameter impacts distinct aspects of the model’s training procedure and
eventual accuracy. Here, we present a comprehensive table enumerating these hyperparameters
alongside their respective values and specifications. Hyperparameters encompass
configurations for model architecture (e.g., layer quantity and size), training settings (such as
class quantity and batch size), and other parameters that influence how the model processes
data, ultimately enhancing data exploration efficiency.

Table 5.1: Hyper-Parameter

Hyperparameter Value Description


IMAGE_SIZE 256 Input image dimensions (height and
width).
CHANNELS 3 Number of color channels (RGB).
n_classes 10 Number of output classes.
learning_rate 0.001 Learning rate for the optimizer.
batch_size 64 Samples per gradient update.
epochs 100 Number of training epochs.
Conv2D filters 32, 64, 64, 64, 64, 64 Filters in each convolutional layer.
Dense layer units 64 Units in the dense layer.
Activation ReLU/Softmax ReLU for hidden layers, Softmax for
functions output layer.
Pooling size (2, 2) Size of the max pooling windows.
Loss function SparseCategoricalCrossentropy Loss function used.
Metrics Accuracy Metrics to evaluate the model.

33
5. RESULTS AND DISCUSSIONS 34

5.2 THE DEVELOPED SYSTEM

This section provides a detailed description of the configuration developed, focusing on the
database installation and use of data models in the Django application.

5.2.1 DATABASE DICTIONARY

Table 5.2: Database Dictionary for the Patient Data Model

Field Name Type Description Constraints Default


Patient_Name CharField
Name of the patient Max Length: 100
Patient_Id CharField
Unique identifier for Primary key
the patient
date DateField Date when the record Current date
was created or the (date.today)
patient was registered
Medical_image ImageField Field to store the Upload Path:
medical image 'medical_images/'
Disease_Type CharField Type of the medical Max Length: 100 'No Type'
image
Image_Result CharField Result of the analysis Max Length: 100 'No result'
or any preliminary
result

Tabel 5.3: Database Dictionary for Django's User Model

Field Type Description Constraints Default


Name
id AutoField Automatically generated Primary Key
unique identifier
username CharField Username Max Length: 150
password CharField Password (hashed)
first_name CharField First name Max Length: 30
last_name CharField Last name Max Length: 150
email EmailField Email address Max Length: 254
is_staff BooleanField Designates whether the False
user can access the admin
site
is_active BooleanField Designates whether this True
user should be treated as
active
date_joined DateTimeField Date and time when the Current
user account was created date and
time

34
5. RESULTS AND DISCUSSIONS 35

5.2.2 SCREENSHOTS OF THE SYSTEM

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.

5.2.2.1 WEB APP INTERFACE

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.

Figure 5.1: User Login Page for Ethio-MeditechScan v1.0

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.

Figure 5.2: Home Page UI

➢ 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.

Figure 5.3: Upload page for Detection System

Figure 5.4: File Selection

37
5. RESULTS AND DISCUSSIONS 38

Figure 5.5: Image Displaying Detection Results on the Detection Page

➢ Add Data Page

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.

Figure 5.6: Add Data Page for Ethio-MeditechScan v1.0

38
5. RESULTS AND DISCUSSIONS 39

➢ View Data page

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.

Figure 5.7: shows the View Data page in Ethio-MeditechScan v1.0

5.2.2.2 ANDROID APP INTERFACE

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

5.3 TEST CASE SCENARIOS

5.3.1 TEST CASE: LOGIN

Table 5.4: Login Test Case Scenario

Test case Steps Description


A Login

1 Enter username User enters their username


2 Enter password User enters password
3 Validates username and password Check for validity of username and password
B Invalid username and password

1 Repeat 1 and 2 of Login


2 Enter username
3 Enter password

5.3.2 TEST CASE: CREATE ACCOUNT

Table 5.5: Create Account Test Case

Test case Steps Description


A: Admin Complete login successfully
Click on Add user button System to go to account creation page
System goes account creation page
directly
Fill Details Fill the details to be added in space provided
Click on submit button To add user into database
The system create account
Successfully

42
5. RESULTS AND DISCUSSIONS 43

5.3.3 TEST CASE: CHOOSE DETECTION

Table 5.6: Choose Detection Test Case

Test case Steps Description

A: Doctor Complete login successfully

1 Click on selected detection System to go to selected detection page

2 System goes to selected detection page


directly
3 Click on Choose File To select image from File manager

4 Click on Interpret The system to analyze the image

5 The system then detects brain stroke/lung


cancer/lung disease

5.3.4 TEST CASE: ADD DATA

Table 5.7: Add Data Test Case

Test case Steps Description

A Complete login successfully

1 Click on Add Data button System to go to Add data page

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

4 Click on Choose File To associate medical image with result

5 Click on Choose File button To add the data

6 System add data successfully

43
5. RESULTS AND DISCUSSIONS 44

5.3.5 TEST CASE: VIEW DATA

Table 5.8: View Data Test Case

Test case Steps Description

A Complete login successfully

1 Click on View Data System to go to View data page

2 System goes to view data page directly

5.3.6 TEST CASE: ABOUT US

Table 5.9: About Us Test Case

Test case Steps Description


A Complete login successfully
1 Click on about us navigation bar System to go to about us page
2 System goes to About us page directly

5.3.7 TEST CASE: CONTACT US

Table 5.10: Contact Us Test Case

Test case Steps Description


A Complete login successfully
1 Click on Contact us navigation bar System to go to Contact us page
2 System goes to contact us page directly

5.3.8 TEST CASE: LOGOUT

Table 5.11: Logout Test Case

Test case Steps Description

A Complete login successfully

1 Click on Logout button System to go out of the system

2 System goes out directly

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

We recommend hospitals, health centers, doctors and radiologists to use Ethio-MeditechScan


v1.0 project by connecting it to their system. In addition, we highly recommend to connect the
database of Ethio-MeditechScan v1.0 project to the database of the medical center and store
the results of the patients alongside with the images and the patient id, it will be useful for
future studies and researches. The Ethio-MeditechScan v1.0 project was developed based on a
dataset found on Kaggle. This also reduces the credibility of the project. Therefore, in the
future, it would be great if the AI models were trained and reworked with a dataset collected
and labeled by hospitals in Ethiopia together with radiologists and experts in the field.

46
REFERENCES 47

REFERENCES

[1] A. A. and M. T. , "Status of radiological services in Addis Ababa public hospitals,"


Ethiopian Medical Journal, pp. 257-63, July 2011.
[2] L. Zhang, L. Yan, Y. Zhao, Y. Zhang and Y. Duan, " Deep Learning-based Detection and
Classification of Pulmonary Nodules Using Chest CT Images.," Frontiers in Oncology.,
vol. 8, no. 10, pp. 1-9, 2018.
[3] Y. Wang, T. Liu, D. Sun, G. Papadakis and G. E. Karniadakis, "Discussion on the ChestX-
ray14 Dataset: Problems and Potential Solutions.," arXiv preprint, 2020.
[4] . H. Kim, . C. M. Park, J. Lee, S. M. Lee and McAdam, "AI-driven Automated Detection
of Pulmonary Embolism on CT Pulmonary Angiography.," European Radiology., vol. 28,
no. 6, pp. 2510-2519., 2018.
[5] B. N. Patel and l. Rosenberg, " Introduction of RapidAI: Automated Identification and
Quantification of Intracranial Hemorrhage on Head CT Scans.," Stroke, vol. 49, no. 3,
pp. 675-681, 2018.
[6] . W. Wu, . Y. Zhao,, J. Sun and Y. Wang, "Review of Deep Learning in Medical Image
Analysis.," Engineering, vol. 5, no. 1, pp. 40-50, 2019.
[7] [Online]. Available: https://hepius.co/ai-in-ethiopian-healthcare-possibilities-and-
challenges/. [Accessed 7 May 2024].
[8] [Online]. Available: https://www.nature.com/articles/s41746-021-00487-4. [Accessed
2024 5 7].
[9] 1 2024. [Online]. Available: https://hepius.co/ai-in-ethiopian-healthcare-possibilities-
and-challenges/#google_vignette. [Accessed 7 5 2024].
[10] [Online]. Available: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8826344/.
[Accessed 26 May 2024].
[11] [Online]. Available: https://borgenproject.org/global-health-innovations-and-health-
technologies-for-developing-countries/. [Accessed 26 5 2024].
[12] M. M. Engr. Kris Cariño Calpotura, A Learning Module in Software Engineering,
JIMMA, ETHIOPIA.

47
REFERENCES 48

[13] "Wikipedia," [Online]. Available: https://en.wikipedia.org/wiki/Flowchart. [Accessed 24


May 2024].
[14] "Encord," [Online]. Available: https://encord.com/blog/f1-score-in-machine-learning/.
[Accessed 24 May 2024].
[15] W. Powers, "Evaluation: From Precision, Recall and F-Measure to ROC, Informedness,
Markedness & Correlation," Journal of Machine Learning Technologies, vol. 2, pp. 37-
63, 2011..
[16] [Online]. Available: https://en.wikipedia.org/wiki/Django_(web_framework). [Accessed
24 May 2024].
[17] "Google_Colab," [Online]. Available: https://www.dataquest.io/blog/getting-started-
with-google-colab-for-deep-learning/. [Accessed 24 may 2024].
[18] "Wikipedia," [Online]. Available: https://en.wikipedia.org/wiki/Visual_Studio_Code.
[Accessed 24 May 2024].
[19] G. Anirudha , S. Farhana , C. Amlan and D. Debashis , "Fundamental Concepts of
ConvolutionalNeural Network".

48
APPENDICES 49

APPENDICES

A.1 SOURCE CODE FOR TRAINING THE MODEL

import tensorflow as tf

from tensorflow.keras import layers, models, optimizers

from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score,


roc_auc_score, confusion_matrix, ConfusionMatrixDisplay

import matplotlib.pyplot as plt

# Define constants

IMAGE_SIZE = 256

CHANNELS = 3

input_shape = (IMAGE_SIZE, IMAGE_SIZE, CHANNELS)

n_classes = 10

# Define the model

model = models.Sequential([

layers.InputLayer(input_shape=input_shape),

layers.Conv2D(32, kernel_size=(3, 3), activation='relu'),

layers.MaxPooling2D((2, 2)),

layers.Conv2D(64, kernel_size=(3, 3), activation='relu'),

layers.MaxPooling2D((2, 2)),

layers.Conv2D(64, kernel_size=(3, 3), activation='relu'),

layers.MaxPooling2D((2, 2)),

layers.Conv2D(64, (3, 3), activation='relu'),

layers.MaxPooling2D((2, 2)),

layers.Conv2D(64, (3, 3), activation='relu'),

layers.MaxPooling2D((2, 2)),

49
APPENDICES 50

layers.Conv2D(64, (3, 3), activation='relu'),

layers.MaxPooling2D((2, 2)),

layers.Flatten(),

layers.Dense(64, activation='relu'),

layers.Dense(n_classes, activation='softmax'),

])

# Define the optimizer and learning rate

learning_rate = 0.001

model.compile(

optimizer=optimizers.Adam(learning_rate=learning_rate),

loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=False),

metrics=['accuracy']

# Train the model

history = model.fit(

train_generator,

batch_size=64,

validation_data=validation_generator,

verbose=1,

epochs=100,

# Evaluate the model on the validation set

validation_loss, validation_accuracy = model.evaluate(validation_generator, verbose=0)

# Predict the labels for the validation set

predictions = model.predict(validation_generator)

50
APPENDICES 51

predicted_labels = tf.math.argmax(predictions, axis=1)

# Calculate metrics

accuracy = accuracy_score(validation_generator.labels, predicted_labels)

precision = precision_score(validation_generator.labels, predicted_labels, average='macro')

recall = recall_score(validation_generator.labels, predicted_labels, average='macro')

f1 = f1_score(validation_generator.labels, predicted_labels, average='macro')

roc_auc = roc_auc_score(validation_generator.labels, predictions, multi_class='ovr')

# Print the results

print('Validation Loss:', validation_loss)

print('Validation Accuracy:', validation_accuracy)

print('Accuracy:', accuracy)

print('Precision:', precision)

print('Recall:', recall)

print('F1-Score:', f1)

print('ROC AUC:', roc_auc)

51
APPENDICES 52

A.2 LETTER FOR REQUESTING DATASET FORM JIMMA REFERRAL


HOSPITAL

52
APPENDICES 53

53

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy