The use of machine vision technology for recognizing cow behavior plays a crucial role in daily management, health monitoring, and breeding and reproduction in dairy farming, making it an essential component of modern smart agriculture. This paper presents a novel dual-stream network model, the Motion Focus Global-Local Network (MFGN), for analyzing cow video data. The dual-stream network consists of a global spatiotemporal feature stream and a fine motion feature stream. The global spatiotemporal feature stream extracts key frames to remove redundant information and utilizes a Transformer network for global spatio-temporal feature extraction, reflecting the dynamic changes in cow videos and the temporal relationships between video frames. The fine motion feature stream, based on frame differencing of cow videos, uses focal convolution to capture subtle movements of cows, enhancing the focus on minor behavioral changes. To evaluate the performance of the proposed model, video data samples were collected from eight cows marked on their bodies and heads at an Australian farm site (CSIRO Armidale), including a total of 1715 video sequences across three behavior categories. The model achieved recognition accuracies of 98.1% for drinking, 95.5% for grazing, and 49.3% for other behaviors, with an overall average recognition accuracy of 79.4%, representing a 7.4% improvement over the classic TSN model. Overall, the MFGN network effectively extracts and integrates global spatiotemporal features with fine motion features from cow video data, modeling both the overall sequence characteristics and focusing on local motion details, achieving precise behavioral recognition. This research not only enhances the accuracy of cow behavior recognition but also provides new technological means for precise management in modern smart agriculture, with broad industry application potential to improve farm efficiency, profitability, and disease control and prevention.
Read full abstract