Harnessing YOLOv9 for Enhanced Detection of Lung
Harnessing YOLOv9 for Enhanced Detection of Lung
Abstract— This study introduces the use of YOLOv9 provided technology that can help in the early detection and
differential diagnosis of lung cancer. This technology is now
2024 Intelligent Methods, Systems, and Applications (IMSA) | 979-8-3503-6263-3/24/$31.00 ©2024 IEEE | DOI: 10.1109/IMSA61967.2024.10652879
518
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on November 27,2024 at 09:11:06 UTC from IEEE Xplore. Restrictions apply.
has a poor prognosis. Despite knowledge of the dangers of The rest of this paper is organized as follows: In Section II, we
smoking and the potential for diseases, routine screening for show the problem definition and its challenges. Section III
lung cancer has not been successful. Symptoms usually do not shows the prototype and Section IV shows its performance
present until the disease is advanced, and early-stage lung cancer analysis. Finally, Section V concludes this paper.
is frequently asymptomatic. [30]-[32], - The objective is to
replicate the outcomes achieved by previous computer-aided II. MATERIALS AND METHODS
design (CAD) systems through the implementation of a
machine-learning approach. The criterion for success will be the
equivalence of the ROC curve. - The aim is to develop a system
that exhibits higher sensitivity and a lower rate of false negatives
compared to the currently existing CAD systems. - The goal is
to devise a technique for accurately localizing the nodule within
the scan, utilizing a three-dimensional bounding box. - The
objective is to enhance the accessibility of CAD systems for
radiologists by establishing a method to execute the YOLO
system on new scans and determine the probability of cancer
present in a given scan. Data for this project uses Lung Image
Database Consortium (LIDC) and Image Database Resource
Initiative, which is the largest publicly available dataset of
thoracic CT scans, containing over 1000 cases, and is therefore
perfect for training and testing a deep learning system. The large
number of cases will allow us to obtain a very high sensitivity Figure 2 Farmwork architecture
system while maintaining a relatively low number of false
positives. Objectives can be broken down into a number of Each of the 1018 CT scans was divided and stored into sets of
elements This work aims at harnessing the potential of the 'You roughly 160-200 images in DICOM format. Unfortunately,
Only Look Once' v3, or YOLOv3 deep learning system for only 888 of these cases are suitable for algorithm training as
enhanced detection of lung cancer. Though numerous computer- they contain 2D image annotations from the radiologists. The
aided detection (CAD) have been developed in the last 3 remaining 130 cases only have annotations in 3D voxels which
decades, the wide variability of lung cancer in terms of its size, is difficult to translate into 2D bounding boxes around the
shape, and appearance means that no single method shall be nodules. These 130 cases were still used for initial algorithm
sensitive enough to detect all cancers. It is known that for every development and analysis. The sets of images were named
1mm increase in nodule diameter, there is a 25% increased risk descriptively with a three-digit number identifying the patient
of it being recognized on a chest radiograph. Yet, many small and series (i.e. 001), a lowercase letter designating the image
nodules are missed as the appearance of lung cancer is highly number in the series, and a file extension. Data loading times
variable. Detection methods have not been able to keep up with and overall testing of the detection algorithm were recorded
the advances in thin-slice CT scanning, which has increased the from the start in order to assess hardware and algorithm
incidence of lung nodules considerably. The National Lung efficiency. [41-43], An overview of the dataset used in this
Screening Trial Research team indicates a 20% reduction in study is given in Table 1. The Lung Image Database
deaths of high-risk individuals screened by low-dose CT scan
Consortium and Image Database Resource Initiative (LIDC-
versus chest radiography. The ability to correctly detect lung
IDRI) provides 1018 cases of thoracic CT scans, each case is
cancer from CT scans has never been more important and is an
active area of research. [33-40], accompanied by the collective opinion of four (4) experienced
thoracic radiologists who provided annotations. Detect and
locate all lung nodules in each CT scan and characterize the
likelihood of each nodule being malignant. In the case of using
CT or MR images, the best diagnostic performance of image
analysis is achieved when the following property is fulfilled:
image analysis is performed on the same modality images used
in medical diagnosis. This is because the differential diagnosis
of diseases by radiologists is performed using pattern
recognition accumulated from experience with special findings
on images, of which only the modality images possess. Our
previous CAD system only detected nodules because the
diagnosis of nodule type and differentiation between nodule
and pneumonia are difficult and somewhat ambiguous with
current image information. In the case of ground-glass nodules,
the finding expression is quite similar to pneumonia or chronic
inflammation, making differential diagnosis difficult.
Therefore, for early diagnosis of ground-glass nodules, the
Figure 1 Input Images.
CAD system must possess higher-level image interpretation
519
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on November 27,2024 at 09:11:06 UTC from IEEE Xplore. Restrictions apply.
that discerns different findings of nodules and lesions with validation and testing respectively. Data was applied to be
similar shadows. This task is best achieved using 3-D image resized in 640*640 and auto orientation. Then data is loaded in
analysis and an artificial shadowing test. We plan to compare a folder in the Kaggle notebook then yolov9 is loaded and
the detection rate of ground-glass nodules between our previous trained, validated and tested in data,
nodule detection system and the new system using 3D image
analysis. To achieve early and accurate diagnosis of sub-solid III. RESULTS
nodules, we propose a new CAD system that uses 3-D image In this section, we compare the proposed method with
analysis. This is system detects and classifies lung nodules as existing methods for the detection of pulmonary nodules in CT
shown on helical CT images. Diagnosis of malignant potential images. A step-by-step introduction of the test image is shown
for detected nodules is key for effectively treating lung cancer in Figure 3 and Figure 4. For the original CT image with real
at the early stage. Sub-solid and ground-glass nodules are a nodules, the proposed method exhibited a 92% sensitivity with
common type of early lung cancer, but assessing the malignant 6.3 FPs/image, confirming high performance. The proposed
potential of these lesions is difficult, even for experienced method exhibited similar performance to the use of a
radiologists. CT images in the dataset are first converted into conventional CT image. When comparing its performance using
3D NumPy arrays with spacing preserved using a 3D slicer. The ROC analysis, the experimental group had an AUC of 0.906.
The proposed method was able to detect all sizes and types of
spacing information is used in the 'transpose_and_scale'
nodules with high accuracy.
preprocessing function where the CT image spacing is
normalized to (1,1,1) and the image is resampled using linear Table 1 performance metrics
interpolation to ensure that the slice thickness is also (1,1,1).
This standardizes the dimensions of the image and ensures that Mean Average The mAP50 across all classes exceeded
Precision 99.5%, indicating a high level of precision in
structures of interest are not disproportionately stretched or (mAP50) detecting.
squeezed. As a lung nodule may be of any size, six different
input sizes were evaluated. Magnetic Resonance Imaging Precision and The precision for the detection was 97.6%,
(MRI) and Computed Tomography (CT) scans are some of the Recall with a recall rate of 97.7%. These metrics
suggest that the model is highly effective in
most reliable imaging tests to get a clear picture of what you identifying true positives while minimizing
have in your body. YOLO implemented with CT and MRI false negatives.
might be a perfect solution because it is more efficient in
detecting different abnormalities compared to other methods, F1 Score The overall F1 score, a harmonic mean of
precision and recall, was 99.5% further
and it is more predictable. Medical officers will obtain more confirming the model's reliability in detection.
accurate results, thus improving their decision-making and
saving lives. However, MRI seems more complicated in image
detection due to certain intensities and noises that would be
difficult for computerized detection. But our aim here is to
leverage YOLO to detect lung tumors on MRI images and
determine its efficiency compared to other existing methods.
[44-48], We realize the requirement of an established platform,
a system, or compendium that could serve medical officers to
detect lung cancer with a more acute and accurate method. This
would allow for a diagnosis using minimal effort, ensuring the
importance of classifying the lung tumor with accuracy and
preventing medical practitioners from misdiagnosing. We have
Figure 3 Sample of the Input Images
conducted a case study throughout our research on how YOLO
could be implemented to detect lung cancer. This system should
be able to function automatically to locate the tumor. Figure2
show the farmwork architecture. Although much of the dataset
contains annotations for several types of lesions, this study
largely focuses on the detection and malignancy classification
of solid lung nodules. All datasets underwent some form of
preprocessing, detailed in the subsequent section. Evaluation of
the network has been weighted towards the detection of subtle
lesions, primarily for cancer screening in RTRC datasets.
Although algorithm performance has not been measured for
diagnosis and/or prognosis of diseases, the detection of Figure 4 The detection of classes
malignant cancerous lesions has also been noted as a possible
future evaluation point for this study. The dataset used in this The application of the YOLOv9 model to the task of
research was obtained from rope-flow data containing about detecting yielded significant results. The model demonstrated
994 images divided into 900,47 and 47 images for training, high accuracy, as evidenced by the following key performance
520
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on November 27,2024 at 09:11:06 UTC from IEEE Xplore. Restrictions apply.
metrics evaluated on the testing set as shown in Table 1. The
model's performance in detecting achieved an mAP of 99.5%,
with a precision of 97.64% and a recall of 97.7%. Figure 3 -
Figure 10 show input samples, detecting sample, confusion
matrix ,precision , f1 , recall and loss and accuracy graphs
respectively.
Figure 9 Precision-Recall
521
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on November 27,2024 at 09:11:06 UTC from IEEE Xplore. Restrictions apply.
This study highlights the significant potential of the YOLOv9 2024. [PDF],
model in advancing the field of dermatological diagnostics [14] A. Bhandary, G. A. Prabhu, V. Rajinikanth, et al., "Deep-
through deep learning. learning framework to detect lung abnormality–A study
with chest X-Ray and lung CT scan images," Pattern
REFERENCES Recognition Letters, vol. 129, pp. 77-85, 2020, Elsevier.
[1] S. Mei, H. Q. Jiang, and L. Ma, "YOLO-lung: A practical up.pt
detector based on improved YOLOv4 for Pulmonary [15] E. A. Nekolla, G. Brix, and J. Griebel, "Lung cancer
Nodule Detection," in Proc. 2021 14th International screening with low-dose CT: radiation risk and benefit–
Congress on ..., 2021. [HTML],
risk assessment for different screening scenarios,"
[2] A. Baccouche, B. Garcia-Zapirain, et al., "Breast Lesions Diagnostics, 2022. mdpi.com
Detection and Classification via YOLO-Based Fusion [16] R. M. Hoffman, R. P. Atallah, R. D. Struble, et al., "Lung
Models," in Computers, 2021. semanticscholar.org cancer screening with low-dose CT: a meta-analysis,"
[3] Z. Yao, T. Jin, B. Mao, B. Lu, Y. Zhang, S. Li, et al., "… Journal of General Internal Medicine, vol. 2020. Springer,
and multicenter diagnostic verification of intelligent 2020. springer.com
recognition system for endoscopic images from early
[17] N. Woznitza, B. Ghimire, A. Devaraj, S.M. Janes, K.
gastric cancer based on YOLO-V3 algorithm," Frontiers Piper, "Impact of radiographer immediate reporting of X-
in …, 2022. [Online]. Available: frontiersin.org. rays of the chest from general practice on the lung cancer
frontiersin.org pathway (radioX): a randomised controlled trial," Thorax,
[4] J. Ma, S. Duan, Y. Zhang, J. Wang, Z. Wang, R. Li, et al., vol. 2023, thorax.bmj.com. bmj.com
"Efficient deep learning architecture for detection and
[18] C. Hyldgaard, C. Trolle, S. M. W. Harders, H. Engberg, et
recognition of thyroid nodules," Computational ..., 2020,
al., "Increased use of diagnostic CT imaging increases the
hindawi.com. hindawi.com detection of stage IA lung cancer: pathways and patient
[5] H. Biserinska, "YOLO Models for Automatic Lung characteristics," BMC Cancer, vol. 22, no. 1, pp. 1-12,
Nodules Detection from CT Scans," 2020. uvt.nl 2022. springer.com
[6] A. Traoré, A.O. Ly, and M.A. Akhloufi, "Evaluating deep [19] M. A. Thanoon, M. A. Zulkifley, M. A. A. Mohd Zainuri,
learning algorithms in pulmonary nodule detection," in et al., "A Review of Deep Learning Techniques for Lung
2020 42nd Annual International Conference of the IEEE Cancer Screening and Diagnosis Based on CT Images,"
Engineering in Medicine & Biology Society (EMBC), Diagnostics, vol. 2023, mdpi.com, 2023. mdpi.com
2020. [HTML], [20] A. Carriero, L. Groenhoff, E. Vologina, P. Basile et al.,
[7] K. Liu, "Stbi-yolo: A real-time object detection method "Deep Learning in Breast Cancer Imaging: State of the Art
for lung nodule recognition," IEEE Access, 2022. ieee.org and Recent Advancements in Early 2024," Diagnostics,
[8] X. Wu, G. Tan, N. Zhu, Z. Chen, Y. Yang, et al., 2024. mdpi.com
"CacheTrack-YOLO: Real-time detection and tracking for [21] L. Wu, S. Lin, W. Jin, H. Weng, J. Xu, L.T. Zhang, Y. Xu
thyroid nodules and surrounding tissues in ultrasound et al., "CCHA YOLO for mycelium clamp connection
videos," in IEEE Journal of ..., 2021. [HTML], (CC) and hyphae Autolysis (HA) detection under
[9] S. Mammeri, M. Amroune, M.Y. Haouam, I. Bendib, et microscopy imaging and web deployment,"
al., "Early detection and diagnosis of lung cancer using Microchemical Journal, vol. TBD, no. TBD, pp. TBD,
YOLO v7, and transfer learning," Multimedia Tools and 2024, Elsevier. [HTML],
Applications, vol. 2023. Springer, 2023. [HTML], [22] J. Liu, H. Xu, H. Qing, Y. Li, X. Yang, C. He, J. Ren, et
[10] Y. Ahmadyar, A. Kamali-Asl, H. Arabi, R. Samimi, et al., al., "Comparison of radiomic models based on low-dose
"Hierarchical approach for pulmonary-nodule and standard-dose CT for prediction of adenocarcinomas
identification from CT images using YOLO model and a and benign lesions in solid pulmonary nodules," Frontiers
3D neural network classifier," in Medical physics and in ..., 2021. frontiersin.org
technology, Springer, 2024. hug.ch [23] C. Zheng, H. Wang, Q. Liu, D. Han, Y. Xin, "Application
[11] V. Westeel, P. Foucher, A. Scherpereel, J. Domas, et al., effect of low-dose spiral CT on pulmonary nodules and its
"Chest CT scan plus x-ray versus chest x-ray for the diagnostic value for benign and malignant nodules,"
follow-up of completely resected non-small-cell lung American Journal of ..., 2023. nih.gov
cancer (IFCT-0302): a multicentre, open-label, [24] E. L. Li, A. L. Ma, T. Wang, Y. F. Fu, H. Y. Liu, and G.
randomised…," The Lancet Oncology, 2022. C. Li, "Low-dose versus standard-dose computed
sciencedirect.com tomography-guided biopsy for pulmonary nodules: a
[12] C. Li, H. Wang, Y. Jiang, W. Fu, X. Liu, et al., "Advances randomized controlled trial," Journal of Cardiothoracic
in lung cancer screening and early detection," Cancer Surgery, vol. 2023. Springer, 2023. springer.com
biology & …, 2022, ncbi.nlm.nih.gov. nih.gov [25] X. Hu, J. Gou, L. Wang, W. Lin et al., "Diagnostic
[13] S. Li, L. Yu, B. Liu, Q. Lin et al., "Application analysis of accuracy of low-dose double-input perfusion computed
ai technology combined with spiral CT scanning in early tomography in the differential diagnosis of pulmonary
lung cancer screening," arXiv preprint arXiv:2402.04267, benign and malignant ground-glass nodules," 2024.
522
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on November 27,2024 at 09:11:06 UTC from IEEE Xplore. Restrictions apply.
researchsquare.com [37] S. Zheng, X. Cui, M. Vonder, R. N. J. Veldhuis, Z. Ye, et
[26] [Y. F. Fu, G. C. Li, Q. S. Xu, Y. B. Shi et al., "Computed al., "Deep learning-based pulmonary nodule detection:
tomography–guided lung biopsy: A randomized Effect of slab thickness in maximum intensity projections
controlled trial of low-dose versus standard-dose at the nodule candidate detection stage," Computer
protocol," European radiology, 2020. [HTML], Methods and Programs in Biomedicine, vol. 196, 2020,
[27] Y. Gao, M. Hua, J. Lv, Y. Ma, Y. Liu, M. Ren, Elsevier. sciencedirect.com
"Reproducibility of radiomic features of pulmonary [38] Y. Ohno, K. Aoyagi, A. Yaguchi, S. Seki, Y. Ueno, et al.,
nodules between low-dose CT and conventional-dose "Differentiation of benign from malignant pulmonary
CT," in Quantitative imaging in medicine and surgery, nodules by using a convolutional neural network to
vol. 12, no. 1, pp. 123-134, 2022. nih.gov determine volume change at chest CT," Radiology, 2020,
[28] Y. L. Wan, P. W. Wu, P. C. Huang, P. K. Tsay, K. T. Pan, [Online]. Available: pubs.rsna.org. rsna.org
et al., "The use of artificial intelligence in the [39] D. P. Mendoza, M. Petranovic, A. Som, "Lung-RADS
differentiation of malignant and benign lung nodules on category 3 and 4 nodules on lung cancer screening in
computed tomograms proven by surgical pathology," clinical practice," American Journal of ..., vol. 2022, Am
Cancers, 2020. [Online]. Available: mdpi.com mdpi.com Roentgen Ray Soc, 2022. ajronline.org
[29] M. Oudkerk, S. Y. Liu, M. A. Heuvelmans, et al., "Lung [40] Y. Gu, J. Chi, J. Liu, L. Yang, B. Zhang, D. Yu, "A survey
cancer LDCT screening and mortality reduction— of computer-aided diagnosis of lung nodules from CT
evidence, pitfalls and future perspectives," Nature scans using deep learning," Computers in biology and
Reviews Clinical Oncology, vol. 18, no. 3, pp. 135-151, medicine, vol. 128, pp. 104115, 2021, Elsevier. [HTML],
2021. liverpool.ac.uk [41] V. Bishnoi and N. Goel, "Transfer learning-based
[30] R. Nooreldeen and H. Bach, "Current and future classification model for the Computed Tomography scan
development in lung cancer diagnosis," International pulmonary images," Multimedia Tools and Applications,
journal of molecular sciences, 2021. mdpi.com 2024. [HTML],
[31] G. Veronesi, D. R. Baldwin, C. I. Henschke, S. Ghislandi, [42] I. Shafi, S. Din, A. Khan, I. D. L. T. Díez, and R. J. P.
et al., "Recommendations for implementing lung cancer Casanova, "An effective method for lung cancer diagnosis
screening with low-dose computed tomography in from CT scan using deep learning-based support vector
Europe," Cancers, 2020. [Online]. Available: mdpi.com. network," Cancers, 2022, mdpi.com. mdpi.com
mdpi.com [43] A. Baccouche, B. Garcia-Zapirain, Y. Zheng, "Early
[32] L. Azour, J.P. Ko, S.L. Washer, A. Lanier, "Incidental detection and classification of abnormality in prior
lung nodules on cross-sectional imaging: current reporting mammograms using image-to-image translation and
and management," Radiologic Clinics, 2021. [HTML], YOLO techniques," Computer Methods and Programs in
[33] E. C. Bartlett, S. V. Kemp, B. Rawal, and A. Devaraj, Biomedicine, vol. 214, 2022, Elsevier. sciencedirect.com
"Defining growth in small pulmonary nodules using [44] N. S. Kumar and A. K. Goel, "Detection, localization and
volumetry: results from a “coffee-break” CT study and classification of fetal brain abnormalities using YOLO v4
implications for current nodule management …," architecture," International Journal of Performability
European Radiology, 2022. springer.com Engineering, 2022. ijpe-online.com
[34] M. Jacob, J. Romano, J.M. Pereira, I. Ramos, et al., [45] MF Almufareh, M Imran, A Khan, M Humayun, et al.,
"Predicting lung nodules malignancy," Pulmonology, vol. "Automated Brain Tumor Segmentation and
2022. Elsevier, 2022. sciencedirect.com Classification in MRI using YOLO-based Deep
[35] A. Khawaja, B. J. Bartholmai, S. Rajagopalan, "Do we Learning," in IEEE ..., 2024. ieee.org
need to see to believe?—Radiomics for lung nodule [46] C. Santos, M. Aguiar, D. Welfer, and B. Belloni, "A new
classification and lung cancer risk stratification," Journal approach for detecting fundus lesions using image
of Thoracic Disease, vol. 12, no. 9, pp. 5137–5140, 2020. processing and deep neural network architecture based on
nih.gov yolo model," Sensors, 2022. mdpi.com
[36] R. Zhang, P. Tian, Z. Qiu, Y. Liang et al., "The growth [47] Z. Mustafa and H. Nsour, "Using Computer Vision
feature and its diagnostic value for benign and malignant Techniques to Automatically Detect Abnormalities in
pulmonary nodules met in routine clinical practice," Chest X-rays," Diagnostics, 2023. mdpi.com.
Journal of Thoracic Disease, 2020. nih.gov
523
Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on November 27,2024 at 09:11:06 UTC from IEEE Xplore. Restrictions apply.