# DGS-YOLO: A Detection Network for Rapid Pig Face Recognition

**Authors:** Hongli Chao, Wenshuang Tu, Tonghe Liu, Hang Zhu, Jinghuan Hu, Tianli Hu, Yu Sun, Ye Mu, Juanjuan Fan, He Gong

PMC · DOI: 10.3390/ani16020187 · Animals : an Open Access Journal from MDPI · 2026-01-08

## TL;DR

This paper introduces DGS-YOLO, a new model for accurately recognizing pig faces in complex farming environments, achieving high precision and robustness.

## Contribution

The novel contribution is the development of DGS-YOLO, an enhanced YOLOv11n-based model with dynamic convolutions and optimized modules for improved pig face recognition.

## Key findings

- DGS-YOLO achieves 88.3% precision, 86.9% recall, and 91.8% mAP50 in pig face recognition.
- The model outperforms Faster R-CNN and SSD in comprehensive evaluation metrics.
- It shows strong generalization in limited sample scenarios with 20.1% higher accuracy and 10.3% higher mAP50.

## Abstract

To address the challenge of insufficient facial recognition accuracy in animal protection, this paper proposes DGS-YOLO—a pig face recognition model based on an improved YOLOv11n—using pigs in group housing facilities as the research subject. The model focuses on optimizing recognition performance under interfering factors such as complex backgrounds, subtle textures, and facial occlusions, effectively enhancing detection accuracy and robustness. Experimental results demonstrate that DGS-YOLO achieves a precision of 88.3%, a recall rate of 86.9%, and an mAP50 of 91.8% in pig face recognition tasks.

This study addresses the practical demand for facial recognition of pigs in the food safety and insurance industries, tackling the challenge of low recognition accuracy caused by complex farming environments, occlusions, and similar textures. To this end, we propose an enhanced model, DGS-YOLO, based on YOLOv11n, designed to achieve precise facial recognition of group-raised young pigs. The core improvements of the model include the following: (1) replacing standard convolutions with dynamic convolutions (DMConv) to enhance the network’s adaptive extraction capability for critical detail features; (2) designing a C3k2_GBC module with a bottleneck structure to replace the C3k2 neck, enabling more efficient capture of multi-scale contextual information; (3) introducing the SimAM parameter-free attention mechanism to optimize feature focusing; (4) employing the Shape-IoU loss function to mitigate the impact of bounding box geometry on regression accuracy. Experiments on self-built datasets demonstrate that DGS-YOLO achieves 4%, 2.1%, and 2.3% improvements in accuracy, recall, and mAP50, respectively, compared to the baseline model YOLOv11n. Furthermore, its overall performance surpasses that of Faster R-CNN and SSD in comprehensive evaluation metrics. Especially in limited sample scenarios, the model demonstrates strong generalization ability, with accuracy and mAP50 further increased by 20.1% and 10.3%. This study provides a highly accurate and robust solution for animal facial recognition in complex scenarios.

## Full-text entities

- **Species:** Sus scrofa (pig, species) [taxon 9823]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12837936/full.md

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12837936/full.md

## References

24 references — full list in the complete paper: https://tomesphere.com/paper/PMC12837936/full.md

---
Source: https://tomesphere.com/paper/PMC12837936