A Machine Learning-Based Method for Pig Weight Estimation and the PIGRGB-Weight Dataset
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.
Authors
- Simon X. Yang (ORCID: https://orcid.org/0000-0002-6888-7993)
- Zhiyu Ren (ORCID: https://orcid.org/0000-0002-5495-8711)
- Weihong Ma (ORCID: https://orcid.org/0000-0002-8838-0006)
- Qifeng Li (ORCID: https://orcid.org/0000-0001-8813-5054)
- Mingyu Li (ORCID: https://orcid.org/0000-0003-4812-8604)
- Xintong Ji
- Kaijun Guo
- Zhankang Xu
Institutions
- Beijing University of Agriculture (CN)
- National Engineering Research Center for Information Technology in Agriculture (CN)
- University of Guelph (CA)
Publication Details
- Journal
- Agriculture
- Published
- 2025-04-09
- DOI
- https://doi.org/10.3390/agriculture15080814
- Citations
- 5
- Primary Topic
- Animal Behavior and Welfare Studies
- Type
- article
- Field-Weighted Citation Impact
- 11.77
Funders
- Beijing Academy of Agricultural and Forestry Sciences
- National Science and Technology Major Project