Skip to main content

A Tiny CNN Architecture for Medical Face Mask Detection for Resource-Constrained Endpoints

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Electrical Engineering ((LNEE,volume 756))

Abstract

The world is going through one of the most dangerous pandemics of all time with the rapid spread of the novel coronavirus (COVID-19). According to the World Health Organization, the most effective way to thwart the transmission of coronavirus is to wear medical face masks. Monitoring the use of face masks in public places has been a challenge because manual monitoring could be unsafe. This paper proposes an architecture for detecting medical face masks for deployment on resource-constrained endpoints having extremely low memory footprints. A small development board with an ARM Cortex-M7 microcontroller clocked at 480 MHz and having just 496 KB of framebuffer RAM has been used for the deployment of the model. Using the TensorFlow-Lite framework, the model is quantized to further reduce its size. The proposed model is 138 KB post-quantization and runs at the inference speed of 30 FPS.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   219.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. A.J. Paul, Recent advances in selective image encryption and its indispensability due to covid-19, in IEEE Recent Advances in Intelligent Computational Systems (RAICS) (2020). https://doi.org/10.1109/RAICS51191.2020.9332513

  2. Y. LeCun, L. Bottou, Y. Bengio, P. Haffner, Gradient-based learning applied to document recognition, in Intelligent Signal Processing (IEEE Press, 2001), pp. 306–351

    Google Scholar 

  3. A. Chavda, J. Dsouza, S. Badgujar, A. Damani, Multi-stage CNN architecture for face mask detection. arXiv e-prints arXiv:2009.07627 (2020)

  4. M. Loey, G. Manogaran, M. Taha, N. Khalifa, A hybrid deep transfer learning model with machine learning methods for face mask detection in the era of the covid-19 pandemic. Measur. J. Int. Measur. Confederation 167 (2021). https://doi.org/10.1016/j.measurement.2020.108288

  5. M. Jiang, X. Fan, H. Yan, RetinaMask: a face mask detector. arXiv e-prints arXiv:2005.03950 (2020)

  6. T. Meenpal, A. Balakrishnan, A. Verma, Facial mask detection using semantic segmentation, in 2019 4th International Conference on Computing, Communications and Security (ICCCS), pp. 1–5 (2019). https://doi.org/10.1109/CCCS.2019.8888092

  7. M. Loey, G. Manogaran, M.H.N. Taha, N.E.M. Khalifa, Fighting against covid-19: a novel deep learning model based on yolo-v2 with resnet-50 for medical face mask detection. Sustain. Cities Soc. 102600 (2020). https://doi.org/10.1016/j.scs.2020.102600. http://www.sciencedirect.com/science/article/pii/S2210670720308179

  8. G. Jignesh Chowdary, N. Singh Punn, S.K. Sonbhadra, S. Agarwal, Face mask detection using transfer learning of inceptionV3. arXiv e-prints arXiv:2009.08369 (2020)

  9. B. Roy, S. Nandy, D. Ghosh, D. Dutta, P. Biswas, T. Das, Moxa: a deep learning based unmanned approach for real-time monitoring of people wearing medical masks. Trans. Ind. Nat. Acad. Eng. 5(3), 509–518 (2020). https://doi.org/10.1007/s41403-020-00157-z

    Article  Google Scholar 

  10. R. Banner, Y. Nahshan, D. Soudry, Post training 4-bit quantization of convolutional networks for rapid-deployment, in Advances in Neural Information Processing Systems, vol. 32. ed. by H. Wallach, H. Larochelle, A. Beygelzimer, F. d’ Alché-Buc, E. Fox, R. Garnett (Curran Associates, Inc., 2019), pp. 7950–7958. https://proceedings.neurips.cc/paper/2019/file/c0a62e133894cdce435bcb4a5df1db2d-Paper.pdf

  11. Y. Nahshan, B. Chmiel, C. Baskin, E. Zheltonozhskii, R. Banner, A.M. Bronstein, A. Mendelson, Loss aware post-training quantization. arXiv e-prints arXiv:1911.07190 (2019)

  12. R. Zhao, Y. Hu, J. Dotzel, C. De Sa, Z. Zhang, Improving neural network quantization without retraining using outlier channel splitting, in Proceedings of the 36th International Conference on Machine Learning, Proceedings of Machine Learning Research, vol. 97 ed. by K. Chaudhuri, R. Salakhutdinov (eds.) (PMLR, Long Beach, California, USA 2019), pp. 7543–7552 http://proceedings.mlr.press/v97/zhao19c.html

  13. Y. Choukroun, E. Kravchik, F. Yang, P. Kisilev, Low-bit quantization of neural networks for efficient inference, in 2019 IEEE/CVF International Conference on Computer Vision Workshop (ICCVW), pp. 3009–3018 (2019). https://doi.org/10.1109/ICCVW.2019.00363

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

    Google Scholar 

  15. R. Gong, X. Liu, S. Jiang, T. Li, P. Hu, J. Lin, F. Yu, J. Yan, Differentiable soft quantization: bridging full-precision and low-bit neural networks, in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (2019)

    Google Scholar 

  16. S. Ge, Z. Luo, S. Zhao, X. Jin, X. Zhang, Compressing deep neural networks for efficient visual inference, in 2017 IEEE International Conference on Multimedia and Expo (ICME) (2017), pp. 667–672. https://doi.org/10.1109/ICME.2017.8019465

  17. Z. Dong, Z. Yao, A. Gholami, M.W. Mahoney, K. Keutzer, Hawq: Hessian aware quantization of neural networks with mixed-precision, in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (2019)

    Google Scholar 

  18. Z. Dong, Z. Yao, Y. Cai, D. Arfeen, A. Gholami, M.W. Mahoney, K. Keutzer, Hawq-v2: Hessian aware trace-weighted quantization of neural networks, in Advances in Neural Information Processing Systems 33 Pre-proceedings (NeurIPS 2020) (2019)

    Google Scholar 

  19. Z. Yao, Z. Dong, Z. Zheng, A. Gholami, J. Yu, E. Tan, L. Wang, Q. Huang, Y. Wang, M.W. Mahoney, K. Keutzer, HAWQV3: dyadic neural network quantization. arXiv e-prints arXiv:2011.10680 (2020)

  20. I. Abdelkader, Y. El-Sonbaty, M. El-Habrouk, Openmv: a python powered, extensible machine vision camera. arXiv e-prints arXiv:1711.10464 (2017)

  21. 32-bit Arm® Cortex®-M7 480MHz MCUs, up to 2MB Flash, up to 1MB RAM, 46 com. and analog interfaces (2019). https://www.st.com/resource/en/datasheet/stm32h743vi.pdf

  22. A.J. Paul, P. Mohan, S. Sehgal, Rethinking generalization in american sign language prediction for edge devices with extremely low memory footprint, in IEEE Recent Advances in Intelligent Computational Systems (RAICS) (2020). https://doi.org/10.1109/RAICS51191.2020.9332480

  23. A. Jangra, Face mask  12k images dataset (2020). https://www.kaggle.com/ashishjangra27/face-mask-12k-images-dataset

  24. D. Makwana, Face mask classification (2020). https://www.kaggle.com/dhruvmak/face-mask-detection

  25. F.N. Iandola, S. Han, M.W. Moskewicz, K. Ashraf, W.J. Dally, K. Keutzer, SqueezeNet: alexNet-level accuracy with 50x fewer parameters and \(<\)0.5MB model size. arXiv e-prints arXiv:1602.07360 (2016)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Puranjay Mohan .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Mohan, P., Paul, A.J., Chirania, A. (2021). A Tiny CNN Architecture for Medical Face Mask Detection for Resource-Constrained Endpoints. In: Mekhilef, S., Favorskaya, M., Pandey, R.K., Shaw, R.N. (eds) Innovations in Electrical and Electronic Engineering. Lecture Notes in Electrical Engineering, vol 756. Springer, Singapore. https://doi.org/10.1007/978-981-16-0749-3_52

Download citation

  • DOI: https://doi.org/10.1007/978-981-16-0749-3_52

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-16-0748-6

  • Online ISBN: 978-981-16-0749-3

  • eBook Packages: EnergyEnergy (R0)

Publish with us

Policies and ethics