key: cord-0286524-bd34s7bd authors: Maurya, Aniket title: Predicting intubation support requirement of patients using Chest X-ray with Deep Representation Learning date: 2020-10-28 journal: nan DOI: 10.13140/rg.2.2.18271.69282 sha: bb1290c002039b193df6173190116aab9ad5821a doc_id: 286524 cord_uid: bd34s7bd Recent developments in medical imaging with Deep Learning presents evidence of automated diagnosis and prognosis. It can also be a complement to currently available diagnosis methods. Deep Learning can be leveraged for diagnosis, severity prediction, intubation support prediction and many similar tasks. We present prediction of intubation support requirement for patients from the Chest X-ray using Deep representation learning. We release our source code publicly at https://github.com/aniketmaurya/covid-research. According to [who, 2014] the world is to see a short of 12.9 million health-care workers by 2035. This problem of shortage of medical experts and medical equipment is more visible in this COVID-19 pandemic [Byatnal, 2020] [Ranney et al., 2020] . COVID-19 test result time has not improved much to help slow the spread of the virus [Stein, 2020] . There is an urgent need to upgrade the current healthcare system with recent technology advancements [who, 2020] . Approximately 3.2% of COVID-19 patients required intubation and invasive ventilation support in some point of their illness [Meng et al., 2020] . Sometimes COVID-19 patients crash suddenly and require immediate care for intubation and ventilation [Strickland, 2020] . Providing intubation can put infection risk to the provider and every person in the room. Some delay may occur during intubation process due to heightened anxiety and rush, this can increase the infection risk. In this work, we present prediction of intubation support requirement to patients using Deep Representation Learning. We show that how we can leverage deep learning for taking proactive measures like arranging beds, ventilators, oxygen cylinders. It can give enough time to healthcare provider to be prepared with personal protective equipment properly. We produce Chest X-ray representation of patients and train our learning algorithm to classify whether the person will need intubation support during the duration of his illness. Recently a lot of work has been started in automating the disease prognosis and diagnosis task with Deep Learning. It is mainly due to recent advancements in Deep learning. Convolutional Neural Networks [Lecun et al., 1998 ] are now able to reach human level performance in classification and detection tasks [Geirhos et al., 2018] . [Rajpurkar et al., 2017 ] [Irvin et al., 2019 [Lu et al., 2020] detects chest pneumonia with radiologist level accuracy. Image recognition with deep learning is being used for detecting different type of diseases like diabetic retinopathy and skin cancer [Tymchenko et al., 2020 ]. ChexNet [Rajpurkar et al., 2017] can predict Pneumonia from CXRs with better F1 score than a group of experienced radiologists. It is a 121-layered deep convolutional neural network trained on ChestX-ray14 dataset [Wang et al., 2017] for classifying Chest X-ray image as Pneumatic. The dataset is comprised of 112,120 frontal-view Chest X-ray images of 30,805 unique patients. To train this network, images are first resized to 224x224 dimension and normalized by the ImageNet [Russakovsky et al., 2015] mean and standard deviation. This sets a benchmark for other similar lungs disease diagnosis task. The network is able to achieve state of the art score on total 14 different lungs disease diagnosis task. It achieves F1 score of 0.435 which is higher than achieved by a group of radiologists that is 0.385. [Cohen et al., 2020a] predicts severity of COVID-19 from the chest x-ray of patients. To train this network, a representation of 1024 dimensional vector is produced from non-covid CXR pre-trained network, 18 outputs (from classification layer), 4 outputs as subset of 18 outputs (lung opacity, pneumonia, infiltration, and consolidation) and Lung opacity output is used for creating final data representation. It further evaluates the input data features for overfitting & bias and analyses the model with Saliency map. Knowing severity can help COVID-19 patients and hospitals so that they can arrange themselves. We use covid-chestxray-dataset [Cohen et al., 2020b] (Figure 1 ), an open dataset collected from public and indirect collection from hospitals and physicians. The dataset is available on GitHub. It has a total of 535 AP and PA view of X-ray images in PNG format, which is a lossless image format. The ratio of COVID-19 positive and negative is 63.9% and 36%, where total positive labels are 342 and non-positives are 193. The metadata of this dataset contains labels of 25 lungs disease, shown in Table 1 . To avoid issues with float round off the image pixels are normalized to be in range of [-1024,1024] . The pre-trained DenseNet-121 model has been trained on large amount of chest x-ray dataset for different chest abnormality classification. We use this model for creating representation of COVID-19 CXR image data. We remove the last layer of the network, i.e. the classification layer, and extract the embedding from the last convolution layer. The obtained features are of dimension 7x7x1024, we applied 2D average pooling to convert it into 1x1x1024 dimension. We use this embedding to train k-nearest neighbors classification algorithm (KNN) with scikit-learn Python library [Pedregosa et al., 2011] , where k is the number of neighbors. We split the dataset into train and test using random sampling. Our train data consisted of 428 images and test data consisted of 107 images. We train the KNN model with K=8 and took euclidean distance as distance metric d = (X 1 − X 2 ) 2 . We get 73% precision and 83% recall. We plot confusion matrix of our classification outputs in Figure 2 . [Cohen et al., 2020b] intubated attribute represents whether the patient was intubated at any point during his illness. Given a CXR, we predict whether the patient will need intubation, Figure 3 . For this task we used AP and PA view of Chest X-ray of COVID and other Chest diseases, total of 25 different pathology, Table 1 . We produce our feature representation similar to section 4.1 and labels are 1 and 0 where 1 is intubation was required for the patient and 0 means intubation was not required. We randomly split dataset into train and test set. Our training set comprised of 75% of the total data. Train dataset length is 119 and test dataset length is 40. We experiment with number of neighbors (k) from 2 to 14 inclusively. We find that k=5 gives the best precision and recall. After training, we plot the confusion matrix of the test result as in Figure 3 20 intubated and 10 non-intubated patients are classified correctly as intubated and non-intubated respectively while 6 intubated and 4 non-intubated patients are classified incorrectly. We calculate 0.84 (95% CI 0.62, 0.86) AUC on the test set, Figure 4 . We use bootstrap method to create 95% CI with 10,000 bootstrap samples with replacement from the test dataset. We observe 0.84 (95% CI 0.615, 0.863) ROC-AUC for our KNN classifier. This shows how we can use representations when dataset is limited. We need to leverage Deep learning methods to automate our healthcare system wherever possible. Deep learning methods can assist in better resource management. X-rays are economical to CT scan and is available most of the places. It can be used to get an instant prognosis which can help in deciding quarantine and triaging. Severity prediction can be used to check if the current resources can support the patient status. Intubation support prediction can help hospital in managing the bed, ventilator and oxygen cylinders in advance. However, due to COVID-19 there has been a lot of research that has come up with different solution and suggestion for disease diagnosis. But before deploying any machine automated solution we must need to test it thoroughly for any kind of bias. Global health workforce shortage to reach 12.9 million in coming decades Scikit-learn: Machine learning in Python Chexnet: Radiologist-level pneumonia detection on chest x-rays with deep learning Critical supply shortages -the need for ventilators and personal protective equipment during the covid-19 pandemic Coronavirus test results get faster, but still too slow to help slow disease spread Ai can help hospitals triage covid-19 patients Deep learning approach to diabetic retinopathy detection Chestx-ray8: Hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases [Byatnal, 2020]