河北大学学报(自然科学版) ›› 2026, Vol. 46 ›› Issue (3): 237-248.DOI: 10.3969/j.issn.1000-1565.2026.03.002

• • 上一篇    

基于改进RTDETR算法的产后母牛与犊牛行为实时分类模型

顾禄辉,姚瑶,李佳舟,邓依凡,彭英琦   

  • 收稿日期:2025-12-17 发布日期:2026-05-15
  • 通讯作者: 彭英琦(1991—)
  • 作者简介:顾禄辉(2000—),男,四川农业大学在读硕士研究生,主要从事动物行为与检测方向研究.
    E-mail: 2023217016@stu.sicau.edu.cn
  • 基金资助:
    国家自然科学基金项目(32402826)

Real-time behavior classification model of postpartum cows and calves based on improved RTDETR algorithm

GU Luhui, YAO Yao, LI Jiazhou, DENG Yifan, PENG Yingqi   

  1. College of Mechanical and Electrical Engineering, Sichuan Agricultural University, Yaan 625014, China
  • Received:2025-12-17 Published:2026-05-15

摘要: 基于计算机视觉的行为分类已成为动物行为监测的重要技术.本文基于改进的RTDETR(real-time detection transformer)算法,构建了一种产后母牛与犊牛的行为分类模型.通过在RTDETR-r18模型骨架网络的最后一层引入频率自适应空洞卷积(frequency-adaptive dilated convolution,FADC)模块,并将混合编码层中基于注意力的同尺度特征交互(attention-based intra-scale feature interaction,AIFI)模块替换为高低频注意力(HiLo attention)模块,以增强模型对母牛和犊牛图像全局信息与局部特征的高效捕捉能力.将所提出模型与其他模型在相同的产后母牛与犊牛行为数据集上进行训练与比较,结果表明:改进RTDETR模型的总体精确率为97.3%,召回率为96.2%,均高于其他对比模型;与基线RTDETR-r18模型相比,改进RTDETR模型的精确率和召回率分别提升0.9和0.6个百分点.改进RTDETR模型在产后母牛与犊牛的行为分类任务中表现优异,可为提升养殖场管理效率提供新方法.

关键词: 产后母牛, 犊牛, 行为分类, 改进RTDETR模型

Abstract: At present, behavior classification based on computer vision has become an important technology for animal behavior monitoring. This study developed a behavioral classification model for postpartum cows and calves based on the improved RTDETR(real-time detection transformer)algorithm. To efficiently capture both global information and local features from cow and calf images, a frequency-adaptive dilated convolution(FADC)module was integrated into the final layer of the backbone network in the RTDETR-r18 model, and the attention-based intra-scale feature interaction(AIFI)module in the hybrid encoder was replaced with a HiLo attention module. The proposed and other models were trained- 引用格式:张文恺,杨术明,马永龙,等.基于EDEM的牧场推料机器人参数优化设计与试验[J].河北大学学报(自然科学版),2026,46(3):225-236.引用格式:顾禄辉,姚瑶,李佳舟,等.基于改进RTDETR算法的产后母牛与犊牛行为实时分类模型[J].河北大学学报(自然科学版),2026,46(3):237-248.DOI:10.3969/j.issn.1000-1565.2026.03.002基于改进RTDETR算法的产后母牛与犊牛行为实时分类模型顾禄辉,姚瑶,李佳舟,邓依凡,彭英琦(四川农业大学 机电学院,四川 雅安 625014)摘 要:基于计算机视觉的行为分类已成为动物行为监测的重要技术.本文基于改进的RTDETR(real-time detection transformer)算法,构建了一种产后母牛与犊牛的行为分类模型.通过在RTDETR-r18模型骨架网络的最后一层引入频率自适应空洞卷积(frequency-adaptive dilated convolution,FADC)模块,并将混合编码层中基于注意力的同尺度特征交互(attention-based intra-scale feature interaction,AIFI)模块替换为高低频注意力(HiLo attention)模块,以增强模型对母牛和犊牛图像全局信息与局部特征的高效捕捉能力.将所提出模型与其他模型在相同的产后母牛与犊牛行为数据集上进行训练与比较,结果表明:改进RTDETR模型的总体精确率为97.3%,召回率为96.2%,均高于其他对比模型;与基线RTDETR-r18模型相比,改进RTDETR模型的精确率和召回率分别提升0.9和0.6个百分点.改进RTDETR模型在产后母牛与犊牛的行为分类任务中表现优异,可为提升养殖场管理效率提供新方法.关键词:产后母牛;犊牛;行为分类;改进RTDETR模型中图分类号:TP391.4 文献标志码:A 文章编号:1000-1565(2026)03-0237-12DOI:10.3969/j.issn.1000-1565.2026.03.002Real-time behavior classification model of postpartum cows and calves based on improved RTDETR algorithmGU Luhui, YAO Yao, LI Jiazhou, DENG Yifan, PENG Yingqi(College of Mechanical and Electrical Engineering, Sichuan Agricultural University, Yaan 625014, China)Abstract: At present, behavior classification based on computer vision has become an important technology for animal behavior monitoring. This study developed a behavioral classification model for postpartum cows and calves based on the improved RTDETR(real-time detection transformer)algorithm. To efficiently capture both global information and local features from cow and calf images, a frequency-adaptive dilated convolution(FADC)module was integrated into the final layer of the backbone network in the RTDETR-r18 model, and the attention-based intra-scale feature interaction(AIFI)module in the hybrid encoder was replaced with a HiLo attention module. The proposed and other models were trained- 收稿日期:2025-12-17;修回日期:2026-01-15 基金项目:国家自然科学基金项目(32402826) 第一作者:顾禄辉(2000—),男,四川农业大学在读硕士研究生,主要从事动物行为与检测方向研究.E-mail: 2023217016@stu.sicau.edu.cn 通信作者:彭英琦(1991—),女,四川农业大学副教授,主要从事生物传感器、大数据挖掘与分析、动物行为与检测方向研究.E-mail: pengyingqi@sicau.edu.cn 第3期顾禄辉等:基于改进RTDETR算法的产后母牛与犊牛行为实时分类模型河北大学学报(自然科学版) 第46卷on the same dataset of postpartum cow and calf behaviors. The results showed that the improved RTDETR model achieved an overall precision of 97.3% and a recall of 96.2%, both surpassing those of other models. Compared with the baseline RTDETR-r18 model, the precision and recall of the improved RTDETR model increased by 0.9 and 0.6 percentage points, respectively. The improved RTDETR model demonstrates exceptional performance in behavioral classification of postpartum cows and calves, offering an effective method to enhance livestock farm management efficiency.

Key words: postpartum cow, calf, behavior classification, improved RTDETR model

中图分类号: