Optimizing Pneumonia Detection on Edge Devices Using YOLOv5lu with Pruning and Quantization

Muhammad Satriya Pratama Manggala Kusuma, Cinantya Paramita, Suryanti Chan

Abstract


Pneumonia continues to be a leading cause of childhood mortality worldwide, with the greatest impact in resource limited regions where access to radiologists is limited. Deep learning has emerged as a promising tool for automated screening, yet conventional object detection models demand high computational resources, restricting their use on low cost edge devices common in rural healthcare settings. To address this challenge, we developed a lightweight pneumonia detection framework designed for realtime inference on standard hardware. Our approach builds on the YOLOv5lu architecture, which incorporates an anchor free decoupled head, and was trained on a balanced dataset of 14,863 chest X-rays from the RSNA Pneumonia Detection Challenge.To enable deployment on edge devices, we applied a sequential compression pipeline. First, 30% of convolutional filters were removed through structured pruning, followed by post training quantization to INT8. These optimizations reduced the model size by nearly half (from 101 MB to 51.72 MB) and improved inference speed to 6.24 ms per image, equivalent to more than 160 frames per second on a standard CPU. Importantly, the quantized model preserved diagnostic performance, achieving a mean Average Precision (mAP@0.4–0.75) of 0.266 compared to the baseline score of 0.287. These findings confirm the practical feasibility of deploying advanced deep learning models in limited resource regions. By effectively balancing efficiency and accuracy, this framework offers a scalable solution for early pneumonia screening and establishes a foundation for extending detection to other diseases, including Tuberculosis and COVID-19.

Keywords


Medical Imaging; Model Compression; Pneumonia Detection; YOLOv5.

References


C. King et al., “Paediatric pneumonia research priorities in the context of COVID-19: An eDelphi study,” J. Glob. Health, vol. 12, p. 09001, 2022.

World Health Organization, “Stakeholder Consultative Meeting on Prevention and Management of Childhood Pneumonia and Diarrhoea Report, 12–14 October 2021.” WHO, Geneva, Switzerland, 2022.

C. Cairns and K. Kang, “National Hospital Ambulatory Medical Care Survey: 2022 emergency department summary tables. Tables 11.” 2022. [Online]. Available: https://www.cdc.gov/nchs/data/nhamcs/web_tables/2022-nhamcs-ed-web-tables.pdf

Centers for Disease Control and Prevention, National Center for Health Statistics, “National Vital Statistics System, Mortality 2018–2023 on CDC WONDER Online Database.” 2024. [Online]. Available: http://wonder.cdc.gov/ucd-icd10-expanded.html

A. H. Attaway, R. G. Scheraga, A. Bhimraj, M. Biehl, and U. Hatipoğlu, “Severe covid-19 pneumonia: pathogenesis and clinical management,” BMJ, p. n436, Mar. 2021, doi: 10.1136/bmj.n436.

A. J. Amron, C. Paramita, and P. Šolić, “Interpretable Hybrid YOLOv8s-GWO Framework for Bounding-Box Viral Pneumonia Detection on Kaggle Chest X-ray Images,” vol. 6, no. 6, 2025.

S. Singh, M. Kumar, A. Kumar, B. K. Verma, K. Abhishek, and S. Selvarajan, “Efficient pneumonia detection using Vision Transformers on chest X-rays,” Sci. Rep., vol. 14, no. 1, p. 2487, Jan. 2024, doi: 10.1038/s41598-024-52703-2.

T. O. Togunwa, A. O. Babatunde, O. E. Fatade, R. Olatunji, G. Ogbole, and A. Falade, “Detection of pneumonia in children through chest radiographs using artificial intelligence in a low-resource setting: A pilot study,” PLOS Digit. Health, vol. 4, no. 9, p. e0000713, Sep. 2025, doi: 10.1371/journal.pdig.0000713.

A. Stein et al., “RSNA Pneumonia Detection Challenge.” Kaggle, 2018. [Online]. Available: https://kaggle.com/competitions/rsna-pneumonia-detection-challenge

M. Larobina, “Thirty Years of the DICOM Standard,” Tomography, vol. 9, no. 5, pp. 1829–1838, Oct. 2023, doi: 10.3390/tomography9050145.

Z. Zou, K. Chen, Z. Shi, Y. Guo, and J. Ye, “Object detection in 20 years: A survey,” Proc. IEEE, vol. 111, no. 3, pp. 257–276, Mar. 2023.

M. Nawaz, R. Qureshi, M. A. Teevno, and A. R. Shahid, “Object detection and segmentation by composition of fast fuzzy C-mean clustering based maps,” J. Ambient Intell. Humaniz. Comput., vol. 14, no. 6, pp. 7173–7188, Jun. 2023.

W. T. D. Tjahjono, C. Paramita, C. Supriyanto, A. J. Savicevic, S. Rakasiwi, and A. A. Haresta, “YOLOv10x Model for Accurate First Detection of Skin Diseases from Dermoscopic Objects,” in 2025 International Conference on Smart Computing, IoT and Machine Learning (SIML), Surakarta, Indonesia: IEEE, Jun. 2025, pp. 1–6. doi: 10.1109/SIML65326.2025.11080864.

M. A. Al-antari, S.-M. Han, and T.-S. Kim, “Evaluation of deep learning detection and classification towards computer-aided diagnosis of breast lesions in digital X-ray mammograms,” Comput. Methods Programs Biomed., vol. 196, p. 105584, Nov. 2020, doi: 10.1016/j.cmpb.2020.105584.

Y. E. Almalki et al., “Deep Learning Models for Classification of Dental Diseases Using Orthopantomography X-ray OPG Images,” Sensors, vol. 22, no. 19, p. 7370, Sep. 2022, doi: 10.3390/s22197370.

A. Baccouche, B. Garcia-Zapirain, Y. Zheng, and A. S. Elmaghraby, “Early detection and classification of abnormality in prior mammograms using image-to-image translation and YOLO techniques,” Comput. Methods Programs Biomed., vol. 221, p. 106884, Jun. 2022, doi: 10.1016/j.cmpb.2022.106884.

M. Dobrovolny, J. Benes, J. Langer, O. Krejcar, and A. Selamat, “Study on Sperm-Cell Detection Using YOLOv5 Architecture with Labaled Dataset,” Genes, vol. 14, no. 2, p. 451, Feb. 2023, doi: 10.3390/genes14020451.

Z. Han, H. Huang, Q. Fan, Y. Li, Y. Li, and X. Chen, “SMD-YOLO: An efficient and lightweight detection method for mask wearing status during the COVID-19 pandemic,” Comput. Methods Programs Biomed., vol. 221, p. 106888, Jun. 2022, doi: 10.1016/j.cmpb.2022.106888.

Cinantya Paramita, Catur Supriyanto, Amalia, and Khalivio Rahmyanto Putra, “Comparative Analysis of YOLOv5 and YOLOv8 Cigarette Detection in Social Media Content,” Sci. J. Inform., vol. 11, no. 2, pp. 341–352, May 2024, doi: 10.15294/sji.v11i2.2808.

T. Diwan, G. Anirudh, and J. V. Tembhurne, “Object detection using YOLO: Challenges, architectural successors, datasets and applications,” Multimed. Tools Appl., vol. 82, no. 6, pp. 9243–9275, Mar. 2023.

W. Fang, L. Wang, and P. Ren, “Tinier-YOLO: A real-time object detection method for constrained environments,” IEEE Access, vol. 8, pp. 1935–1944, 2020.

C. Paramita, C. Supriyanto, P. Šolić, C. Wada, and A. A. Dzaky, “Performance Evaluation of YOLOv8 Models for Multi-Class Skin Lesion Detection from Dermoscopic Images,” in 2025 International Conference on Smart Computing, IoT and Machine Learning (SIML), Surakarta, Indonesia: IEEE, Jun. 2025, pp. 1–6. doi: 10.1109/SIML65326.2025.11080819.

T. Liang, J. Glossner, L. Wang, S. Shi, and X. Zhang, “Pruning and quantization for deep neural network acceleration: A survey,” Neurocomputing, vol. 461, pp. 370–403, Oct. 2021, doi: 10.1016/j.neucom.2021.07.045.

A. Kuzmin, M. Nagel, M. van Baalen, A. Behboodi, and T. Blankevoort, “Pruning vs Quantization: Which is Better?,” 2023, arXiv. doi: 10.48550/ARXIV.2307.02973.

H. N. Syifa’ and A. Nugroho, “PERFORMANCE OF THE YOLOV5 ALGORITHM TO DETECT HUMANS IN THE REAR EXCAVATOR AREA,” JITK J. Ilmu Pengetah. Dan Teknol. Komput., vol. 10, no. 1, pp. 197–207, Aug. 2024, doi: 10.33480/jitk.v10i1.5576.

M. Sabaghian, M. A. Keyvanrad, and S. M. Moghadami, “A Novel Compression Framework for YOLOv8: Achieving Real-Time Aerial Object Detection on Edge Devices via Structured Pruning and Channel-Wise Distillation,” 2025, arXiv. doi: 10.48550/ARXIV.2509.12918.




DOI: https://doi.org/10.30591/jpit.v11i2.10374

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

JPIT INDEXED BY

  
  

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.