Mengjie Zhang , Dan Hong , Jiabao Wu , Yanfei Zhu , Qinan Zhao , Xiaoshuan Zhang , Hailing Luo
{"title":"Sheep-YOLO: improved and lightweight YOLOv8n for precise and intelligent recognition of fattening lambs’ behaviors and vitality statuses","authors":"Mengjie Zhang , Dan Hong , Jiabao Wu , Yanfei Zhu , Qinan Zhao , Xiaoshuan Zhang , Hailing Luo","doi":"10.1016/j.compag.2025.110413","DOIUrl":null,"url":null,"abstract":"<div><div>Fattening lambs’ behaviors and vitality statuses reflect health status and animal welfare directly. However, current detection methods for these aspects primarily rely on manual observation, which is inefficient. This paper aims to achieve precise and intelligent recognition of fattening lambs’ behaviors and vitality statuses. Through the comprehensive literature review, field observations, and consultations with experts, four pivotal behaviors (running, sleeping, socialization, and wandering), alongside four vitality statuses (excitement, hungry, lethargy, and normal) are identified as crucial indicators that mirror the health status of fattening lambs. A visual system is established to collect and construct a dataset of fattening lambs, and a five-fold cross-validation method is employed to determine the basic model. Furthermore, an improved lightweight YOLOv8n model, named Sheep-YOLO, is developed in this paper. Sheep-YOLO utilizes the FasterNet network to reduce model complexity and incorporates the Mixed Local Channel Attention (MLCA) module, SIoU loss function, and Content-Aware ReAssembly of FEatures (CARAFE) to enhance the model’s adaptability to varying breeding densities and lighting conditions. To validate the effectiveness of the optimization strategies, comparison experiments are conducted in this paper. The experimental results show that Sheep-YOLO achieved Params of 1.905 M and GFLOPs of 5.5 G, with a high mAP<sub>0.5</sub> of 96.1 % on the test set and a detection speed of 79.317 FPS(12.61 ms/per image). Compared to the basic YOLOv8n, Sheep-YOLO achieves a 36.6 % reduction in Params and a 30 % decrease in GFLOPs, while maintaining higher mAP<sub>0.5</sub> and faster detection speed. Besides, Sheep-YOLO surpasses widely used algorithms such as YOLOv3-tiny, YOLOv5n, YOLOv10n, RT-DETR, and Faster-RCNN regarding both lightweight performance and precision. Therefore, this study provides potential technical support for precise and intelligent recognition of the behaviors and vitality statuses of fattening lambs, contributing to the health monitoring and early disease prediction of sheep.</div></div>","PeriodicalId":50627,"journal":{"name":"Computers and Electronics in Agriculture","volume":"236 ","pages":"Article 110413"},"PeriodicalIF":7.7000,"publicationDate":"2025-04-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computers and Electronics in Agriculture","FirstCategoryId":"97","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0168169925005198","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
Abstract
Fattening lambs’ behaviors and vitality statuses reflect health status and animal welfare directly. However, current detection methods for these aspects primarily rely on manual observation, which is inefficient. This paper aims to achieve precise and intelligent recognition of fattening lambs’ behaviors and vitality statuses. Through the comprehensive literature review, field observations, and consultations with experts, four pivotal behaviors (running, sleeping, socialization, and wandering), alongside four vitality statuses (excitement, hungry, lethargy, and normal) are identified as crucial indicators that mirror the health status of fattening lambs. A visual system is established to collect and construct a dataset of fattening lambs, and a five-fold cross-validation method is employed to determine the basic model. Furthermore, an improved lightweight YOLOv8n model, named Sheep-YOLO, is developed in this paper. Sheep-YOLO utilizes the FasterNet network to reduce model complexity and incorporates the Mixed Local Channel Attention (MLCA) module, SIoU loss function, and Content-Aware ReAssembly of FEatures (CARAFE) to enhance the model’s adaptability to varying breeding densities and lighting conditions. To validate the effectiveness of the optimization strategies, comparison experiments are conducted in this paper. The experimental results show that Sheep-YOLO achieved Params of 1.905 M and GFLOPs of 5.5 G, with a high mAP0.5 of 96.1 % on the test set and a detection speed of 79.317 FPS(12.61 ms/per image). Compared to the basic YOLOv8n, Sheep-YOLO achieves a 36.6 % reduction in Params and a 30 % decrease in GFLOPs, while maintaining higher mAP0.5 and faster detection speed. Besides, Sheep-YOLO surpasses widely used algorithms such as YOLOv3-tiny, YOLOv5n, YOLOv10n, RT-DETR, and Faster-RCNN regarding both lightweight performance and precision. Therefore, this study provides potential technical support for precise and intelligent recognition of the behaviors and vitality statuses of fattening lambs, contributing to the health monitoring and early disease prediction of sheep.
期刊介绍:
Computers and Electronics in Agriculture provides international coverage of advancements in computer hardware, software, electronic instrumentation, and control systems applied to agricultural challenges. Encompassing agronomy, horticulture, forestry, aquaculture, and animal farming, the journal publishes original papers, reviews, and applications notes. It explores the use of computers and electronics in plant or animal agricultural production, covering topics like agricultural soils, water, pests, controlled environments, and waste. The scope extends to on-farm post-harvest operations and relevant technologies, including artificial intelligence, sensors, machine vision, robotics, networking, and simulation modeling. Its companion journal, Smart Agricultural Technology, continues the focus on smart applications in production agriculture.