# Measurement of Fish Morphological Features through Image Processing and Deep Learning Techniques
## 3 Experimental Results--Discussion
An obscured fish can be detected if its contour is the longest in the _edgesgm_ image, but dimension estimation and fish part localization cannot be performed, since the shape will not be the expected one in this case (corners cannot be determined, as described in Section 2.2). Contour2's path is much slower, and its latency depends on the number of patterns, rotations and scaling levels tested. The accuracy might be high if successful pattern matching is achieved, but it will be much worse if an inappropriate pattern, orientation or scaling is adopted. Extending the pattern set with fish patterns that have known rotations or slants or display obscured fishes can lead to more accurate measurements in these cases with the cost of higher latency. The deep learning inference (BMA, SCIA) had the shortest latency. The accuracy achieved depended on the training set size. The system could also be trained with different classes of obscured and slanted fishes. The classification performed along with image segmentation could be used to recognize obscured or slanted fishes, triggering the necessary corrections. None of the tested methods are appropriate for real-time processing of video frames. However, the system is not intended to be used in such applications, because even if it were capable of processing 30 frames/s, the user would not be able to view the colored fish parts changing at this rate. On the contrary, capturing a single photograph of the fish may be adequate in order to estimate its mass, dimensions and health through the color or texture of its parts. The reported latencies in the referenced approaches are comparable with our case. More specifically, in the approaches of [PERSON] et al. [4; 6], the time needed to process a single frame could be up to 12 s. The framework proposed in [18] placed 23 landmarks on 13,686 objects (zooids) detected in 1684 pictures of fossil bryozoans in 3.12 min using a personal computer. Table 9 compares the experimental results of the current work with the ones achieved in the referenced approaches. The fish part localization performed in this work can be considered as a classification problem (image regions belong to a fish part or the background). Although there are some approaches that achieve lower size estimation errors ([16; 18; 20]) than the current work, they do not offer the same functionality (i.e., fish part localization). The classification accuracy is comparable with the referenced approaches, and as can be seen from Table 9, the referenced works that performed classification did not offer fish size estimation as in our case. It is expected that both the size error and classification accuracy of the proposed framework can be significantly improved if the deep learning approaches have the opportunity to be trained with larger datasets. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Method** & **Speed** & **Precision** & **Prerequisites** &
\begin{tabular}{c} **Supported** \\ **Extensions or Corrections** \\ \end{tabular} \\ \hline Contour1 (image proc.) & Medium & High & Simple background & - Rotation or slant correction through optimized affine transformation \\ Contour2 (image proc.) & Low & Variant & Appropriate set of patterns & - Inherent rotation or slant correction \\ BMA and SCIA (Deep Learning) & High & Depends on the training dataset size & Appropriate annotations & - Selectable correction methods if fish is classified as rotated, slanted or obscured \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Summary of employed method features. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Ref.** & **Size Error** & \
\begin{tabular}{c} **Classification** \\ **Accuracy** \\ \end{tabular} &
\begin{tabular}{c} **Species or Fish** \\ **Families** \\ \end{tabular} & **Notes** \\ \hline
[6] & 7–12\% & & \\
[8] & & 91–94\% & 20 & Dataset = 350 fish images (93 for testing) \\
[9] & & 82–90\% & 24 & Dataset = 250 training, 150 test images \\
[13] & & 92–97\% & Treated or Untreated & \\ \hline \hline \end{tabular}
\end{table}