Cow Face Keypoint Detection and Pose Recognition Based on Improved YOLO v7-Pose

HUANG Xiaoping, HOU Xiankun, GUO Yangyang, ZHENG Huanyu, DOU Zihao, LIU Mengyi, ZHAO Jinling

Abstract

Facial keypoint detection in dairy cows plays a crucial role in the automation of cow farms. It aids in cow face recognition, face alignment, head movement detection, and behavior recognition. In view of the problems of cow face occlusion and weak light in the current dairy farming environment, an improved algorithm of YOLO v7-Pose network model was proposed, which can be used for keypoint detection and head pose recognition of cow face. Firstly, dairy cow facial images were collected from cow farms by using network cameras and a dataset was constructed. Secondly, the SPPFCSPCL structure was integrated into the YOLO v7-Pose network model to enhance its feature extraction capabilities for cow facial keypoints. The WingLoss loss function replaced the OKS loss function for keypoint detection, thereby improving the accuracy of cow facial keypoint detection. Finally, L1 regularization was applied to prune the improved model, reducing the number of network parameters. The experimental results showed that the cow face keypoint detection of improved model YOLO v7-SCLWL-Pose was improved by 5 percentage points and AP0.5 was improved by 2.7 percentage points compared with the original model AP, and the memory occupation of the improved model was only 106.7MB, which was reduced by 33.6%. The keypoint detection was applied to pose recognition, and the experimental results showed that the recognition accuracy of the motions of looking up and looking down reached 95.5% and 86.5%. This research can provide support technology for behavior recognition in dairy cows on farms.

 

Keyword: cow face detection ; keypoint detection ; YOLO v7-Pose ; pose recognition

 

Download Full Text:

PDF


References


HE Dongjian, SONG Ziqi. Automatic detection of dairy cow’s eye temperature based on thermal infrared imaging technology and skeleton tree model[ J]. Transactions of the Chinese Society for Agricultural Machinery ,2021 ,52(3) ; 243 -250. (in Chinese)

WANG Z, ZHANG J, DUAN C, et al. Vehicle detection in severe weather based on pseudo-visual search and HOG — LBP feature fusion J. Proceedings of the Institution of Mechanical Engineers, Part D; Journal of Automobile Engineering, 2022, 236(7) : 1607 - 1618.

NIU B, GAO Z, GUO B. Facial expression recognition with LBP and ORB features [J ]. Computational Intelligence and Neuroscience ,2021 ( 1 ) : 8828245.

XIA Xiaohua, ZHAO Qian, XIANG Huatao, et al. SIFT feature extraction method for the defocused blurred area of multi-focus images [J]. Optics and Precision Engineering, 2023 ,31 ( 24) : 3630 -3639. (in Chinese)

CAI Cheng, SONG Xiaoxiao, HE Jinrong. Algorithm and realization for cattle face contour extraction based on computer vision J j. Transactions of the CSAE ,2017 ,33 ( 11 ) ; 171 -177. (in Chinese)

MAJI D, NAGORI S, MATHEW M, et al. YOLO-pose: enhancing YOLO for multi person pose estimation using object keypoint similarity loss [С ] // IEEE/CVF Conference on Computer Vision and Pattern Recognition ,2022: 2637 -2646.

DONG C, TANG Y, ZHANG L. MDA — YOLO Person: a 2D human pose estimation model based on YOLO detection framework [J]. Cluster Computing, 2024 ,27 :12323 - 12340.

LIU Mochen, CHU Zhenyuan, GUI Mingshi, et al. lied ripe strawberry recognition and stem detection based on improved YOLO 8 —Pose [J]. Transactions of the Chinese Society for Agricultural Machinery, 2023, 54 ( Supp. 2 ) : 244 - 251. (in Chinese)

HUANG Xiaoping, FENG Tao, GUO Yangyang, et al. Lightweight dairy cow body condition scoring method based on improved YOLO 5s [J]. Transactions of the Chinese Society for Agricultural Machinery,2023,54(6) ; 287 -296. (in Chinese)

W ANG С Y, BOCHKOVSKIY A, LIAO II Y M. YOLO v7; trainable bag-of-freebies sets new state-of-the-art for real-time object detectors [ С ]/IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023: 7464 -7475.

CHOI E, BAHADORI M T, SUN J, et al. Retain: an interpretable predictive model for healthcare using reverse time attention mechanism [ J ]. Advances in Neural Information Processing systems,2016 ,29 :35 12 -3520.

SUN K,XIAO B, LIU D, et al. Deep high-resolution representation learning for human pose estimation [ С ] // IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019; 5693 -5703.

JIANG T, LU P, ZHANG L, et al. Rtmpose; real-time multi-person pose estimation based on mmpose [ J ]. arXiv Preprint arXiv:2303. 07399,2023.

Q1 Yongsheng, JIAO Jie, В A О Tengfei, et al. Cattle face detection algorithm in complex scenes using adaptive attention mechanism [ J ]. Transactions of the CSAE, 2023, 39 (14): 173 -183. (in Chinese)

XU B, WANG W, GUO L, et al. CattleFaceNet; a cattle face identification approach based on RetinaFace and ArcFace loss [ J ]. Computers and Electronics in Agriculture, 2022, 193: 106675.

GUO Yangvang, HONG Wenhao, DING Yi, et al. Goat face detection method by combining coordinate attention mechanism and YOLO v5s model [ J ]. Transactions of the Chinese Society for Agricultural Machinery, 2023 , 54 ( 7 ) ; 313 -321. (in Chinese)

SONG Huaibo, HUA Zhixin, MA Baoling, et al. Lightweight keypoint detection method of dairy cow based on SimCC - ShuffleNetV2r.il. Transactions of the Chinese Society for Agricultural Machinery, 2023, 54 ( 10 ) : 275 - 281,363. (in Chinese)

LI X, SUN K, FAN H, et al. Real-time cattle pose estimation based on improved RTMPosefJ J. Agriculture, 2023,13 ( 10) ; 1938.

HUANG Zhijie, XU Aijun, ZHOU Suyin, et al. Keypoint detection method for pig face fusing reparameterization and attention mechanisms [ J ]. Transactions of the CSAE ,2023 ,39( 12) ; 141 - 149. (in Chinese)

FENG Z H, KITTLER J, AWAIS M, et al. Wing loss for robust facial landmark localisation with convolutional neural networks [C] // IEEE Conference on Computer Vision and Pattern Recognition, 2018; 2235 -2245.


Refbacks

  • There are currently no refbacks.