3.
METHODOLOGY 52
MobileViT's Role in Reducing False Positives: MobileViT, which combines the strengths of
CNNs and Vision Transformers, is utilized post YOLOv9 classification to verify and refine the
detection outputs. This model is particularly effective in:
1. Malaria Confirmation Phase: MobileViT re-evaluates the regions initially identified
by YOLOv9 to confirm the presence of malaria. This step is crucial for reducing false
positives by providing a secondary, in-depth analysis to ensure that only true positives
are considered in the final diagnosis.
2. Malaria Type Confirmation Phase: After confirming the presence of malaria,
MobileViT further scrutinizes the classification provided by YOLOv9 to validate the
type of malaria detected (e.g., P. falciparum, P. vivax, or Mixed). This additional
verification helps in significantly lowering the rate of misclassification.
Training and Application of MobileViT: The MobileViT model is specifically trained on
cropped regions that are extracted based on the preliminary detections by YOLOv9. For
training, images are cropped around these detected areas with a buffer radius of 48 pixels,
producing images of 96x96 pixels. This focused training enables MobileViT to effectively
perform its role in reducing false positives by concentrating on the most relevant features of
the detected regions.
Workflow Integration:
1. Detection and Initial Classification Phase: YOLOv9 processes the input blood smear
images to detect potential regions containing malaria parasites and classifies them into
potential types of malaria.
2. Verification and Refinement Phase: The regions classified by YOLOv9 are then
passed to MobileViT, which performs a secondary analysis to confirm both the
presence of malaria and the accuracy of the initial classification.
3. Final Decision Phase: Based on the analysis by MobileViT, the final diagnostic output
is refined to include only confirmed cases of malaria, effectively minimizing false
positives from the preliminary results provided by YOLOv9.
RESEARCH THESIS 52
3. METHODOLOGY 53
Advantages of Integration:
• Enhanced Diagnostic Reliability: By using MobileViT to verify and refine YOLOv9's
outputs, the overall diagnostic process becomes more reliable, ensuring that only
confirmed malaria cases are reported.
• Efficient and Accurate Processing: The dual-stage verification process leverages both
YOLOv9's rapid detection capabilities and MobileViT's precision in reducing false
positives, thereby optimizing the speed and accuracy of malaria diagnostics.
This integration of YOLOv9 and MobileViT effectively enhances the malaria detection and
classification process, ensuring high accuracy and reliability of the diagnostic results, which is
critical for the effective treatment and management of malaria.
Developing this two-stage malaria detection algorithm is a big step in using deep learning
models in the health sector. As the approach addresses organizational and implementation
issues of the detection and classification problems in malaria diagnosis, it could improve
diagnostic accuracy and reduce the time and costs of constant malaria screening in the affected
regions. This would go a long way to helping healthcare workers and greatly support worldwide
efforts to eradicate the disease with policies that control and finally eliminate malaria.
3.13 SOFTWARE METHODOLOGY
There are different software development methodologies, and there are pros and cons.[91] The
waterfall method is a typical model that includes iterative waterfall, prototyping, evolution, and
spiral.[91] Choosing the Right Model Choosing the correct model for research is based on
several factors.
• Resource availability
• System complexity
• Research deadlines[91]
Rapid Application Development (RAD) – This model for time-bound research is
better.[92][93] It starts with a feasibility study, specifications planning, system design, and
definition!! With iterative development, subsequent phases may be carried out in parallel with
at least some overlap, reducing the overall time to market.[93] It can be considered that RAD
RESEARCH THESIS 53
3. METHODOLOGY 54
provides quick development and is a sound system for tight-scheduled research.[92][93] It is
also suitable for using advanced development tools. RAD's success is almost entirely classed
upon the expertise and talent of staff members.[93]
Advantages:
• Perfect for quick turn-around research
• Provides effective results with less resources
• Leverages advanced development tools for faster efficiency and higher accuracy,
which are lower than conventional means.
Disadvantages:
• Bad for extensive research.
• Not suitable for more affluent research.
Figure 3.25 Rapid Application Development Model Life Cycle
Phases of RAD Application Development:
1. Feasibility Study—This phase is important as it decides whether the proposed system
can be developed within existing budgetary confines. This includes evaluating existing
technologies (e.g., imaging and deep learning algorithms) to determine whether they
can be reused or should be developed from scratch—for example, to meet the specific
needs of detection and classification in the malaria detector prototype.
2. Requirement Analysis and Specifications - A detailed requirement analysis is also
done to ensure the end-users for which it will be developed, healthcare professionals,
and diagnostic laboratories. Before anything else, the requirements must be identified
RESEARCH THESIS 54
3. METHODOLOGY 55
and organized into a Software Requirement Specification (SRS) document to provide a
roadmap for achieving what the system is supposed to do as clearly defined, which
alleviates ambiguity, forcing the process of focusing on essential qualities like
accuracy, and most importantly usability.
3. Implementation and Unit Testing - Implementing and performing unit testing of the
code makes it possible to detect and repair bugs early in development, which in turn is
essential for raising quality standards as well as the reliability level of a detection
system. In the researcher's case, it would involve incremental testing of image
processing modules, feature extraction algorithms, and classifiers to verify each
component works as expected before integrating into the entire system. This step is one
of the most critical steps in creating a solid prototype that works effectively for malaria
detection and classification through such blood smear images.
The rationale for Choosing RAD:
• RAD is considered the fastest way to get valuable results because it delivers high-
quality results, which is beneficial in time constraints.
• It is suitable when small research teams can have fast and efficient development
cycles.
3.14 SOFTWARE REQUIREMENTS SPECIFICATION
Introduction: This software requirement specification comprehensively outlines the
development of a malaria detection system. This system is designed to assist in automated
malaria diagnosis from microscopic images of blood smears obtained from Jimma University
Malaria Center. The aim is to leverage deep learning models to enhance detection accuracy and
facilitate rapid diagnosis.
3.14.1 FUNCTIONAL REQUIREMENTS OF THE SYSTEM
The functional requirements outline the system's capabilities, focusing on processing user-
uploaded images for malaria diagnosis through various automated steps.
1. Image Upload and Management:
RESEARCH THESIS 55
3. METHODOLOGY 56
o Users can upload blood smear images via the system interface. The system
supports multiple image formats typical in medical imaging.
o Batch uploading capabilities allow users to efficiently process multiple images
simultaneously.
2. Image Preprocessing:
o Automatic enhancement of image quality to improve visibility and detail,
including adjustments for contrast and brightness where necessary.
o Remove background noise and artifacts, specifically targeting and eliminating
back pixels around the borders of the images.
o Implement an image tiling mechanism that separates images into smaller
segments of 640x640 pixels with 30% overlap to prepare them for subsequent
detection analysis.
3. Malaria Detection:
o Utilization of trained deep learning models (e.g., YOLOv9, RTDETR) to
analyze preprocessed images for initial malaria detection.
o For detected regions suggestive of malaria, the system will automatically
calculate a center point and crop a 96x96 pixel area centered around it for further
analysis.
4. Region Cropping and Secondary Analysis:
o The system automatically crops the regions around detected potential parasites
based on a calculated center to focus on specific details.
o Conduct a secondary analysis to confirm the presence of malaria in the cropped
regions using a separate classification model. This model determines the
presence or absence of malaria, ensuring high accuracy before proceeding to
type classification in thin blood smear samples.
5. Data Storage:
o Secure storage of all uploaded images, processed data, and results within the
system for compliance and future reference. This includes storing original
images, preprocessing step outputs, and detecting and classifying results.
6. Result Presentation and Interaction:
o Display of processed images with annotations and bounding boxes on detected
regions.
o Provision of detailed reports summarizing the detection and classification
results, including the presence of malaria and its type is determined.
RESEARCH THESIS 56
3. METHODOLOGY 57
7. Malaria Type identification (Conditional on Detection and classification):
o If malaria is confirmed in the initial detection phase, the system processes a thin
blood smear image starting from image upload, preprocessing, and following
the entire detection and classification workflow to classify the type of malaria.
System Outputs:
• Detection Outputs: Visual outputs, including images marked with bounding boxes and
specific crop regions.
• Classification Results: Textual outputs indicating the presence or absence of
malaria and, if applicable, the type of malaria detected.
• Reports: Comprehensive diagnostic reports detailing the findings from both the
detection and classification phases.
3.14.2 NON-FUNCTIONAL REQUIREMENTS:
1. Performance:
o The system must process images and provide detection results within time
constraints suitable for clinical workflows.
o It should ensure high accuracy and reliability in malaria detection to minimize
false positives and negatives.
2. Usability:
o The interface should be intuitive and easy for medical professionals without
requiring technical expertise in machine learning or image processing.
3. Scalability:
o The software should be capable of handling an increasing amount of data and
users without degradation in performance.
4. Security:
o All data, susceptible medical information, must be handled and stored securely
in compliance with medical data regulations and privacy laws.
5. Maintainability:
o The system should facilitate easy updates and maintenance, allowing for
integrating newer algorithms and technologies as they become available.
RESEARCH THESIS 57
3. METHODOLOGY 58
3.14.3 SOFTWARE REQUIREMENTS
To develop our system, the software requirement is:
➢ Python with some library of
o Tensorflow
o Keras
o Opencv
o Pyqt5
o Numpy
o Matplotlib and others
This paper uses Python programming language Because of
o an excellent library ecosystem (i.e., Keras, TensorFlow, sklearn, pandas, and others)
o Flexibility
o Platform independence (It can run on Windows, Linux, macOS)
o Readability (i.e., it can be straightforward to read)
o Good visualization option (i.e., matplotlib, seaborn)
o Community support (stackoverflow, help center of Edureka, GitHub, and other help
communities)
3.14.4 HARDWARE REQUIREMENTS
To run our system for optimal performance, the researcher considers the following
specifications:
o Memory: 32 GB
o Processor: intel core i5-2.4GHz
o Hard Disk: greater than 500GB
o Monitor: Dell full HD/SD (its version is dependent on the user)
RESEARCH THESIS 58
3. METHODOLOGY 59
3.15 USE CASE DIAGRAM
Figure 3.26 Usecase Diagram
RESEARCH THESIS 59
3. METHODOLOGY 60
3.15.1 USE CASE SCENARIO
Table 4.1Use case scenario
Use Use Case Actor Description preconditions postconditions
Case Name
ID
UC1 Submit Blood Sick Person The Sick The system is Sample
Sample Person submits operational received and
a blood sample and logged by the
at a collection accessible; the system.
center. Sick Person
is registered
and
authorized.
First Stage Detection and classification
UC2 Capture and Laboratory Prepares blood Blood sample Images are
Upload Technician smear, captures submitted. stored and
Blood Smear digital images, queued for
and uploads analysis.
them to the
system.
UC3 Data System Automatically Thick smear Images
Preprocessing preprocess and images processed and
for Thick tile the uploaded. ready for
Smear uploaded detection.
images to
prepare them
for analysis.
UC4 Tiling and System The system tiles Preprocessed Detection
Detection by the thick smear results
YOLOv9 preprocessed images recorded: If
thick smear are available. malaria is
images and uses detected,
RESEARCH THESIS 60
3. METHODOLOGY 61
YOLOv9 to it triggers thin
detect malaria smear capture.
parasites.
UC5 Refine System Automatically Refined Refined
Detection refines detection detection
with detections using results results updated.
MobileVIT MobileVIT to updated.
reduce false
positives.
Second Stage Detection and Classification
UC6 Capture and Laboratory Captures and Malaria Thin smear
Upload Thin Technician uploads digital detected in images
Blood Smear images of the thick smear. are stored and
thin blood queued for
smear for preprocessing.
malaria-type
classification.
UC7 Data System Automatically Thin smear Images
Preprocessing preprocesses images processed and
for Thin the thin smear uploaded. ready for
Smear images for malaria-type
detailed detection.
analysis.
UC8 Tiling and System The system tiles Preprocessed Classification
Detection by preprocessed thin smear results are
YOLOv9 for thin smear images are recorded,
Thin images and uses available. which triggers
YOLOv9 to final
classify malaria refinement.
type.
RESEARCH THESIS 61
3. METHODOLOGY 62
UC9 Final System Further, Classification Final refined
Refinement classification completed by results
with results can be YOLOv9. recorded.
MobileVIT refined using
MobileVIT to
ensure
accuracy.
UC10 Store Results Laboratory Stores all Diagnostic Results are
Technician diagnostic results are successfully
results in the ready for stored and
system storage. confirmed in
database. the system.
UC11 View Results Sick Person The Sick Results are Sick Person
Person logs into stored in the views
the system to system. diagnostic
view the results.
diagnostic
results.
RESEARCH THESIS 62