Abstract:In aquaculture, fish tracking is fundamental for monitoring fish behavior, detecting water quality anomalies, and assessing the growth conditions of fish. However, existing methods suffer from issues such as computational time consumption, large model size, and difficulties in deploying on edge devices. To address these challenges, taking grouper fish as the research subject, a tracking method was proposed based on a lightweight YOLO v8 and BoT-SORT. This method consisted of two stages: target detection and target tracking. In the target detection phase, YOLO v8m was used as the baseline network. Firstly, a convolutional module, FasterConv, was introduced to reduce the number of parameters. Then the excitation and modulation attention (EMA) mechanism was incorporated to maintain model accuracy. Finally, a multi-scale feature fusion module, Fusion, was employed and the structure of the Neck network was adjusted to enhance the model’s capability for feature integration. For the target tracking part, the BoT-SORT algorithm simplified the motion state variables of the fish body and included camera motion compensation (CMC) to deal with drastic changes in fish appearance. Subsequently, the ResNeST50 network was utilized to extract the appearance features of the fish within high-confidence detection bounding boxes, achieving fish tracking. The method was trained and validated on a self-built grouper dataset, achieving a mAP@0.5 of 95.80% for the object detection model, with a model size of 23.7MB—a 54.42% reduction compared to that of the original YOLO v8m model. When applying the lightweight object detection model to the BoT-SORT algorithm, the MOTA reached 78.774%, with an FPS of 28.20f/s, significantly outperforming SORT, DeepMoT, and other algorithms in comparative experiments. The results demonstrated that this method can achieve detection and tracking of grouper fish, providing technical support for the cultivation of groupers.