## 4 Evaluation Metrics  
In this study, we developed a novel method by fine-tuning the CNN model trained on lung cells with urinary cells, to obtain good classification accuracy with a small number of urinary cells. To confirm the effectiveness of the proposed method, we evaluated the classification accuracy of the urinary cells using three different methods:  
Method 1: The CNN trained using lung cell images was applied directly to the urinary cell image classification process. In other words, images of urinary cells were not used in training the CNN.  
Method 2: The CNN was trained and evaluated using only the images of urinary cells. In other words, the images of the lung cells were not used in training the CNN.  
Method 3: The CNN pre-trained on lung cell images was fine-tuned using urinary cell images, and the classification accuracy of the urinary cell images was evaluated. This is the method proposed in this study.  
The classification methods described above produce different results. However, it is difficult to examine the basis of the classification from the VGG-16 results because it is not possible to understand the parts of the image that were focused on for the classification. Therefore, to visualize the basis for classification, we introduced gradient-weighted class activation mapping (Grad-CAM) [20], which can output the areas that contribute to the CNN classification in the form of a heat map (activation map).  
In addition, as an index for evaluating classification accuracy, we calculated the number of true positives (_TP_), true negatives (_TN_), false positives (_FP_), and false negatives (_FN_)  
Figure 2: CNN architecture introduced to the proposed scheme. Two-class classification model was built by replacing the fully connected layer of the VGG-16 model.  
and created a confusion matrix. Subsequently, the detection sensitivity (_Recall_), specificity, precision, accuracy, and _F1 score_ were calculated based on the following equations:  
\[Sensitivity\ (Recall)=\frac{TP}{TP+FN} \tag{1}\]  
\[Specificity=\frac{TN}{TN+FP} \tag{2}\]  
\[Precision=\frac{TP}{TP+FP} \tag{3}\]  
\[Accuracy=\frac{TP+TN}{TP+TN+FN+FP} \tag{4}\]  
\[F1 Score=2\frac{Recall\text{-}Precision}{Recall+Precision} \tag{5}\]  
To obtain the above results for all the data, CNN was trained and evaluated using the cross-validation method for Methods 2 and 3 since the urinary data were used for both training and validation. The cross-validation method divides the data into N datasets, trains them on N-1 datasets, and evaluates the classification accuracy of the remaining 1 dataset. By replacing the dataset to be excluded for evaluation and resetting the parameters for training, the classification results were obtained for all the data. In this study, N = 5 was used. That is, 80% of the data were used for training and 20% for testing. Here, images of the same case were distributed such that they would not be mixed in the training data and the data for evaluation. In contrast, single validation was employed since the training (lung) and the validation (urine) data were different for the Method 1.  
The CNN calculations were performed using the software we developed in the Python programming language with an AMD Ryzen 9 3950X processor (16 CPU cores, 4.7 GHz) with 128 GB of DDR4 memory. The training processes of the CNNs were accelerated using an NVIDIA Quadro RTX 8000 GPU (48 GB memory).