With the advancement of deep learning technology, the importance of utilizing deep learning for livestock management is becoming increasingly evident. goat face detection provides a foundation for goat recognition and management. In this study, we proposed a novel neural network specifically designed for goat face object detection, addressing challenges such as low image resolution, small goat face targets, and indistinct features. By incorporating contextual information and feature-fusion complementation, our approach was compared with existing object detection networks using evaluation metrics such as F1-Score (F1), precision (P), recall (R), and average precision (AP). Our results show that there are 8.07%, 0.06, and 6.8% improvements in AP, P, and R, respectively. The findings confirm that the proposed object detection network effectively mitigates the impact of small targets in goat face detection, providing a solid basis for the development of intelligent management systems for modern livestock farms.
To achieve rapid and precise target counting, the quality of target detection serves as a pivotal factor. This study introduces the Sheep’s Head-Single Shot MultiBox Detector (SH-SSD) as a solution. Within the network’s backbone, the Triple Attention mechanism is incorporated to enhance the MobileNetV3 backbone, resulting in a significant reduction in network parameters and an improvement in detection speed. The network’s neck is constructed using a combination of the Spatial Pyramid Pooling module and the Triple Attention Bottleneck module. This combination enhances the extraction of semantic information and the preservation of detailed feature map information, with a slight increase in network parameters. The network’s head is established through the Decoupled Head module, optimizing the network’s prediction capabilities. Experimental findings demonstrate that the SH-SSD model attains an impressive average detection accuracy of 96.11%, effectively detecting sheep’s heads within the sample. Notably, SH-SSD exhibits enhancements across various detection metrics, accompanied by a significant reduction in model parameters. Furthermore, when combined with the DeepSort tracking algorithm, it achieves high-precision quantitative statistics. The SH-SSD model, introduced in this paper, showcases commendable performance in sheep’s head detection and offers deployment simplicity, thereby furnishing essential technical support for the advancement of intelligent animal husbandry practices.