# A Deep Learning Review of ResNet Architecture for Lung Disease Identification in CXR Image
## 3 Materials and Methods
### Metric Evaluation  
In quantifying the performance of the classification model, and to determine the most suitable technique, the confusion matrix is employed. The confusion table can display and  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Layer Name** & **ResNet-50** & **ResNet-101** & **ResNet-152** \\ \hline  & Convolutional Layer & & \(7\times 7\), 64, stride 2 \\  & Maxpooling Layer & & \(3\times 3\), stride 2 \\ Block 1 & Convolutional Layer & & \(\begin{bmatrix}1\times 1\times 64\\ 3\times 3\times 64\\ 1\times 1\times 256\end{bmatrix}\times 3\) & & \(\begin{bmatrix}1\times 1\times 64\\ 3\times 3\times 64\\ 1\times 1\times 256\end{bmatrix}\times 3\) & & \(\begin{bmatrix}1\times 1\times 64\\ 3\times 3\times 64\\ 1\times 1\times 256\end{bmatrix}\times 3\) \\ Block 2 & Convolutional Layer & & \(\begin{bmatrix}1\times 1\times 128\\ 3\times 3\times 128\\ 1\times 1\times 512\end{bmatrix}\times 4\) & & \(\begin{bmatrix}1\times 1\times 128\\ 3\times 3\times 128\\ 1\times 1\times 512\end{bmatrix}\times 4\) & & \(\begin{bmatrix}1\times 1\times 128\\ 3\times 3\times 128\\ 1\times 1\times 512\end{bmatrix}\times 512\) \\ Block 3 & Convolutional Layer & & \(\begin{bmatrix}1\times 1\times 256\\ 3\times 3\times 256\\ 1\times 1\times 1024\end{bmatrix}\times 6\) & & \(\begin{bmatrix}1\times 1\times 256\\ 3\times 3\times 256\\ 1\times 1\times 1024\end{bmatrix}\times 23\) & & \(\begin{bmatrix}1\times 1\times 256\\ 3\times 3\times 256\\ 1\times 1\times 1024\end{bmatrix}\times 36\) \\ Block 4 & Convolutional Layer & & \(\begin{bmatrix}1\times 1\times 512\\ 3\times 3\times 512\\ 1\times 1\times 2048\end{bmatrix}\times 3\) & & \(\begin{bmatrix}1\times 1\times 512\\ 3\times 3\times 512\\ 1\times 1\times 2048\end{bmatrix}\times 3\) \\  & Averagepooling Layer & & 1000 fc, softmax \\ \hline \hline \end{tabular}
\end{table}
Table 3: The ResNet-50, ResNet-101, and ResNet-152 architecture.  
compare the value to the model's expected value. The precision, recall, and F1-score are typical evaluation matrices used in this study.  
Precision is a metric that represents the probability that the data are truly positive, given that they have been classified as positive. Precision is the difference between a correctly predicted positive outcome and an overall positive prediction. Precision can be expressed mathematically as follows:  
\[\text{precision}=\frac{\text{TP}}{\text{TP}+\text{FP}}. \tag{4}\]  
Recall, also referred to as sensitivity, is a measure used to assess the ability of a test to identify true positives. It is calculated by comparing the number of true positive predictions to the total number of actual positive instances. The F1-score is calculated by summarizing accuracy and sensitivity/recall through the computation of their averages. The formula for recall and F1-score are in Equations (5) and (6), respectively.  
\[\text{recall}=\frac{\text{TP}}{\text{TP}+\text{FN}}, \tag{5}\]  
\[\text{F}_{1}=\frac{2}{\text{recall}^{-1}+\text{precision}^{-1}}=\frac{\text{ TP}}{\text{TP}+\frac{1}{2}(\text{FP}+\text{FN})}. \tag{6}\]  
In this context, TP (True Positive) and TN (True Negative) represent the sum of data instances whose actual class matches the predicted class. On the other hand, FP (False Positive) and FN (False Negative) denote the sum of data instances whose actual class does not align with the predicted class.