Multi-Granularity Semantic Convolutional Model for Pig Face Recognition

Yadong Yang, Yourui Huang, Deyong She, Jing Zhang, Mingjing Pei, Xiancun Zhou · International Journal of Pattern Recognition and Artificial Intelligence · 2025

The intensification and automation of the pig farming industry have created an urgent need for cost-effective and efficient identification of individual pigs. Pig identification is crucial for disease prevention and control, pork quality traceability, genetic breeding, and insurance services. To address the challenges faced by existing noncontact pig face recognition models in overcoming strong environmental interference in pigsties and the minimal differences among pig faces, this paper proposes a convolutional neural network based on multi-granularity semantic analysis (MGSNet). By integrating pixel-level, component-level, and object-level semantic features, the model significantly improves recognition performance in complex scenarios. Specifically, the model addresses challenges such as environmental interference and high similarity among individual pigs. Experimental results show that the algorithm achieves a high test accuracy of 92.50% on a dataset of 10 pigs collected from actual pig farms, with lightweight network parameters. Through deconvolution and gradient-weighted class activation mapping techniques, the feature extraction process of the model is visually interpretable, providing reliable technical support for farmers. The research findings can be directly applied to precision feeding, disease monitoring, breeding optimization, and other scenarios, promoting the comprehensive adoption of smart agriculture.

Read the paper · More papers on PaperTik