Abstract:Beef cattle target detection and quantity statistics are the first key problems should be solved in fine, automatic and intelligent beef cattle breeding. However, in the detection process, the existing beef cattle target detection methods cannot be applied to the actual beef cattle breeding because the beef cattle target colors are similar and there are severe occlusion with each other. Based on YOLO v5s and ECABasicBlock, a multi-target beef cattle detection method named ECA-YOLO v5s was proposed. The improvement method was to add three layers ECABasicBlock to the backbone feature extraction network of YOLO v5s model. YOLO v5s network, which integrated channel information, realized the accurate recognition of multi-target beef cattle in severe occlusion environment. A method of eliminating redundant images based on structural similarity was adopted to ensure the quality of beef cattle images. After labeling the beef cattle image obtained by framing the monitoring video of the farm, it was sent to ECA-YOLO v5s network for beef cattle target detection. After 300 iterations of training, the accuracy of the model was 89,8%, the recall rate was 76.9%, the mAP was 85.3%, the detection speed was 76.9f/s, and the model size was 24MB. Compared with YOLO v5s models, the precision value, recall value and mAP value of the ECA-YOLO v5s were 1.0 percentage points, 0.8 percentage points and 2.2 percentage points higher than those of YOLO v5s, respectively. Simultaneously, the performance differences of different attention mechanisms applied to YOLO v5s were compared, and the four attention mechanisms of CBAM, CA, SE and ECA were compared. By comparison, the mAP value of ECA-YOLO v5s was 0.5 percentage points, 0.6 percentage points and 0.2 percentage points higher than that of CBAM, CA and SE, respectively. It could be seen that the network effect of integrating ECA module was the best. The detection results of different occlusion and illumination conditions were analyzed and discussed. The results showed that ECA-YOLO v5s network can accurately and quickly detect beef targets with different occlusion and illumination conditions. The model had high robustness and small model, which was convenient for the migration and application of the model, and the research result can provide necessary technical support for the research of beef cattle target detection and pledge supervision.