# Rapid and Accurate Crayfish Sorting by Size and Maturity Based on Improved YOLOv5
## 4 Results and Analysis
### Experimental Analysis
#### 4.3.2 Comparative Analysis of Speed and Accuracy of Different Object Detection Algorithms  
Among the currently popular object detection algorithms, SSD stands out for its high speed, although it may lack precision in detection. Faster R-CNN demonstrates strong versatility but compromises accuracy due to the use of original RoI pooling with double rounding. On the other hand, Centernet achieves faster speeds by employing fewer anchors, but this reduction in anchor quantity can lead to a decrease in accuracy. The YOLO series, on the other hand, has gained widespread acclaim for its high accuracy and fast detection speed. In order to further demonstrate the superiority of our proposed algorithm in terms of crayfish recognition, we conducted qualitative and quantitative comparisons between our algorithm and eight other commonly used object detection algorithms, encompassing \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Precision (\%)** & **Recall (\%)** & **mAP (\%)** & \begin{tabular}{c} **The Processing Time** \\ **per Image/ms** \\ \end{tabular} & \
\begin{tabular}{c} **Parameters** \\ **/10\({}^{6}\)** \\ \end{tabular} &
\begin{tabular}{c} **FLOPs** \\ **/10\({}^{9}\)** \\ \end{tabular} \\ \hline YOLOv5n & 92.9 & 92.2 & 96.9 & **8.8** & **1.769989** & **4.2** \\ YOLOv5m & 94.9 & 95.8 & 97.4 & 17.9 & 20.899605 & 48.3 \\ YOLOv5l & 95.5 & 95.9 & 97.9 & 23.6 & 46.175989 & 108.3 \\
**Proposed** & **95.6** & **98.1** & **98.8** & 14.1 & 6.930653 & 15.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparative analysis of speed and accuracy of different variants of YOLOv5. Figure 10: Comparison of loss between the improved model in this paper and the YOLOv5 model. SSD, Faster R-CNN, Centernet, Volov4, Volov5-6.0, YOLOv5-7.0, YOLOv5-7.0, YOLOv, and YOLOv8. Consistent datasets and experimental platforms were utilized for the training and validation of all algorithms. Figure 11 illustrates that qualitative analysis was performed on nine different object detection algorithms, encompassing SSD, Faster R-CNN, Centernet, Volov4, Yolov5-6.0, YOLOv5-7.0, YOLOv5-7.0, YOLOv, YOLOv8, and ours. Eight random images were selected, corresponding to the categories of green_small, green_medium, green_large, green_extralarge, red_small, red_medium, red_large, and red_extralarge. The confidence threshold of 0.5 and an IoU threshold of 0.45 were set. Figure 11 reveals the generation of false positives by the SSD algorithm, selecting a box for the blank space of the red_small category. Fast R-CNN exhibited poor performance, producing two predicted boxes for the red_small category, one of which was misclassified as green_small, resulting in low accuracy. The YOLOv4 algorithm demonstrated weak detection ability for small targets, missing the prediction box for the green_medium category. The Centernet algorithm showed poor robustness, missing the prediction box for the green_extralarge category. The YOLOv5 series, YOLOv, as well as YOLOv8, have demonstrated stable and accurate performance in predicting and testing images. This further validates the superior accuracy and robustness exhibited by the YOLO series, enabling it to reliably and accurately output results for crayfish of varying sizes and maturity levels. As shown in Table 5, a quantitative comparison was made between these nine object detection algorithms in terms of their precision, recall, mAP, model size, and processing time per image. The algorithm proposed in this paper has the fastest detection speed among all algorithms, except for SSD. SSD was 6% faster than the algorithm presented in this paper, with a processing time per image that was 0.9 ms faster, but the mAP results demonstrated a notable 12% superiority of the proposed algorithm over SSD, and the detection speed also met the real-time requirements for crayfish detection. Therefore, while ensuring detection speed, the algorithm presented in this paper achieved the highest mAP for crayfish detection.