IDEAS home Printed from https://ideas.repec.org/a/gam/jagris/v15y2025i8p814-d1630879.html
   My bibliography  Save this article

A Machine Learning-Based Method for Pig Weight Estimation and the PIGRGB-Weight Dataset

Author

Listed:
  • Xintong Ji

    (College of Animal Science and Technology, Beijing University of Agriculture, Beijing 100096, China
    Information Technology Research Centre, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China)

  • Qifeng Li

    (Information Technology Research Centre, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China
    National Innovation Centre of Digital Technology in Animal Husbandry, Beijing 100097, China)

  • Kaijun Guo

    (College of Animal Science and Technology, Beijing University of Agriculture, Beijing 100096, China)

  • Weihong Ma

    (Information Technology Research Centre, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China
    National Innovation Centre of Digital Technology in Animal Husbandry, Beijing 100097, China)

  • Mingyu Li

    (Information Technology Research Centre, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China)

  • Zhankang Xu

    (Information Technology Research Centre, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China)

  • Simon X. Yang

    (Advanced Robotics and Intelligent Systems Laboratory, School of Engineering, University of Guelph, Guelph, ON N1G 2W1, Canada)

  • Zhiyu Ren

    (Information Technology Research Centre, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China)

Abstract

Traditional pig weighing methods are costly, require driving pigs onto electronic scales, and cannot collect real-time data without interference. Pig weight estimation using deep learning often demands significant computational resources and lacks real-time capabilities, highlighting the need for a more efficient method. To overcome these challenges, this study proposes a machine learning-based approach for real-time pig weight estimation by extracting image features. The method reduces computational demands while maintaining high accuracy. The SAM2-Pig model is employed for instant segmentation of pig RGB images to extract features such as relative projection area, body length, and body width, which are crucial for accurate weight prediction. Regression models, including the BPNN with Trainlm, are used to predict pig weight based on the extracted features, achieving the best performance in our experiments. This study demonstrates that machine learning methods using RGB image features provide accurate and adaptable results, offering a viable solution for real-time pig weight estimation. This study also publicly releases the PIGRGB-Weight dataset, consisting of 9579 RGB images of pigs in a free-moving state, annotated with weight information, enabling future research and model testing. The method demonstrates remarkable stability, low computational demand, and practical applicability, making it a lightweight and effective approach for estimating pig weight in real time.

Suggested Citation

  • Xintong Ji & Qifeng Li & Kaijun Guo & Weihong Ma & Mingyu Li & Zhankang Xu & Simon X. Yang & Zhiyu Ren, 2025. "A Machine Learning-Based Method for Pig Weight Estimation and the PIGRGB-Weight Dataset," Agriculture, MDPI, vol. 15(8), pages 1-23, April.
  • Handle: RePEc:gam:jagris:v:15:y:2025:i:8:p:814-:d:1630879
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2077-0472/15/8/814/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2077-0472/15/8/814/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Enze Duan & Hongyun Hao & Shida Zhao & Hongying Wang & Zongchun Bai, 2023. "Estimating Body Weight in Captive Rabbits Based on Improved Mask RCNN," Agriculture, MDPI, vol. 13(4), pages 1-18, March.
    2. Weihong Ma & Xiangyu Qi & Yi Sun & Ronghua Gao & Luyu Ding & Rong Wang & Cheng Peng & Jun Zhang & Jianwei Wu & Zhankang Xu & Mingyu Li & Hongyan Zhao & Shudong Huang & Qifeng Li, 2024. "Computer Vision-Based Measurement Techniques for Livestock Body Dimension and Weight: A Review," Agriculture, MDPI, vol. 14(2), pages 1-22, February.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Cui, Yiming & Liu, Mengmeng & Li, Wei & Lian, Jijian & Yao, Ye & Gao, Xifeng & Yu, Lina & Wang, Ting & Li, Yichu & Yin, Jilong, 2024. "An exploratory framework to identify dust on photovoltaic panels in offshore floating solar power stations," Energy, Elsevier, vol. 307(C).
    2. Guanying Cui & Lulu Qiao & Yuhua Li & Zhilong Chen & Zhenyu Liang & Chengrui Xin & Maohua Xiao & Xiuguo Zou, 2023. "Division of Cow Production Groups Based on SOLOv2 and Improved CNN-LSTM," Agriculture, MDPI, vol. 13(8), pages 1-21, August.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jagris:v:15:y:2025:i:8:p:814-:d:1630879. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.