Face Recognition and Temperature Data Acquisition for COVID-19 Patients in Honduras

Honduras health workers are reduced; doctors and nurses are getting infected by COVID-19. The primary purpose of this project is the design and development of software that performs facial recognition and temperature registration for patients. The incremental model was used to develop the software. The algorithm was trained with 5 images per face for the first test and 10 images per face for the second, with a total sample of 80 participants. At a maximum distance of 1.4 meters from the camera, the system obtained 72% and 82% accuracy for each of the tests. Finally, the authors conclude that the system can be implemented in health areas such as laboratories, hospitals, and clinics so that contact between patients and doctors can be reduced.


Introduction
The current outbreak of COVID-19 at the end of 2019 quickly turned into a pandemic. This pandemic has caused the collapse of the health system in many countries. This collapse has generated uncertainty for thousands of people in the face of such an unexpected virus due to its exponentially rapid dissemination causing intense respiratory symptoms. As of June 2020, the virus has spread worldwide in more than 200 countries, with more than 7,18 million people infected [1].
Artificial intelligence (AI), an emerging technology in the medical field, has effectively contributed to control and fight against the COVID-19 virus [2]. AI, with the analysis and interpretation of images, allows the creation of faster and more effective solutions compared to other operations in which the burden falls on humans [3].
In Honduras, unlike other countries with higher technology and contingency plans to combat the COVID-19 pandemic remains traditional. Hence, the prevention and detection process is prolonged, which only increases the propagation curve in the country. The impact caused by this virus to the country's public and private health system is alarming. The president of the National Association of Nurses and Auxiliary Patients of Honduras (ANEEAH), Josué Orellana, affirmed that around 900 health workers presented COVID contagion, of which 36 percent are auxiliary nurses [4].
Generally, patients infected with COVID-19 present a high fever picture, so one of the measures adopted have been the control and monitoring of body temperature to detect its contagion. The use of conventional clinical forehead thermometers and scanner tools are currently carried out individually for each person. These procedures require more time to present the results, as well as the healthcare personnel exposure to crowded places in public areas, which directly interferes with the recommended social distancing.

Theories
This project was oriented to the development of a technological alternative capable of making precise and rapid readings. Temperature control and face recognition can be used in the medical area or where preventive control is necessary. Besides, it reduces the chances of contagion at the same time. All these images contain the characteristic features of people's faces. Thus, the program would be able to identify and recognize it. For this project, an incremental model in three faces was considered.
Artificial intelligence (AI) is a science discipline related to computer programs, which aims to emulate its own and human intellectual faculties in artificial systems [8]. Neural networks in recent decades have transformed the method of information processing in which through specific instructions stored in memory, they can make decisions based on them. They can implement learning and organization techniques to detect specific patterns, margins, and even adapt to the changes generated in the system [9]. Machine vision as part of the AI field is used for different purposes: image segmentation, object detection, facial recognition, pattern detection, image classification, and many other more advanced techniques such as those used today for autonomous cars. Facial recognition is a discipline within the field of artificial vision with which, through a pattern of images, people or machines can identify a specific face. This is achieved thanks to the analysis of previously entered patterns studied by the system [10].
The human being can observe and analyze the face almost instantaneously using memory. Instead, these vision systems carry out more complicated detection tasks due to the variability in the images. [11] Being more precise and capable of noticing detailed features that would be impossible to detect by the human eye. Biometrics is defined as the science that includes the autonomous detection of an individual's identity based on physical characteristics and traits, including the biological behavior of each one of them [12]. The operation of the system is determined from a database. It generates biometric patterns that represent the identity of each person or user [13].
For the development of the neural network and artificial vision integrated into the system, the use of Visual Studio. This software was used by the libraries it offers, which will allow training the neural network and the face identification. It will also extract the temperature sensor values for each person. Different variables, such as distance, lighting, and precision, were analyzed to determine system efficiency.

Analysis and results
For the development of the project, an incremental methodology was used. The tasks were divided into levels, where increasing the level would increase the complexity as well. To distribute the 3 required tasks and obtain results progressively and achieve the complete system development through the timeline, the following diagram outlines the process, which consisted of three incremental stages, As shown in Figure 1. The first increment includes facial recognition for the patient's detection. The second step was to create a database to store the personal information of each registered user. The third increase was temperature detection focused on the current situation of COVID-19.

Analysis
Through the analysis of the different stages, it was determined that the software to use for the creation and training of the neural network was Visual Studio in the 2019 version. This software was used with the .NET framework. For the creation of the algorithm, the OpenCV library called Emgu Cv was used. Also, the .NET Framework Data Provider OleDb allowed access to the form from the database created in Microsoft Access. The code was generated in the C# language.
Regarding temperature detection, the characteristics gathered by the MLX90614 sensor were those that best adapted to the required functionalities. But most importantly, the non-contact detection facility. This is essential when guiding the project to the current situation of COVID-19 to prevent its spread. According to the WHO [14], the body temperature of a person is between 36.5 and 37 degrees, and when these digits are exceeded, they are considered to have a fever, which is why it is within the measurement range of the sensor that measures from -70 to 380 C. The data transmission is done through the ATMega microcontroller allowing the processing of the digital values provided by the sensor.

Design
For the design of the program carried out in Visual Studio, 3 Windows Forms made: Login, Face Recognition, and User Registration. These forms created with a friendly interface for any user is easy to use. For the development of the Login Form, it was determined that the program would not be exposed to anyone who could mishandle the system. Therefore, access would be previously authorized, and the interface developed will allow the user and password to be entered. The Login interface is shown in Figure 2.  For the Registry, the design allows the detection and storage of the face. It also contains fields to fill in the personal and medical data of the individual to be registered. Within the personal data, name, surname, date of birth, code or identity, time, and date of entry are requested. Within the medical fields, the temperature sensor value and the symptoms are recorded. At the end of the registration, all this data will be updated to the Microsoft Access database. The database standard format will provide the most critical and relevant information for each clinical case.

Code
The Facial Recognition interface design shows these results, identifying and framing each registered person showing their last name. In case of not being detected, each individual can be registered, and directly access the Registration interface to proceed to save the patient information. Likewise, an integral image facilitates the calculation of points in constant time, using a grouping of 4 values to obtain the sum of all the points contained in a rectangle of the image to be processed. [15] The algorithm needs both positive and negative images for the classifier training stage. [16] Haar features consist of rectangular representations, and the sum of the pixels within the geometric image can be positioned in any image region. It detects a specific feature or area of the face on a smaller scale [17].
Each feature was obtained as a value by calculating the difference between the sum of pixels in the white rectangle from the sum of pixels in the black one. The cascade classifier is a tree-based technology, which results from training hundreds of images of an object, in this case: human faces. In a 24x24 image, there can be 160,000 features. Therefore, this classifier puts together the features into different stages of classifiers, and each stage is trained to eliminate the non-face pattern. If a region does not belong to the face or object to be detected, it discards it and moves on to the next stage of features. It continues the process, and finally, the window which passes all the preview stages is a face region. The cascade classifier is the successful method of Viola & Jones for face detection, making the whole human face detection rate higher [18] and combined with Adaboost algorithm form a strong classifier made up of nodes that analyze the different characteristics of the image regions. [19].
The pre-trained XML file (haarcascade_frontalface_default.xml) offered by OpenCV was selected. The XML format contains the most notable characteristics of the trained photos since the program feeds it after recognizing multiple images [20]. So, within the programming in Visual Studio, as a result, get a list that contains all the detected faces. In such a way, it allows positioning a rectangle that delimits the detected face.
The Microsoft Access database linked through the OleDbConnection data source allows the identity recognition of the detected person. It saves the image registered in binary numbers, which was obtained from the physiological characteristics of the face. It is possible with the bitmap class, which is a specific implementation of the abstract image class. It encapsulates the bitmap object to load and work with the images in any JPEG, PNG, JPG format.

Test
To determine the efficiency of the system, different study variables were tested, such as distance, lighting-also, the number of faces required to optimize the facial recognition process. Moreover, finally, the precision of the values emitted by the temperature sensor. To determine the efficiency of the system created, the correct operation of facial detection was tested by evaluating variables of lighting, distance, and the use of a respiratory mask.

Lightning.
Factors such as the lighting of the place play an important role in facial detection at the time of registration because this can significantly affect the capture. If the lighting is low and very dark, the program is unable to detect a face, and the image cannot be added to the database. If the lighting is average, facial detection turns out to be successful. If the lighting is high, the system turns out to be able to recognize a face to be registered, as shown in Figure 3.

Distance.
The distance was crucial to determine the system range detection. For this, tests were carried out at different distances. At approximately 2 meters, the program couldn't detect the presence of a face, as shown in the following image. Subsequence 1.4 meters, allowed the system to recognize and detect the face, as shown in Figure 4.

Temperature.
Regarding the temperature, body measurement was first taken, which resulted in an average temperature of 37 ºC. Noticing noticed that the sensor is affected by environments with air conditioning or fans. Therefore, it is necessary to carry out the corresponding calibrations depending on the application and its conditions. Once the facial recognition is associated with the database, tests oriented to the correct functioning in the identification, these results were used to calculate the number of faces required to optimize the results and whether such identification occurs even when using the respiratory mask. Simultaneously, the precision of the temperature sensor values was evaluated.

Number of faces required.
For this investigation, it was trained in the network for demonstration purposes with a sample of 80 individuals. All of them were captured with 5 images per face. When performing the analysis of the results, a percentage of precision was obtained to determine the level of acceptance, representing the percentage of positive data, calculated from Equation 1. The individuals were trained and subsequently, the following results were obtained: The results can be represented as a percentage from the positive and false-positive data shows an efficiency of 72% and a margin of error of 28%.
Subsequently, the number of captures per face of the 80 individuals was increased to 10 and the following results were obtained: From the data obtained in Table 2 As you can see, the results show that the precision increased to a percentage of 82% with a margin of error of 14%. So, when training the system, the number of images per face directly influences the results.

Face recognition with respiratory face masks.
As the last tests, 10 people were taken from the previous sample, which was the number of people physically accessible due to the COVID-19 situation and who were available to use a respiratory mask, to determine if the system was capable to identify people wearing a respiratory mask once registered. The obtained results show that the program can recognize 9 out of 10 people without any problem, as can be shown in the following Table 3: As evidence, the correct identification by the system of the person registered as Fernanda Paz was verified, and this time was wearing a respiratory mask resulting in a successful recognition. In which, the system showed the correct name of the identified person. This can be shown in Figure 5. Also, Figure 6 represents the software functionality.

Conclusions
For a third world country like Honduras, it is necessary to implement technologies such as an artificial vision for the detection and prevention of Covid-19 in the health area. This implementation is due to the high rate of infected health personnel, who are those who are on the front lines to control the virus. The study turned out to be effective for face recognition from a maximum distance of 1.4 meters, which benefits the required distance between people. According to the results, a minimum of 5 images per person is required for the training stage having an efficiency of 72%. However, to improve the system performance, it can be considered to train it with 10 images to reach an efficiency of 82%. It can be concluded that when more captures per face are entered to train the system, the greater the efficiency can be. A boost of 5 images per face can be achieved by increasing precision by 10%. The system provides a safe way to be implemented in health areas such as laboratories, hospitals, and clinics so that contact between patients and doctors can be reduced. Likewise, it can be affirmed that this program can be applied in the medical area where the use of respiratory masks is required for the patient's identification.