# A Low-Cost Automated Digital Microscopy Platform for Automatic Identification of Diatoms
## 3 Results and Discussion
### Live Diatom Detection  
The objective of diatom detection is to count the specimens in a slide under observation with the presence of 10 different possible species--taxa. To decide which method is the most appropriate to implement a live diatom detection function for our automated microscope, four methods were finally compared--based on three metrics. Two of them (VJ and SCIRD) are dependent on the classical careful selection of handcrafted features, and the other two are based on deep neural networks (YOLO and SegNet) capable of extracting the relevant features by themselves. Tables 4 and 5 and Figure 8 show the results for testing the four methods for the 21 test images. Table 4 highlights the method with the best score for each metric calculated for the diatom taxa being detected. Table 5 and Figure 8 group the results for all the taxa to show the most global perspective. \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Species** & **Sensitivity** & **Specificity** & **Precision** \\ \hline
1. _Gomphonema rhombicum_ & SegNet (0.98) & YOLO (0.93) & YOLO (0.86) \\
2. _Nitzschia palea_ & SegNet (0.87) & SCIRD (0.97) & YOLO (0.73) \\
3. _Skeletonema potamos_ & SegNet (0.92) & YOLO (0.97) & SegNet (0.63) \\
4. _Eolimma minima_ & SegNet (0.98) & YOLO (0.94) & YOLO (0.64) \\
5. _Achnanthes subhudsonis_ & SegNet (0.98) & YOLO (0.98) & YOLO (0.84) \\
6. _Staurosira venter_ & SegNet (0.96) & YOLO (0.99) & YOLO (0.73) \\
7. _Nitzschia capitellata_ & SegNet (0.99) & SCIRD (0.99) & SCIRD (0.80) \\
8. _Eolimma rhombelliptica_ & SegNet (0.95) & YOLO (0.98) & YOLO (0.72) \\
9. _Nitzschia inconspicua_ & SegNet (0.99) & YOLO (0.98) & YOLO (0.79) \\
10. _Nitzschia frustulum_ & SegNet (0.98) & YOLO (0.97) & YOLO (0.80) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Summary of the best method for each taxon detection based on different metrics (the best values are highlighted in boldface). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**FOV Array Size** & **Image res. (\(w\times h\))** & **Tot.Size (mm\({}^{2}\))** & **Acq. Time (s)** & **Proc. Time (s)** & **Tot. Time (s)** \\ \hline
3 \(\times\) 3 & 3660 \(\times\) 2928 & 0.17 & 5.719 & 9.678 & 15.397 \\
5 \(\times\) 5 & 6040 \(\times\) 4832 & 0.46 & 13.783 & 24.074 & 37.858 \\
7 \(\times\) 7 & 8420 \(\times\) 6736 & 0.90 & 25.916 & 63.642 & 89.557 \\
10 \(\times\) 10 & 11,990 \(\times\) 9592 & 2.07 & 50.113 & 116.960 & 167.073 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Summary of the results for automatic scanning with different FOV array sizes. Acq., acquisition; Proc., processing. As is shown by these results, YOLO and semantic segmentation with SegNet overcame the classical methods not based on DNNs, although SegNet's specificity was quite poor against SCIRD. SegNet (96% sensitivity) and YOLO (96% specificity and 72.7% precision) scored the best for the metrics employed for comparison among the four strategies. Although YOLO and SegNet had an acceptable performance and were better than SCIRD (i.e., sensitivity and specificity), they produced false negatives--missing some diatoms--and false positives, even segmenting some detritus instead of diatoms. In general, sensitivity was enhanced with semantic segmentation (SegNet) with room for improvement in precision. An observed weakness in semantic segmentation derives from the incorrect separation of ROIs when overlapping between specimens occurs. This problem may be solved with instance segmentation (Mask-R-CNN), but it has been proven only with 10 different species [44]. As a trade-off between performance and computational requirements, an inference module based on YOLO was integrated into the microscope software to provide a live diatom detection. The implementation finally integrated was adapted from the public code at the Darknet GitHub Repository [75]. Figure 8: Boxplots comparing the obtained results for three metrics (**a**) sensitivity, (**b**) specificity, and (**c**) precision; comparing each method (VJ, SCIRD, YOLO, and SegNet).