There are some problems with estrus detection in ewes in large-scale meat sheep farming: mainly, the manual detection method is labor-intensive and the contact sensor detection method causes stress reactions in ewes. To solve the abovementioned problems, we proposed a multi-objective detection layer neural network-based method for ewe estrus crawling behavior recognition. The approach we proposed has four main parts. Firstly, to address the problem of mismatch between our constructed ewe estrus dataset and the YOLO v3 anchor box size, we propose to obtain a new anchor box size by clustering the ewe estrus dataset using the K-means++ algorithm. Secondly, to address the problem of low model recognition precision caused by small imaging of distant ewes in the dataset, we added a 104 × 104 target detection layer, making the total target detection layer reach four layers, strengthening the model’s ability to learn shallow information and improving the model’s ability to detect small targets. Then, we added residual units to the residual structure of the model, so that the deep feature information of the model is not easily lost and further fused with the shallow feature information to speed up the training of the model. Finally, we maintain the aspect ratio of the images in the data-loading module of the model to reduce the distortion of the image information and increase the precision of the model. The experimental results show that our proposed model has 98.56% recognition precision, while recall was 98.04%, F1 value was 98%, mAP was 99.78%, FPS was 41 f/s, and model size was 276 M, which can meet the accurate and real-time recognition of ewe estrus behavior in large-scale meat sheep farming.
In response to the poor performance of long-distance small target recognition tasks and real-time intelligent monitoring, this paper proposes a deep learning-based recognition method aimed at improving the ability to recognize and monitor various behaviors of captive ewes. Additionally, we have developed a system platform based on ELFN-YOLO to monitor the behaviors of ewes. ELFN-YOLO enhances the overall performance of the model by combining ELFN with the attention mechanism CBAM. ELFN strengthens multiple layers with fewer parameters, while the attention mechanism further emphasizes the channel information interaction based on ELFN. It also improves the ability of ELFN to extract spatial information in small target occlusion scenarios, leading to better recognition results. The proposed ELFN-YOLO achieved an accuracy of 92.5%, an F1 score of 92.5%, and a mAP@0.5 of 94.7% on the ewe behavior dataset built in commercial farms, which outperformed YOLOv7-Tiny by 1.5%, 0.8%, and 0.7% in terms of accuracy, F1 score, and mAP@0.5, respectively. It also outperformed other baseline models such as Faster R-CNN, YOLOv4-Tiny, and YOLOv5s. The obtained results indicate that the proposed approach outperforms existing methods in scenarios involving multi-scale detection of small objects. The proposed method is of significant importance for strengthening animal welfare and ewe management, and it provides valuable data support for subsequent tracking algorithms to monitor the activity status of ewes.