Research on Estimating Backfat Thickness in Jinfen White Pigs Using Deep Learning and Image Processing
To address the time-consuming, labor-intensive, and inefficient nature of existing contact-based measurements of sow backfat thickness (BFT), in this study, a method to estimate BFT from depth images using deep learning and image processing is proposed. Measurements of BFT and hip depth images were collected from 254 Jinfen White sows. Following preprocessing, including depth-value filtering and colorization, a modified YOLOv8n-ShuffleNetV2 detector was trained and deployed to predict regions of interest in the buttock images. Depth values were then extracted from these regions and converted into distance estimates. Then, 11 external morphological pixel-based parameters were extracted, including hip area, hip-circumference length, and the area of the fitted ellipse. A random sample of 203 sows was selected for training and testing, and the relationship between BFT and the external morphological parameters was analyzed in 152, with the rest being used for testing. The results show significant positive correlations between BFT and several hip morphological parameters, with Pearson correlation coefficients exceeding 0.90 for both hip and fitted ellipse area. Principal component analysis was applied to the selected hip features to extract area and length related factors as inputs to a machine learning model. An elastic net regression model was employed to estimate BFT. The model’s generalization capability was evaluated using 51 sows not involved in training and testing. The model achieved an R2 = 0.8617, MSE = 4.3626 mm2, and MAE = 1.6456 mm. Finally, a BFT estimation system for Jinfen White pigs was developed using PyQt5 and Python, which enables automatic preprocessing of sow hip images and real-time estimation of BFT. Together, these results address the cumbersome and inefficient traditional manual collection of sow BFT data and support precision management in sow breeding farms.
Authors
- Hongli Li (ORCID: https://orcid.org/0000-0002-9723-8546)
- J. X. Zhang
- Ziyu Li (ORCID: https://orcid.org/0009-0002-8122-1093)
- Xuyang Fu
- Wenwen Xing
- Pengzhe Yi
Institutions
- Shanxi Agricultural University (CN)
Publication Details
- Journal
- Agriculture
- Published
- 2026-01-06
- DOI
- https://doi.org/10.3390/agriculture16020138
- Primary Topic
- Animal Behavior and Welfare Studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00