Abstract:Accurate and effective cow estrus detection is the foundation for improving herd reproductive performance. Existing contact cow estrus detection devices are costly and prone to cause stress in cows, and some deep learning-based detection methods suffer from poor detection accuracy under the influence of complex environments and deployment difficulties due to high model complexity. Therefore, a lightweight DCT-YOLO model for cow climbing spanning behavior and estrus cow detection was proposed based on the YOLO v8n model for improvement. Firstly, the MPConv structure was adopted for the feature extraction and subsampled of the Backbone part to improve the recognition ability of the model for small-target cow mounting behavior. Secondly, the detection head adopted a dynamic TADDH, which fused the feature association between estrous cows and mounting behavior, and improved the network’s focus on individual estrous cows through the distinctive feature of mounting behavior. Finally, the interpolating part adopted CARAFE, which enhanced the features of estrus cows through cross-dimensional interactions. To validate the performance of the model, totally 2239 images were labeled for model training and testing. The experimental results showed that DCT-YOLO model had a precision of 94.8%, a recall of 80.1%, a mean average precision (mAP@0.5) of 87.5%, floating-point operations (FLOPs) of 8.5×109, params of 2.08×106, and a detection speed of 256.41f/s. Compared with SSD, Faster R-CNN, YOLO v5n, YOLO v5s, YOLO v7-tiny, YOLO v8n and YOLO v8s target detection networks, the number of parameters was reduced by 91.19%, 98.48%, 16.93%, 77.18%, 65.41%, 30.82% and 81.31%, and the detection speed was respectively improved by 192.72f/s, 226.56f/s, 34.19f/s, 97.68f/s, 187.92f/s, 39.02f/s and 126.54f/s, respectively, mAP@0.5 was only 1.9 percentage points lower than that of YOLO v8s and 0.2 percentage points higher than that of the best of the other models and the results showed that the model achieved a good balance between detection accuracy and speed. In summary, the model was lightweight, real-time accurate and robust, and it can provide important information support for tasks such as cow mounting behavior detection and estrus cow localization.