Advancing Tuberculosis Detection in Chest X-rays: A YOLOv7-Based Approach
Abstract
1. Introduction
2. Related Work
3. Materials and Methods
3.1. Dataset
3.2. Preprocessing
3.3. Class Weights
3.4. Image Augmentations
3.5. Experiments
3.6. Hyperparameter Evolution
3.7. Deployment in CAD System
4. Results and Discussions
4.1. Performance Metrics
4.2. Results
4.3. Visualization and Analysis
4.4. Learning Curve Analysis
5. Conclusions and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Available online: https://www.who.int/teams/global-tuberculosis-programme/tb-reports/global-tuberculosis-report-2022 (accessed on 1 August 2023).
- Available online: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3278873/ (accessed on 1 August 2023).
- Bhalla, A.S.; Goyal, A.; Guleria, R.; Gupta, A.K. Chest tuberculosis: Radiological review and imaging recommendations. Indian J. Radiol. Imaging 2015, 25, 213–225. [Google Scholar] [CrossRef] [Scilit]
- Chauhan, A.; Chauhan, D.; Rout, C. Role of gist and PHOG features in computer-aided diagnosis of tuberculosis without segmentation. PLoS ONE 2014, 9, e112980. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hwang, S.; Kim, H.E.; Jeong, J.; Kim, H.J. A novel approach for tuberculosis screening based on deep convolutional neural networks. In Medical Imaging 2016: Computer-Aided Diagnosis; SPIE: Bellingham, WA, USA, 2016; Volume 9785, pp. 750–757. [Google Scholar]
- Jaeger, S.; Karargyris, A.; Candemir, S.; Folio, L.; Siegelman, J.; Callaghan, F.; Xue, Z.; Palaniappan, K.; Singh, R.K.; Antani, S.; et al. Automatic tuberculosis screening using chest radiographs. IEEE Trans. Med. Imaging 2013, 33, 233–245. [Google Scholar] [CrossRef] [Scilit]
- Zellweger, J.P.; Sotgiu, G.; Corradi, M.; Durando, P. The diagnosis of latent tuberculosis infection (LTBI): Currently available tests, future developments, and perspectives to eliminate tuberculosis (TB). La Med. Del Lav. 2020, 111, 170–183. [Google Scholar] [CrossRef] [Scilit]
- Candemir, S.; Jaeger, S.; Palaniappan, K.; Musco, J.P.; Singh, R.K.; Xue, Z.; Karargyris, A.; Antani, S.; Thoma, G.; McDonald, C.J. Lung segmentation in chest radiographs using anatomical atlases with nonrigid registration. IEEE Trans. Med. Imaging 2013, 33, 577–590. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Konstantinos, A. Testing for tuberculosis. Aust. Prescr. 2010, 33, 12–18. [Google Scholar] [CrossRef] [Scilit]
- Available online: https://apps.who.int/iris/handle/10665/252424 (accessed on 1 August 2023).
- Van Cleeff, M.R.A.; Kivihya-Ndugga, L.E.; Meme, H.; Odhiambo, J.A.; Klatser, P.R. The role and performance of chest X-ray for the diagnosis of tuberculosis: A cost-effectiveness analysis in Nairobi, Kenya. BMC Infect. Dis. 2005, 5, 111. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Liu, Y.; Wu, Y.H.; Ban, Y.; Wang, H.; Cheng, M.M. Rethinking computer-aided tuberculosis diagnosis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 2646–2655. [Google Scholar]
- Bansal, M.A.; Sharma, D.R.; Kathuria, D.M. A systematic review on data scarcity problem in deep learning: Solution and applications. ACM Comput. Surv. 2022, 54, 1–29. [Google Scholar] [CrossRef] [Scilit]
- Alshehri, F.; Muhammad, G. A comprehensive survey of the Internet of Things (IoT) and AI-based smart healthcare. IEEE Access 2021, 9, 3660–3678. [Google Scholar] [CrossRef] [Scilit]
- Muhammad, G.; Alshehri, F.; Karray, F.; El Saddik, A.; Alsulaiman, M.; Falk, T.H. A comprehensive survey on multimodal medical signals fusion for smart healthcare systems. Inf. Fusion 2021, 76, 355–375. [Google Scholar] [CrossRef] [Scilit]
- Muhammad, G.; Alhamid, M.F.; Long, X. Computing and processing on the edge: Smart pathology detection for connected healthcare. IEEE Netw. 2019, 33, 44–49. [Google Scholar] [CrossRef] [Scilit]
- Lieberman, R.; Kwong, H.; Liu, B.; Huang, H.K. Computer-assisted detection (CAD) methodology for early detection of response to pharmaceutical therapy in tuberculosis patients. In Medical Imaging 2009: Computer-Aided Diagnosis; SPIE: Bellingham, WA, USA, 2009; Volume 7260, pp. 847–854. [Google Scholar]
- Acharya, V.; Dhiman, G.; Prakasha, K.; Bahadur, P.; Choraria, A.; Sushobhitha, M.; Sowjanya, J.; Prabhu, S.; Kautish, S.; Viriyasitavat, W.; et al. AI-assisted tuberculosis detection and classification from chest X-rays using a deep learning normalization-free network model. Comput. Intell. Neurosci. 2022, 2022, 2399428. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nafisah, S.I.; Muhammad, G. Tuberculosis detection in chest radiograph using convolutional neural network architecture and explainable artificial intelligence. Neural Comput. Appl. 2022, 19, 1–21. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Du, J. Understanding of object detection based on CNN family and YOLO. In Journal of Physics: Conference Series; IOP Publishing: Bristol, UK, 2018; Volume 1004, p. 012029. [Google Scholar]
- Luo, Y.; Zhang, Y.; Sun, X.; Dai, H.; Chen, X. Intelligent solutions in chest abnormality detection based on YOLOv5 and ResNet50. J. Healthc. Eng. 2021, 2021, 2267635. [Google Scholar] [CrossRef] [Scilit]
- Diwan, T.; Anirudh, G.; Tembhurne, J.V. Object detection using YOLO: Challenges, architectural successors, datasets and applications. Multimed. Tools Appl. 2022, 82, 9243–9275. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 779–788. [Google Scholar]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 18–22 June 2023; pp. 7464–7475. [Google Scholar]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
- Nishio, M.; Noguchi, S.; Matsuo, H.; Murakami, T. Automatic classification between COVID-19 pneumonia, non-COVID-19 pneumonia, and the healthy on chest X-ray image: Combination of data augmentation methods. Sci. Rep. 2020, 10, 17532. [Google Scholar] [CrossRef] [Scilit]
- Garcea, F.; Serra, A.; Lamberti, F.; Morra, L. Data augmentation for medical imaging: A systematic literature review. Comput. Biol. Med. 2023, 152, 106391. [Google Scholar] [CrossRef] [Scilit]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Alzubaidi, L.; Zhang, J.; Humaidi, A.J.; Al-Dujaili, A.; Duan, Y.; Al-Shamma, O.; Santamaría, J.; Fadhel, M.A.; Al-Amidie, M.; Farhan, L. Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. J. Big Data 2021, 8, 1–74. [Google Scholar] [CrossRef] [Scilit]
- Available online: https://docs.ultralytics.com/yolov5/tutorials/hyperparameter_evolution/ (accessed on 1 August 2023).
- Yang, R.; Yu, Y. Artificial convolutional neural network in object detection and semantic segmentation for medical imaging analysis. Front. Oncol. 2021, 11, 638182. [Google Scholar] [CrossRef] [Scilit]
- Li, W.; Kazemifar, S.; Bai, T.; Nguyen, D.; Weng, Y.; Li, Y.; Xia, J.; Xiong, J.; Xie, Y.; Owrangi, A.; et al. Synthesizing CT images from MR images with deep learning: Model generalization for different datasets through transfer learning. Biomed. Phys. Eng. Express 2021, 7, 025020. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ye, J.C.; Ye, J.C. Generalization capability of deep learning. In Geometry of Deep Learning: A Signal Processing Perspective; Springer: Berlin/Heidelberg, Germany, 2022; pp. 243–266. [Google Scholar]
- Chen, R.J.; Lu, M.Y.; Chen, T.Y.; Williamson, D.F.; Mahmood, F. Synthetic data in machine learning for medicine and healthcare. Nat. Biomed. Eng. 2021, 5, 493–497. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Acharya, Y.; Vink, I.; Ebisi, M.; Arja, S. A descriptive analysis of patient history based on its relevance. Int. J. Med. Sci. Educ. 2018, 35, 144–148. [Google Scholar]
















| Method | Data | Pre-Trained | Backbone | Active TB | Latent TB | ||
|---|---|---|---|---|---|---|---|
| AP50 | AP | AP50 | AP | ||||
| SSD | ALL | Yes | VGGNet-16 | 50.5 | 22.8 | 8.1 | 3.2 |
| RetinaNet | ResNet-50 w/FPN | 45.4 | 19.6 | 6.2 | 2.4 | ||
| Faster R-CNN | ResNet-50 w/PPN | 53.3 | 21.9 | 9.6 | 2.9 | ||
| FCOS | ResNet-50 w/FPN | 40.3 | 16.8 | 6.2 | 2.1 | ||
| SSD | No | VGGNet 16 | 60 | 26.2 | 8.2 | 2.9 | |
| RetinaNet | ResNet-50 w/FPN | 19.1 | 6.4 | 1.6 | 0.6 | ||
| Faster R-CNN | ResNet-50 w/FPN | 21.2 | 7.1 | 2.7 | 0.8 | ||
| SSD | TB | Yes | VGGNet-16 | 63.7 | 28 | 10.7 | 4 |
| RetinaNet | ResNet-50 w/FPN | 61.5 | 25.3 | 10.2 | 4.1 | ||
| Faster R-CNN | ResNet-50 w/FPN | 58.7 | 23.7 | 9.6 | 2.8 | ||
| FCOS | ResNet-50 w/FPN | 47.9 | 19.8 | 7.4 | 2.4 | ||
| SSD | No | VGGNet-16 | 67 | 29 | 9.9 | 3.5 | |
| RetinaNet | ResNet-50 w/FPN | 37.8 | 12.7 | 3.2 | 1.1 | ||
| Faster R-CNN | ResNet-50 w/FPN | 35.3 | 11.3 | 3.9 | 1.1 | ||
| FCOS | ResNet-50 w/FPN | 38.5 | 13.6 | 4.3 | 1.1 | ||
| Class | Train | Val | Test | Total | |
|---|---|---|---|---|---|
| Non-TB | Healthy | 3000 | 800 | 1200 | 5000 |
| Sick and Non-TB | 3000 | 800 | 1200 | 5000 | |
| TB | Active TB | 473 | 157 | 294 | 924 |
| Latent TB | 104 | 36 | 72 | 212 | |
| Active and latent TB | 23 | 7 | 24 | 54 | |
| Uncertain TB | 0 | 0 | 10 | 10 | |
| Total | 6600 | 1800 | 2800 | 11,200 | |
| Hyperparameter Number | Hyperparameter Name | Hyperparameter Value |
|---|---|---|
| 1 | Lr0 | 0.00941 |
| 2 | Lrf | 0.0202 |
| 3 | Momentum | 0.841 |
| 4 | Weight_decay | 0.00047 |
| 5 | Warmup_epochs | 4.21 |
| 6 | Warmup_momentum | 0.252 |
| 7 | Warmup_bias_lr | 0.0647 |
| 8 | Box | 0.0777 |
| 9 | Cls | 0.265 |
| 10 | Cls_pw | 1.05 |
| 11 | Obj | 0.229 |
| 12 | Obj_pw | 0.93 |
| 13 | Anchor_t | 4.34 |
| 14 | Loss_ota | 1.0 |
| 15 | Anchors | 3.0 |
| Expt. No. | Active TB(AP) | Obsolete Pulmonary TB (AP) | All Classes (mAP@0.5) | Description |
|---|---|---|---|---|
| 1 | 0.489 | 0.009 | 0.249 | Base model with class imbalance |
| 2 | 0.391 | 0.032 | 0.211 | Base model with image weights |
| 3 | 0.329 | 0.232 | 0.280 | Base model with minority class image augmentation |
| 4 | 0.675 | 0.499 | 0.587 | Putting it all together and evolving the hyperparameter |
| YOLO Model | Features |
|---|---|
| 1. Input size | 512 × 512 |
| 2. Number of parameters | 37.2 million |
| 3. Number of layers | 415 |
| 4. Size | 71.3 MB |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bista, R.; Timilsina, A.; Manandhar, A.; Paudel, A.; Bajracharya, A.; Wagle, S.; Ferreira, J.C. Advancing Tuberculosis Detection in Chest X-rays: A YOLOv7-Based Approach. Information 2023, 14, 655. https://doi.org/10.3390/info14120655
Bista R, Timilsina A, Manandhar A, Paudel A, Bajracharya A, Wagle S, Ferreira JC. Advancing Tuberculosis Detection in Chest X-rays: A YOLOv7-Based Approach. Information. 2023; 14(12):655. https://doi.org/10.3390/info14120655
Chicago/Turabian StyleBista, Rabindra, Anurag Timilsina, Anish Manandhar, Ayush Paudel, Avaya Bajracharya, Sagar Wagle, and Joao C. Ferreira. 2023. "Advancing Tuberculosis Detection in Chest X-rays: A YOLOv7-Based Approach" Information 14, no. 12: 655. https://doi.org/10.3390/info14120655
APA StyleBista, R., Timilsina, A., Manandhar, A., Paudel, A., Bajracharya, A., Wagle, S., & Ferreira, J. C. (2023). Advancing Tuberculosis Detection in Chest X-rays: A YOLOv7-Based Approach. Information, 14(12), 655. https://doi.org/10.3390/info14120655

