Sensors (Sep 2023)

CAT-CBAM-Net: An Automatic Scoring Method for Sow Body Condition Based on CNN and Transformer

  • Hongxiang Xue,
  • Yuwen Sun,
  • Jinxin Chen,
  • Haonan Tian,
  • Zihao Liu,
  • Mingxia Shen,
  • Longshen Liu

DOI
https://doi.org/10.3390/s23187919
Journal volume & issue
Vol. 23, no. 18
p. 7919

Abstract

Read online

Sow body condition scoring has been confirmed as a vital procedure in sow management. A timely and accurate assessment of the body condition of a sow is conducive to determining nutritional supply, and it takes on critical significance in enhancing sow reproductive performance. Manual sow body condition scoring methods have been extensively employed in large-scale sow farms, which are time-consuming and labor-intensive. To address the above-mentioned problem, a dual neural network-based automatic scoring method was developed in this study for sow body condition. The developed method aims to enhance the ability to capture local features and global information in sow images by combining CNN and transformer networks. Moreover, it introduces a CBAM module to help the network pay more attention to crucial feature channels while suppressing attention to irrelevant channels. To tackle the problem of imbalanced categories and mislabeling of body condition data, the original loss function was substituted with the optimized focal loss function. As indicated by the model test, the sow body condition classification achieved an average precision of 91.06%, the average recall rate was 91.58%, and the average F1 score reached 91.31%. The comprehensive comparative experimental results suggested that the proposed method yielded optimal performance on this dataset. The method developed in this study is capable of achieving automatic scoring of sow body condition, and it shows broad and promising applications.

Keywords