Zheng Wang , Hongxing Deng , Shujin Zhang , Xingshi Xu , Yuchen Wen , Huaibo Song
{"title":"Detection and tracking of oestrus dairy cows based on improved YOLOv8n and TransT models","authors":"Zheng Wang , Hongxing Deng , Shujin Zhang , Xingshi Xu , Yuchen Wen , Huaibo Song","doi":"10.1016/j.biosystemseng.2025.02.005","DOIUrl":null,"url":null,"abstract":"<div><div>Real-time monitoring of oestrus cows in dairy farming is labour-intensive and time-consuming. To achieve accurate detection and real-time positioning of oestrus cows in natural scenes, a model named YOLO-TransT, integrating the improved YOLOv8n and Transformer Tracking (TransT) models, was proposed for oestrus cow detection and tracking. Firstly, the Context Augmentation Module (CAM) was incorporated into YOLOv8n to enhance the model's focus on the oestrus cow by associating with mounting behaviour; Secondly, the Squeeze-and-Excitation (SE) module was introduced to boost the network's learning ability and suppress redundant features; Thirdly, the improved YOLOv8n and TransT were integrated to obtain the YOLO-TransT model, which realised the detection and tracking of oestrus cow; Finally, based on YOLO-TransT, a cow oestrus monitoring and warning system was designed. The experimental results showed that in the detection part of the YOLO-TransT, the improved YOLOv8n achieved a 92.60% Average Precision of oestrus (AP<sub>oestrus</sub>), 92.00% F1-score, with 3.14 M parameters, 9.70 G Floating-point Operations (FLOPs), and a 7.0 ms/frame detection speed. Compared to the original YOLOv8n, the improved YOLOv8n had increased AP<sub>oestrus</sub> by 4.10% and F1-score by 3.25%, while keeping the parameters, FLOPs, and detection speed essentially unchanged; In the tracking part, the TransT model had a tracking success rate of 70.3%, a precision value of 85.5%, and an Area under Curve (AUC) value of 71.4%. In conclusion, the YOLO-TransT could accurately detect and track oestrus cows in natural scenes, laying the foundation for intelligent livestock breeding. The dataset and code were released on GitHub (<span><span>https://github.com/XingshiXu/ZhengWang_YOLO-TransT</span><svg><path></path></svg></span>).</div></div>","PeriodicalId":9173,"journal":{"name":"Biosystems Engineering","volume":"252 ","pages":"Pages 61-76"},"PeriodicalIF":4.4000,"publicationDate":"2025-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Biosystems Engineering","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1537511025000315","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURAL ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Real-time monitoring of oestrus cows in dairy farming is labour-intensive and time-consuming. To achieve accurate detection and real-time positioning of oestrus cows in natural scenes, a model named YOLO-TransT, integrating the improved YOLOv8n and Transformer Tracking (TransT) models, was proposed for oestrus cow detection and tracking. Firstly, the Context Augmentation Module (CAM) was incorporated into YOLOv8n to enhance the model's focus on the oestrus cow by associating with mounting behaviour; Secondly, the Squeeze-and-Excitation (SE) module was introduced to boost the network's learning ability and suppress redundant features; Thirdly, the improved YOLOv8n and TransT were integrated to obtain the YOLO-TransT model, which realised the detection and tracking of oestrus cow; Finally, based on YOLO-TransT, a cow oestrus monitoring and warning system was designed. The experimental results showed that in the detection part of the YOLO-TransT, the improved YOLOv8n achieved a 92.60% Average Precision of oestrus (APoestrus), 92.00% F1-score, with 3.14 M parameters, 9.70 G Floating-point Operations (FLOPs), and a 7.0 ms/frame detection speed. Compared to the original YOLOv8n, the improved YOLOv8n had increased APoestrus by 4.10% and F1-score by 3.25%, while keeping the parameters, FLOPs, and detection speed essentially unchanged; In the tracking part, the TransT model had a tracking success rate of 70.3%, a precision value of 85.5%, and an Area under Curve (AUC) value of 71.4%. In conclusion, the YOLO-TransT could accurately detect and track oestrus cows in natural scenes, laying the foundation for intelligent livestock breeding. The dataset and code were released on GitHub (https://github.com/XingshiXu/ZhengWang_YOLO-TransT).
期刊介绍:
Biosystems Engineering publishes research in engineering and the physical sciences that represent advances in understanding or modelling of the performance of biological systems for sustainable developments in land use and the environment, agriculture and amenity, bioproduction processes and the food chain. The subject matter of the journal reflects the wide range and interdisciplinary nature of research in engineering for biological systems.