IoT based Indoor Safety Monitoring System for Covid 19

DOI : 10.17577/IJERTCONV10IS04003

Download Full-Text PDF Cite this Publication

Text Only Version

IoT based Indoor Safety Monitoring System for Covid 19

Dr.Gnana Sheela K Department of Electronics TIST

Kochi, India

Hashfi K H

Department of Electronics TIST

Kochi, India

AbstractDuring the ongoing COVID-19 pandemic, Safety monitoring systems are potentially immensely beneficial for COVID-19 patients. This study presents an IoT-based system to test the temperature of the people individually and to check whether they wear masks or not. In shopping malls, schools, and colleges manpower is doing the job of testing the temperature of the public, before entering their workplace. To help Government and the public, automated detection of the system is planned to solve the problem.

KeywordsSafety, Monitoring, Covid 19, Mask


    Coronavirus is an infectious respiratory disease that spreads mostly by saliva droplets or through coughing or sneezing of an affected person. The covid-19 sickness is rapidly spreading and has the potential to harm humans. The difficulty is that there aren't enough treatments and immunizations. Maintaining social distance, wearing masks, washing hands frequently to avoid contact with COVID patients, proper sanitization, limiting the number of people in public areas, limiting private gatherings, and isolating yourself when necessary are some of the indoor safety measures that should be taken by each individual.

    COVID-19, a respiratory disease caused by the SARS-Cov-2 virus (also known as coronavirus), has impacted nearly every area of people's lives around the world. It was first detected in Wuhan, China, in December 2019, but spread fast to other nations in just a few weeks. Fever, fatigue, sore throat, nasal congestion, and loss of taste and smell are common symptoms of COVID -19 infection. Respiratory droplets and contact with contaminated surfaces can spread the virus both directly and indirectly. The incubation period can last from one to fourteen days, with a five-day average.

    As a result, wearing a surgical mask, using hand sanitizers, and social distancing have all been demonstrated to reduce illness spread. Governments implemented a variety of protection and safety measures to combat disease spread, including indoor masking, quarantine, self-isolation, social distancing limiting citizens' movement within and outside of country borders, and the prohibition and cancellation of large public events and gatherings. Even if the pandemic appeared to be weaker at one point, most of the safety rules are still in place due to unstable scenarios. Coronavirus infection causes several changes in our daily routines, habits, and activities, ranging from professional conduct to social relationships, sports, and leisure. Because of the socio-economic implications, people with high body temperatures should not be allowed to visit public spaces. Temperature detection,

    mask detection, and social distancing are all required at the entrances to any city, mall, workplace, organization, etc.


    Nenad Petrovic and Dorde Kocic introduced a low-cost IoT- based solution aimed at assisting companies in adhering to COVID-19 safety regulations and guidelines in order to prevent disease transmission. It concentrates on the most basic indoor measures, such as staying at home if you have a high body temperature, wearing a mask, and keeping a gap of at least 1.5-2 meters between individuals. For temperature detection, they employ an Arduino Uno microcontroller board with a contactless temperature sensor, and for the other two scenarios, they use a Raspberry Pi2 single-board computer with a camera and computer vision techniques. In the instance of mask detection, the system achieves around 91 percent accuracy, while in the case of social distancing testing, it achieves about 73 percent accuracy [3].

    B Varshini, HR Yogeshdeep uses Convolution Neural Networks (CNN) classification technique for face mask recognition. A CNN is an artificial neural network designed to analyze pixel input and is primarily used for image recognition and analysis. Each layer applies a separate set of filters, and 100s to 1000s of filters are combined to produce a final result, which is then transferred to the neural network's next layer. The framework is tested using the Tensor Flow software library and the face mask detection technique. The temperature sensor (MLX90614) is an infrared contactless temperature reader that measures temperature without having to touch it. The device operates admirably, with the trained model achieving a score of 97 percent for temperature measurement and mask detection [4].

    Dhurgadevi and Akila implemented an IoT based approach during the current public health crisis, which gives several benefits, including fostering social distancing practices through the use of technology, supporting contact tracking mechanisms to trace COVID-19's spread providing information to encourage adherence to local, state, and federal health regulations, avoiding fines for noncompliance and promoting physical and psychological safety among employees. OpenCV, Tensor flow, Keras, NumPy, raspian, and Pycam modules help to complete its task. An accuracy of 84-91 percent is attained in detecting masks worn by the participants in the group. The rate changes with the number of members in the group. Similarly, the social distancing statistics are accurate to the tune of 64-73 percent [6].

    Henderi developed an application to handle the problem of breaking the COVID-19 distribution chain in public locations because there are many hazards of virus transmission while someone is outside the house. They want to create applications and research mask detectors to prevent the spread of COVID 19. A deep convolutional neural network (CNN) is used to classify images, as it is in the large-scale single-label object recognition test. Picture and video compression, image segmentation, image editing, object recognition, visual tracking, and other computer vision applications use salient object detection algorithms as the first step. [5].


    The proposed system uses machine learning and Computer Vision Modules, through which people can effectively follow COVID protocols to avoid mass infections taking place at public gatherings such as commercial trade centers, schools, colleges, IT offices, shopping malls, etc.

    Fig. 1. Proposed System

    The block diagram of the COVID 19 indoor safety monitoring system is shown in figure 1.

    First, all people that try to enter the building have to pass through Mask Detection, for this purpose, a computer vision subsystem based on Raspberry Pi single-board computer equipped with a camera module can be used. In case the passenger does not wear a mask, the person is alerted to wear a mask or leave the place. Otherwise, if the person that is being checked wears a mask, the door will be opened.

    After that, passengers proceed to the next step of checking for Temperature detection. For that purpose, Arduino Uno equipped with an infrared thermometer (such as MLX90614) is used. In case that person has a body temperature higher than normal, the door is locked and warned to leave the place. If a persons body temperature is normal, the person can use an automatic sanitizer dispenser that is installed in the monitoring room/area. Following this, we need to check the no. of persons entering the monitoring area. For this task, Arduino equipped with two IR sensors will be placed on the

    one-way entrance/exit. In case more persons enter the monitoring area, Security guards will be notified by beating the buzzer, so they can war that person to leave.


    1. Mask Detection Subsystem

      Face mask identification is accomplished using a deep learning method and Convolution Neural Networks (CNN) classification. CNN is a type of artificial neural network that is designed to understand pixel input and is primarily used for image recognition and analysis. Keras and TensorFlow are used to further train the mask detector model. The mask detection algorithm's steps are listed below



      3: SPLITTING



      • Dataset Collection

        The photos used in the training and testing model were obtained from the dataset contains 1900 photographs divided into two sets: 900 images with masks and 986 images without masks. The dataset is developed using photographs of people's faces and labeling them with and without masks.

      • Pre-Processing

        Images are converted to arrays during the pre-processing step. Resizing image size, converting image to an array, pre- processing input using mobile net v2, and finally performing hot encoding on labels are the four processes in the pre- processing stage.

      • Split the data

        Following pre-processing, the data is divided into two sections: training data (80%), and testing data (the remaining 20%). Images with and without masks are included in each segment.

      • Building the Model

        Construction of the training image generator for augmentation, in which a number of images are formed from a single image by flipping, rotating, and so on, is one of the phases involved in generating the model. Mobilenetv2 is used to generate the base and head models, as well as add model parameters, compile the model, train the model, and save the model for future prediction.

      • Testing the Model

        To ensure that the model can predict accurately, the first stage is to make a prediction on the testing set, followed by the calculation of training loss and accuracy, and finally the model's evaluation.

      • Implementing the Model

        A webcam is used to read the video frame by frame, and then the face detection algorithm is implemented. It moves on to

        the next phase if a face is detected. The frame containing the face will be pre-processed, which will include scaling the image size, converting to an array, and pre-processing input using mobilenetv2. The next stage is to predict the input image that has been processed using a model that has already been created. The video frame will also be tagged with whether or not the subject is wearing a mask, as well as the predicted accuracy percentage. The process flow of mask detection is shown in fig 2.

        Fig. 2. Process flow of Mask Detection

    2. Temperature Measurement Subsystem

      The temperature measurement subsystem uses a contactless IR sensor MLX90614 to measure the temperature of passengers. While passengers pass by one by one, if the temperature of one of them exceeds the average human body temperature (37 °C), Arduino sends a signal to lock the entrance and prohibit the person from entering the building. Otherwise, the door is opened and the person is welcomed inside. The MLX90614 Temperature Sensor measures a specific object's temperature in the range of -70° C to 382.2°C. The sensor uses infrared rays to measure the temperature of an object without making physical touch and communicates with the microcontroller using the I2C protocol. The pinout of MLX90614 is shown in figure 3.

      Fig. 3. MLX90614 Temperature Sensor

    3. Automatic Sanitizing Dispenser

      The ultrasonic sensor consists of one ultrasonic transmitter and one ultrasonic receiver and is based on ultrasonic sound.

      When a microcontroller transmits an input signal to the sensor, an ultrasonic wave is sent out, which is reflected back by the object in front of the sensor and received by the ultrasonic receiver. The sensor's output will be the whole time it takes for sound to travel from the sensor to the object and back to the sensor. The ultrasonic sensor is utilized to detect the hand in this system. The Arduino code specifies the detection distance for the hand. The Arduino will transmit a signal to the ultrasonic sensor on a regular basis. The sensor will be activated. When your hand is in front of the sensor, the sensor will output the total time it took for the sound to travel to and from the object. The Arduino receives the sensor's output signal and interprets it. When the sensor detects a hand in front of the sensor, it activates the hand sanitizer, which activates the DC water pump, and when the hand is not in front of the sensor, the hand sanitizer is turned off.

    4. IR Sensors

    One of the subsystems is an IR Sensor that works as a Human Detector. When an interrupt is detected by the IR sensor, which counts the individual and adds it to the previous value. An infrared transmitter and receiver are included in the IR sensor. When an IR transmitter contacts an obstruction, it emits a certain frequency that is reflected back to the sensor. The reflected signal will be received by the receiver tube. The infrared sensor's circuit is depicted in Figure 4. Opamp, variable resistor (trimmer pot), and output LED are also included.

    Fig. 4. Infrared Sensors


    First, all people that try to enter the building have to pass through Mask Detection, for this purpose, a computer vision subsystem based on Raspberry Pi single-board computer equipped with camera module version 110 revision 3 can be used. In case the passenger does not wear a mask or it does not cover the nose, the person is alerted to wear a mask or leave the place. Otherwise, if the person that is being checked wears a mask, the door will be opened. The person wearing and without wearing a mask is shown in fig 5 and 6

    Fig. 5. Person without a mask

    Fig. 6. Person with mask

    After that, passengers proceed to the next step of checking, temperature detection. For that purpose, Arduino Uno equipped with an infrared thermometer (such as MLX90614) is used. In case that person has a body temperature higher than normal, the door is locked and warned to leave the place. When the temperature is below normal body temperature the blue led will glow, the buzzer is off and the door will be opened as shown in fig 7.

    Fig. 7. When temperature below the base temperature

    When the temperature is above normal body temperature the red led will glow, the buzzer is turned on and the door will be closed as shown in fig 8.

    If a persons body temperature is normal, the person can use an automatic sanitizer dispenser that is installed in the monitoring room/area. When the sensor detects the hand, it will turn on the hand sanitizer and turn on the DC water pump, and when the hand is not present in front of the sensor the hand sanitizer will be turned off. The distance between hand and sensor should be less than 10 cm to be detected

    Fig. 8. When temperature above a base temperature

    . When the distance is less than 10cm the servomotor starts rotating indicating that sanitizer will be dispensed using a DC pump as shown in fig 9. Also, When the distance is greater than 10cm the servomotor stops rotating indicating that the sanitizer will be turned off.

    Fig. 9. Sanitizer dispensing when distance less than 10cm

    When a person encounters the outer IR sensor which is used to count the number of people entering the room, the counter is incremented by one represented by fig 10.

    Fig. 10. IR sensor counting no: of the person inside a room


The IoT-based safety monitoring system was developed to reduce disease spread during COVID 19 pandemic situation by following various indoor safety measures. According to the obtained results, the proposed solution is employed for its intended purpose within specific performance constraints. Furtermore, it is based on open hardware and free software, which is a distinct and desirable feature for such systems.

The system is low-cost and simple to configure and adjust since it uses open-source software and readily available sensors. Mask detection with CNN, temperature monitoring with MLX90614 sensor, automatic hand sanitization with ultrasonic sensors, and measuring the number of people entering or exiting the room have all been done with better accuracy.


[1] M. Kavitha, S. M. M. Roomi, K. Priya, K. B. Devi, State model-based face mask detection, International Journal of Engineering & Technology, 7 (22), pp. 35-38, 2020.

[2] T. Meenpal, A. Balakrishnan, A. Verma, Facial Mask Detection using Semantic Segmentation, 2019 4th International Conference on Computing, Communications and Security (ICCCS), pp. 1-5, 2020.

[3] Nenad Petrovic and ore Koci, IoT-based System for COVID-19 Indoor Safety Monitoring, IcETRAN conference paper, September 2020.

[4] B Varshini, HR Yogesh, Syed Danish Pasha, Maaz Suhail, V Madhumitha, Archana Sasi, IoT-Enabled Smart Doors for Monitoring Body Temperature and Face Mask Detection, Global Transitions Proceedings,2021.

[5] Hendrie, Aging Setiani Rafika, Harco Leslie Hendric Spits Warner, and Meldi Anggara Saputra, An Application of Mask Detector For Prevent Covid-19 in Public Services Area, Journal of Physics,2020

[6] Dr.M.Dhurgadevi, S.Akila, G.Vinodhini, Indoor safety monitoring system using IoT in the workplace environment for protection against Covid-19, paideia journal, Vol XIV, Issue 5 2021.

[7] Jiang X, Gao, T, Zhu, Z, Zhao, Y, Real-Time Face Mask Detection Method Based on YOLOv3, Journal of Electronics, 10, 837, 2021.

[8] Mahdi Rezaei, Mohsen Azarmi, DeepSOCIAL: Social Distancing Monitoring and Infection Risk Assessment in COVID-19 Pandemic, Journal of Appl. Sci, 2020.

[9] Alhmiedat, T, Aborokbah, M, Social Distance Monitoring Approach Using Wearable Smart Tags, Journal of Electronics,2021

[10] Gagandeep Kaur, Ritesh Sinha, Puneet Kumar Tiwari, Srijan Kumar Yadav, Face mask recognition system using CNN model, Neuroscience Informatics,2021.

[11] Vivek Kumar Pandey, Artificial Intelligence Based Face Mask Detection System International Journal of Innovative Science and Research Technology, Volume 5, Issue 8, 2020.

[12] G V Shalini, M Kavitha Margret, M J Sufiya Niraimathi, S Subashree, Social Distancing Analyzer Using Computer Vision and Deep Learning, Journal of Physics, 2021.

[13] Jonathan S. Talahua, Jorge Buele, P. Calvopina, and Jose Varela- Aldqas, Facial Recognition System for People with and without Face Mask in Times of the COVID-19 Pandemic, Sustainability 2021, 13, 6900

Leave a Reply