MSPFormer: An enhanced multi-scale and semantic-preserving transformer for sheep ownership identification in precision livestock farming
Yaosheng Han,
Chunmei Li,
Xiangjie Huang,
Qing Dong and
Hao Wang
PLOS ONE, 2026, vol. 21, issue 7, 1-35
Abstract:
Overgrazing is a major driver of grassland degradation on the Qinghai–Tibet Plateau, posing significant challenges for sustainable livestock management. To mitigate this issue, intelligent technologies that can effectively recognize and manage different herders’ sheep flocks are essential for achieving balanced grass–livestock management and reducing overgrazing. This study aims to develop a robust and efficient model for intelligent sheep ownership recognition by leveraging sheep back color features, facilitating scientific grazing management, and supporting herder conflict resolution. A dedicated dataset was constructed, capturing diverse color distributions under variable lighting and complex backgrounds. We propose MSPFormer, a multi-scale and semantic-preserving Transformer model, which builds upon Mask2Former by integrating three key modules: (1) an Atrous Spatial Pyramid Pooling (ASPP) module between the Pixel Decoder and Transformer Decoder to enhance multi-scale feature extraction; (2) a Dynamic Prompt Attention (DPA) module to improve semantic consistency; and (3) a Content-Aware ReAssembly of Features (CARAFE) upsampling module after the Transformer Decoder to optimize spatial detail recovery. Experimental results show that MSPFormer achieves superior segmentation performance, increasing the mIoU from 82.46% to 83.81% (a relative improvement of approximately 1.35%), the mF1-score from 90.08% to 90.92% (an improvement of approximately 0.84%), the mPrecision from 89.50% to 91.52% (an improvement of approximately 2.02%), and the mRecall from 90.74% to 90.92% (an improvement of approximately 0.18%). Validation on the public VOC2012 dataset and several small-sample subsets further demonstrates the model’s strong generalization capability and stability. This study provides an effective and intelligent solution for sheep ownership recognition, contributing to sustainable grazing management and conflict resolution among herders on the Qinghai–Tibet Plateau. Future work will focus on lightweighting the model through pruning and knowledge distillation to facilitate practical deployment.
Date: 2026
References: Add references at CitEc
Citations:
Downloads: (external link)
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0349654 (text/html)
https://journals.plos.org/plosone/article/file?id= ... 49654&type=printable (application/pdf)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:plo:pone00:0349654
DOI: 10.1371/journal.pone.0349654
Access Statistics for this article
More articles in PLOS ONE from Public Library of Science
Bibliographic data for series maintained by plosone ().