Industry-scale prediction of video-derived pig body weight using efficient convolutional neural networks and vision transformers
Accurate pig body weight measurement is critical for pig growth, health, and marketing. Although there is a growing trend towards the use of computer vision approaches for pig body weight prediction, their validation with large-scale data collected in commercial environments is still limited. Therefore, the main objective of this study was to predict pig body weight collected at multiple timepoints from a commercial environment using efficient convolutional neural networks and efficient vision transformers. Top-view videos were collected from over 600 pigs at six time points over three months. Scale-based body weight records were simultaneously recorded by a digital weighing system. An automated video conversion pipeline and fine-tuned YOLOv8 were applied to preprocess the raw depth videos. Two families of lightweight deep neural networks, MobileNet and MobileViT, were initialised with the pre-trained weights from ImageNet and customised to predict pig body weight directly from depth images. Two cross-validation strategies were used: single time point random subsampling and time series forecasting with a sparse design considering limited budget scenarios. In single time point random subsampling, the best prediction mean absolute percentage error for each time point was 4.71%, 3.80%, 3.08%, 5.60%, 3.42%, and 3.77%, respectively. On average, the MobileViT-S model produced the best prediction mean absolute percentage error. In time series forecasting, although a sparse design resulted in some performance loss compared to the full design, the use of ViT models mitigated this degradation. These results suggest that efficient deep learning-based supervised learning models are a promising approach for predicting pig body weight from industry-scale depth video data. • We generated a pig body weight dataset for validation in commercial settings. • Lightweight CNN and ViT models successfully predicted pig body weight from videos. • Predictions remained accurate with sparse data showing promise for budget-friendly use.
Authors
- Gota Morota (ORCID: https://orcid.org/0000-0002-3567-6911)
- Ye Bi (ORCID: https://orcid.org/0000-0001-7871-5856)
- Jianhua Xuan (ORCID: https://orcid.org/0000-0001-7256-1374)
- Yuting Huang (ORCID: https://orcid.org/0000-0001-6979-8100)
Publication Details
- Journal
- Biosystems Engineering
- Published
- 2025-08-05
- DOI
- https://doi.org/10.1016/j.biosystemseng.2025.104243
- Citations
- 4
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 3.01
Funders
- U.S. Department of Agriculture
- National Institute of Food and Agriculture