Pig-ear detection from the thermal infrared image based on improved YOLOv8n

Hui Han, Xianglong Xue, Qifeng Li, Hongfeng Gao, Rong Wang, Ruixiang Jiang, Zhiyu Ren, Rui Meng, Mingyu Li, Yuhang Guo, Yu Liu, Weihong Ma
{"title":"Pig-ear detection from the thermal infrared image based on improved YOLOv8n","authors":"Hui Han, Xianglong Xue, Qifeng Li, Hongfeng Gao, Rong Wang, Ruixiang Jiang, Zhiyu Ren, Rui Meng, Mingyu Li, Yuhang Guo, Yu Liu, Weihong Ma","doi":"10.20517/ir.2024.02","DOIUrl":null,"url":null,"abstract":"In the current pig scale breeding process, considering the low accuracy and speed of the infrared thermal camera automatic measurement concerning the pig body surface temperature, this paper proposes an improved algorithm for target detection of the pig ear thermal infrared image based on the YOLOv8n model. The algorithm firstly replaces the standard convolution in the CSPDarknet-53 and neck network with Deformable Convolution v2, so that the convolution kernel can adjust its shape according to the actual situation, thus enhancing the extraction of input features; secondly, the Multi-Head Self-Attention module is integrated into the backbone network, which extends the sensory horizons of the backbone network; finally, the Focal-Efficient Intersection Over Union loss function was introduced into the loss of bounding box regression, which increases the Intersection Over Union loss and gradient of the target and, in turn, improves the accuracy of the bounding box regression. Apart from that, a pig training set, including 3,000 infrared images from 50 different individual pigs, was constructed, trained, and tested. The performance of the proposed algorithm was evaluated by comparing it with the current mainstream target detection algorithms, such as Faster-RCNN, SSD, and YOLO families. The experimental results showed that the improved model achieves 97.0%, 98.1% and 98.5% in terms of Precision, Recall and mean Average Precision, which are 3.3, 0.7 and 4.7 percentage points higher compared to the baseline model. At the same time, the detection speed can reach 131 frames per second, which meets the requirement of real-time detection. The research results show that the improved pig ear detection method based on YOLOv8n proposed in this paper can accurately locate the pig ear in thermal infrared images and provide a reference and basis for the subsequent pig body temperature detection.","PeriodicalId":426514,"journal":{"name":"Intelligence & Robotics","volume":"277 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-01-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Intelligence & Robotics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.20517/ir.2024.02","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

In the current pig scale breeding process, considering the low accuracy and speed of the infrared thermal camera automatic measurement concerning the pig body surface temperature, this paper proposes an improved algorithm for target detection of the pig ear thermal infrared image based on the YOLOv8n model. The algorithm firstly replaces the standard convolution in the CSPDarknet-53 and neck network with Deformable Convolution v2, so that the convolution kernel can adjust its shape according to the actual situation, thus enhancing the extraction of input features; secondly, the Multi-Head Self-Attention module is integrated into the backbone network, which extends the sensory horizons of the backbone network; finally, the Focal-Efficient Intersection Over Union loss function was introduced into the loss of bounding box regression, which increases the Intersection Over Union loss and gradient of the target and, in turn, improves the accuracy of the bounding box regression. Apart from that, a pig training set, including 3,000 infrared images from 50 different individual pigs, was constructed, trained, and tested. The performance of the proposed algorithm was evaluated by comparing it with the current mainstream target detection algorithms, such as Faster-RCNN, SSD, and YOLO families. The experimental results showed that the improved model achieves 97.0%, 98.1% and 98.5% in terms of Precision, Recall and mean Average Precision, which are 3.3, 0.7 and 4.7 percentage points higher compared to the baseline model. At the same time, the detection speed can reach 131 frames per second, which meets the requirement of real-time detection. The research results show that the improved pig ear detection method based on YOLOv8n proposed in this paper can accurately locate the pig ear in thermal infrared images and provide a reference and basis for the subsequent pig body temperature detection.
基于改进型 YOLOv8n 的热红外图像猪耳检测技术
在当前生猪规模化养殖过程中,考虑到红外热像仪自动测量猪体表温度的精度和速度较低,本文提出了一种基于YOLOv8n模型的猪耳热红外图像目标检测改进算法。该算法首先将 CSPDarknet-53 和颈部网络中的标准卷积替换为 Deformable Convolution v2,使卷积核可以根据实际情况调整形状,从而增强了对输入特征的提取;其次,在骨干网络中集成了多头自注意力模块,扩展了骨干网络的感知范围;最后,在边界框回归的损失中引入了 Focal-Efficient Intersection Over Union 损失函数,增加了目标的 Intersection Over Union 损失和梯度,从而提高了边界框回归的准确性。此外,还构建、训练和测试了一个猪训练集,其中包括来自 50 头不同个体猪的 3,000 张红外图像。通过与当前主流的目标检测算法(如 Faster-RCNN、SSD 和 YOLO 系列)进行比较,评估了所提出算法的性能。实验结果表明,改进后的模型在精确度、召回率和平均精确度方面分别达到了 97.0%、98.1% 和 98.5%,与基线模型相比分别提高了 3.3、0.7 和 4.7 个百分点。同时,检测速度可以达到每秒 131 帧,满足了实时检测的要求。研究结果表明,本文提出的基于 YOLOv8n 的改进型猪耳检测方法能够准确定位热红外图像中的猪耳,为后续的猪体温检测提供参考和依据。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信