Classification of Pneumonia images on mobile devices with Quantized Neural Network




Classification; Images; Quantization; Mobile Devices; Pneumonia.


This paper presents an approach for the classification of child chest X-ray images into two classes: pneumonia and normal. We employ Convolutional Neural Networks, from pre-trained networks together with a quantization process, using the platform TensorFlow Lite method. This reduces the processing requirement and computational cost. Results have shown accuracy up to 95.4% and 94.2% for MobileNetV1 and MobileNetV2, respectively. The resulting mobile app also presents a simple and intuitive user interface.


Abidin, A. Z., Deng, B., DSouza, A. M., Nagarajan, M. B., Coan, P., & Wismüller, A. (2018). Deep transfer learning for characterizing chondrocyte patterns in phase contrast X-Ray computed tomography images of the human patellar cartilage. Computers in Biology and Medicine, 95, 24-33. doi:

Baltruschat, I. M., Nickisch, H., Grass, M., Knopp, T., & Saalbach, A. (2018). Comparison of Deep Learning Approaches for Multi-Label Chest X-Ray Classification. CoRR, abs/1803.02315. Fonte:

Bowers, A. J., & Zhou, X. (2019). Receiver operating characteristic (ROC) area under the curve (AUC): A diagnostic measure for evaluating the accuracy of predictors of education outcomes. Journal of Education for Students Placed at Risk (JESPAR), 24, 20–46.

Chen, C., Dou, Q., Chen, H., & Heng, P.-A. (2018). Semantic-Aware Generative Adversarial Nets for Unsupervised Domain Adaptation in Chest X-ray Segmentation. CoRR, abs/1806.00600. Fonte:

Chen, X., Hu, X., Zhou, H., & Xu, N. (2017). Fxpnet: Training a deep convolutional neural network in fixed-point representation. 2017 International Joint Conference on Neural Networks (IJCNN), 2494–2501.

Choi, J., Chuang, P. I.-J., Wang, Z., Venkataramani, S., Srinivasan, V., & Gopalakrishnan, K. (2018). Bridging the accuracy gap for 2-bit quantized neural networks (QNN). arXiv preprint arXiv:1807.06964.

Dittimi, T. V., & Suen, C. Y. (2019). Mobile Phone based ensemble classification of Deep Learned Feature for Medical Image Analysis. IETE Technical Review, 1–12.

Douarre, C., Schielein, R., Frindel, C., Gerth, S., & Rousseau, D. (2018). Transfer Learning from Synthetic Data Applied to Soil–Root Segmentation in X-Ray Tomography Images. Journal of Imaging, 4. doi:10.3390/jimaging4050065

Gavai, N. R., Jakhade, Y. A., Tribhuvan, S. A., & Bhattad, R. (2017). MobileNets for flower classification using TensorFlow. 2017 International Conference on Big Data, IoT and Data Science (BID), 154–158.

He, K., Girshick, R. B., & Dollár, P. (2018). Rethinking ImageNet Pre-training. CoRR, abs/1811.08883. Fonte:

Howard, A. G., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Weyand, T., Adam, H. (2017). Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861.

Hubara, I., Courbariaux, M., Soudry, D., El-Yaniv, R., & Bengio, Y. (2017). Quantized neural networks: Training neural networks with low precision weights and activations. The Journal of Machine Learning Research, 18, 6869–6898.

Iorio, G., Capasso, M., Prisco, S., De Luca, G., Mancusi, C., Laganà, B., Comune, V. (2018). Lung Ultrasound Findings Undetectable by Chest Radiography in Children with Community-Acquired Pneumonia. Ultrasound in medicine & biology.

Jacob, B., Kligys, S., Chen, B., Zhu, M., Tang, M., Howard, A., Kalenichenko, D. (2018). Quantization and training of neural networks for efficient integer-arithmetic-only inference. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, (pp. 2704–2713).

Kermany, D. S., Goldbaum, M., Cai, W., Valentim, C. C., Liang, H., Baxter, S. L., et al. (2018). Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell, 172, 1122–1131.

Kermany, D. S., Goldbaum, M., Cai, W., Valentim, C. C., Liang, H., Baxter, S. L., Zhang, K. (2018). Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning. Cell, 172, 1122 - 1131.e9. doi:

Kermany, D., Zhang, K., & Goldbaum, M. (2018). Large Dataset of Labeled Optical Coherence Tomography (OCT) and Chest X-Ray Images. Mendeley Data V3. doi:

Khatami, A., Babaie, M., Tizhoosh, H. R., Khosravi, A., Nguyen, T., & Nahavandi, S. (2018). A sequential search-space shrinking using CNN transfer learning and a Radon projection pool for medical image retrieval. Expert Systems with Applications, 100, 224-233. doi:

Kunz, W. G., Patzig, M., Crispin, A., Stahl, R., Reiser, M. F., & Notohamiprodjo, M. (2018). The Value of Supine Chest X-Ray in the Diagnosis of Pneumonia in the Basal Lung Zones. Academic radiology.

Kurt, I. S., Unluer, E. E., Evrin, T., Katipoglu, B., & Eser, U. (2018). Urine Dipstick of Sputum for the Rapid Diagnosis of Community Acquired Pneumonia. Journal of the National Medical Association.

Malmir, B., Amini, M., & Chang, S. I. (2017). A medical decision support system for disease diagnosis under uncertainty. Expert Systems with Applications, 88, 95–108.

Manogaran, G., Varatharajan, R., & Priyan, M. K. (2018). Hybrid recommendation system for heart disease diagnosis based on multiple kernel learning with adaptive neuro-fuzzy inference system. Multimedia tools and applications, 77, 4379–4399.

Moons, B., Goetschalckx, K., Van Berckelaer, N., & Verhelst, M. (2017). Minimum energy quantized neural networks. 2017 51st Asilomar Conference on Signals, Systems, and Computers, 1921–1925.

Ramalingam, S., & Garzia, F. (10 de 2018). Facial Expression Recognition using Transfer Learning. 2018 International Carnahan Conference on Security Technology (ICCST), (pp. 1-5). doi:10.1109/CCST.2018.8585504

Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., & Chen, L.-C. (2018). Mobilenetv2: Inverted residuals and linear bottlenecks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 4510–4520.

Saraiva, A., Melo, R. T., Filipe, V., Sousa, J. V., Ferreira, N. F., & Valente, A. (2018). Mobile multirobot manipulation by image recognition.

Saraiva., A. A., Ferreira., N. M., de Sousa., L. L., Costa., N. J., Sousa., J. V., Santos., D. B., Soares., S. (2019). Classification of Images of Childhood Pneumonia using Convolutional Neural Networks. Proceedings of the 12th International Joint Conference on Biomedical Engineering Systems and Technologies. 2, 112-119. SciTePress. doi:10.5220/0007404301120119

Saraiva., A. A., Santos., D. B., Costa., N. J., Sousa., J. V., Ferreira., N. M., Valente., A., & Soares., S. (2019). Models of Learning to Classify X-ray Images for the Detection of Pneumonia using Neural Networks. Proceedings of the 12th International Joint Conference on Biomedical Engineering Systems and Technologies. 2, 76-83. SciTePress. doi:10.5220/0007346600760083

Shallu, & Mehra, R. (2018). Breast cancer histology images classification: Training from scratch or transfer learning? ICT Express, 4, 247-254. doi:

Ting, K. M. (2017). Confusion Matrix. Em C. Sammut, G. I. Webb (Eds.), Encyclopedia of Machine Learning and Data Mining (pp. 260–260). Boston, MA: Springer US. doi:10.1007/978-1-4899-7687-1_50

World, O. (2016). World, Health, Organization pneumonia. Retrieved from

Wu, L. (2019). Biomedical Image Segmentation and Object Detection Using Deep Convolutional Neural Networks. Ph.D. dissertation, figshare.

Wu, Y., Qin, X., Pan, Y., & Yuan, C. (7 de 2018). Convolution Neural Network based Transfer Learning for Classification of Flowers. 2018 IEEE 3rd International Conference on Signal and Image Processing (ICSIP), (pp. 562-566). doi:10.1109/SIPROCESS.2018.8600536

Zoph, B., Vasudevan, V., Shlens, J., & Le, Q. V. (2018). Learning transferable architectures for scalable image recognition. Proceedings of the IEEE conference on computer vision and pattern recognition, 8697–8710.




How to Cite

SOUSA, J. V. M. .; ALMEIDA, V. R. de .; SARAIVA, A. A. .; SANTOS, D. B. S. .; PIMENTEL, P. M. C.; SOUSA, L. L. de . Classification of Pneumonia images on mobile devices with Quantized Neural Network. Research, Society and Development, [S. l.], v. 9, n. 10, p. e889108382, 2020. DOI: 10.33448/rsd-v9i10.8382. Disponível em: Acesso em: 28 jun. 2022.