## 3 Experiment
### Virus Detection Algorithm
```
1 Input: directory \(\leftarrow\) {path to image directory}
2 Input: supportedExtensions \(\leftarrow\) {list of supported image file extensions}
3 Output: jsonFile \(\leftarrow\) {file containing image names and normal cell counts}
4 imageFiles \(\leftarrow\) {d\({}_{l}\)..., d\({}_{n}\)} \(\leftarrow\) ListFilesInDirectory(directory)
5 imageFiles \(\leftarrow\) FilterFiles(imageFiles, supportedExtensions)
6 totalData \(\leftarrow\) {}



## 4 Results

### Algorithm Validation

To assess the performance of the developed cell and virus detection algorithms, 150 images containing both cells and viruses were selected for comparison against manual counts conducted by three experts. Each expert manually counted the cells and viruses within the images, providing a benchmark for evaluating the algorithm's ability to distinguish and classify the two types separately. The comparison between the manual counts and the algorithm-generated results was visualized through various statistical methods. Linear regression was employed to analyze the relationship between the manual and algorithmic counts, while a Bland-Altman plot provided insight into any potential biases or discrepancies between the two methods. Additionally, a box plot was used to illustrate the distribution and variance in the count data, offering a comprehensive view of the algorithm's performance in comparison to expert assessment. These visualizations help demonstrate the effectiveness of the algorithm in detecting cells and viruses. The manual counting process shown in Figure 5(a) was conducted by three independent experts who analyzed the same set of images using pre-defined criteria to distinguish between infected and uninfected cells. Infected cells were identified by their blue cell bodies surrounded by distinct yellow inclusions, while uninfected cells exhibited a uniform blue color. To address inter-observer variability, the mean or median of the counts from the three experts was calculated and used as the ground truth for algorithm evaluation, ensuring consistency and minimizing discrepancies. #### 4.1.1 Linear Regression

The linear regression graph in Figure 6(a) illustrates the comparison between the cell counts from 150 images manually counted by experts (x-axis) and the counts generated by the cell counting algorithm (y-axis). The data points, marked as purple crosses, represent individual image counts, ranging from 400 to 1900 cells per image. The blue line with a slope of 1 represents the reference line, which signifies perfect agreement between the expert and algorithm counts. The red dashed line is the linear fit line that highlights the trend of the algorithm's performance. Based on the regression analysis, the linear equation derived is \(y=0.96x\), indicating that the algorithm slightly underestimates the cell count in comparison to the expert counts. The coefficient of determination \(R^{2}\) is calculated to be 0.9618, reflecting a strong correlation between the algorithm's output and the expert counts, suggesting that the algorithm performs consistently across different cell counts [35]. Figure 6: (a) Manual counting by expert, (b) algorithm cell counting, (c) algorithm virus counting. Similarly, Figure 7b presents the virus detection algorithm, which shows a comparable trend of strong correlation with expert counts. The linear regression analysis produces a linear equation of \(y=0.96x\), indicating a slight underestimation of virus counts by the algorithm. Nevertheless, the higher coefficient of determination, \(R^{2}=0.9773\), indicates an even stronger correlation between the algorithm's output and expert counts, surpassing the performance of the cell counting algorithm. Moreover, to assess the correlation between the expert and machine counting, [PERSON]'s correlation coefficient method was employed to measure the strength of the linear relationship between the two variables [36].