Journal of Integrative Agriculture ›› 2026, Vol. 25 ›› Issue (6): 2534-2544.DOI: 10.1016/j.jia.2024.08.014

• • 上一篇    下一篇

高质量数据集、基础模型和性能评价促进机器视觉技术在生猪养殖中的应用

  

  • 收稿日期:2024-02-27 修回日期:2024-08-22 接受日期:2024-06-23 出版日期:2026-06-20 发布日期:2026-05-06

Promote computer vision applications in pig farming scenarios: High-quality dataset, fundamental models, and comparable performance

Jiangong Li1, 2*#, Xiaodan Hu3*, Ana Lucic4, Yiqi Wu1, Isabella C.F.S. Condotta5, Ryan N. Dilger5, Narendra Ahuja3, Angela R. Green-Miller6   

  1. 1 State Key Laboratory of Animal Nutrition and Feeding, College of Animal Science and Technology, China Agricultural University, Beijing 100193, China

    2 Key Laboratory of Equipment and Informatization in Environment Controlled Agriculture, Ministry of Agriculture and Rural Affairs/College of Biosystems Engineering and Food Science, Zhejiang University, Hangzhou 310058, China

    3 Department of Electrical and Computer Engineering, University of Illinois at Urbana-Champaign, Urbana 61801, USA

    4 Applied Research Institute, University of Illinois at Urbana-Champaign, Champaign 61820, USA

    5 Department of Animal Sciences, University of Illinois at Urbana-Champaign, Urbana 61801, USA

    6 Department of Agricultural and Biological Engineering, University of Illinois at Urbana-Champaign, Urbana 61801, USA

  • Received:2024-02-27 Revised:2024-08-22 Accepted:2024-06-23 Online:2026-06-20 Published:2026-05-06
  • About author:Xiaodan Hu, E-mail: xiaodan8@illinois.edu; #Correspondence Jiangong Li, Tel: +86-10-62732763, E-mail: jli153@cau.edu.cn * These authors contributed equally to this study.
  • Supported by:

    This research received support from the Key Laboratory of Equipment and Informatization in Environment Controlled Agriculture, Ministry of Agriculture and Rural Affairs, China (2011NYZD2204); the Chinese Universities Scientific Fund,  (2024TC097); the Agriculture and Food Research Initiative of United States (AFRI, 2020-67021-32799); and the USDA National Institute of Food and Agriculture (project accession 1024178).

摘要:

机器视觉被广泛认为是动物精准管理领域中的核心应用技术。最新的研究表明,通过视频监控系统和机器视觉算法有望改善猪的健康和福利。然而,缺乏基准数据集和稳健的识别算法限制了机器视觉在实际生产中的应用。本研究旨在通过引入一个通用数据集(PigLife)、比较常见的机器视觉算法的基准性能、讨论不同视觉模型开发的方法和效果,来弥合算法研发与实际应用之间的差距。PigLife数据集包含了现代猪生产工艺(繁殖和妊娠、产仔至断奶、断奶与保育、育肥至出栏)中常规生产场景的视频片段和图像(38个短视频片段、2K图像帧、22K猪实例)。本研究利用PiLife 数据集,训练并对比了三种常规猪只检测算法(Faster R-CNN、RetinaNet、TridentNet)和三种分常规猪只分割算法(Mask R-CNN、MViTv2、Point-Rend)。此外,本研究评估了通过预训练模型的微调(YOLO8-m、Faster-RCNN-r50)和零样本模型(CLIP-SAM、Grouddino-HQSAM)的无训练两种方式,来加快机器视觉开发的速度。通过本研究的分析与讨论,展示了基准数据集在评估算法稳健性和识别各种算法面临的困难和挑战中的必要性;表明从预训练算法或零样本模型开发计算机视觉模型表现出更好的性能和更快的过程,可以极大的降低针对猪养殖场景开发高性能机器视觉产品的成本和难度。

Abstract:

Computer vision is widely recognized as an influential technology in the field of precision management of animals.  Emerging studies have demonstrated the potential to improve pig health and welfare through animal surveillance systems and computer vision (CV) algorithms.  However, the lack of benchmark datasets and robust fundamental algorithms restrict CV applications for the commercial use.  This study aims to bridge the gap between technology development and commercial applications in pig farming scenarios by introducing a general-purpose dataset (PigLife), comparing benchmark performances of foundational CV algorithms and model development workflows.  The PigLife dataset contains video clips and images (38 short video clips, 2K image frames, 22K pig instances) across most pig production phases in a typical commercial pig farm: Breeding and Gestation, Farrow to Wean, Weaning & Nursery, and Growth to Finish.  Three detection algorithms (Faster R-CNN, RetinaNet, TridentNet) and three segmentation algorithms (Mask R-CNN, MViTv2, PointRend) were trained on the PigLife dataset from scratch.  Fine-tuning of pre-trained models (YOLO8-m, Faster-RCNN-r50) and no-training from zero-shot models (CLIP-SAM, Grouddino-HQSAM) were also evaluated to suggest faster CV development workflows for commercial applications in pig farming.  This study emphasizes the necessity of a benchmark dataset for evaluating the robustness of algorithms and identifying the remaining difficulties and challenges across various algorithms.  Furthermore, developing CV models from pre-trained algorithms or zero-shot models showed better performance and a faster process, which could reduce barriers when developing high-performance CV products in pig production industry.

Key words: PigLife , pig recognition ,  benchmark performance ,  transfer learning ,  zero-shot algorithm