Deep Learning Empowers Smart Animal Husbandry: Precise Localization and Image Segmentation of Specific Parts of Sika Deer
Abstract
1. Introduction
2. Materials and Methods
2.1. Datasets
2.1.1. Data Sample Collection
2.1.2. Datasets Enhancement
2.2. Model Improvement
2.2.1. Multipath Diversion Feature Fusion Pyramid Network (MPDFPN)
2.2.2. Deeply Separable Extended Residual Module
2.2.3. MPDIoU
- Enhanced geometric sensitivity: When the centers of the predicted bounding box and the truth bounding box coincide but their sizes are different (), for CIoU, as and , the loss function becomes equivalent to IoU (), and thus cannot guide the model to optimize the size. In contrast, MPDIoU explicitly penalizes the corner offset through , forcing the model to adjust both the width and height parameters simultaneously.
- Optimization of computational efficiency: MPDIoU eliminates the complicated external rectangle calculation and aspect ratio coupling terms in CIoU, giving a computational complexity reduction of about 30–40% when compared with CIoU.
- Small target adaptability: For small target detection tasks, in CIoU, the absolute coordinate deviation of the bounding box results in weak gradients due to the relatively large normalization factor ; however, the term in MPDIoU retains linear sensitivity to minute offsets. Theoretical analysis shows that its gradient amplitude is 23% higher than that of CIoU.
2.3. Evaluation Indicators
3. Experimental Results and Analysis
3.1. Experimental Environment and Parameter Setting
3.2. Experimental Results of MPDF-DetSeg Model
3.3. Comparative Experiments of Different Models
3.4. Visual Comparison of Test Results
3.5. Ablation Experiment
3.5.1. Analysis of MPDFPN’s Influence on Model Performance
3.5.2. Analysis of the Influence of DWEResBlock on Model Performance
3.5.3. Analysis of MPDIoU’s Influence on Model Performance
4. Discussion
4.1. Analysis of Comprehensive Performance and Model Design
4.2. Targeted Analysis of Dataset Challenges and Model Improvements
4.3. Future Outlook and Potential Applications
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Wu, D.; Cui, D.; Zhou, M.; Ying, Y. Information Perception in Modern Poultry Farming: A Review. Comput. Electron. Agric. 2022, 199, 107131. [Google Scholar] [CrossRef]
- Yin, M.; Ma, R.; Luo, H.; Li, J.; Zhao, Q.; Zhang, M. Non-Contact Sensing Technology Enables Precision Livestock Farming in Smart Farms. Comput. Electron. Agric. 2023, 212, 108171. [Google Scholar] [CrossRef]
- Li, W.; Ren, Q.; Feng, J.; Lee, S.Y.; Liu, Y. DNA Barcoding for the Identification and Authentication of Medicinal (Cervus sp.) Products in China. PLoS ONE 2024, 19, e0297164. [Google Scholar] [CrossRef]
- Ortega, A.C.; Dwinnell, S.P.; Lasharr, T.N.; Jakopak, R.P.; Denryter, K.; Huggler, K.S.; Hayes, M.M.; Aikens, E.O.; Verzuh, T.L.; May, A.B.; et al. Effectiveness of Partial Sedation to Reduce Stress in Captured Mule Deer. J. Wildl. Manag. 2022, 84, 1445–1456. [Google Scholar] [CrossRef]
- Zhang, Z.; He, Z.; Cao, G.; Cao, W. Animal Detection From Highly Cluttered Natural Scenes Using Spatiotemporal Object Region Proposals and Patch Verification. IEEE Trans. Multimed. 2016, 18, 2079–2092. [Google Scholar] [CrossRef]
- Zhang, X.; Xuan, C.; Xue, J.; Chen, B.; Ma, Y. LSR-YOLO: A High-Precision, Lightweight Model for Sheep Face Recognition on the Mobile End. Animals 2023, 13, 1824. [Google Scholar] [CrossRef]
- Li, R.; Dai, B.; Hu, Y.; Dai, X.; Fang, J.; Yin, Y.; Liu, H.; Shen, W. Multi-Behavior Detection of Group-Housed Pigs Based on YOLOX and SCTS-SlowFast. Comput. Electron. Agric. 2024, 225, 109286. [Google Scholar] [CrossRef]
- Mu, Y.; Hu, J.; Wang, H.; Li, S.; Zhu, H.; Luo, L.; Wei, J.; Ni, L.; Chao, H.; Hu, T.; et al. Research on the Behavior Recognition of Beef Cattle Based on the Improved Lightweight CBR-YOLO Model Based on YOLOv8 in Multi-Scene Weather. Animals 2024, 14, 2800. [Google Scholar] [CrossRef] [PubMed]
- Huang, X.; Huang, F.; Hu, J.; Zheng, H.; Liu, M.; Dou, Z.; Jiang, Q. Automatic Face Detection of Farm Images Based on an Enhanced Lightweight Learning Model. Int. J. Pattern Recognit. Artif. Intell. 2024, 38, 2456009. [Google Scholar] [CrossRef]
- Xiong, H.; Xiao, Y.; Zhao, H.; Xuan, K.; Zhao, Y.; Li, J. AD-YOLOv5: An Object Detection Approach for Key Parts of Sika Deer Based on Deep Learning. Comput. Electron. Agric. 2024, 217, 108610. [Google Scholar] [CrossRef]
- Gong, H.; Liu, J.; Li, Z.; Zhu, H.; Luo, L.; Li, H.; Hu, T.; Guo, Y.; Mu, Y. GFI-YOLOv8: Sika Deer Posture Recognition Target Detection Method Based on YOLOv8. Animals 2024, 14, 2640. [Google Scholar] [CrossRef]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask R-CNN. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 386–397. [Google Scholar] [CrossRef]
- Liu, S.; Zhao, C.; Zhang, H.; Li, Q.; Li, S.; Chen, Y.; Gao, R.; Wang, R.; Li, X. ICNet: A Dual-Branch Instance Segmentation Network for High-Precision Pig Counting. Agriculture 2024, 14, 141. [Google Scholar] [CrossRef]
- Zhao, H.; Mao, R.; Li, M.; Li, B.; Wang, M. SheepInst: A High-Performance Instance Segmentation of Sheep Images Based on Deep Learning. Animals 2023, 13, 1338. [Google Scholar] [CrossRef] [PubMed]
- Qiao, Y.; Truman, M.; Sukkarieh, S. Cattle Segmentation and Contour Extraction Based on Mask R-CNN for Precision Livestock Farming. Comput. Electron. Agric. 2019, 165, 104958. [Google Scholar] [CrossRef]
- Kumar, T.; Brennan, R.; Mileo, A.; Bendechache, M. Image Data Augmentation Approaches: A Comprehensive Survey and Future Directions. IEEE Access 2024, 12, 187536–187571. [Google Scholar] [CrossRef]
- Jocher, G.; Qiu, J.; Chaurasia, A. Ultralytics YOLO 2023. Available online: https://www.ultralytics.com/events/yolovision/2023 (accessed on 1 June 2025).
- Ma, S.; Xu, Y. MPDIoU: A Loss for Efficient and Accurate Bounding Box Regression. arXiv 2023, arXiv:2307.07662. [Google Scholar] [CrossRef]
- Lin, T.-Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature Pyramid Networks for Object Detection. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 936–944. [Google Scholar]
- Liu, S.; Qi, L.; Qin, H.; Shi, J.; Jia, J. Path Aggregation Network for Instance Segmentation. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 8759–8768. [Google Scholar]
- Chollet, F. Xception: Deep Learning with Depthwise Separable Convolutions. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 1800–1807. [Google Scholar]
- Qin, D.; Leichner, C.; Delakis, M.; Fornoni, M.; Luo, S.; Yang, F.; Wang, W.; Banbury, C.; Ye, C.; Akin, B. MobileNetV4—Universal Models for the Mobile Ecosystem; Springer: Berlin/Heidelberg, Germany, 2024. [Google Scholar]
- Zheng, Z.; Wang, P.; Ren, D.; Liu, W.; Ye, R.; Hu, Q.; Zuo, W. Enhancing Geometric Factors in Model Learning and Inference for Object Detection and Instance Segmentation. IEEE Trans. Cybern. 2022, 52, 8574–8586. [Google Scholar] [CrossRef]
- Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. DETRs Beat YOLOs on Real-Time Object Detection. In Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 16–22 June 2024; pp. 16965–16974. [Google Scholar]
- Li, C.; Zhang, B.; Li, L.; Li, L.; Geng, Y.; Cheng, M.; Xiaoming, X.; Chu, X.; Wei, X. YOLOV6: A Single-Stage Object Detection Framework for Industrial Applications. arXiv 2024, arXiv:2209.02976. [Google Scholar]
- Wang, C.-Y.; Yeh, I.-H.; Liao, H.-Y.M. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information; Springer: Berlin/Heidelberg, Germany, 2024. [Google Scholar]
- Tian, Y.; Ye, Q.; Doermann, D. YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv 2025, arXiv:2502.12524. [Google Scholar]
- Zheng, Z.; Wang, P.; Liu, W.; Li, J.; Ye, R.; Ren, D. Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression. arXiv 2019, arXiv:1911.08287. [Google Scholar] [CrossRef]
- Rezatofighi, H.; Tsoi, N.; Gwak, J.; Sadeghian, A.; Reid, I.; Savarese, S. Generalized Intersection Over Union: A Metric and a Loss for Bounding Box Regression. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 658–666. [Google Scholar]
- Lin, T.-Y.; Maire, M.; Belongie, S.J.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft COCO: Common Objects in Context. In Proceedings of the European Conference on Computer Vision, Zurich, Switzerland, 6–12 September 2014. [Google Scholar]
Train | Val | |||
---|---|---|---|---|
Images | Original (828) | Enhance (2484) | Original (208) | |
Instances | ||||
leg_f | 584 | 1752 | 128 | |
leg_b | 633 | 1899 | 139 | |
backbone_f | 1500 | 4500 | 354 | |
backbone_s | 1025 | 3075 | 246 | |
Deer antlers | 854 | 2562 | 262 | |
All | 8188 | 24,564 | 2135 |
Environment Configuration | Parameter |
---|---|
Operating system | Linux |
CPU | Intel(R) Xeon(R) Gold 6148 CPU @ 2.40 GHz |
GPU | 2×A100(80 GB) |
Development environment | PyCharm 2023.2.5 |
Language | Python 3.8.10 |
frame | PyTorch 2.0.1 |
Operating platform | CUDA 11.8 |
Hyperparameter | Parameter |
---|---|
Epochs | 200 |
Batch | 64 |
AdamW learning rate | 0.000714 |
Momentum | 0.9 |
Weight decay | 0.0005 |
Input image size | 640 |
Model | Box | Mask | ||||||
---|---|---|---|---|---|---|---|---|
P | R | mAP50 | mAP50-95 | P | R | mAP50 | mAP50-95 | |
RT-Detr-l | 87.9 | 88.2 | 92.2 | 72.6 | 87.2 | 87.3 | 91.6 | 65.6 |
RT-Detr-resnet50 | 85.7 | 88.1 | 93.6 | 72.4 | 85.1 | 87.4 | 92.5 | 68.1 |
YOLOv5s-seg | 84.3 | 86.3 | 90.2 | 65.6 | 83.5 | 85.3 | 89.8 | 60.0 |
YOLOv6-seg | 81.6 | 86.6 | 90.1 | 66.1 | 82.7 | 83.8 | 90.0 | 58.5 |
YOLOv8s-seg | 85.7 | 85.9 | 90.9 | 68.9 | 85.1 | 85.1 | 90.1 | 62.6 |
YOLOv9c-seg | 87.2 | 88.4 | 92.6 | 72.6 | 86.3 | 87.6 | 91.8 | 66.5 |
YOLOv9e-seg | 87.9 | 87.5 | 93.9 | 73.4 | 88.0 | 85.7 | 93.2 | 67.9 |
YOLO11s-seg | 87.2 | 86.0 | 91.6 | 69.1 | 87.2 | 84.8 | 90.6 | 62.7 |
YOLO12s-seg | 87.6 | 85.6 | 91.8 | 69.8 | 87.0 | 86.2 | 90.1 | 63.0 |
our | 87.8 | 86.7 | 93.7 | 74.0 | 87.4 | 86.3 | 93.0 | 68.0 |
Model | Box(mAP50) | Mask(mAP50) | Memory | Parameters | FLOPs | Time |
---|---|---|---|---|---|---|
RT-Detr-l | 92.2 | 91.6 | 63.9 | 30.802431 | 168.9 | 13.2 |
RT-Detr-resnet50 | 93.6 | 92.5 | 83.7 | 40.753375 | 191.1 | 14.9 |
YOLOv9c-seg | 92.6 | 91.8 | 56.3 | 27.628383 | 157.6 | 13.9 |
YOLOv9e-seg | 93.9 | 93.2 | 121.9 | 59.685535 | 244.5 | 25.3 |
our | 93.7 | 93.0 | 17.45 | 9.335958 | 35.1 | 6.8 |
Method | Box | Mask | ||||||
---|---|---|---|---|---|---|---|---|
P | R | mAP50 | mAP50-95 | P | R | mAP50 | mAP50-95 | |
base | 87.2 | 86.0 | 91.6 | 69.1 | 87.2 | 84.8 | 90.6 | 62.7 |
+MPDFPN | 87.6 | 86.5 | 93.5 | 73.8 | 87.3 | 85.7 | 92.8 | 67.5 |
+DWEResBlock | 87.7 | 86.8 | 93.1 | 72.6 | 87.5 | 85.9 | 92.0 | 66.3 |
+MPDIoU | 87.5 | 86.3 | 92.3 | 70.8 | 86.8 | 85.3 | 91.2 | 64.5 |
our | 87.8 | 86.7 | 93.7 | 74.0 | 87.4 | 86.3 | 93.0 | 68.0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhu, C.; Wei, J.; Liu, T.; Gong, H.; Fan, J.; Hu, T. Deep Learning Empowers Smart Animal Husbandry: Precise Localization and Image Segmentation of Specific Parts of Sika Deer. Agriculture 2025, 15, 1719. https://doi.org/10.3390/agriculture15161719
Zhu C, Wei J, Liu T, Gong H, Fan J, Hu T. Deep Learning Empowers Smart Animal Husbandry: Precise Localization and Image Segmentation of Specific Parts of Sika Deer. Agriculture. 2025; 15(16):1719. https://doi.org/10.3390/agriculture15161719
Chicago/Turabian StyleZhu, Caocan, Jinfan Wei, Tonghe Liu, He Gong, Juanjuan Fan, and Tianli Hu. 2025. "Deep Learning Empowers Smart Animal Husbandry: Precise Localization and Image Segmentation of Specific Parts of Sika Deer" Agriculture 15, no. 16: 1719. https://doi.org/10.3390/agriculture15161719
APA StyleZhu, C., Wei, J., Liu, T., Gong, H., Fan, J., & Hu, T. (2025). Deep Learning Empowers Smart Animal Husbandry: Precise Localization and Image Segmentation of Specific Parts of Sika Deer. Agriculture, 15(16), 1719. https://doi.org/10.3390/agriculture15161719