YOLOv5s high-density koi fry detection method based on fusion non-local operation
Aiming at the poor applicability of existing methods in the target detection task of high-density koi fry,a Ms-Non-local BIFPN coordinate attention YOLOv5s(NBC-YOLOv5s)target detection algorithm based on non-local operation is proposed.Firstly,in the backbone network of YOLOv5s,a multi-scale non-local operator(MS-Non-lo-cal)is added to enhance the feature extraction ability of the model for high-density koi fry.Secondly,the bi-direc-tional feature pyramid network(BIFPN)is used in the neck network to improve the model feature fusion efficiency.Finally,at the feature fusion of the network,the coordinate attention(CA)mechanism is introduced to increase the model's attention to the key information of the image.In order to verify the effectiveness of the proposed algorithm,a koi fry dataset was established based on the real fishery environment.The experimental results show that the preci-sion,recall rate and mean average precision(mAP)of NBC-YOLOv5s are 88.5%,89.7%and 93.7%,respec-tively,which are 0.6,9.0 and 4.4 percentage points higher than the original model in the improved network com-pared with YOLOv5s.In order to verify the performance improvement effect of MS-Non-local on YOLOv5s,this pa-per compares the three mechanisms of convolutional block attention module(CBAM),squeeze and excitation(SE),and bi-level routing attention(BRA).The results showed that the mAP of MS-Non-local increased by 2.6,2.1 and 0.9 percentage points compared with CBAM,SE and BRA,respectively.Through model disassembly,the effective-ness of the proposed method on the detection of images of koi fry of different densities is analyzed,and it is conclu-ded that the algorithm can realize the detection of high-density koi fry in real scenarios,and can provide effective technical support for screening high-quality koi.