{"title":"AI-powered cow detection in complex farm environments","authors":"Voncarlos M. Araújo , Ines Rili , Thomas Gisiger , Sébastien Gambs , Elsa Vasseur , Marjorie Cellier , Abdoulaye Baniré Diallo","doi":"10.1016/j.atech.2025.100770","DOIUrl":null,"url":null,"abstract":"<div><div>Animal welfare has become a critical issue in contemporary society, emphasizing our ethical responsibilities toward animals, particularly within livestock farming. In addition, the advent of Artificial Intelligence (AI) technologies, specifically computer vision, offers a innovative approach to monitoring and enhancing animal welfare. Cows, as essential contributors to sustainable agriculture and climate management, being a central part of it. However, existing cow detection algorithms face significant challenges in real-world farming environments, such as complex lighting, occlusions, pose variations and background interference, which hinder accurate and reliable detection. Additionally, the model generalization power is highly desirable as it enables the model to adapt and perform well across different contexts and conditions, beyond its training environment or dataset. This study addresses these challenges in diverse cow dataset composed of six different environments, including indoor and outdoor scenarios. More precisely, we propose a novel detection model that combines YOLOv8 with the CBAM (Convolutional Block Attention Module) and assess its performance against baseline models, including Mask R-CNN, YOLOv5 and YOLOv8. Our findings indicate that while baseline models show promise, their performance degrades in complex real-world conditions, which our approach improves using the CBAM attention module. Overall, YOLOv8-CBAM outperformed YOLOv8 by 2.3% in mAP across all camera types, achieving a precision of 95.2% and an [email protected]:0.95 of 82.6%, demonstrating superior generalization and enhanced detection accuracy in complex backgrounds. Thus, the primary contributions of this research are: (1) providing an in-depth analysis of current limitations in cow detection under challenging indoor and outdoor environments, (2) proposing a robust general model that effectively detects cows in complex real-world conditions and (3) evaluating and benchmarking state-of-the-art detection algorithms. Potential application scenarios of the model include automated health monitoring, behavioral analysis and tracking within smart farm management systems, enabling precise detection of individual cows, even in challenging environments. By addressing these critical challenges, this study paves the way for future innovations in AI-driven livestock monitoring, aiming to improve the welfare and management of farm animals while advancing smart agriculture.</div></div>","PeriodicalId":74813,"journal":{"name":"Smart agricultural technology","volume":"10 ","pages":"Article 100770"},"PeriodicalIF":6.3000,"publicationDate":"2025-01-08","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/S2772375525000048","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURAL ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Animal welfare has become a critical issue in contemporary society, emphasizing our ethical responsibilities toward animals, particularly within livestock farming. In addition, the advent of Artificial Intelligence (AI) technologies, specifically computer vision, offers a innovative approach to monitoring and enhancing animal welfare. Cows, as essential contributors to sustainable agriculture and climate management, being a central part of it. However, existing cow detection algorithms face significant challenges in real-world farming environments, such as complex lighting, occlusions, pose variations and background interference, which hinder accurate and reliable detection. Additionally, the model generalization power is highly desirable as it enables the model to adapt and perform well across different contexts and conditions, beyond its training environment or dataset. This study addresses these challenges in diverse cow dataset composed of six different environments, including indoor and outdoor scenarios. More precisely, we propose a novel detection model that combines YOLOv8 with the CBAM (Convolutional Block Attention Module) and assess its performance against baseline models, including Mask R-CNN, YOLOv5 and YOLOv8. Our findings indicate that while baseline models show promise, their performance degrades in complex real-world conditions, which our approach improves using the CBAM attention module. Overall, YOLOv8-CBAM outperformed YOLOv8 by 2.3% in mAP across all camera types, achieving a precision of 95.2% and an [email protected]:0.95 of 82.6%, demonstrating superior generalization and enhanced detection accuracy in complex backgrounds. Thus, the primary contributions of this research are: (1) providing an in-depth analysis of current limitations in cow detection under challenging indoor and outdoor environments, (2) proposing a robust general model that effectively detects cows in complex real-world conditions and (3) evaluating and benchmarking state-of-the-art detection algorithms. Potential application scenarios of the model include automated health monitoring, behavioral analysis and tracking within smart farm management systems, enabling precise detection of individual cows, even in challenging environments. By addressing these critical challenges, this study paves the way for future innovations in AI-driven livestock monitoring, aiming to improve the welfare and management of farm animals while advancing smart agriculture.