IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0349654.html

MSPFormer: An enhanced multi-scale and semantic-preserving transformer for sheep ownership identification in precision livestock farming

Author

Listed:
  • Yaosheng Han
  • Chunmei Li
  • Xiangjie Huang
  • Qing Dong
  • Hao Wang

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.

Suggested Citation

  • Yaosheng Han & Chunmei Li & Xiangjie Huang & Qing Dong & Hao Wang, 2026. "MSPFormer: An enhanced multi-scale and semantic-preserving transformer for sheep ownership identification in precision livestock farming," PLOS ONE, Public Library of Science, vol. 21(7), pages 1-35, July.
  • Handle: RePEc:plo:pone00:0349654
    DOI: 10.1371/journal.pone.0349654
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0349654
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0349654&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0349654?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0349654. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.