Lightweight Pig Face Feature Learning Evaluation and Application Based on Attention Mechanism and Two-Stage Transfer Learning
Zhe Yin,
Mingkang Peng,
Zhaodong Guo,
Yue Zhao,
Yaoyu Li,
Wuping Zhang (),
Fuzhong Li and
Xiaohong Guo
Additional contact information
Zhe Yin: College of Softwares, Shanxi Agricultural University, Jinzhong 030801, China
Mingkang Peng: College of Softwares, Shanxi Agricultural University, Jinzhong 030801, China
Zhaodong Guo: College of Softwares, Shanxi Agricultural University, Jinzhong 030801, China
Yue Zhao: College of Softwares, Shanxi Agricultural University, Jinzhong 030801, China
Yaoyu Li: College of Agricultural Engineering, Shanxi Agricultural University, Jinzhong 030801, China
Wuping Zhang: College of Softwares, Shanxi Agricultural University, Jinzhong 030801, China
Fuzhong Li: College of Softwares, Shanxi Agricultural University, Jinzhong 030801, China
Xiaohong Guo: College of Animal Science, Shanxi Agricultural University, Jinzhong 030801, China
Agriculture, 2024, vol. 14, issue 1, 1-17
Abstract:
With the advancement of machine vision technology, pig face recognition has garnered significant attention as a key component in the establishment of precision breeding models. In order to explore non-contact individual pig recognition, this study proposes a lightweight pig face feature learning method based on attention mechanism and two-stage transfer learning. Using a combined approach of online and offline data augmentation, both the self-collected dataset from Shanxi Agricultural University's grazing station and public datasets underwent enhancements in terms of quantity and quality. YOLOv8 was employed for feature extraction and fusion of pig face images. The Coordinate Attention (CA) module was integrated into the YOLOv8 model to enhance the extraction of critical pig face features. Fine-tuning of the feature network was conducted to establish a pig face feature learning model based on two-stage transfer learning. The YOLOv8 model achieved a mean average precision ( mAP ) of 97.73% for pig face feature learning, surpassing lightweight models such as EfficientDet, SDD, YOLOv5, YOLOv7-tiny, and swin_transformer by 0.32, 1.23, 1.56, 0.43 and 0.14 percentage points, respectively. The YOLOv8-CA model’s mAP reached 98.03%, a 0.3 percentage point improvement from before its addition. Furthermore, the mAP of the two-stage transfer learning-based pig face feature learning model was 95.73%, exceeding the backbone network and pre-trained weight models by 10.92 and 3.13 percentage points, respectively. The lightweight pig face feature learning method, based on attention mechanism and two-stage transfer learning, effectively captures unique pig features. This approach serves as a valuable reference for achieving non-contact individual pig recognition in precision breeding.
Keywords: transfer learning; attention mechanisms; lightweight; deep learning; pig face feature learning (search for similar items in EconPapers)
JEL-codes: Q1 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 (search for similar items in EconPapers)
Date: 2024
References: View complete reference list from CitEc
Citations:
Downloads: (external link)
https://www.mdpi.com/2077-0472/14/1/156/pdf (application/pdf)
https://www.mdpi.com/2077-0472/14/1/156/ (text/html)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:gam:jagris:v:14:y:2024:i:1:p:156-:d:1323354
Access Statistics for this article
Agriculture is currently edited by Ms. Leda Xuan
More articles in Agriculture from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().