A Novel Normalization Algorithm to Facilitate Pre-Assessment of Covid-19 Disease from Chest X-ray Image and its FPGA implementation


 COVID-19 is still a fatal disease, which has threatened all people by affecting the human lungs. Chest X-Ray or computed tomography (CT) imaging is commonly used to make a fast and reliable medical investigation to detect the COVID-19 virus from these medical images is remarkably challenging because it is a full-time job and prone to human errors. In this paper, a new normalization algorithm that consists of Mean-Variance-Softmax-Rescale (MVSR) processes respectively is proposed to provide facilitation pre-assessment and diagnosis Covid-19 disease. In order to show the effect of MVSR normalization technique on image processing, the algorithm is applied to chest X-ray images. Therefore, the normalized X-ray images with MVSR are used to recognize via one of the neural network models as known Convolutional Neural Networks (CNNs). At the implementation stage, the MVSR algorithm is executed on MATLAB environment, then it is implemented on FPGA platform. All the arithmetic operations of the MVSR normalization are coded in VHDL with the help of fixed-point fractional number representation format. The experimental platform consists of Zynq-7000 Development Board and VGA monitor to display the both original X-ray and MVSR normalized image. The CNN model is constructed and executed using Anaconda Navigator interface with python language. Based on the results of this study, infections of Covid-19 disease can be easily diagnosed for MVSR normalized image. The proposed MVSR normalization makes the accuracy of CNN model increase from 83.01%, to 96.16% for binary class of chest X-ray images.


Introduction
Normalization with mean and variance is a noise/error compensation method that is used in many applications such as signal, image and speech processing, arti cial intelligence, big data, optimization algorithms and so on [1][2][3]. One of the compensation techniques is Batch normalization (BN) method to develop performance and stability of neural networks by rescaling values of hidden layer units and also to create more complicated deep learning models. One of the critical problems is the covariate shift in the learning process for deep learning models. To solve this problem, BN is proposed in 2015 [4]. Besides, Cepstral mean and variance normalization (CMVN) [5] is used to eliminate noise inside voice for speech processing applications. CMVN is a critical method for recognizing voice instructions to minimize the data lost for messages during normalization.
Noise in the image is a general problem for image processing applications [6]. It is also hot topic in computer vision and image processing. Many techniques based on image denoising model have been developed to overcome this problem [7][8]. In most studies, researchers rstly add noise (especially Gaussian noise) with different noise ratios to the original image, then they design deep CNNs to enhance image denoising performance (speed, quality and cost) and e ciency [9]. Some of these techniques consists of CNN with BN [10], image restoration by applying ResNet [11], several traditional linear and non-linear image lter techniques [12].
Deep Normalized Convolutional Neural Network (DNCNN) is developed for unbalanced classi cations of neural networks and constructed based on ReLU and weight normalization strategy. In [13], In DNCNN, ReLU is employed as an activation function to overcome the gradient vanishing problem and enhance the optimization by using the parameters (weight, bias) normalization strategy. Weight Normalization (WN) is used to accelerate the convergence of stochastic gradient descent optimization in a neural network. In [14], WN is applied to show bene ts of this technique in four different NN models. WN method is also used for image smoke detection in [15]. The result of this study shows that false alarm ratio is achieved under 0.60% and smoke detection accuracy is around 96.37%.
CNN models have been constructed in many different ways [16] for image processing (such as image segmentation, classi cation and denoising) but still, there are many challenge during image processing that requires amounts of parameters (image size, weights, and bias, etc.) and lots of convolution operations in the training and inference process [17][18][19]. This has inspired many researchers to focus their attention on more energy-e cient hardware platforms [20,21]. Field Programmable Gate Array (FPGA) is a vital side for implementation of CNN models due to its hardware adaptability and parallel process capability. On the other hand, General Processing Units (GPUs) supply more resources in terms of memory and computational units. But, during the validation process, GPUs have a long execution time because of sequential logic design [22,23]. FPGA has parallel architectures on its logic con guration and this feature makes it better choice for hardware designers during validation process of CNN con gurations. At the implementation stage of CNN models on any hardware, normalization process ensures fewer number of hardware resources and reduced power consumption during the training and validation processes [22][23][24][25].
In this paper, a new normalization algorithm that consists of MVSR (named as acronym of Mean-Variance-Softmax-Rescale) processes respectively is proposed. In order to show effect of MVSR on image processing, the algorithm is applied to chest X-ray images to provide facilitation pre-assessment and diagnosis Covid-19 disease. Therefore, the normalized X-ray images with MVSR are used to recognize via one of the neural network models as known Convolutional Neural Networks (CNNs). At the implementation stage, the MVSR algorithm is executed on MATLAB, then it is implemented on FPGA platform. The experimental platform consists of Zynq-7000 Development Board and VGA monitor to display the both original X-ray and MVSR normalized image. The CNN model is constructed and executed using Anaconda Navigator interface with python language.
The rest of the paper is organized as follows. The architecture and mathematic of the MVSR normalization technique and its necessity are detailed in Section 2. In Section 3, the MATLAB pre-study is accomplished for observing the effect of proposed normalization algorithm on chest X-ray images. Section 4 consists of FPGA implementation of MVSR normalization and the results for chest X-ray images on VGA screen. Then, in Section 5, the architecture of CNN model is constructed and the implementation of image classi cation (diagnosis of Covid-19 disease) for original and normalized chest X-ray images are executed on Anaconda Navigator interface with python language to prove the bene ts of proposed MVSR normalization algorithm. Section 6 concludes the paper.

Mvsr Normalization Algorithm
In general, the standard deviation (the square root of the variance) is used to make a relation between each data and measure how to spread out or distribute around the mean of a data set [26]. The MVSR normalization is built on these features of mathematical operations and four-part processes,

Mean
Variance Softmax Rescaling of the data, respectively.
According to R. Duncan Luce's probability theory, it is also known as Luce's choice axiom, probability of one of the data is dependent on another in the same data set. The softmax function, based on Luce's choice axiom, is usually employed in the last activation function of multiclass Arti cial Neural Network (ANN) models to make probability distribution of the output classes [27]. After calculation of the normalized intensity of the input, the dataset can have the negative and the positive fractional numbers. In order to conserve the effect of negative data and also nonlinearity, we used the softmax function. In the rescaling step, all data is transformed to 8-bit unsigned integer intervals change from 0-1 to 0-255.
The MVSR normalization technique consists of following mathematical processes whereμ MVSR ,σ 2 MVSR , x i , S(x) i and r i stand for mean of x i , variance, the normalized intensity of the input, softmax and rescaled values, respectively.
In the normalized intensity value of the input (x i ), a small positive number (δ) is added to the variance value to avoid the divisor is to be zero. In the equations above, x i is the input data intensity and r i is the result of MVSR normalization.
The MVSR normalization architecture is given in Figure 1. The mathematical operations are executed in order to represented ow. Input chest X-ray image is inputted the algorithm and the normalized version of input is applied to neural network model.
In the pre-study, to observe the effect of MVSR normalization for Covid-19 disease diagnosis from chest X-ray images, the algorithm is executed on MATLAB. Chest X-ray images of Covid-19 infected and No-Finding are represented after and before MVSR normalization in the gures 2. the source of the X-ray images dataset is publicly available at Hospital Israelita Albert Einstein [28]. According to the expert view, Infectious Diseases Doctor, after MVSR normalization the infection on chest X-ray images can be more clearly observed. At this stage, the starting point of this study is based on this view and this normalization process is thought to be used in image classi cation applications. The accuracy of Covid-19 diagnose can be increased by using MVSR normalization before training process for the neural network models. The rest of the paper is based on this projection.
The MATLAB-based MVSR normalization used for the pre-phase was taken as a reference to design an FPGA-based MVSR normalization. In order to show bene t of the MVSR normalization, more images are normalized and presented in Figure 3.

Mvsr Normalization On Fpga
Calculations of standard deviation, mean, and variance are required to apply MVSR operation. To obtain these operations, we need to de ne real numbers as a xed point number type to embedded systems or any hardware. Multiplication, division, addition, subtraction, and especially square root calculations are essential mathematical arithmetic to calculate these operations in FPGA. MVSR normalization is implemented by using a static random access memory (SRAM) on re-programmable FPGA. All the data is read from SRAM and de ned arrays. Systolic arrays are used for these operations to perform parallel integrations such as convolution, correlation, linear algebra or additional data tasks [29]. All normalization processes are constructed with pure VHDL at Vivado 2018.1 version.

Division of the xed-point fractional binary numbers
Division is one of the important operation to calculate standard deviation, mean, and variance. Fixedpoint fractional number format is a way to represent fractional numbers. The xed point division process is slightly different from the standard binary division operation. It is needed to scale the fractional part of the division after nding the remainder [30].

Square root of the xed-point fractional binary numbers
This section represents calculating the xed-point square root. Square root of the xed point binary numbers are essential to have normalized input data with standard deviation from variance operation in the MVSR operation. After making the groups of data by 2 n (n=1, 2... m, m=data size/2), it is gradually compared with the multiplied expected data. If the group of the data is smaller than expected, the result is equal to 1, vice versa 0. The FPGA implementation platform where Xilinx Zynq-7000 Development Board is used to implement the MVSR normalization algorithm for input images and VGA monitor to display the both original X-ray and MVSR normalized image.
Results of FPGA implementation of MVSR normalization algorithm is given in Figure 4. As seen in the gure, the algorithm is implemented on FPGA board and the results are shown on VGA monitor successfully. The main result of FPGA implementation stage is that the X-ray image can be normalized on FPGA and the expert views support our opinions on the starting point of this study. In the Table 1, information about resource utilization of FPGA implementation stage of study is shown. This result shows that the MVSR normalization algorithm is performed on FPGA chip with the fewer number of resource.

Proposed Convolutional Neural Network Architecture
The architecture of the CNN model is constructed with seven convolutional layers and ve max-pooling layers and this model can be seen in Table.2. This model is executed for original and MVSR normalized chest X-ray images on Anaconda Navigator interface with python language to prove the bene ts of the proposed MVSR normalization algorithm. There are four-type of prediction approaches, four distinct combinations of predicted and actual values, to evaluate results of classi cation model via confusion matrix [33], F1-score is the harmonic mean of the Precision and Recall. Therefore, f1-score gives a combined idea of these two measurements. F1-score is maximum when the Precision is equal to Recall. The precision determines whether the model is reliable or not. Prediction according to the model, the recall is given how many true positive cases are accurately predicted.
Precision; It counts how precise the executed model operates by examining TP from the predicted ones P = T P T P + F P 6 Recall (Sensitivity); It is the percentage of recognition of positive samples R = T P T P + F N 7 F-1 Score; It is a function to nd a balance between sensitivity and precision. The results of the f1-scores given in Table.3, performed with original chest X-ray and MVSR normalized images, the normalized images perform the better F1-Score (accuracy). images. This matrix demonstrate how the CNN models classify and misclassify Covid-19 disease on chest X-ray images. Furthermore, the precision, recall and f1-score can be easily computable by using confusion matrix.  Figure 1 MVSR architecture