Jinxin Chen , Luo Liu , Peng Li , Wen Yao , Mingxia Shen , Qi-an Ding , Longshen Liu
{"title":"PKL-Track: A Keypoint-Optimized approach for piglet tracking and activity measurement","authors":"Jinxin Chen , Luo Liu , Peng Li , Wen Yao , Mingxia Shen , Qi-an Ding , Longshen Liu","doi":"10.1016/j.compag.2025.110578","DOIUrl":null,"url":null,"abstract":"<div><div>This study proposes an efficient and accurate multi-object tracking method for piglets (Piglet Keypoints and L2 Distance Tracking, PKL-Track) to achieve piglet state monitoring and activity quantification. The proposed method employs the improved YOLOv11s-Pose model for target and keypoint detection, utilizing the relative positions of piglet bounding boxes to refine keypoint regression while optimizing the detection head to enhance model efficiency. To address challenges such as occlusion and target crowding, the BoT-SORT algorithm was improved by incorporating keypoint and bounding box information to refine matching distances, supplemented by normalized Euclidean distance to expand matching range. Experiments were conducted using video data from 31 piglet pens, constructing a dataset containing targets, keypoints, and tracking annotations for testing. Results demonstrated that the improved YOLOv11s-Pose model achieved an average precision of 98.5 % for object detection and 98.0 % for keypoint detection, with a detection time of 5.0 ms per frame. For multi-object tracking tasks, short frame intervals (5 frames) achieved 84.3 % HOTA, 99.1 % MOTA, and 91.5 % IDF1, significantly reducing ID switches. Activity quantification experiments based on tracking results revealed a relative error of only 2.36 % in group activity measurement, accurately reflecting piglet activity levels. The proposed method demonstrates excellent performance in multi-object tracking and activity quantification, providing key technological support for behavior monitoring and piglet health assessment in precision livestock farming.</div></div>","PeriodicalId":50627,"journal":{"name":"Computers and Electronics in Agriculture","volume":"237 ","pages":"Article 110578"},"PeriodicalIF":7.7000,"publicationDate":"2025-05-28","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/S0168169925006842","RegionNum":1,"RegionCategory":"农林科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
Abstract
This study proposes an efficient and accurate multi-object tracking method for piglets (Piglet Keypoints and L2 Distance Tracking, PKL-Track) to achieve piglet state monitoring and activity quantification. The proposed method employs the improved YOLOv11s-Pose model for target and keypoint detection, utilizing the relative positions of piglet bounding boxes to refine keypoint regression while optimizing the detection head to enhance model efficiency. To address challenges such as occlusion and target crowding, the BoT-SORT algorithm was improved by incorporating keypoint and bounding box information to refine matching distances, supplemented by normalized Euclidean distance to expand matching range. Experiments were conducted using video data from 31 piglet pens, constructing a dataset containing targets, keypoints, and tracking annotations for testing. Results demonstrated that the improved YOLOv11s-Pose model achieved an average precision of 98.5 % for object detection and 98.0 % for keypoint detection, with a detection time of 5.0 ms per frame. For multi-object tracking tasks, short frame intervals (5 frames) achieved 84.3 % HOTA, 99.1 % MOTA, and 91.5 % IDF1, significantly reducing ID switches. Activity quantification experiments based on tracking results revealed a relative error of only 2.36 % in group activity measurement, accurately reflecting piglet activity levels. The proposed method demonstrates excellent performance in multi-object tracking and activity quantification, providing key technological support for behavior monitoring and piglet health assessment in precision livestock farming.
本研究提出了一种高效、准确的仔猪多目标跟踪方法(Piglet Keypoints and L2 Distance tracking, PKL-Track),实现仔猪状态监测和活动量化。该方法采用改进的YOLOv11s-Pose模型进行目标和关键点检测,利用仔猪边界盒的相对位置对关键点回归进行细化,同时对检测头进行优化,提高模型效率。针对遮挡和目标拥挤等问题,对BoT-SORT算法进行了改进,结合关键点和边界框信息来细化匹配距离,并补充归一化欧几里得距离来扩大匹配范围。实验采用31个猪圈的视频数据,构建了包含目标、关键点和跟踪注释的数据集进行测试。结果表明,改进的YOLOv11s-Pose模型的目标检测平均精度为98.5%,关键点检测平均精度为98.0%,检测时间为5.0 ms /帧。对于多目标跟踪任务,短帧间隔(5帧)实现了84.3%的HOTA、99.1%的MOTA和91.5%的IDF1,显著减少了ID切换。基于跟踪结果的活动量化实验表明,群体活动测量的相对误差仅为2.36%,准确反映了仔猪的活动水平。该方法在多目标跟踪和活动量化方面表现优异,为精准养殖中的行为监测和仔猪健康评估提供关键技术支持。
期刊介绍:
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.