Submitted:
17 July 2026
Posted:
20 July 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction

2. Materials and Methods
2.1. Data Acquisition and Processing


2.2. Construction of the Lightweight YOLO11-AFE Model
2.2.1. Improvement of the YOLO11n Model

2.2.2. Introduction of the ADown Lightweight Downsampling Module

2.2.3. Construction of the C3k2_FE Feature-Adaptive Enhancement Module



2.2.4. SPPF_ECA Multi-Scale Channel Attention Enhancement Module


2.3. Improvement of the Heterogeneous-Camera Target Association Algorithm
2.3.1. Problem Definition and Overall Workflow
2.3.2. Construction of the Fused Cost Matrix
2.3.3. Improved Hungarian Matching and Outlier Association Removal
2.4. Hardware Environment and Evaluation Metrics
3. Results
3.1. Comparison of Detection Models

3.2. Ablation Study Analysis
3.3. Heterogeneous-Camera Target Association Results Analysis

3.4. Edge-Device Deployment Performance Analysis

4. Discussion
4.1. Innovation
4.2. Application Scenario
4.3. Limitations and Future Work
5. Conclusions
- By introducing ADown, C3k2_FE, and SPPF_ECA, YOLO11-AFE improved cow-head detection in both modalities. Compared with YOLO11n, the visible-light Precision, mAP@0.5, and mAP@0.5:0.95 increased by 4.40, 2.15, and 1.36 percentage points. The corresponding gains on the infrared pseudo-colour subset were 1.65, 0.15, and 1.15 percentage points.
- The detector contained 2.14M parameters and required 5.27 GFLOPs, which are 17.37% and 18.17% lower than YOLO11n. Therefore, the model reduces computational demand while improving accuracy, making it appropriate for real-time cow-head detection on inspection-robot edge hardware.
- The improved Hungarian association algorithm uses both target-box IoU and the Euclidean distance difference relative to the image centre. In the 122 synchronized dual-light test-image pairs, 187 corresponding cow-head pairs were present and all were associated without mismatches or missed matches. These results indicate that the method can provide reliable cross-modal target-level correspondence for subsequent facial-region localization and radiometric temperature extraction.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| ADown | Adaptive Downsampling |
| AFE | Adaptive Feature Enhancement |
| C3k2_FE | C3k2 with Feature-Adaptive Enhancement |
| ECA | Efficient Channel Attention |
| FiLM | Feature-wise Linear Modulation |
| FLOPs | Floating-Point Operations |
| FPS | Frames Per Second |
| GFLOPs | Giga Floating-Point Operations |
| IoU | Intersection over Union |
| IR | Infrared |
| IRT | Infrared Thermography |
| mAP | Mean Average Precision |
| NMS | Non-Maximum Suppression |
| RGB | Red–Green–Blue |
| SPPF | Spatial Pyramid Pooling-Fast |
| SPPF_ECA | Spatial Pyramid Pooling-Fast with Efficient Channel Attention |
| SSIM | Structural Similarity Index Measure |
| VIS | Visible-light Image |
| YOLO | You Only Look Once |
References
- Liu, Z.; Fan, W.; He, D. Research progress on body temperature detection of dairy cows. Heilongjiang Anim. Sci. Vet. Med. 2018, 2018, 41–44. [Google Scholar] [CrossRef]
- Zhang, L.; Dong, R.; Hou, Y.; et al. Research progress on evaluation indexes and measurement methods of body temperature in dairy cows. Chin. J. Anim. Nutr. 2020, 32, 548–557. [Google Scholar] [CrossRef]
- Mottram, T. Animal board invited review: Precision livestock farming for dairy cows with a focus on oestrus detection. Animal 2016, 10, 1575–1584. [Google Scholar] [CrossRef] [PubMed]
- He, J.; Zhang, X.; Li, S.; et al. Effects of environmental temperature/humidity and measurement location on infrared thermal imaging temperature measurements in dairy cows. J. Zhejiang Univ. (Agriculture and Life Sciences Edition) 2020, 46, 500–508. [Google Scholar] [CrossRef]
- Violin, G.; Giammarco, M.; Trentin, A.R.; et al. Evaluation of ear thermographic imaging as a potential variable for detecting hypocalcemia in postpartum Holstein dairy cows. Animals 2025, 15, 2055. [Google Scholar] [CrossRef] [PubMed]
- Kim, S.; Yamagishi, N.; Ishikawa, S.; Tsuchiaka, S. Unique temperature change patterns in calves’ eyes and muzzles: A non-invasive approach using infrared thermography and object detection. Front. Vet. Sci. 2025, 12, 1548906. [Google Scholar] [CrossRef] [PubMed]
- Wang, Z.; Wang, S.; Wang, C.; Zhang, Y.; Zong, Z.; Wang, H.; Su, L.; Du, Y. A non-contact cow oestrus monitoring method based on the thermal infrared images of cows. Agriculture 2023, 13, 385. [Google Scholar] [CrossRef]
- Shu, H.; Ma, M.; Tucker, C.B.; et al. Automated collection of facial temperatures in dairy cows via improved YOLOv8 object detection and pose estimation models. Comput. Electron. Agric. 2024, 219, 108614. [Google Scholar] [CrossRef]
- Guo, S.S.; Lee, K.H.; Chang, L.; et al. Development of an automated body temperature detection platform for face recognition in cattle with YOLO V3-Tiny deep learning and infrared thermal imaging. Appl. Sci. 2022, 12, 4036. [Google Scholar] [CrossRef]
- Michelena, A.; Fontenla-Romero, O.; Calvo-Rolle, J.L. A review and future trends of precision livestock over dairy and beef cow cattle with artificial intelligence. Log. J. IGPL 2025, jzae111. [Google Scholar] [CrossRef]
- Song, H.; Wang, Y.; Deng, H.; et al. Research progress of intelligent monitoring technology for large-scale dairy cows based on video analysis. J. South China Agric. Univ. 2024, 45, 649–660. [Google Scholar] [CrossRef]
- Tassinari, P.; Bovo, M.; Benni, S.; et al. A computer vision approach based on deep learning for the detection of dairy cows in free stall barn. Comput. Electron. Agric. 2021, 182, 106030. [Google Scholar] [CrossRef]
- Tian, F.; Zhang, L.; Zhang, S.; et al. Selective feeding behaviour recognition method for dairy cows based on inspection robot and improved RT-DETR. Trans. Chin. Soc. Agric. Mach. 2025, 56, 258–267. Available online: https://www.j-csam.org/jcsam/article/abstract/20250625.
- Bumbálek, R.; Stehlík, R.; Zoubek, T.; et al. Automated detection and localisation of hoof diseases in dairy cattle using an integrated computer vision and infrared thermography system. Comput. Electron. Agric. 2026, 243, 111404. [Google Scholar] [CrossRef]
- Wang, Y.; Chen, T.; Li, B.; et al. Automatic identification and analysis of multi-object cattle rumination based on computer vision. J. Anim. Sci. Technol. 2023, 65, 519–534. [Google Scholar] [CrossRef] [PubMed]
- Chen, Y.; Zhong, P. Research on cross-modal feature matching algorithm based on Transformer. Sci. Technol. Innov. 2025, 22, 114–117. [Google Scholar]
- Wang, D.; Liu, J.; Fan, X.; et al. Unsupervised misaligned infrared and visible image fusion via cross-modality image generation and registration. In Proceedings of the International Joint Conference on Artificial Intelligence, 2022. [Google Scholar] [CrossRef] [PubMed]
- Turner, D.; Lucieer, A.; Malenovský, Z.; et al. Spatial co-registration of ultra-high resolution visible, multispectral and thermal images acquired with a micro-UAV over Antarctic moss beds. Remote Sens. 2014, 6, 4003–4024. [Google Scholar] [CrossRef]
- Fu, C.; Ren, L.; Wang, F. Cattle behaviour recognition and tracking method based on improved YOLOv8. Trans. Chin. Soc. Agric. Mach. 2024, 55, 1–10. [Google Scholar] [CrossRef]
- Yang, S.; Sun, Y.; Han, M.; et al. Research progress on infrared and visible image registration technology. J. Detect. Control 2024, 46, 1–12. [Google Scholar] [CrossRef]
- Zhan, X. Research on infrared and visible image registration algorithms in complex scenes. Doctoral dissertation, University of Chinese Academy of Sciences, Chengdu, China, 2022. [Google Scholar] [CrossRef]
- Ben-Shoushan, R.; Brook, A. Fused thermal and RGB imagery for robust detection and classification of dynamic objects in mixed datasets via pre-trained high-level CNN. Remote Sens. 2023, 15, 723. [Google Scholar] [CrossRef]
- Ruifeng, Z.H.A.N.G.; Shanshan, C.A.O.; Fantao, K.O.N.G.; et al. Lightweight cattle face identity recognition method based on improved DenseNet121[J]. Trans. Chin. Soc. Agric. Eng. 2026, 42(3), 212–220. [Google Scholar] [CrossRef]
- NEKRASOV, V.; DHARMASIRI, T.; SPEK, A.; et al. Real-time joint semantic segmentation and depth estimation using asymmetric annotations[EB/OL]. arXiv. 2019. Available online: https://arxiv.org/abs/1809.04766.
- Zhiqiang, C.H.E.N.; Xiaohui, L.E.I.; Yang, L.I.U.; et al. Growth quality detection and binocular localization method for orchard pears based on improved YOLO v8n[J/OL]. Trans. Chin. Soc. Agric. Eng. 2026, 1–11. Available online: https://link.cnki.net/urlid/11.2047.S.20260514.1738.028. [CrossRef]
- Suiyan, T.A.N.; Lei, Z.H.O.N.G.; Changjiang, L.I.U.; et al. Design and experiment of sowing performance detection system for leafy vegetable plug seedlings based on YOLO11n[J]. Trans. Chin. Soc. Agric. Eng. 2026, 42(1), 25–36. [Google Scholar] [CrossRef]
- Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), Seattle, WA, USA, 2020; pp. 11534–11542. [Google Scholar] [CrossRef]
- Jin, Z.H.A.N.G.; Hao, G.U.O.; Yulong, S.U.N.; et al. Dynamic Weapon-target Assignment based on Variable Time Domain Hungarian Algorithm[J]. Acta Armamentarii 2025, 46(S2), 395–401. [Google Scholar] [CrossRef]
- Shu, H.; Ma, M.; Tucker, C.B.; et al. Automated collection of facial temperatures in dairy cows via improved YOLOv8 object detection and pose estimation models. Comput. Electron. Agric. 2024, 219, 108614. [Google Scholar] [CrossRef]
- Kim, S.; Yamagishi, N.; Ishikawa, S.; Tsuchiaka, S. Unique temperature change patterns in calves’ eyes and muzzles: A non-invasive approach using infrared thermography and object detection. Front. Vet. Sci. 2025, 12, 1548906. [Google Scholar] [CrossRef] [PubMed]
- Violin, G.; Giammarco, M.; Trentin, A.R.; et al. Evaluation of ear thermographic imaging as a potential variable for detecting hypocalcemia in postpartum Holstein dairy cows. Animals 2025, 15, 2055. [Google Scholar] [CrossRef] [PubMed]
- Algra, M.; de Keijzer, L.; Arndt, S.S.; van Eerdenburg, F.J.C.M.; Goerlich, V.C. Evaluation of the thermal response of the horns in dairy cattle. Animals 2023, 13, 500. [Google Scholar] [CrossRef] [PubMed]
- Mongillo, P.; Giaretta, E.; Fiore, E.; Fabbri, G.; Stefanon, B.; Degano, L.; Vicario, D.; Gabai, G. Factors affecting the applicability of infrared thermography as a measure of temperament in cattle. Vet. Sci. 2025, 12, 913. [Google Scholar] [CrossRef] [PubMed]

| Number of Cattle/Figure | Visible images(VIS) | Infrared pseudo-colour image(IR) | ||||
| Train | Val | Test | Train | Val | Test | |
| 1 | 3 | 1 | 1 | 544 | 74 | 72 |
| 2 | 7 | 1 | 1 | 297 | 38 | 39 |
| 3 | 73 | 4 | 4 | 113 | 7 | 8 |
| 4 | 104 | 17 | 18 | 19 | 2 | 2 |
| 5 | 222 | 27 | 23 | 5 | 1 | 1 |
| 6 | 202 | 24 | 26 | 0 | 0 | 0 |
| 7 | 174 | 20 | 22 | 0 | 0 | 0 |
| 8 | 81 | 6 | 8 | 0 | 0 | 0 |
| 9 | 40 | 9 | 5 | 0 | 0 | 0 |
| 10 | 35 | 2 | 4 | 0 | 0 | 0 |
| 11-16 | 37 | 11 | 10 | 0 | 0 | 0 |
| Total | 978 | 122 | 122 | 978 | 122 | 122 |
| Model | Modality | P/% | mAP0.5/% | mAP0.5:0.95/% | Params(M) | FLOPs(G) |
| RT-DETR_L | VIS | 92.98 | 92.84 | 68.04 | 32.81 | 108 |
| IR | 89.23 | 96.16 | 88.61 | 32.81 | 108 | |
| Faster-RCNN | VIS | 93.25 | 86.54 | 61.11 | 41.3 | 267.86 |
| IR | 95.34 | 92.20 | 82.98 | 41.3 | 267.86 | |
| YOLOV5n | VIS | 95.27 | 94.56 | 68.64 | 2.51 | 7.18 |
| IR | 95.79 | 98.56 | 89.64 | 2.51 | 7.18 | |
| YOLOV8n | VIS | 96.17 | 94.81 | 69.47 | 3.01 | 8.2 |
| IR | 93.01 | 98.31 | 90.11 | 3.01 | 8.2 | |
| YOLOV10n | VIS | 96.53 | 95.76 | 68.24 | 2.71 | 8.4 |
| IR | 94.51 | 97.15 | 90.33 | 2.71 | 8.4 | |
| YOLO11n | VIS | 93.11 | 94.11 | 69.28 | 2.59 | 6.44 |
| IR | 94.27 | 98.92 | 90.26 | 2.59 | 6.44 | |
| YOLO12n | VIS | 93.75 | 94.25 | 68.27 | 2.57 | 6.48 |
| IR | 94.84 | 97.96 | 90.20 | 2.57 | 6.48 | |
| YOLO11-AFE | VIS | 97.51 | 96.26 | 70.64 | 2.14 | 5.27 |
| IR | 95.92 | 99.07 | 91.41 | 2.14 | 5.27 |
| ADown | C3k2_FE | SPPF_ECA | Modality | P/% | mAP0.5/% | mAP0.5:0.95/% | Params(M) | FLOPs(G) |
| - | - | - | VIS | 93.11 | 94.11 | 69.28 | 2.59 | 6.44 |
| IR | 94.27 | 98.92 | 90.26 | 2.59 | 6.44 | |||
| √ | - | - | VIS | 97.37 | 94.74 | 69.97 | 2.04 | 5.17 |
| IR | 95.85 | 98.83 | 91.01 | 2.04 | 5.17 | |||
| - | √ | - | VIS | 96.08 | 95.86 | 70.90 | 2.62 | 6.46 |
| IR | 96.08 | 98.74 | 91.45 | 2.62 | 6.46 | |||
| - | - | √ | VIS | 96.26 | 95.66 | 69.70 | 2.59 | 6.44 |
| IR | 94.23 | 98.9 | 91.01 | 2.59 | 6.44 | |||
| √ | √ | - | VIS | 96.88 | 94.73 | 69.15 | 2.14 | 5.27 |
| IR | 96.79 | 98.84 | 90.77 | 2.14 | 5.27 | |||
| √ | - | √ | VIS | 95.16 | 94.56 | 68.96 | 2.11 | 5.25 |
| IR | 94.26 | 98.62 | 90.43 | 2.11 | 5.25 | |||
| - | √ | √ | VIS | 97.43 | 95.61 | 70.69 | 2.62 | 6.46 |
| IR | 93.82 | 98.51 | 91.25 | 2.62 | 6.46 | |||
| √ | √ | √ | VIS | 97.51 | 96.26 | 70.64 | 2.14 | 5.27 |
| IR | 95.92 | 99.07 | 91.41 | 2.14 | 5.27 |
| Number of synchronized image pairs in the test set | Number of ground-truth matched target pairs | Correct matches | Mismatches | Missed matches | Matching accuracy/% |
| 122 | 187 | 187 | 0 | 0 | 100% |
| Inference mode | Frame reading time / ms | Inference time / ms | Bounding-box parsing time / ms | Hungarian matching time / ms | Core-process time / ms | Inference FPS | Core-process FPS | Matching proportion / % |
| PyTorch | 2.95 | 38.14 | 2.55 | 0.12 | 40.81 | 26.22 | 24.50 | 0.289 |
| TensorRT | 3.21 | 24.23 | 2.89 | 0.12 | 27.24 | 41.26 | 36.71 | 0.444 |
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. |
© 2026 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.