Skip to main content
Elsevier - PMC COVID-19 Collection logoLink to Elsevier - PMC COVID-19 Collection
. 2022 May 14;123:104201. doi: 10.1016/j.infrared.2022.104201

Low-cost thermal imaging with machine learning for non-invasive diagnosis and therapeutic monitoring of pneumonia

Yingjie Qu a,1, Yuquan Meng b,1, Hua Fan c,, Ronald X Xu d,
PMCID: PMC9106596  PMID: 35599723

Abstract

Rapid screening and early treatment of lung infection are essential for effective control of many epidemics such as Coronavirus Disease 2019 (COVID-19). Recent studies have demonstrated the potential correlation between lung infection and the change of back skin temperature distribution. Based on these findings, we propose to use low-cost, portable and rapid thermal imaging in combination with image-processing algorithms and machine learning analysis for non-invasive and safe detection of pneumonia. The proposed method was tested in 69 subjects (30 normal adults, 11 cases of fever without pneumonia, 19 cases of general pneumonia and 9 cases of COVID-19) where both RGB and thermal images were acquired from the back of each subject. The acquired images were processed automatically in order to extract multiple location and shape features that distinguish normal subjects from pneumonia patients at a high accuracy of 93%. Furthermore, daily assessment of two pneumonia patients by the proposed method accurately predicted the clinical outcomes, coincident with those of laboratory tests. Our pilot study demonstrated the technical feasibility of portable and intelligent thermal imaging for screening and therapeutic assessment of pneumonia. The method can be potentially implemented in under-resourced regions for more effective control of respiratory epidemics.

Keywords: Thermal imaging, Machine learning, Diagnosis, Therapeutic monitoring, Pneumonia

1. Introduction

Pneumonia remains one of the most leading causes of morbidity and mortality over the world [1], [2], [3], particularly in under-resourced environments [4]. Since December 2019, the COVID-19 pandemic caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), has imposed a significant burden on the healthcare systems worldwide [5], [6], [7]. Early and rapid detection of respiratory disorders is essential to prevent their further transmission. Commonly used non-invasive imaging techniques for the diagnosis of pneumonia include chest X-ray (CXR) [8] and computed tomography (CT) [9]. While CXR and CT with advanced image processing and artificial intelligent (AI) algorithms are able to detect pneumonia with accuracy and spatial resolution [10], [11], [12], [13], they pose the potential radiation hazard, especially for babies and pregnant women [14]. Besides, the high cost and the poor portability of these equipment items have prevented their broad applications in under-resourced regions. Therefore, it is important to find a portable, low-cost, safe, non-invasive, and fast tool for pneumonia screening.

Infrared thermal imaging (TI) is a fast, non-invasive, cost-effective, and safe imaging technique that has been widely used in many clinical applications, such as early detection of breast cancer [15] and skin cancer [16]; assessment of burn depth [17]; and fever screening at public places during pandemics [18] such as severe acute respiratory syndrome (SARS) [19] and influenza A pandemic (H1N1) [20]. TI can create a visible image from the invisible infrared radiation emitted from the surface of the human body [21], which reveals the distribution of the skin temperature. It is known that skin temperature is a significant indicator of illness. Whether generalized or localized, the change in skin temperature is recognized as the presence of diseases [22]. This is because injury [23], infection [24], inflammation [25], or malignancy [26] is associated with localized vasodilation leading to tissue hyper-perfusion to the affected area and increased metabolic processes, all which lead to a higher emitted temperature. In a recent study [27], Wang et al. investigated the diagnostic accuracy of thermal imaging for focal pneumonia with chest X-ray as the gold standard, they found that the skin temperature of the lung mapping area on the back of patients with pneumonia increased significantly, and this temperature difference can be used to assist the diagnosis of pneumonia. Similar results can be found in the other study [28]. Rafael Y. Brzezinski et al. developed a non-invasive and portable thermal imaging tool to detect COVID-19 and lung injury based on the analysis of thermal images of back. Since TI is very sensitive for detecting small changes in the temperature distribution of the skin, which helps to access valuable information regarding the underlying physiological process causing diseases, it is a potentially new screening method to aid detection and monitoring of pneumonia including COVID-19.

Recently, machine learning (ML) methods have achieved state-of-the-art performance in a wide range of innovative applications of TI, such as livestock science [29], electric substation safety [30], advanced driver-assistance systems [31] and especially disease detection [32], [33]. During COVID-19 pandemic, TI based on ML has been employed to monitor the health conditions of people wearing masks by monitoring the respiratory systems. A Bidirectional Gate Recurrent Unit with an ATtention mechanism (BiGRU-AT) was applied to provide detection of abnormal breathing patterns with an accuracy of 83.69%, sensitivity of 90.23% and specificity of 76.31% [34]. Besides respiratory pathological patterns, a temperature asymmetry of 0.55°C between the lacrimal caruncle and the forehead through a random forest analysis was found to distinguish COVID-19 patients from healthy subjects with an accuracy of 82% [35]. Therefore, ML could constitute a suitable tool, to exploit both spatial and temporal TI features, potentially providing optimal classification performances.

In this manuscript, we developed advanced processing algorithms for thermal images of the back, captured by a portable thermal imager connected directly to a smartphone, to serve as a non-invasive tool for screening and treatment monitoring of pneumonia including COVID-19. Our proposed automated thermal imaging method is portable, low-cost, safe, and fast. It can be potentially used as an auxiliary diagnostic tool in the under-resourced regions to curb the spread of the COVID-19 epidemic.

2. Materials and Methods

In this section, the overview of the study, shown in Fig. 1 , will be discussed in detail. Specifically, the procedures for the experiment, including experiment subjects and data acquisition, are first documented. Then the data preprocessing as well as the feature selection criteria are presented. Finally, the machine learning methods implemented in the data analysis and classification are introduced.

Fig. 1.

Fig. 1

Overview of the study.

2.1. Subjects

The objective of this study is to test the clinical feasibility of thermal imaging and machine learning in pneumonia detection. We enrolled normal subjects, fever patients and suspicious pneumonia patients from the First Affiliated Hospital of University of Science and Technology of China. Subjects were excluded if they had congestive heart failure, skin disease or rheumatic disease of the back, or lung malignancy. All patients (fever patients and suspicious pneumonia patients) took thermal imaging at their first visit before receiving any specific medical treatment. The final used pneumonia thermal images were selected from the enrolled suspicious patients based on the CT scans and laboratory characteristics results with diagnosis of pneumonia. Eventually, 69 adult subjects, which consist of 12 females aged 19–64 years and 57 males aged 18–80 years, were recruited in the study, and divided into two groups: pneumonia negative group and pneumonia positive group. The pneumonia positive group comprised of 19 cases of general pneumonia aged 59 ± 24 years and 9 cases of COVID-19 aged 59 ± 14 years. The pneumonia negative group included 30 normal adults aged 44 ± 17 years and 11 cases of fever without pneumonia aged 55 ± 16 years. Except age, the height and weight of all subjects were recorded to calculate their body mass index (BMI). As shown in Table 1 , each subject has similar BMI. The use of human subject in this study was approved by the ethics committee of the First Affiliated Hospital of University of Science and Technology of China with the reference number 2020-KY645, and all subjects provided their written informed consent.

Table 1.

Basic information of all subjects.

Pneumonia Negative
Pneumonia Positive
Normal Fever General Pneumonia COVID-19
Number of Subjects 30 11 19 9
Age 44 ± 17 55 ± 16 59 ± 24 59 ± 14
BMI 24 ± 3 23 ± 4 23 ± 6 23 ± 2

2.2. Clinical data acquisition

Given that infrared radiation emitted from skin surface depends on several environmental factors like surrounding temperature, humidity, and the physiological condition of subjects[36], it is therefore essential to perform the medical thermal imaging experiments in a controlled environment and at a similar time. Our experiments were performed in the morning and in a climate control room with temperature and humidity respectively ranging from 23°C to 24°C and 45–55% and without direct sunlight or air flow. Before starting the experiment, subjects were required to wait for 5–10 min so as to get used to the temperature of the room. Then, they were asked to remove their clothing to expose the back and sit still on a chair. In our study, we used a FILR ONE pro thermal imager directly connecting to an Android smartphone to acquire the back images of each subject. The FILR ONE pro thermal imager is low-cost and portable and can detect signals over the spectral range of 8–14 μm. In addition, its detecting temperature ranges from −20°C to 400°C with a temperature resolution of 0.1°C. Moreover, this thermal imager contains two cameras, which can capture a RGB image with image resolution of 1440 × 1080 pixels and a thermal image with image resolution of 160 × 120 pixels of the object at the same time. Hence, two back images including a RGB image, and a thermal image were captured for each subject. The subject is 1 m distance away from the detector, as presented in Fig. 2 .

Fig. 2.

Fig. 2

(a) schematic diagram of thermal imaging system for pneumonia screening. (b) procedures of feature selections.

To characterize the pneumonia and develop viable classification models, it is necessary to perform feature selection to reduce dimensionality of raw data. According to Fig. 3 , normal subjects, general pneumonia patients and fever patients show characteristic patterns in the region around temperature maxima. Specifically, a high temperature region congregates around spines for normal subjects, while this region lies around the lung area for pneumonia patients. And for the fever patients, the high temperature regions have no clear correlation with the lung or the spine. For the sake of quantification, the high temperature region should be defined. In this work, we chose two temperature bands with bandwidth of 1 Celsius as the region of interest (ROI). Those two temperature bands are referred to as high temperature region and sub-high temperature region defined in the Step 3 below. It is worth mentioning that the bandwidth is selected as 1 Celsius simply for convenience. The formal feature selection procedures, as illustrated in Fig. 2(b), can be found below:

  • Step 1: Finding the maximal temperature of each thermal image, denoted by Tmax.

  • Step 2: Marking the lung region in the corresponding RGB image by experienced practitioners.

  • Step 3: Locating the region in the thermal image where the temperature is ranging from Tmax-1 to Tmax (such region is named high temperature region for convenience) as well as the region from Tmax-2 to Tmax-1 (such region is referred to as sub-high temperature region).

  • Step 4: Extracting the temperature in the overlapping area of step 2 and step 3.

  • Step 5: Calculating the indices respectively for high temperature region and sub-high temperature region, defined in Table 3.

  • Step 6: Performing Principal Component Analysis (PCA) to the indices.

Fig. 3.

Fig. 3

Typical examples of thermal imaging results of one normal person, one pneumonia patient and one fever patient without pneumonia. (a) thermal imaging result of one normal person; (b) thermal imaging result of one pneumonia patient shows temperature increases (red or white areas) in both right and left lung; (c) thermal imaging result of one fever patient without pneumonia.

2.3. Machine Learning Models

The extracted indexes are then subject to data analysis for characterizing pneumonia. To do so, different machine learning models are employed on thermal images of patients in healthy state, general pneumonia, and fever for pneumonia differentiation and for ease of monitoring of recovery phases. The classification models involved in this study are support vector machine (SVM), K-nearest neighbor (KNN), decision tree, Gaussian Naïve Bayes classifier, linear or quadratic discriminant analysis (LDA and QDA). In this study, depending on the types of labels, binary classification (pneumonia/normal or pneumonia positive/negative) and multiclass classification problem (pneumonia/fever/normal) will be achieved. All the programs are written in Python. Leave-one-out cross validation is performed to the dataset for training and testing. The brief introduction of applying each model to the collected data is presented as following.

2.3.1. Support Vector Machine

Support vector machine (SVM) is a supervised learning model which has been widely adopted in classification and regression problem. The basic idea of SVM is to find a hyperplane to maximize the distance to the dataset. In binary classification, the dataset D={(x1,y1),(x2,y2),,(xn,yn)},yi{-1,+1} comprises of the indexes extracted from thermal images and the corresponding labels. Then the hyperplane satisfies:

w,x+b=0

where w denotes normal vector of the hyperplane, and b is the offset. ·,· represents inner product. If w,x+b>0, then the output yi^=+1, otherwise, the output yi^=-1.

The goal of training SVM is to optimize the margin, which is defined as the summation of distance from support vectors in different classes to the hyperplane, i.e.,

maxw,b2||w||yiw,x+b1

Above method can be generalized to nonlinear problem, where the dataset is not linearly divided. In such case, the kernel functions are introduced to replace inner product. The commonly chosen kernel functions include:

  • polynomial kernel:
    K(x,y)=((x,y)+1)d.
  • RBF kernel:
    K(x,y)=exp-x-y22σ02.

When dealing with multiclass problems, the one-vs-one or one-vs-rest strategies are utilized. In one-vs-one, multiple SVM classifiers are trained to differentiate all possible pairs of classes whereas in one-vs-rest, the classifiers are to distinguish each class with respect to the entity of all remaining classes.

In SVM, per-class probabilities for each sample can be estimated by the logistic regression. The basic form of logistic regression for binary classification is:

logist(x)=11+exp(-x)

By fitting an additional cross-validation on the training set, the output of logist, which lies between 0 and 1, is the probability. In our study, such probability is used for assessing the likelihood of the patient’s suffering pneumonia and also used for recovery monitoring.

2.3.2. K-Nearest Neighbors

K-Nearest neighbors algorithm is a non-parametric learning model, where the prediction is only determined by the labels of nearest data points. Since the model relies on the distance between the target and the dataset, normalization of the features, such that each feature is in the same scale, will lead to a boost in performance. In this algorithm, an integer N is first selected (usually 5). Then prediction of a certain data point is based on the highest votes among K closest data points in the training set.

Consider binary classification (pneumonia/normal), assuming the training dataset is D={(x1,y1),(x2,y2),,(xn,yn)},yi{-1,+1}. By sorting the elements with respect to a certain norm ||·||, we get {(x(1),y(1)),(x(2),y(2)),,(x(n),y(n))} such that ||x(1)-x||||x(n)-x||. The target label y^ of input x is determined by the majority of first K labels.

Euclidean distance is usually selected as the criterion in the algorithm. When the variables are discrete, e.g. text recognition, Pearson coefficient or other distances are usually adopted [37]. In addition, some modern KNN algorithms, e.g. Large Margin Nearest Neighbor (LMNN) or Neighborhood components analysis (NCA) can automatically optimize and redesign the choice of measure.

2.3.3. Decision tree

Decision tree is widely used in data mining, decision analysis et al. In this study, decision tree can distinguish pneumonia data well since it has high interpretability while not sacrificing accuracy. By establishing a tree-structure, the decision-making process is visualized, and the label is determined by querying the value of each index until the leaf node. During training process, the essential knowledge of indexes is purified by branching and calculating the entropy. Such model is hierarchical, and the classification rules are clear by identifying the path from the root to leaf.

The procedures for performing decision tree on pneumonia data can be summarized as:

  • Identifying the types of each index.

  • Deciding the index for the current branch.

  • Finding the optimal threshold for querying the certain feature by evaluating information gain.

  • Repeating the above steps until reaching the leaf node.

The information entropy is commonly adopted to determine the feature and threshold in branching. Assuming N class, the definition is

HN(D)=-i=12pilog10pi

where pi denotes the ratio of data occupying ith class in the current dataset D. Smaller value of HN(D) represents higher purification of current branching. Assume a feature is discrete, and collection of values are in {x1,x2,,xm}. Let Di represents the quantity of sample whose value of such feature is xi. Then by entropy, the information gain is

Gain(D)=HN(D)-i=1mDiDHN(Di)

By comparing the information gain of each index, the optimal division is determined, and finally, the label, e.g., pneumonia or normal, can be obtained.

2.3.4. Discriminant Analysis

Proposed by Ronald A. Fisher in 1936, linear discriminant analysis (LDA) is an important statistical method, which is commonly adopted in classification or dimensionality reduction. The goal of LDA is to transform the pneumonia data onto the low dimensional space, such that the transformed data set is linearly separatable. LDA has the advantages of avoiding over-fitting and low computational cost. QDA (quadratic discriminant analysis) and Gaussian Naïve Bayes classifier are the variants of LDA. The difference between three models is the simplification of the covariance matrix. The brief introduction of discriminant analysis is shown below:

Considering a multi-class problem, for each sample x,

P(y=k|x)=P(y=k)P(x|y=k)P(x)

where k is the label. Assuming P(x|y=k) satisfies Gaussian distribution, it holds that

P(x|y=k)=1(2π)d|Σk|2exp-12(x-μk)tΣk-1(x-μk)

where d is the dimension of x,Σk,μk represent covariance matrix and mean vector of class k respectively. Then,

logP(y=k|x)=-12log|Σk|-12(x-μk)tΣk-1(x-μk)+logP(y=k)+C

The constant C is independent to the class k. In QDA, logP(y=k|x) is obtained by estimating Σk without simplification. In particular, Gaussian Naïve Bayes classifier is a special case where the covariance matrix Σk is assumed to be diagonal. Different from QDA and Gaussian Naïve Bayes, it is assumed in LDA that all classes k share the same covariance matrix, i.e.,

logP(y=k|x)=-12log|Σ|-12(x-μk)tΣ-1(x-μk)+logP(y=k)+C

Therefore,

logP(y=k|x)=-aktx+bk+C

where ak=Σ-1μk,bk=-12μktΣ-1μk+logP(y=k).

The choice of models heavily depends on the basic structure of dataset, i.e., the correlation between different indexes of thermal images. In this study, LDA, QDA and Gaussian Naïve Bayes model are all implemented for comparison.

3. Results

In this section, a culmination of all the experimental tests were presented. Specifically, the classification results using different machine learning models to distinguish pneumonia patients from other subjects and the monitoring results during treatment of one recovered pneumonia patient and one unrecovered pneumonia patient.

3.1. Detection of pneumonia patients

Here, we confirmed and validated the ability of our proposed method to distinguish pneumonia patients from other subjects in three different settings using different machine learning models, as shown in Table 2 . The first setting is a two-classification including normal subjects (n = 30) and pneumonia positive patients (n = 28). All the six machine learning models performed well. For examples, SVM, KNN and Decision tree even achieved a high accuracy more than 90%. However, except pneumonia, fever may also alter the thermal patterns of back from normal by increasing the absolute temperature of the back. Thereby, introducing potential confounding factors to the analysis, the second setting is a two-classification including pneumonia negative patients (n = 41) and pneumonia positive patients (n = 28). Both SVM and Gaussian NB got an accuracy more than 80%. However, the rest models only got an accuracy between 70% and 80%. The last setting is a three-classification including normal subjects (n = 30), fever patients without pneumonia (n = 11), and pneumonia negative patients (n = 28). Compared to the results from the first and second setting, all six models didn’t show good performance in the third setting. Only SVM and Gaussian NB had an accuracy more than 70%. The other methods had an accuracy between 60% to 70%. This is probably because there is no clear boundary for back thermal images between normal person and fever patient. In fact, the temperature change of fever patient is not always reflected on the back thermal images. It may be difficult to differentiate the patients with low-grade fever and normal people. In addition, it is worthwhile to mention that the performance for four-class classification (normal/fever/general pneumonia/Covid-19) is poor. This is because the back thermal images for general pneumonia and Covid-19 have little difference. Overall, SVM had the best performance in the three settings among all six models. Therefore, we used SVM model to monitor the recovery of two pneumonia patients during treatment.

Table 2.

Classification results based on different machine learning models. Compared with other methods, SVM shows the best performance. Note: The pneumonia negative group includes 30 normal adults and 11 cases of fever without pneumonia. The pneumonia positive group comprised of 19 cases of general pneumonia and 9 cases of COVID-19.

Classification Accuracy
Norm vs. Pneu Pos Pneu Pos vs. Pneu Neg Norm vs. Fever vs. Pneu Pos
SVM 93% 86% 81%
KNN 91% 78% 68%
Decision tree 93% 78% 70%
Gaussian NB 90% 83% 75%
LDA 86% 71% 67%
QDA 85% 75% 65%

3.2. Monitoring of pneumonia patients

After validating the feasibility of our method to distinguish pneumonia patients from other subjects, we also verified the ability of this method to monitor the recovery of pneumonia patients during treatment. Fig. 4 showed the thermal imaging results during a 3-day therapy for a patient recovered from general pneumonia. And Fig. 5 presented the thermal imaging results during a 4-day therapy for a patient failed to recover from general pneumonia. According to Fig. 4, the areas of temperature maxima shrink, shift from the lung areas to the spine areas from day 1 to day 3, and from a pneumonia temperature pattern to a normal temperature pattern, indicating the recovery of pneumonia. However, in Fig. 5, the areas of temperature maxima didn’t change significantly from day 1 to day 4, indicating the failure of recovery from pneumonia. Our results of the two pneumonia patients were coincident with their clinical therapeutic assessments based on daily laboratory test results.

Fig. 4.

Fig. 4

Typical examples of one recovered pneumonia patient after 3-days therapy. The thermal imaging images were taken from day 1 to day 3.

Fig. 5.

Fig. 5

Typical examples of one unrecovered pneumonia patient after 4-days therapy. The thermal imaging images were taken from day 1 to day 4.

For further quantification, we used three SVM models based on three different classification settings to assess the probability of pneumonia of two panumonia patients during treatment. The first model was a SVM model based on a two-classification including normal subjects (n = 30) and pneumonia positive patients (n = 28). Fig. 6 (a) showed the plot of pneumonia probability of all subjects. The blue marker represented normal subjects, whose pneumonia probability were almost all around 0. The red marker represented pneumonia positive patients, whose pneumonia probability were almost all above 0.9. Fig. 6(b) was the plot of pneumonia probability of one recovered pneumonia patient after 3-days therapy. The probability of pneumonia decreased from day 1 to day 3, which was from 0.96 to 0.31 indicating the recovery of the patient. Fig. 6(c) was the plot of pneumonia probability of one unrecovered pneumonia patient after 4-days therapy. The probability of pneumonia almost matained above 0.9 from day 1 to day 4, indicating the unrecovery of the patient. The second model was a SVM model based on a two-classification including pneumonia negative patients (n = 41) and pneumonia positive patients (n = 28). Fig. 7 (a) showed the plot of pneumonia probability of all subjects. The blue marker represented pneumonia negative subjects, whose pneumonia probability were almost all under 0.2. The red marker represented pneumonia positive patients, whose pneumonia probability were almost all above 0.8. Compared to Fig. 6(a), the number of false points increased in Fig. 7(a). Fig. 7(b-c) were the plot of pneumonia probability of one recovered pneumonia patient after 3-days therapy and one unrecovered pneumonia patient after 4-days therapy, respectively. Similar trend in Fig. 6(b-c) can be found in Fig. 7(b-c). However, the value of the probability of pneumonia decreased in Fig. 7(b-c). The third model was a SVM model based on a three-classification including normal subjects (n = 30), fever patients without pneumonia (n = 11), and pneumonia negative patients (n = 28). Fig. 8 (a) showed the plot of pneumonia probability of all subjects. The blue marker represented normal subjects, whose pneumonia probability were almost all under 0.2. The cyan maker represented fever patients without pneumonia. Though most of the fever patients had a low pneumonia probability under 0.4, two fever patients were above 0.5 and one fever patient was around 0.5, which were the false points. The red marker represented pneumonia positive patients, whose pneumonia probability were almost all above 0.8. Fig. 8(b-c) were the plot of pneumonia probability of one recovered pneumonia patient after 3-days therapy and one unrecovered pneumonia patient after 4-days therapy, respectively. Similar trend in Fig. 8(b-c) can be found in Fig. 6(b-c) and Fig. 7(b-c). However, the value of the probability of pneumonia decreased in Fig. 8(b-c), compared to Fig. 6(b-c), and Fig. 7(b-c).

Fig. 6.

Fig. 6

Plots of pneumonia probability by SVM model based on normal and pneumonia. (a) Plot of pneumonia probability of all subjects. (b) Plot of pneumonia probability of one recovered pneumonia patient after a 3-day therapy. (c) Plot of pneumonia probability of one unrecovered pneumonia patient after a 4-day therapy.

Fig. 7.

Fig. 7

Plots of pneumonia probability by SVM model based on pneumonia positive and pneumonia negative. (a) Plot of pneumonia probability of all subjects. (b) Plot of pneumonia probability of one recovered pneumonia patient after 3-days therapy. (c) Plot of pneumonia probability of one unrecovered pneumonia patient after 4-days therapy.

Fig. 8.

Fig. 8

Plots of pneumonia probability by SVM model based on normal, fever and pneumonia positive. (a) Plot of pneumonia probability of all subjects. (b) Plot of pneumonia probability of one recovered pneumonia patient after 3-days therapy. (c) Plot of pneumonia probability of one unrecovered pneumonia patient after 4-days therapy.

4. Discussions

Current efforts to use thermal imaging in the fight against the COVID-19 pandemic have focused primarily on measuring absolute body temperature and screening for individuals with fever in crowded settings. However, these attempts have demonstrated limited effectiveness. Our innovative approach to extract advanced location and shape features from the thermal image other than absolute body temperature value, could help improve these screening tools and aid in the diagnosis of acute inflammatory changes in deep tissues, such as lung infection. We designed this study to determine if the thermal pattern of the back could be used as a diagnostic marker of pneumonia including COVID–19.

The thermal pattern is outlined by the high temperature region whose temperature ranges from Tmax-1 to Tmax. As shown in Fig. 3, significant differences were found between the normal, fever and pneumonia groups for the thermal patterns on the back, indicating its powerful discriminatory capacity to detect pneumonia. Though 1 degree Celsius difference in temperature is remarkable for human bodies, the temperature distribution outside of 1 degree Celsius may also have contribution to differentiating pneumonia. Hence, except the high temperature regions, we also defined a sub-high temperature region (Tmax-2 to Tmax-1) to expand the interested temperature region so that a significantly broader range of temperature distribution is considered.

Before performing the machine learning models, several indices (defined in Table 3) are proposed in this work to characterize the thermal patterns. For the sake of understanding the contribution of indices in diagnostics, feature ranking algorithm should be leveraged. Regarding this, we adopted permutation feature importance algorithm which randomly shuffles one feature value each time and then evaluates the model performance. Fig. 9 shows some top-ranked features, among which the standard deviation of lung temperature is the most important one. This agrees with our observation that the lung temperature variation in the patients with pneumonia is much larger than normal people or fever patients. Besides Sr, the area ratio index, distance index and torque index are similarly important.

Fig. 9.

Fig. 9

Ranking of top feature importance. The feature importance is evaluated based on SVM models.

Although the thermal images used for classification were taken before the patients’ undergoing any medical treatment, the thermal patterns of the skin may be influenced by age, gender and BMI differences. Therefore, these factors should be taken into account. In our study, all the enrolled subjects have similar BMI. However, pneumonia positive group is older than the normal group and the number of females is much smaller than the number of males. Therefore, future studies should take these into account and control as much as possible the effect of age and gender factors and the effect of medication on thermal patterns of the back.

Though the results of detection and monitoring of pneumonia patients were promising, there are several limitations. First, the sample size is not very large, and the cases of fever patients without pneumonia and the cases of COVID–19 patients are limited. As a preliminary study, the relatively high accuracy classification results and two typical monitoring results can reveal the feasibility of our method to distinguish pneumonia patients from other subjects and monitor the recovery of pneumonia treatment. However, a lager sample size with other will be needed for further validation of the clinical performance in the future. Secondly, due to the limitation of the cases of COVID–19, we didn’t analyze the difference between general pneumonia and COVID–19. So, after increasing the number COVID–19 patients, further analysis will be conducted. Thirdly, the lung and spine areas were marked manually by an experienced respiratory doctor before feature extraction, which may introduce variations. Therefore, in the future, we may use deep learning methods to mark the lung and spine areas automatically.

5. Conclusions

In this manuscript, we present a low-cost, portable, safe, and non-invasive thermal imaging method to aid diagnosis and monitoring of pneumonia based on a dual-mode thermal imager, which can record both RGB and thermal images of the back of each subject. In our method, we first used novel image processing algorithms to extract multiple location and shape features of the thermal images automatically and then applied machine learning analysis to achieve good performance on detection of pneumonia. For examples, a high accuracy of 93% in a two-classification setting including normal subjects (n = 30) and pneumonia positive patients (n = 28), a high accuracy of 86% a in a two-classification setting including pneumonia negative patients (n = 41) and pneumonia positive patients (n = 28), and a relatively high accuracy of 81% in a three-classification setting including normal subjects (n = 30), fever patients without pneumonia (n = 11), and pneumonia negative patients (n = 28). In addition, the monitoring results of two pneumonia patients by our method during treatment were consistent with their clinical results based on laboratory characteristics. Hence, our proposed method may facilitate the screening of people to detect and monitor pneumonia in real time, especially in low-income regions with limited imaging resources, which can help limit the spread of COVID-19. However, despite the very promissory results of our pilot study, more extensive trials are required to confirm our findings and validate them. Future studies should focus on determining whether the thermal patterns we identified can be used to discriminate between general pneumonia patients and COVID-19 patients.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Appendix A. Description of Indices Used in the Study

The following table summarizes the indices extracted from thermal imaging for the machine learning.

Table 3.

Definition and calculation of indices.

Index Symbol Description
Area ratio index of left lung Rl AH,lAl
Area ratio index of right lung Rr AH,rAr
Temperature index of left lung Tl average Ti of the left lung
Temperature index of right lung Tr average Ti of the right lung
Standard deviation of left lung Sl std of Ti of the left lung
Standard deviation of right lung Sr std of Ti of the right lung
Distance index of left lung Pl i=1AH,l(dl,spine)iAH,l×A
Distance index of right lung Pr i=1AH,r(dr,spine)iAH,r×A
Torque index of left lung Ml i=1AH,l(dl,spine)i·TiAH,l×A
Torque index of right lung Mr i=1AH,r(dr,spine)i·TiAH,r×A
H–L y index of left lung Wyl (CH,l)x-(Cl)xA
H–L y index of right lung Wyr (CH,r)x-(Cr)xA
H–L x index of left lung Wxl (CH,l)y-(Cl)yA
H–L x index of right lung Wxr (CH,r)y-(Cr)yA
Maximal spine temperature Spmax max temperature of spine
Average spine temperature Spavg average temperature of the spine

The explanations of some indices are:

  • Rl/Rr: the percentage of area of high temperature regions in left/right lung region.

  • Tl/Tr: the average temperature of left/right lung.

  • Sl/Sr: standard deviation of temperature distribution in left/right lung.

  • Pl/Pr: the normalized distance between the centroid of high temperature region in left/right lung to the spine. The factor A is for normalization to eliminate the influence of lung size or the angle and distance when capturing the thermal images.

  • Ml/Mr: the normalized weighted temperature of high temperature region in left/right lung. This index is conceptually an extension of the torque in physics.

  • Wxl/Wxr/Wyl/Wyr: the normalized distance between the centroid of high temperature region and lung region. x/y means the x or y-axis coordinate. The index name H–L is short for high temperature region to lung region.

  • AH,l/AH,r: total number of pixels in high temperature region of left/right lung

  • A: total number of pixels of both lungs

  • Al/Ar: total number of pixels of left/right lung

  • (dl,spine)i/(dr,spine)i: distance from the pixels in left/right lung to the spine

  • CH,l/CH,r: coordinate of the centroid of left/right lung’s high temperature region

References

  • 1.Troeger C., Forouzanfar M., Rao P.C., Khalil I., Brown A., Swartz S., Fullman N., Mosser J., Thompson R.L., Reiner R.C., Jr, et al. Estimates of the global, regional, and national morbidity, mortality, and aetiologies of lower respiratory tract infections in 195 countries: a systematic analysis for the global burden of disease study 2015. Lancet. Infect. Dis. 2017;17(11):1133–1161. doi: 10.1016/S1473-3099(17)30396-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Htun T.P., Sun Y., Chua H.L., Pang J. Clinical features for diagnosis of pneumonia among adults in primary care setting: a systematic and meta-review. Scientific reports. 2019;9(1):1–10. doi: 10.1038/s41598-019-44145-y. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Shi T., Denouel A., Tietjen A.K., Lee J.W., Falsey A.R., Demont C., Nyawanda B.O., Cai B., Fuentes R., Stoszek S.K., et al. Global and regional burden of hospital admissions for pneumonia in older adults: a systematic review and meta-analysis. The Journal of infectious diseases. 2020;222(Supplement_7):S570–S576. doi: 10.1093/infdis/jiz053. [DOI] [PubMed] [Google Scholar]
  • 4.Nair H., Simões E.A., Rudan I., Gessner B.D., Azziz-Baumgartner E., Zhang J.S.F., Feikin D.R., Mackenzie G.A., Moiïsi J.C., Roca A., et al. Global and regional burden of hospital admissions for severe acute lower respiratory infections in young children in 2010: a systematic analysis. The Lancet. 2013;381(9875):1380–1390. doi: 10.1016/S0140-6736(12)61901-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Wu Z., McGoogan J.M. Characteristics of and important lessons from the coronavirus disease 2019 (covid-19) outbreak in china: summary of a report of 72 314 cases from the chinese center for disease control and prevention. Jama. 2020;323(13):1239–1242. doi: 10.1001/jama.2020.2648. [DOI] [PubMed] [Google Scholar]
  • 6.Mehra M.R., Desai S.S., Kuy S., Henry T.D., Patel A.N. Cardiovascular disease, drug therapy, and mortality in covid-19. N. Engl. J. Med. 2020;382(25):e102. doi: 10.1056/NEJMoa2007621. [DOI] [PMC free article] [PubMed] [Google Scholar] [Retracted]
  • 7.Lai C.-C., Shih T.-P., Ko W.-C., Tang H.-J., Hsueh P.-R. Severe acute respiratory syndrome coronavirus 2 (sars-cov-2) and coronavirus disease-2019 (covid-19): The epidemic and the challenges. International journal of antimicrobial agents. 2020;55(3):105924. doi: 10.1016/j.ijantimicag.2020.105924. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Speets A., Hoes A., Van Der Graaf Y., Kalmijn S., Sachs A., Mali W.T.M. Chest radiography and pneumonia in primary care: diagnostic yield and consequences for patient management. Eur. Respir. J. 2006;28(5):933–938. doi: 10.1183/09031936.06.00008306. [DOI] [PubMed] [Google Scholar]
  • 9.Homayounieh F., Rockenbach M.A.B.C., Ebrahimian S., Khera R.D., Bizzo B.C., Buch V., Babaei R., Mobin H.K., Mohseni I., Mitschke M., et al. Multicenter assessment of ct pneumonia analysis prototype for predicting disease severity and patient outcome. J. Digit. Imaging. 2021:1–10. doi: 10.1007/s10278-021-00430-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Wang B., Jin S., Yan Q., Xu H., Luo C., Wei L., Zhao W., Hou X., Ma W., Xu Z., et al. Ai-assisted ct imaging analysis for covid-19 screening: Building and deploying a medical ai system. Applied Soft Computing. 2021;98:106897. doi: 10.1016/j.asoc.2020.106897. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Serte S., Demirel H. Deep learning for diagnosis of covid-19 using 3d ct scans. Computers in biology and medicine. 2021;132:104306. doi: 10.1016/j.compbiomed.2021.104306. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Salvatore C., Interlenghi M., Monti C.B., Ippolito D., Capra D., Cozzi A., Schiaffino S., Polidori A., Gandola D., Alì M., et al. Artificial intelligence applied to chest x-ray for differential diagnosis of covid-19 pneumonia. Diagnostics. 2021;11(3):530. doi: 10.3390/diagnostics11030530. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Ibrahim A.U., Ozsoz M., Serte S., Al-Turjman F., Yakoi P.S. Pneumonia classification using deep learning from chest x-ray images during covid-19. Cognitive Computation. 2021:1–13. doi: 10.1007/s12559-020-09787-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Ceniccola G.D., Castro M.G., Piovacari S.M.F., Horie L.M., Corrêa F.G., Barrere A.P.N., Toledo D.O. Current technologies in body composition assessment: advantages and disadvantages. Nutrition. 2019;62:25–31. doi: 10.1016/j.nut.2018.11.028. [DOI] [PubMed] [Google Scholar]
  • 15.Kandlikar S.G., Perez-Raya I., Raghupathi P.A., Gonzalez-Hernandez J.-L., Dabydeen D., Medeiros L., Phatak P. Infrared imaging technology for breast cancer detection–current status, protocols and new directions. Int. J. Heat Mass Transf. 2017;108:2303–2320. [Google Scholar]
  • 16.Magalhaes C., Vardasca R., Mendes J. Recent use of medical infrared thermography in skin neoplasms. Skin Research and Technology. 2018;24(4):587–591. doi: 10.1111/srt.12469. [DOI] [PubMed] [Google Scholar]
  • 17.Ganon S., Guédon A., Cassier S., Atlan M. Contribution of thermal imaging in determining the depth of pediatric acute burns. Burns. 2020;46(5):1091–1099. doi: 10.1016/j.burns.2019.11.019. [DOI] [PubMed] [Google Scholar]
  • 18.Perpetuini D., Filippini C., Cardone D., Merla A. An overview of thermal infrared imaging-based screenings during pandemic emergencies. International Journal of Environmental Research and Public Health. 2021;18(6):3286. doi: 10.3390/ijerph18063286. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Chiu W., Lin P., Chiou H., Lee W., Lee C., Yang Y., Lee H., Hsieh M., Hu C., Ho Y., et al. Infrared thermography to mass-screen suspected sars patients with fever. Asia Pacific Journal of Public Health. 2005;17(1):26–28. doi: 10.1177/101053950501700107. [DOI] [PubMed] [Google Scholar]
  • 20.Nishiura H., Kamiya K. Fever screening during the influenza (h1n1-2009) pandemic at narita international airport, japan. BMC infectious diseases. 2011;11(1):1–11. doi: 10.1186/1471-2334-11-111. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.J.P. Gore, L.X. Xu, Thermal imaging for biological and medical diagnostics, in: Biomedical Photonics Handbook, CRC Press, 2014, pp. 540–553.
  • 22.Anbar M. Clinical thermal imaging today. IEEE Eng. Med. Biol. Mag. 1998;17(4):25–33. doi: 10.1109/51.687960. [DOI] [PubMed] [Google Scholar]
  • 23.I. Fernández-Cuevas, J.A. Lastras, V.E. Galindo, P.G. Carmona, Infrared thermography for the detection of injury in sports medicine, in: Application of infrared thermography in sports science, Springer, 2017, pp. 81–109.
  • 24.Montalto M., Davies F., Marijanovic N., Meads A. Skin surface temperature: a possible new outcome measure for skin and soft tissue infection. Australian family physician. 2013;42(9):653–657. [PubMed] [Google Scholar]
  • 25.Guo H., Li Z., et al. Application of medical infrared thermal imaging in the diagnosis of human internal focus. Infrared Physics & Technology. 2019;101:127–132. [Google Scholar]
  • 26.Godoy S.E., Hayat M.M., Ramirez D.A., Myers S.A., Padilla R.S., Krishna S. Detection theory for accurate and non-invasive skin cancer diagnosis using dynamic thermal imaging. Biomedical optics express. 2017;8(4):2301–2323. doi: 10.1364/BOE.8.002301. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Wang L.T., Cleveland R.H., Binder W., Zwerdling R.G., Stamoulis C., Ptak T., Sherman M., Haver K., Sagar P., Hibberd P. Similarity of chest x-ray and thermal imaging of focal pneumonia: a randomised proof of concept study at a large urban teaching hospital. BMJ open. 2018;8(1):e017964. doi: 10.1136/bmjopen-2017-017964. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Brzezinski R.Y., Rabin N., Lewis N., Peled R., Kerpel A., Tsur A.M., Gendelman O., Naftali-Shani N., Gringauz I., Amital H., et al. Automated processing of thermal imaging to detect covid-19. Scientific Reports. 2021;11(1):1–10. doi: 10.1038/s41598-021-96900-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Pacheco V.M., de Sousa R.V., da Silva Rodrigues A.V., de Souza Sardinha E.J., Martello L.S. Thermal imaging combined with predictive machine learning based model for the development of thermal stress level classifiers. Livestock Science. 2020;241:104244. [Google Scholar]
  • 30.Singh L., Alam A., Kumar K.V., Kumar D., Kumar P., Jaffery Z.A. Design of thermal imaging-based health condition monitoring and early fault detection technique for porcelain insulators using machine learning. Environmental Technology & Innovation. 2021;24:102000. [Google Scholar]
  • 31.Cardone D., Perpetuini D., Filippini C., Spadolini E., Mancini L., Chiarelli A.M., Merla A. Driver stress state evaluation by means of thermal imaging: A supervised machine learning approach based on ecg signal. Applied Sciences. 2020;10(16):5673. [Google Scholar]
  • 32.R. Vardasca, C. Magalhaes, J. Mendes, Biomedical applications of infrared thermal imaging: current state of machine learning classification, in: Multidisciplinary Digital Publishing Institute Proceedings, Vol. 27, 2019, p. 46.
  • 33.Filippini C., Cardone D., Perpetuini D., Chiarelli A.M., Gualdi G., Amerio P., Merla A. Convolutional neural networks for differential diagnosis of raynaud’s phenomenon based on hands thermal patterns. Applied Sciences. 2021;11(8):3614. [Google Scholar]
  • 34.Jiang Z., Hu M., Gao Z., Fan L., Dai R., Pan Y., Tang W., Zhai G., Lu Y. Detection of respiratory infections using rgb-infrared sensors on portable device. IEEE Sens. J. 2020;20(22):13674–13681. doi: 10.1109/JSEN.2020.3004568. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Martinez-Jimenez M.A., Loza-Gonzalez V.M., Kolosovas-Machuca E.S., Yanes-Lane M.E., Ramirez-GarciaLuna A.S., Ramirez-GarciaLuna J.L. Diagnostic accuracy of infrared thermal imaging for detecting covid-19 infection in minimally symptomatic patients. European journal of clinical investigation. 2021;51(3):e13474. doi: 10.1111/eci.13474. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Ng E.Y., Kawb G., Chang W. Analysis of ir thermal imager for mass blind fever screening. Microvasc. Res. 2004;68(2):104–109. doi: 10.1016/j.mvr.2004.05.003. [DOI] [PubMed] [Google Scholar]
  • 37.Pearson K. Notes on regression and inheritance in the case of two parents proceedings of the royal society of london. 1895;58:240–242. [Google Scholar]

Articles from Infrared Physics & Technology are provided here courtesy of Elsevier

RESOURCES