CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement

With the rapid development of machine learning and deep learning technology, cow face detection technology has achieved remarkable results. Traditional contact cattle identification methods are costly; are easy to lose and tamper with; and can lead to a series of security problems, such as untimely...

Full description

Saved in:
Bibliographic Details
Main Authors: Guohong Gao, Yuxin Ma, Jianping Wang, Zhiyu Li, Yan Wang, Haofan Bai
Format: Article
Language:English
Published: MDPI AG 2025-02-01
Series:Sensors
Subjects:
Online Access:https://www.mdpi.com/1424-8220/25/4/1084
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849719143744405504
author Guohong Gao
Yuxin Ma
Jianping Wang
Zhiyu Li
Yan Wang
Haofan Bai
author_facet Guohong Gao
Yuxin Ma
Jianping Wang
Zhiyu Li
Yan Wang
Haofan Bai
author_sort Guohong Gao
collection DOAJ
description With the rapid development of machine learning and deep learning technology, cow face detection technology has achieved remarkable results. Traditional contact cattle identification methods are costly; are easy to lose and tamper with; and can lead to a series of security problems, such as untimely disease prevention and control, incorrect traceability of cattle products, and fraudulent insurance claims. In order to solve these problems, this study explores the application of cattle face detection technology in cattle individual detection to improve the accuracy of detection, an approach that is particularly important in smart animal husbandry and animal behavior analysis. In this paper, we propose a novel cow face detection network based on YOLOv7 improvement, named CFR-YOLO. First of all, the method of extracting the features of a cow’s face (including nose, eye corner, and mouth corner) is constructed. Then, we calculate the frame center of gravity and frame size based on these feature points to design the cow face detection CFR-YOLO network model. To optimize the performance of the model, the activation function of FReLU is used instead of the original SiLU activation function, and the CBS module is replaced by the CBF module. The RFB module is introduced in the backbone network; and in the head layer, the CBAM convolutional attention module is introduced. The performance of CFR-YOLO is compared with other mainstream deep learning models (including YOLOv7, YOLOv5, YOLOv4, and SSD) on a self-built cow face dataset. Experiments indicate that the CFR-YOLO model achieves 98.46% accuracy (precision), 97.21% recall (recall), and 96.27% average accuracy (mAP), proving its excellent performance in the field of cow face detection. In addition, comparative analyses with the other four methods show that CFR-YOLO exhibits faster convergence speed while ensuring the same detection accuracy; and its detection accuracy is higher under the condition of the same model convergence speed. These results will be helpful to further develop the cattle identification technique.
format Article
id doaj-art-5deb7823edae44f5b93bfbd02345dd15
institution DOAJ
issn 1424-8220
language English
publishDate 2025-02-01
publisher MDPI AG
record_format Article
series Sensors
spelling doaj-art-5deb7823edae44f5b93bfbd02345dd152025-08-20T03:12:12ZengMDPI AGSensors1424-82202025-02-01254108410.3390/s25041084CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 ImprovementGuohong Gao0Yuxin Ma1Jianping Wang2Zhiyu Li3Yan Wang4Haofan Bai5School of Computer Science and Technology, Henan Institute of Science and Technology, Xinxiang 453003, ChinaSchool of Computer Science and Technology, Henan Institute of Science and Technology, Xinxiang 453003, ChinaSchool of Computer Science and Technology, Henan Institute of Science and Technology, Xinxiang 453003, ChinaSchool of Computer Science and Technology, Henan Institute of Science and Technology, Xinxiang 453003, ChinaSchool of Computer Science and Technology, Henan Institute of Science and Technology, Xinxiang 453003, ChinaSchool of Computer Science and Technology, Henan Institute of Science and Technology, Xinxiang 453003, ChinaWith the rapid development of machine learning and deep learning technology, cow face detection technology has achieved remarkable results. Traditional contact cattle identification methods are costly; are easy to lose and tamper with; and can lead to a series of security problems, such as untimely disease prevention and control, incorrect traceability of cattle products, and fraudulent insurance claims. In order to solve these problems, this study explores the application of cattle face detection technology in cattle individual detection to improve the accuracy of detection, an approach that is particularly important in smart animal husbandry and animal behavior analysis. In this paper, we propose a novel cow face detection network based on YOLOv7 improvement, named CFR-YOLO. First of all, the method of extracting the features of a cow’s face (including nose, eye corner, and mouth corner) is constructed. Then, we calculate the frame center of gravity and frame size based on these feature points to design the cow face detection CFR-YOLO network model. To optimize the performance of the model, the activation function of FReLU is used instead of the original SiLU activation function, and the CBS module is replaced by the CBF module. The RFB module is introduced in the backbone network; and in the head layer, the CBAM convolutional attention module is introduced. The performance of CFR-YOLO is compared with other mainstream deep learning models (including YOLOv7, YOLOv5, YOLOv4, and SSD) on a self-built cow face dataset. Experiments indicate that the CFR-YOLO model achieves 98.46% accuracy (precision), 97.21% recall (recall), and 96.27% average accuracy (mAP), proving its excellent performance in the field of cow face detection. In addition, comparative analyses with the other four methods show that CFR-YOLO exhibits faster convergence speed while ensuring the same detection accuracy; and its detection accuracy is higher under the condition of the same model convergence speed. These results will be helpful to further develop the cattle identification technique.https://www.mdpi.com/1424-8220/25/4/1084cow face detectionYOLOv7deep learningtarget detection
spellingShingle Guohong Gao
Yuxin Ma
Jianping Wang
Zhiyu Li
Yan Wang
Haofan Bai
CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement
Sensors
cow face detection
YOLOv7
deep learning
target detection
title CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement
title_full CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement
title_fullStr CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement
title_full_unstemmed CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement
title_short CFR-YOLO: A Novel Cow Face Detection Network Based on YOLOv7 Improvement
title_sort cfr yolo a novel cow face detection network based on yolov7 improvement
topic cow face detection
YOLOv7
deep learning
target detection
url https://www.mdpi.com/1424-8220/25/4/1084
work_keys_str_mv AT guohonggao cfryoloanovelcowfacedetectionnetworkbasedonyolov7improvement
AT yuxinma cfryoloanovelcowfacedetectionnetworkbasedonyolov7improvement
AT jianpingwang cfryoloanovelcowfacedetectionnetworkbasedonyolov7improvement
AT zhiyuli cfryoloanovelcowfacedetectionnetworkbasedonyolov7improvement
AT yanwang cfryoloanovelcowfacedetectionnetworkbasedonyolov7improvement
AT haofanbai cfryoloanovelcowfacedetectionnetworkbasedonyolov7improvement