{"title":"A detection method for dead caged hens based on improved YOLOv7","authors":"","doi":"10.1016/j.compag.2024.109388","DOIUrl":null,"url":null,"abstract":"<div><p>In large-scale laying hen farms, daily inspection of dead hens is a relevant task to monitor the health of the flock and prevent disease spreading. The current manual inspection method used in caged hen farms is inefficient, costly, and particularly difficult for high-rise cages. To address this issue, a dead caged hen detection method based on improved You Only Look Once version 7 (YOLOv7) was proposed in this study, which was optimized to improve detection performance and speed in complex farming environments, such as cage wire mesh occlusion and crowded hen occlusion. First, the Convolutional Block Attention Module was used to enable the model to learn target features accurately. Second, the Distance Intersection over Union Non-maximum Suppression and repulsion loss were introduced to improve crowded hen occlusion and reduce missed detections. Additionally, to facilitate the deployment of the proposed method on mobile devices, the MobileNetv3 lightweight network was used to replace the backbone of YOLOv7. Furthermore, the lightweight model was trained using the knowledge distillation method to enhance its performance. Finally, a comparison experiment of different object detection networks and an ablation experiment were conducted to evaluate the proposed method. The experimental results reveal that the improved YOLOv7 model proposed in this study performs optimally. Its precision, recall, F1 score, and [email protected] for the dead hens in the test set are 95.7 %, 86.8 %, 0.910, and 86.2 %, respectively. Compared with the original YOLOv7 model, precision, recall, and [email protected] were increased by 6 %, 10 %, and 13.4 %, respectively. The model parameters and Giga Floating-point Operations were decreased by 31.95 % and 60.56 %, respectively, resulting in a detection speed increase of 43 Frames Per Second. Furthermore, with the assistance of an inspection robot, the proposed dead hen detection model was deployed in the actual farming environments. Compared with methods proposed by other researchers, the proposed model is more suitable for complex actual farming environments and achieves higher detection accuracy, which can offer a reference for automated caged hen detection.</p></div>","PeriodicalId":50627,"journal":{"name":"Computers and Electronics in Agriculture","volume":null,"pages":null},"PeriodicalIF":7.7000,"publicationDate":"2024-08-31","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/S0168169924007798","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
Abstract
In large-scale laying hen farms, daily inspection of dead hens is a relevant task to monitor the health of the flock and prevent disease spreading. The current manual inspection method used in caged hen farms is inefficient, costly, and particularly difficult for high-rise cages. To address this issue, a dead caged hen detection method based on improved You Only Look Once version 7 (YOLOv7) was proposed in this study, which was optimized to improve detection performance and speed in complex farming environments, such as cage wire mesh occlusion and crowded hen occlusion. First, the Convolutional Block Attention Module was used to enable the model to learn target features accurately. Second, the Distance Intersection over Union Non-maximum Suppression and repulsion loss were introduced to improve crowded hen occlusion and reduce missed detections. Additionally, to facilitate the deployment of the proposed method on mobile devices, the MobileNetv3 lightweight network was used to replace the backbone of YOLOv7. Furthermore, the lightweight model was trained using the knowledge distillation method to enhance its performance. Finally, a comparison experiment of different object detection networks and an ablation experiment were conducted to evaluate the proposed method. The experimental results reveal that the improved YOLOv7 model proposed in this study performs optimally. Its precision, recall, F1 score, and [email protected] for the dead hens in the test set are 95.7 %, 86.8 %, 0.910, and 86.2 %, respectively. Compared with the original YOLOv7 model, precision, recall, and [email protected] were increased by 6 %, 10 %, and 13.4 %, respectively. The model parameters and Giga Floating-point Operations were decreased by 31.95 % and 60.56 %, respectively, resulting in a detection speed increase of 43 Frames Per Second. Furthermore, with the assistance of an inspection robot, the proposed dead hen detection model was deployed in the actual farming environments. Compared with methods proposed by other researchers, the proposed model is more suitable for complex actual farming environments and achieves higher detection accuracy, which can offer a reference for automated caged hen detection.
期刊介绍:
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.