Md Ishtiaq Ahmed , Huiping Cao , Andrés Ricardo Perea , Mehmet Emin Bakir , Huiying Chen , Santiago A. Utsumi
{"title":"YOLOv8-BS: An integrated method for identifying stationary and moving behaviors of cattle with a newly developed dataset","authors":"Md Ishtiaq Ahmed , Huiping Cao , Andrés Ricardo Perea , Mehmet Emin Bakir , Huiying Chen , Santiago A. Utsumi","doi":"10.1016/j.atech.2025.101153","DOIUrl":null,"url":null,"abstract":"<div><div>Enhanced identification of cattle behavior can significantly improve animal welfare, support preventive health management, and optimize daily operations. Advances in computer vision (CV) and deep learning have shown great potential to enhance the robustness and sophistication of modern animal monitoring systems. This study introduces YOLOv8-Background Subtraction (YOLOv8-BS), a novel approach combining the CV model YOLOv8, a background subtraction module from OpenCV, and a behavior-counting component to classify four key behaviors in free roaming cattle: standing, feeding, resting (lying), and walking (moving). To train and evaluate the model, a new benchmark dataset of 92,592 labeled video frames, obtained from videos recorded from 11/2023 to 12/2023, with a balanced distribution of the targeted behaviors was curated. While the YOLOv8 model excelled in identifying stationary postures, it faced significant challenges when detecting animal motion. Conversely, the use of YOLOv8-BS, which applied OpenCV’s background subtraction model on YOLOv8, enhanced the detection of walking, with a 20 % increase in precision, a 13 % boost in recall and an 18 % improvement in F1 score compared to the YOLOv8. YOLOv8-BS achieved 89 % precision and 88 % recall for ‘standing’, 100 % precision and 90 % recall for ‘resting’, 86 % of precision and recall for ‘feeding’ and 74 % precision and 72 % recall for ‘walking’, respectively. Datasets curated for this study fill in the gaps of currently available datasets that primarily emphasize the detection of stationary behaviors of cattle in confined environments or one or a few specific behaviors within an individual video frame. This dataset is available online for research purposes.</div></div>","PeriodicalId":74813,"journal":{"name":"Smart agricultural technology","volume":"12 ","pages":"Article 101153"},"PeriodicalIF":5.7000,"publicationDate":"2025-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Smart agricultural technology","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2772375525003855","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURAL ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Enhanced identification of cattle behavior can significantly improve animal welfare, support preventive health management, and optimize daily operations. Advances in computer vision (CV) and deep learning have shown great potential to enhance the robustness and sophistication of modern animal monitoring systems. This study introduces YOLOv8-Background Subtraction (YOLOv8-BS), a novel approach combining the CV model YOLOv8, a background subtraction module from OpenCV, and a behavior-counting component to classify four key behaviors in free roaming cattle: standing, feeding, resting (lying), and walking (moving). To train and evaluate the model, a new benchmark dataset of 92,592 labeled video frames, obtained from videos recorded from 11/2023 to 12/2023, with a balanced distribution of the targeted behaviors was curated. While the YOLOv8 model excelled in identifying stationary postures, it faced significant challenges when detecting animal motion. Conversely, the use of YOLOv8-BS, which applied OpenCV’s background subtraction model on YOLOv8, enhanced the detection of walking, with a 20 % increase in precision, a 13 % boost in recall and an 18 % improvement in F1 score compared to the YOLOv8. YOLOv8-BS achieved 89 % precision and 88 % recall for ‘standing’, 100 % precision and 90 % recall for ‘resting’, 86 % of precision and recall for ‘feeding’ and 74 % precision and 72 % recall for ‘walking’, respectively. Datasets curated for this study fill in the gaps of currently available datasets that primarily emphasize the detection of stationary behaviors of cattle in confined environments or one or a few specific behaviors within an individual video frame. This dataset is available online for research purposes.