Abstract:In order to accurately detect and track the stress behavior of micropterus salmoides due to low dissolved oxygen content in water, an improved YOLO v5 and DeepSORT combined network algorithm was constructed. In terms of algorithm, two improvement schemes were proposed: two self-attention Swin Transformer modules based on shifted windows were added to the Backbone and Neck of the original YOLO v5, which improved the network's ability to extract target feature information, thereby improving the detection effect of the original model; the learning rate strategy combined with Warmup and Cosine Annealing made the convergence speed of the multi-target tracking algorithm DeepSORT faster and more stable in the early stage. The experimental results showed that in terms of target detection, compared with the original YOLO v5, the mAP@0.5, mAP@0.5:0.95 and recall rate of the improved YOLO v5 were increased by 1.9, 1.3 and 0.8 percentage points, respectively. In the case of incomplete occlusion, the improved algorithm could show better detection results. In terms of target tracking, the MOTA, MOTP, and IDF1 of the DeepSORT algorithm were increased by 4.0, 0.7 and 10.7 percentage points respectively, and the ID switching frequency of micropterus salmoides before and after occlusion was significantly suppressed. The improved YOLO v5 and DeepSORT tracking algorithms were more suitable for detecting and tracking the hypoxic stress behavior of micropterus salmoides, and can provide technical support for the breeding of micropterus salmoides.