DBCA-Net: A Dual-Branch Context-Aware Algorithm for Cattle Face Segmentation and Recognition - Xiaopu Feng; Jiaying Zhang; Yongsheng Qi; Liqiang Liu; Yongting Li (Agriculture, 2025)
Cattle face segmentation and recognition in complex scenarios pose significant challenges due to insufficient fine-grained feature representation in segmentation networks and limited modeling of salient regions and local–global feature interactions in recognition models. To address these issues, DBCA-Net, a dual-branch context-aware algorithm for cattle face segmentation and recognition, is proposed. The method integrates an improved TransUNet-based segmentation network with a novel Fusion-Augmented Channel Attention (FACA) mechanism in the hybrid encoder, enhancing channel attention and fine-grained feature representation to improve segmentation performance in complex environments. The decoder incorporates an Adaptive Multi-Scale Attention Gate (AMAG) module, which mitigates interference from complex backgrounds through adaptive multi-scale feature fusion. Additionally, FACA and AMAG establish a dynamic feedback mechanism that enables iterative optimization of feature representation and parameter updates. For recognition, the GeLU-enhanced Partial Class Activation Attention (G-PCAA) module is introduced after Patch Partition, strengthening salient region modeling and enhancing local–global feature interaction. Experimental results demonstrate that DBCA-Net achieves superior performance, with 95.48% mIoU and 97.61% mDSC in segmentation tasks and 95.34% accuracy and 93.14% F1-score in recognition tasks. These findings underscore the effectiveness of DBCA-Net in addressing segmentation and recognition challenges in complex scenarios, offering significant improvements over existing methods.