Abstract:
Fry counting can play a pivotal role in the aquaculture industry. However, manual counting cannot fully meet the large-scale production in recent years, due to the inefficient, low precision, and even damage to the fry. In this study, a new fry counting was proposed using improved YOLOv8 and multi-target tracking. The objects were taken as the grass carp fry with the body lengths ranging from 20 to 50 mm. Firstly, the test platform was designed, according to the test requirements. Eight fry videos were then captured to extract and screen 961 valid images as the initial dataset. Then augmentation operations were performed on the data, including motion blur, brightness adjustment, noise increase, and image flipping. 2285 images dataset was divided into the training set and testing set in the ratio of 9∶1. P2 small layer of target detection was then added into the YOLOv8, due to the small fry targets and high detection speed. While the GAM (global attention mechanism) was introduced in front of the detection head, and the Inner-SIoU (Inner-SCYLLA- Intersection over Union) loss function was used to accelerate the convergence speed of the model for the better recognition accuracy of small and overlapping targets. The YOLOv8 detector was trained with the following settings: initial learning rate of 0.01, moments of 0.9, weight decay of 0.0005, batch size of 16, and 300 training rounds. The image processing computer was a 12th Gen Intel(R) Core (TM) i7-12700H 2.70 GHz, with an operating system of 64-bit Windows 11 system with 24 G of system memory. After that, a tracking and counting approach was realized for fry counting using BoT-SORT multi-target tracking with motion feature matching, eight-element Kalman filter, and camera motion compensation and discarding the appearance feature matching module. The tracking of fry targets was realized for the fry targets. Finally, the performance of the improved model was also evaluated, in terms of merits and performance. The ablation tests showed that the improved model was significantly promoted the counting performance, compared with the pre-improved model; Comparative test results showed that the average counting accuracy (ACP), average absolute error (MAE), and root mean square error (RMSE) were 97.16%, 3.67, and 5.26, respectively. The indexes of improved model were better than those of YOLOv5+DeepSORT, YOLOv8+DeepSORT, YOLOv8+StrongSORT, YOLOv8+ByteTrack, and YOLOv8+BoT-SORT; The comparative tests showed that the counting performance was negatively correlated with the speed of the fry through the shooting area. Once the speed was too high, the tracker was caused the insufficient inference speed, leading to a decline in the counting accuracy. The number of small fries were found in the video with the higher speed and accuracy than before. The finding can lay the strong foundation for the rapid and accurate counting of fry on the biomass estimation in factory aquaculture.