{'fraction_non_alphanumeric': 0.0335506439815551, 'fraction_numerical': 0.01727884666348651, 'mean_word_length': 4.970886075949367, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Regression model for predicting core body temperature in infrared thermal mass screening

With fever being one of the most prominent symptoms of COVID-19, the implementation of fever screening has become commonplace around the world to help mitigate the spread of the virus. Non-contact methods of temperature screening, such as infrared (IR) forehead thermometers and thermal cameras, benefit by minimizing infection risk. However, the IR temperature measurements may not be reliably correlated with actual core body temperatures. This study proposed a trained model prediction using IR-measured facial feature temperatures to predict core body temperatures comparable to an FDA-approved product. The reference core body temperatures were measured by a commercially available temperature monitoring system. Optimal inputs and training models were selected by the correlation between predicted and reference core body temperature. Five regression models were tested during the study. The linear regression model showed the lowest minimum-root-mean-square error (RSME) compared with reference temperatures. The temple and nose region of interest (ROI) were identified as optimal inputs. This study suggests that IR temperature data could provide comparatively accurate core body temperature prediction for rapid mass screening of potential COVID cases using the linear regression model. Using linear regression modeling, the non-contact temperature measurement could be comparable to the SpotOn system with a mean SD of ± 0.285 °C and MAE of 0.240 °C.


Introduction
The measurement of body temperature is a vital diagnostic tool and is used by clinicians to assess patient treatment plans, even before minor procedures such as administering anti-inflammatories or taking blood cultures and specimens [4] . An elevated body temperature is a key symptom indicating many bacterial and viral infections, including COVID-19, with 78% of 24,410 confirmed adult cases presenting with a fever [5] . Moreover, with 17% of cases being asymptomatic [3] , temperature screening has become an integral part of the global efforts to slow the spread of the virus [7] , along with handwashing, social distancing, and the wearing of face covers. There are many temperature measurement systems available to measure elevated body temperatures, such as esophageal [8] or rectal thermometers [1] . Meanwhile, some other measuring tools can provide a non-invasive way to measure core body temperature, such as the Bair Hugger Temperature Monitoring System (SpotOn, 3 M Healthcare, St Paul, MN, USA) [9] .
Non-contact mass screening body temperature measurement methods have gained strong interest during the COVID-19 pandemic, as they offer rapid temperature measurements whilst reducing the risk of transmission between members of the public and those administering the Some previous works demonstrated a non-contact continuous body temperature measurement (CBTM) system based on a single thermal camera [ 11 , 22 ]. A long-wave infrared (LWIR) camera sensor FLIR Lepton 2.5, was used with a breakout board to fetch sequential thermal images of subjects. The video data were analyzed with the proposed framework. At first, thermal face detection and tracking were used to locate the region of interest (ROI) in the facial part. Then, the raw value of body surface temperature was extracted from the determined ROI and passed through the calibrated formula to get the result. This study aims to fill the gap in non-contact core body temperature prediction by investigating the use of regression analysis in thermal image post-processing to improve body temperature measurement accuracy when using an IR thermal camera. Regression is a supervised machine learning technique that is normally used to predict continuous values. Compared with other machine learning algorithms, regression analysis directly indicated the strength of the relationship between dependent and independent variables. In this study, the independent variable is the core body temperature, and the dependent variable is the temperature of facial features. There are different types of regression: linear regression models, regression trees, support vector machines, ensembles of trees, and Gaussian Process regression.
Using previously collected temperature data, the optimal input variables based on different facial feature temperatures may be determined. With these inputs, the regression models were trained to predict reference body temperatures measured using the non-invasive 3M TM Bair Hugger TM Temperature Monitoring System 370 (SpotOn, 3 M Healthcare, St Paul, MN, USA) and comparatively assessed the models to find the optimal model for the data. With this methodology, the study aimed to calibrate the temperatures measured using IR thermography and improve their accuracy and repeatability in measuring body temperature. It was hypothesized that the predicted temperature is comparable to the body temperature recorded by SpotOn device.

Materials and methods
The focus of our work was to improve the accuracy and repeatability of body temperature measurements using IR thermography. The aim of this investigation was to find regression models which, when input with certain facial feature temperatures measured in IR images, would predict core body temperature. This was completed using previously collected IR thermography and non-invasive core body temperature measurements.

Environmental setup of original experiment and data collection
In November 2020, IR temperature measurements of 119 non-febrile participants were taken using three different devices: an IR camera (FLIR C3, FLIR Systems, Inc., Wilsonville, OR, USA), a non-contact IR forehead thermometer (NCIT) (JXB-182, Berrcom, Guangzhou, China), and a tympanic thermometer (Genius 3, Covidien, Dublin, Ireland). The NCIT was set to the "body mode ". The tympanic thermometer was set to the "ear mode ". NCITs and tympanic thermometers were used for measuring facial temperatures. A 3M TM Bair Hugger TM temperature monitoring sys-

Facial feature selection for regression analysis
To assess the optimal facial feature location, maximum temperatures in established ROIs in each frame were also recorded. These ROIs included the eyes, nose, and mouth regions on the frontal plane and the Temple and Ear regions on the temple plane. The mean and the standard deviation (SD) of temperatures measured in each of these frames and ROIs are illustrated in Fig. 1 .
The overall maximum temperature of each participant was also measured and located, with 28.6% (34 out of 119) of participants registering the highest temperatures in the ROI for the eyes, 35.3% (42 out of 119) registering the highest temperatures in the ROI for the ear (23 out of 119), 7.6% (9 out of 119) registering the highest temperatures in the ROI for the mouth, and 4.2% (5 out of 119) registering the highest temperatures in the ROI for the temple (3 out of 119). The highest temperatures were recorded in 24.4% (29 out of 119) of participants outside of these ROIs, including along the neckline of clothes (20 out of 119), the neck (4 out of 119), the jaw (3 out of 119), the cheek (1 out of 119), and the hairline (1 out of 119). The maximum temperature overall for the eyes ROI was located at the inner canthus of (17 out of 119) eyes. Each participant ( n = 119) had three thermal images taken using the FLIR C3 thermal camera (FLIR, US): one in the frontal plane and two in the temple plane. Each of the thermal images was recorded according to parameters given in Table 1 .
In addition to the maximum temperatures recorded in each participant's ROIs mentioned above, three other maximum temperatures were considered as inputs for this study. These include the maximum temperature of the full face and neck located in each thermal image frame (frontal plane and temple plane) and the overall maximum temperature, which was the maximum temperature recorded for each participant out of the three thermal image frames.
In total, ten IR thermograph temperature measurements were collected from each participant, with the exception of one participant who  was wearing a headscarf and thus whose temples and ear temperatures could not be recorded. For this reason, this participant's temperature measurements were excluded from the analyses.

Selection of best testing data
Since Pearson's correlation coefficient is based on covariance, it is considered the best method of calculating the relationship between variables of interest. It is a statistical method that determines the statistical relationship between two or more variables. By using Jupyter Notebook, Pearson's correlation coefficient method was used to calculate each feature's correlation score with SpotOn temperature measurements. For over 120 subjects' data, 90% of the data were chosen randomly, and Pearson's correlation coefficient method was used to calculate each feature's correlation score with SpotOn. This step was repeated ten times, and the mean of each feature correlation score was calculated. The four facial features with the four highest correlation scores were the temple, eyes, nose, and overall maximum. Moreover, for further verification, 100% of the data were used to calculate the correlation score for each feature with SpotOn. Nevertheless, the same four features from the previous calculation were chosen.
The features were subsequently paired with each other, as shown in Table 2 . The Pearson correlation coefficient method was used again to compare the paired features according to the correlation score between each other. Because 100% and 90% of the subjects' data were similar, all the data were then used to compare each set of paired features. Therefore, at this stage, sets of paired features with a correlation score of lower than 0.5 were chosen.

Selection of best model
The four facial features with the highest correlation scores and three paired facial features with the lowest correlation scores were used in the model selection process. All data of these features were imported into MATLAB regression learner with k-fold Cross Validation where k = 5. The models trained included linear regression, regression trees, support vector machines, ensembles of trees, and gaussian process regression. According to the results, the model with the lowest minimum root-meansquare error (RMSE) was chosen, as the roots must be taken into account when evaluating the model's accuracy. Then features were trained by the model with the lowest RMSE. This step was repeated ten times, and the mean was calculated. Mean results were then compared according to SD, mean absolute error (MAE), and mean squared error (MSE).
Where n is the total number of data points is the individual measurement of each facial feature (temple, eyes, nose, and overall maximum) is corresponding SpotOn temperature measurement of each facial feature (temple, eyes, nose, and overall maximum) ̄ is the mean value of measurement of each facial feature (temple, eyes, nose, and overall maximum) ̄ is the mean value of measurement of each facial feature (temple, eyes, nose, and overall maximum

Identification of regression model inputs
Compared with SpotOn temperatures, any facial feature or frame with a Pearson's correlation coefficient greater than 0.3 was included as an input variable during regression model selection. Mean correlation coefficients calculated using 90% of the data randomly selected and repeated ten times ( n = 10) identified similar facial features and frames, including the temple, eyes, overall maximum, and nose, with correlation coefficients of 0.364, 0.362, 0.338, and 0.321, respectively ( Fig. 2 ).
When calculated with 100% data, temple, eyes, overall maximum, and nose ROI have correlation coefficients of 0.364, 0.364, 0.342, and 0.314, respectively ( Fig. 3 ). Therefore, the input variables for regression model selection are temple, eyes, overall maximum, and nose.
The Pearson correlation coefficient method was used again to compare each pair according to their correlation to each other. In this step, we considered that the lower the correlation between the paired features, the better the pair. This is because if the pair were to have a high correlation score, they would have many similar numbers in the dataset. Temple -nose, nose -overall maximum, and temple -eyes had the three lowest correlation scores of 0.378, 0.470, and 0.568, respectively ( Fig. 4 ).

Identification and validation of optimal regression model
Next, the four features with the highest correlation scores and three paired features with the lowest correlation scores were used to make the Fig. 2. Mean Pearson's correlation coefficient between temperature measurements of SpotOn and IR thermograph facial features and frames using 90% of the data selected randomly. Coefficient calculations were repeated ten times ( n = 10) and averaged. * Indicates coefficients greater than 0.3.  model selection to see which model suits paired features the most. The data of these features were imported into MATLAB regression learner with k-fold Cross Validation where k = 5. The result shows linear regression model has the lowest RMSE when inputting features of the eye, nose, temple plane, overall max, temple plane-nose, and nose-overall max ( Fig. 5 ).
The models for the selected inputs with the lowest RMSE of 0.346 were then trained with a random selection of 90% of the input and tested against the remaining 10% of the data. This process was repeated ten times. Mean results were then compared in terms of SD, MAE, and MSE ( Fig. 6 ).   It can be found that the temple-nose pair has the lowest SD (0.285), MAE (0.240), and MSE (0.086), so this input pair was selected as the optimal input. To further assess this selection, the SD and MAE were calculated after running the SpotOn prediction ten times on the Jupyter Notebook. The results show that if the Temple and Nose temperatures are used as temperature inputs, the SpotOn results can be predicted with a mean SD of ± 0.285 °C and MAE of 0.240 °C ( Figs. 7 ).

Discussion
According to previous studies, the eyes and nose ROI are the expected locations with similar temperatures to the core temperature, and calibration of the camera is needed [24][25][26] . The temple, nose, and eyes are the best locations for taking thermal images. The temple has the highest correlation with SpotOn, followed by eyes and then nose. However, by inputting paired features, particularly the temple -nose pair, the trained model predicts the SpotOn output with the lowest acceptable error, followed by the temple -eyes. Therefore, two photos of the individual (front and side view of the human face) were needed in order to predict core body temperature. It can be seen that by using two input temperatures, the prediction result is better. In contrast, if the user is required to take only one photo, a photo of either the temple or eyes is recommended as their results are only slightly higher than the results of the best pair. Our method has a mean SD of ± 0.285 °C and MAE of 0.240 °C compared with the SpotOn temperature readings.
Many countries have implemented the mass screening rule in response to the COVID-19 pandemic [27] . In the United States alone, Colorado, Delaware, Kansas, and ten other states recommended checking employee temperature at the workplace [28] . Traditional clinical monitoring system such as Spot-On is highly reliable at the cost of slow response time [29] . Infrared thermometers and thermal imaging cameras have the advantage of being instantaneous and contactless. Most of the non-contact devices directly measure facial temperature rather than core body temperature [30] .
When measuring the facial temperature distribution in subjects, there are limiting factors that could potentially impact the accuracy of measurement. For example, ambient temperature and interval time spent in the ambient temperature of the study area between the scans [ 31 , 32 ]. Any degree of anxiety about measurement could impact blood flow in facial areas, thus influencing the facial temperature [ 33 , 34 ]. Moreover, the subjects' clothing would likely affect the overall body temperature, including the facial area [35] . If the subject has done any exercises before the scanning, it would be better to consider the skin temperature together with heart rate [36] . In addition, some studies showed that skin pigmentation, such as applied cosmetics, could affect facial temperature distribution [ 37 , 38 ]. It would be relevant for future investigations to consider the use of surfaces with designated temperatures in the range of temperature with an accuracy of ± 0.1 °C to assist measurement accuracy [39][40][41] .
Dell'Isola et al. [42] have revealed that the overall uncertainty of non-contact body temperature measurement could be higher than the instrumental uncertainty due to additional uncertainties introduced by the procedure, the environmental conditions as well as the measuring conditions. The overall uncertainty is in the range of 0.40-0.62 °C depending on the subject's pre-procedure status (whether resting in an indoor environment or marching in an outdoor environment). In contrast, the uncertainty of measurement from contact devices such as SpotOn in controlled conditions is around 0.20 °C. In order to minimize the overall uncertainty for non-contact devices, a few practices could be established: set threshold references on specific body measuring sites such as temple, nose, and eyes; follow standardized measurement conditions and method; perform a two-stage measurement procedure starting by an initial non-contact measurement, and then followed by a contact body temperature measurement if the non-contact temperature reading needs further review.

Conclusion
In this study, a reliable method to predict human core body temperature was presented. The temple, nose, and eyes were selected to be the optimal sites for surface temperature measurement. Therefore, front and side photos of the individual faces were needed to predict core body temperature. Out of the five training models, the linear regression model had the lowest RMSE. By inputting paired features, particularly the temple -nose pair, the linear regression model could match the Spo-tOn output with SD of ± 0.285 °C and MAE of 0.240 °C. This means our method could generate measurements comparable to existing contact medical devices.

Ethics approval
The Health Research Authority (HRA and Health and Care Research Wales (HCRW)) in conjunction with the NHS Research Ethics Committee (York Teaching hospital, REC reference: 20/HRA/5162).

Declaration of Competing Interests
None declared.

Funding
This research was supported by the York Teaching Hospitals NHS Foundation Trust Elsie May Sykes Award (Charity number: 1170369-12).