EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

SAM 2-Assisted Vision Transformer and Morphometric Feature Engineering for Pig Weight Estimation from RGB Images

Yurui Li, Longhu Ma, Tingting Li, Shengyuan Zhi, Ran Peng, Yan Sun, Mengxin Chen, Jiong Mu

Applied Sciences · 05.06.2026 · 16 (11) · 5708

DOI: 10.3390/app16115708 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Applied Sciences, online erschienen am 05.06.2026. Verfasst von Yurui Li und 7 weiteren Autor:innen. Die Arbeit wurde bisher 1-mal zitiert (Crossref) und nennt 36 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Accurate body-weight measurement is important for precision pig farming, but conventional weighing methods are labor-intensive and may disturb normal animal activity. Although three-dimensional sensing systems can provide reliable geometric information, their deployment cost limits large-scale application in commercial farms. This study proposes a non-contact pig weight estimation framework based on standard RGB images. The framework combines SAM 2 foreground extraction with a transformer-based dorsal segmentation network to obtain stable body contours under complex farm conditions. Cross-covariance attention and local patch interaction modules are introduced to preserve both global body structure and local boundary details during segmentation. A hybrid loss function combining focal loss and label-distribution-aware margin loss is further adopted to address foreground-background imbalance. After segmentation, 17 morphometric features are extracted from the dorsal region and used for weight prediction with XGBoost regression. Experiments were conducted on the public PIGRGB-Weight dataset containing 12,476 RGB images from 124 pigs. The proposed method achieved a mean absolute error of 2.983 kg and an R2 value of 0.9891. Compared with a DeepLabV3+-based baseline under the same regression protocol, the proposed framework reduced the prediction error by 24.1%. The results indicate that improving dorsal segmentation quality can substantially enhance the stability of morphometric feature extraction from low-cost RGB images.

Zitieren

APA

Li, Y., Ma, L., Li, T., Zhi, S., Peng, R., Sun, Y., Chen, M., & Mu, J. (2026). SAM 2-Assisted Vision Transformer and Morphometric Feature Engineering for Pig Weight Estimation from RGB Images. Applied Sciences, 16(11), 5708. https://doi.org/10.3390/app16115708

Vancouver

Li Y, Ma L, Li T, Zhi S, Peng R, Sun Y, et al. SAM 2-Assisted Vision Transformer and Morphometric Feature Engineering for Pig Weight Estimation from RGB Images. Applied Sciences. 2026;16(11):5708. doi:10.3390/app16115708

BibTeX
@article{Li2026,
  author = {Li, Yurui and Ma, Longhu and Li, Tingting and Zhi, Shengyuan and Peng, Ran and Sun, Yan and Chen, Mengxin and Mu, Jiong},
  title = {SAM 2-Assisted Vision Transformer and Morphometric Feature Engineering for Pig Weight Estimation from RGB Images},
  journal = {Applied Sciences},
  year = {2026},
  volume = {16},
  number = {11},
  pages = {5708},
  doi = {10.3390/app16115708}
}
Kostenlos starten →