## 3 Results and Discussion
Figure 7 displays a picture under the same zoom conditions and for individuals of the same size (40 \(\upmu\)m). Table 4 shows the results of the test where the clam was introduced to check whether the algorithm identified it as a mussel or not. As the table displays, the algorithm correctly identified no mussel larvae in the same; indeed, although the larvae are very similar to the human eye, in this sample there were no mussel larvae (consequently, the algorithm proved to be working properly under this test). Additionally, a set of tests were performed using several samples containing a mix of different larvae (in different stages of their growth) in different sizes. Figure 8 displays a picture of a sample used in the laboratory where the algorithm has found the individuals, classified the different classes, and accounted for the number of each class. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Class** & **Size (\(\upmu\)m)** & **Manually** & **Automatic** \\ \hline  & & **\#** & **Time (s)** & **\#** & **Time (s)** \\ \hline
0 & 40 & 183 & 305 & 0 & 6 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Clam larvae of 40 \(\upmu\)m to test if they were identified wrongly as a mussel. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Class** & **Size (\(\upmu\)m)** & **Manually** & \multicolumn{2}{c}{**Automatic**} \\ \hline  & & **\#** & **Time (s)** & **\#** & **Time (s)** \\ \hline
0 & 40 & 204 & 383 & 206 & 9 \\
1 & 100 & 84 & 141 & 83 & 8 \\
2 & 180 & 49 & 77 & 51 & 8 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Average manual vs automatic accounting. Figure 7: Clam larvae of 40 \(\upmu\)m under the same zoom conditions. Finally, a final set of tests were carried out to determine the effectiveness of the algorithm, in terms of not confusing another species incorrectly as if they were mussels. In the laboratory, a dataset of samples that had fine clams were prepared, which are very similar to mussels in their larva state. Figure 9 displays the results of the detection of fine clams at their 40-100-180 \(\upmu\)m stage of growth: as no bounding boxes are shown, the algorithm confirms that no individuals of mussel larvae are present in the sample (in which it is really difficult for the eye to distinguish between them). The metrics used to evaluate the algorithm include Precision and the rate of Recall (\(P\) and \(R\), respectively). They both are based on true positives (\(TP\), meaning a correct detection of a ground-truth bounding box), false negatives (\(FP\), a false detection of a non-existing object within the image), and false negatives (\(FN\), an undetected ground-truth bounding box) [37]. In this case, we opted to define as positive samples those with an overlapping between the predicted bounding box and the ground truth (IoU) of over 0.5. Precision in computer vision is the ability that a model has to identify just relevant objects in an image (in percentual terms, the percentage of correct positive predictions). Recall refers to the capability of the algorithm to find all relevant cases (every ground truth bounding box in the image); it can be written as the percentage of correct positive predictions among every give ground truth:  
\[P=\frac{TP}{TP+FP} \tag{8}\]  
\[R=\frac{TP}{TP+FN} \tag{9}\]  
Figure 8: Seawater sample with mussels in different stages (sizes). Figure 9: Fine clam under the microscope, in their 40 (**left**), 100 (**center**), and 180 (**right**) \(\upmu\)m stages of growth. The algorithm correctly identified no mussel larvae, although the similarities in size and shape are clear.