At the end of 2019, the novel coronavirus disease 2019 pneumonia occurred in the city of Wuhan, China. [1] [2] [3] [4] On January 24, 2020, Huang et al. 5 summarized the clinical characteristics of 41 patients with COVID-19, indicating that the common onset symptoms were fever, cough, myalgia, or fatigue. All these 41 patients had pneumonia and their chest CT examination showed abnormalities. The complications included acute respiratory distress syndrome, acute heart injury, and secondary infections. Thirteen (32%) patients were admitted to the intensive care unit (ICU), and six (15%) died. The the Kok-KH 6 team at the University of Hong Kong found the evidence of human-to-human transmission of COVID-19 for the first time.
COVID-19 causes severe respiratory symptoms and is associated with relatively high ICU admission and mortality. The current clinical experience for treating these patients revealed that the RT-PCR detection of viral RNA from sputum or nasopharyngeal swab had a low positive rate in the early stage. However, a high proportion of abnormal chest CT images were obtained from patients with this disease.
The manifestations of CT imaging of COVID-19 cases had their own characteristics, different from the manifestations of CT imaging of other viral pneumonia such as Influenza-A viral pneumonia, as showed in Figure 1 . Therefore, clinical doctors called for replacing nucleic acid testing with lung CT as one of the early diagnostic criteria for this new type of pneumonia as soon as possible.
With the rapid development of computer technology, digital image processing technology has been widely applied in the medical field, including organ segmentation and image enhancement and repair, providing support for subsequent medical diagnosis. 7, 8 Deep learning technologies, such as convolutional neural network (CNN) with the strong ability of nonlinear modeling, have extensive applications in medical image processing as well. [9] [10] [11] [12] Relevant studies were conducted on the diagnosis of pulmonary nodules, 13-14 classification of benign and malignant tumors, 15 and pulmonary tuberculosis analysis and disease prediction [16] [17] [18] worldwide.
In this study, multiple CNN models were used to classify CT image datasets and calculate the infection probability of COVID-19. The findings might greatly assist in the early screening of patients with COVID-19. Influenza-A viral pneumonia, and 30 healthy case. Furthermore, the test cases of CT set were selected from the people who had not been included in the training stage. Figure 2 shows the whole process of COVID-19 diagnostic report generation in this study. First, the CT images were preprocessed to extract effective pulmonary regions. Figure 2 . Process flow chart.
To study was expedited using the same method and models in data preprocessing and candidate region segmentation stages as a previous study on pulmonary tuberculosis. 17 The focus of infections from pulmonary tuberculosis had multiple structures and types, including miliary, infiltrative, caseous, tuberculoma, and cavitary etc. Although, the VNET 20 based segmentation model VNET-IR-RPN 17 was trained for pulmonary tuberculosis purpose, it was verified to be still good enough to separate candidate patches from viral pneumonia.
Moreover, in the study of pulmonary tuberculosis, the VNET-IR-RPN model was used both for both segmentation and classification. Only the segmentation-related bounding box regression part was preserved, regardless of the classification results, because only the former task was required at this stage in this study.
A large number of non-infection regions irrelevant to this study were also separated using the 3D segmentation model, including fibrotic structure of pulmonary, calcification spots, or healthy regions identified incorrectly. Therefore, an extra category was added as irrelevant-to-infection besides COVID-19 and 
The work of Jeffrey Kanne 21 and Chung M et al, 22 showed at least three distinguishing features of COVID-19: ground-glass appearance, striking peripheral distribution along with the pleura, and usually more than one independent focus of infections for one case, as showed in Figure 3 .
The models were optimized based on these findings. The image classification model was designed to distinguish the appearance and structure of different infections.
Moreover, relative distance-from-edge as an extra weights, was used for the model to learn the relative location information of the patch on the pulmonary image. The focus of infections located close to the pleura were be more likely to be recognized as COVID-19.
The relative distance-from-edge of each patch was calculated as followings:
13 / 29 1) Measure the minimum distance from the mask to the center of this patch (double-headed arrow as showed in Fig 3c) 2) Obtain the diagonal of the minimum circumscribed rectangle of the pulmonary image (Fig 3d) 3) Then the relative distance-from-edge achieved by the distance obtained from step 1) divided by the diagonal from step 2). 
Two CNN three-dimensional classification models were evaluated in this study, as showed in Figure 4 . One was a relative traditional ResNet 23 -based network and another model was designed based on the first network structure by concatenating the location-attention mechanism in the full-connection layer to improve the overall accuracy rate.
The classical ResNet-18 network structure was used for image feature extraction. Pooling operations were also used for the dimensional reduction of data to prevent overfitting and improve the problem of generalization.
The output of the convolution layer was flattened to a 256-dimensional feature vector and then converted into a 16-dimensional feature vector using a full-connection network. For the location-attention network, the value of relative distance-from-edge was first normalized to the same order of magnitude and then concatenated to this full-connection network structure. Next, three full-connection layers were followed to output the final classification result together with the confidence score. 
Inspired by the theory of Bagging prediction algorithm 24 in machine learning technology, one candidate region was represented by three image patches: the center image together with its two neighbors. These three images voted for this whole region with the following strategies:
1) If at least two images were categorized into the same type, then the image with the maximum confidence score in this type was selected 2) Otherwise, the image with the maximum confidence score was picked (no type dominated).
Regions that voted as irrelevant-to-infection type was ignored in the next step.
One of the remarkable features of COVID-19 is more than one independent focus of infections in one CT case. It is reasonable that the overall probability is much larger than 50% if a patient has two COVID-19 regions, both having a 50% probability.
Accordingly, the total infection confidence score (P) for one infection type was calculated using the probability formula of the Noisy-or Bayesian function as follows:
where i P represents the confidence of the ith region.
The confidence scores of two types 19 
An Intel i7-8700k CPU together with NVIDIA GPU GeForce GTX 1080ti was used as the testing server. The processing time largely depended on the number of image layers in one CT set. On average, it was less than 30s for a CT set with 70 layers from data-preprocessing to the output of the report.
As one of the most classical loss function used in classification models, cross-entropy was used in this study. When the epoch number of training iterations increased to more than 1000, the loss value did not decrease or increase obviously, suggesting that the models converged well to a relative optimal state without distinct overfitting. The training curves of the loss value and the accuracy for two classification models were showed in Figure 5 . The network with the location-attention mechanism achieved better performance on the training dataset compared with the original ResNet. 
A total of 30 CT samples were selected randomly from each group (COVID-19,
Influenza-A-viral-pneumonia and healthy) for the test set, following the rule that this person (owner of this CT) had not been included in the previous training stage.
Moreover, the segmentation model VNET-IR-RPN was configured to reduce the proposal's threshold to maximum separate candidate regions even through many normal regions could be included in. One CT case from COVID-19 group that had no region segmented as COVID-19 or Influenza-A-viral-pneumonia and hence wrongly categorized into the no-infection-found group, as showed in Figure 6 . These focus of infections could be barely notified by human eyed and seemed too tenuous to be captured by the segmentation model for this study.
(a) (b) (c) Figure 6 . All CT images from a single CT case. The focus of infections are pointed out by arrows.
A total of 1,710 image patches were acquired from 90 CT samples, including 357 COVID-19, 390 Influenza-A-viral-pneumonia, and 963 irrelevant-to-infection (ground truth). To determine which was the optimal approach, the design of each methodology was assessed using a confusion matrix. Two network structures were evaluated: with and without the location-attention mechanism, as showed in Table 1 and Table 2 . The average f1_scores for two models were 0.750 and 0.764, which indicated that the second model with location-attention mechanism achieved better performance averagely. Therefore, this model was used for the rest of this study.
Each image patch voted to represent this entire candidate region. A total of 570 candidate cubes were distinguished, including 119 COVID-19, 130
Influenza-A-viral-pneumonia and 321 irrelevant-to-infection regions (ground truth).
The confusion matrix of voting result and corresponding recall, precision and f1-score were showed in Table 3 and 
Noisy-or Bayesian function was used to identify the dominated infection types. Three types result exported in the final report: COVID-19, Influenza-A-viral-pneumonia and no-infection-found. The experimental results are summarize in Table 5 and Table 6 .
As the irrelevant-to-infection items (previous step) would be ignored and not be counted by the Bayesian function, we only compare the average f1-score for the first two items. They were 0.806 and 0.843 respectively, which showed a promotion of Moreover, efforts should be made to improve the segmentation and classification model. A better exclusive models should be designed for training, the segmentation and classification accuracy of the model should be improved, and the generalization performance of this algorithm should be verified with a larger data set.
In this multi-center case study, we had presented a novel method that could screen COVID-19 fully automatically by deep learning technologies. Models with location-attention mechanism could more accurately classify COVID-19 at chest radiography with the overall accuracy rate of 86.7 % and could be a promising supplementary diagnostic method for frontline clinical doctors.