Identification of Bacterial Pneumonia on Chest X-Ray Images Using InceptionV3 Feature Extraction and K-Nearest Neighbor (K-NN)

Authors

  • Octaviani Hutapea Universitas Nusa Megarkencana
  • Syifa Nurani Rahmayanti Universitas Nusa Megarkencana

DOI:

https://doi.org/10.56127/juit.v4i3.2327

Keywords:

Bacterial Pneumonia, InceptionV3, K-NN, Image Classification, Cross-Validation

Abstract

Bacterial pneumonia is a type of respiratory tract infection that can lead to serious complications if not promptly detected and properly treated. This study develops a bacterial pneumonia identification model using chest X-ray images by combining the InceptionV3 feature extraction method with the K-Nearest Neighbor (K-NN) classification algorithm. The process begins with image preprocessing to enhance visual quality, followed by feature extraction using InceptionV3 to capture texture and shape characteristics of the lung area. The extracted features are then classified using the K-NN algorithm. Based on the experiments, the highest classification accuracy was obtained at K = 3, reaching 0.84. Model consistency was further evaluated using a cross-validation scheme with odd K values ranging from 1 to 20, and the best result was achieved at K = 3 with an accuracy of 0.9455. The experimental results indicate that the combination of InceptionV3 and K-NN is effective and promising as an automatic diagnostic tool for detecting bacterial pneumonia through chest X-ray images.

References

Ainun, A., Halim, D., & Anraeni, S. (2021). Analisis Klasifikasi Dataset Citra Penyakit Pneumonia Menggunakan Metode K-Nearest Neighbor (KNN). Indonesian Journal of Data and Science (IJODAS), 2(1), 1–12.

Baltazar, L. R., Manzanillo, M. G., Gaudillo, J., Viray, E. D., Domingo, M., Tiangco, B., & Albia, J. (2021). Artificial intelligence on COVID-19 pneumonia detection using chest xray images. PLoS ONE, 16(10 October). https://doi.org/10.1371/journal.pone.0257884

Fahmy Amin, M., & Amin, F. (2022). Confusion Matrix in Binary Classification Problems: A Step-by-Step Tutorial. In Journal of Engineering Research (Vol. 6).

Farin, S. M., Islam Prottasha, M. S., & Reza, S. M. S. (2023). COVID-19 detection using lightweight CNN architecture on chest X-ray images. Proceedings of 2023 International Conference on Intelligent Systems, Advanced Computing and Communication, ISACC 2023. Institute of Electrical and Electronics Engineers Inc. https://doi.org/10.1109/ISACC56298.2023.10084139

Gonca, M., Sazak, Ç., & Gündoğdu, Ş. (2024). Effects of Contrast Limited Adaptive Histogram Equalization (CLAHE) on Manual and Automated Tracing of Lateral Cephalometric Radiographs. Clinical and Experimental Health Sciences, 14(3), 733–744. https://doi.org/10.33808/clinexphealthsci.1357008

Hafidh, A., #1, A., Arifianto, A., Nur, K., & #3, R. (2020). Pneumonia Classification from X-ray Images using Residual Neural Network OPEN ACCESS. Journal on Computing, 5(2), 43–54. https://doi.org/10.21108/indojc.2020.5.2.454

Istianah, L., & Sumarti, H. (2020). Classification of Pneumonia in Thoracic X-Ray images based on texture characteristics using the MLP (Multi-Layer Perceptron) method Abstracts. J. Nat. Scien. & Math. Res, 6(2), 78. Retrieved from http://journal.walisongo.ac.id/index.php/jnsmr

Mujahid, M., Rustam, F., Álvarez, R., Luis Vidal Mazón, J., Díez, I. de la T., & Ashraf, I. (2022). Pneumonia Classification from X-ray Images with Inception-V3 and Convolutional Neural Network. Diagnostics, 12(5). https://doi.org/10.3390/diagnostics12051280

Rachmadany Rachman, R., Dewang, S., Dewi Astuti, S., & Juarlin, E. (2025). High-Accuracy Pneumonia Classification via Ensemble Learning on Chest X-ray Imagery. Jurnal Pendidikan Fisika Dan Terapan, 11(2), 110–122. Retrieved from https://jurnal.ar-raniry.ac.id/index.php/jurnalphi/index

Samir, B., Mwanahija, S., Soumia, B., Özkaya, U., & Oran, A. (2023). Deep Learning For Classification Of Chest X-Ray Images (Covid 19).

Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., & Wojna, Z. (2016). Rethinking the Inception Architecture for Computer Vision. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2016-December, 2818–2826. IEEE Computer Society. https://doi.org/10.1109/CVPR.2016.308

Yoon, M. S., Kwon, G., Oh, J., Ryu, J., Lim, J., Kang, B. kyeong, … Han, D. K. (2023). Effect of Contrast Level and Image Format on a Deep Learning Algorithm for the Detection of Pneumothorax with Chest Radiography. Journal of Digital Imaging, 36(3), 1237–1247. https://doi.org/10.1007/s10278-022-00772-y

Yothapakdee, K., Pugtao, Y., Charoenkhum, S., Boonnuk, T., & Tamee, K. (2025). Finding a suitable chest x-ray image size for the process of machine learning to build a model for predicting Pneumonia. International Journal of Advances in Intelligent Informatics, 11(1), 25–38. https://doi.org/10.26555/ijain.v11i1.1897

Downloads

Published

2025-10-13

How to Cite

Hutapea, O., & Syifa Nurani Rahmayanti. (2025). Identification of Bacterial Pneumonia on Chest X-Ray Images Using InceptionV3 Feature Extraction and K-Nearest Neighbor (K-NN). Jurnal Ilmiah Teknik, 4(3), 95–108. https://doi.org/10.56127/juit.v4i3.2327

Similar Articles

1 2 > >> 

You may also start an advanced similarity search for this article.