基于时空注意力反演的猪只排便行为长视频分析框架
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

广东省重点领域研发计划项目(2023B0202140001)和国家重点研发计划项目(2021YFD2000802)


Spatiotemporal Attention‑based Inverse Reasoning Framework for Pig Defecation Behavior Analysis in Long Videos
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    猪只排便频率是评估猪群健康与环境卫生的重要指标,但现有方法难以在多头猪只的饲养环境和长时序场景中实现个体排便行为的精准识别与统计。为解决这些挑战,本文提出了一种自动化识别和统计猪只排便行为的时空注意力反演推理(Spatiotemporal attention?based inverse reasoning, SAIR)框架。设计了一种基于空间注意力增强的YOLO v8模型,实现猪只个体、臀部及粪便的实时检测,并结合改进的BoT?SORT算法进行轨迹跟踪。提出了一种基于自适应加权多层感知机融合网络,对受背景干扰和低分辨率影响的疑似粪便图像进行精细化重识别。以粪便识别帧为起点回溯收集历史视频帧数据,并采用K?Means算法对猪群行为轨迹中心进行聚类,计算粪便与猪只个体的空间相关性。同时,基于时序注意力机制计算粪便和猪只个体的时间相关性。融合粪便与猪只个体的空间、时间相关性,反演推理确定发生排便行为的猪只个体。结果表明,在短视频测试中,本文方法分类准确率、召回率和精确率分别为97.7%、97.2%和98.1%;在长视频场景下,其F1值、召回率和精确率分别达到88.5%、90.0%和87.1%。该方法有效降低了猪只单次排泄多坨粪便和长时序轨迹误判带来的识别误差,为猪只排便行为识别及健康评估提供了可靠支持。

    Abstract:

    Defecation frequency serves as a crucial indicator for assessing pig health and environmental hygiene. However, existing methods struggle to accurately identify and quantify individual defecation behaviors in multi?pig housing environments and long?duration scenarios. To address these challenges, a spatiotemporal attention?based inverse reasoning (SAIR) framework for automated analysis of pig defecation was proposed. The framework first designed a spatial attention?enhanced YOLO v8 model for detecting pigs, pig hindquarters, and feces. It incorporated an improved BoT?SORT algorithm for pig tracking. Subsequently, an adaptive weighted fusion multi?layer perceptron network was proposed for refined recognition of suspected feces with significant background interference and low resolution. Starting from the feces detection frame, the framework backtracks historical trajectories using K?Means clustering to analyze spatial correlations between pigs and feces. Simultaneously, temporal correlations between feces and pigs were computed by using a temporal attention mechanism. Finally, by integrating the spatial and temporal correlations, the model identified the specific pig involved in defecation. In short video tests, the proposed method achieved classification accuracy, recall, and precision of 97.7%, 97.2%, and 98.1%, respectively. In long video scenarios, the F1?score, recall, and precision reached 88.5%, 90.0%, and 87.1%, respectively. The proposed approach effectively reduced recognition errors caused by multiple fecal discharges in a single defecation event and trajectory misjudgments in long?term sequences, providing reliable support for pig defecation behavior recognition and health assessment.

    参考文献
    相似文献
    引证文献
引用本文

杨秋妹,吴曼婷,肖德琴,陈泽中,吴纪沿,洪其伟.基于时空注意力反演的猪只排便行为长视频分析框架[J].农业机械学报,2026,57(10):295-307. YANG Qiumei, WU Manting, XIAO Deqin, CHEN Zezhong, WU Jiyan, HONG Qiwei. Spatiotemporal Attention‑based Inverse Reasoning Framework for Pig Defecation Behavior Analysis in Long Videos[J]. Transactions of the Chinese Society for Agricultural Machinery,2026,57(10):295-307.

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-08-15
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2026-05-15
  • 出版日期:
文章二维码