Occlusion-Aware Caged Chicken Detection Based on Multi-Scale Edge Information Extractor and Context Fusion
Simple Summary
Abstract
1. Introduction
- This study constructs an image dataset in the caged chicken production environment in various illumination and occlusion conditions. During annotation, a joint head–neck labeling approach is adopted to ensure the spatial continuity of individual identification, while a multi-stage joint image enhancement strategy is employed to improve chicken detectability in poor illumination conditions. Two dedicated test sets are specifically designed to assess model robustness in poor illumination and multiple occlusion conditions.
- In this study, the Chicken-YOLO model is designed. The multi-scale edge information extractor (MSEIExtractor) is proposed to enhance the feather texture and comb contour features. The context-guided downsampling (CGDown) is introduced to optimize the information retention logic of downsampling, and the detection head with the multi-scale separation and enhancement attention module (DHMSEAM) is constructed to enhance the perception of the occlusion area.
- This study evaluates the Chicken-YOLO model’s performance through comprehensive experiments. The proposed method demonstrates superior performance for chicken detection in challenging conditions, including uneven illumination and varying occlusion levels, outperforming mainstream approaches and confirming the model’s robustness against complex disturbances.
2. Materials and Methods
2.1. Materials
2.1.1. Data Acquisition
2.1.2. Dataset Construction
2.2. Methods
2.2.1. Overall Architecture of Chicken-YOLO
2.2.2. MSEIExtractor
2.2.3. CGDown
2.2.4. DHMSEAM
2.3. Experimental Platform and Evaluation Indicators
2.3.1. Implementation Details
2.3.2. Evaluation Metrics
3. Results
3.1. Contrast Experiments
3.1.1. Comparative Experiments of Different Target Detection Algorithms
3.1.2. Comparative Experiments of Different Downsampling Modules
3.1.3. Comparative Experiments with Different Detection Heads
3.1.4. Comparative Experiments Using Special Test Sets
3.2. Ablation Experiment
3.3. Visualization Results and Analysis
3.3.1. Visualization of Results of Different Target Detection Algorithms
3.3.2. Visualization of Ablation Results
3.3.3. Visualization of Test Results for Special Test Sets
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Gateway to Poultry Production and Products. 2025. Available online: https://www.fao.org/poultry-production-products/production/en/ (accessed on 15 May 2025).
- Hafez, H.M.; Attia, Y.A. Challenges to the Poultry Industry: Current Perspectives and Strategic Future After the COVID-19 Outbreak. Front. Vet. Sci. 2020, 7, 516. [Google Scholar] [CrossRef]
- Castro, F.L.S.; Chai, L.; Arango, J.; Owens, C.M.; Smith, P.A.; Reichelt, S.; DuBois, C.; Menconi, A. Poultry Industry Paradigms: Connecting the Dots. J. Appl. Poult. Res. 2023, 32, 100310. [Google Scholar] [CrossRef]
- Yang, C.W.; Du, H.R.; Li, Q.Y.; Qiu, M.H.; Zhang, Z.R.; Yu, C.L.; Xiong, X.; Bai, T.P.; Wu, D.; Yang, L.; et al. Development of Intelligent Management and Analysis System for Breeding Information in Quality Chicken. China Poult. 2019, 41, 50–52. (In Chinese) [Google Scholar] [CrossRef]
- Lian, J.H.; Sun, K.; Zhu, W.; Yin, R.X.; Han, Y.; Li, H.M. Research on Poultry Health Management System Based on Intelligent Inspection Robot. Shandong Agric. Sci. 2019, 51, 152–155. (In Chinese) [Google Scholar] [CrossRef]
- Zhang, J. Research on Yellow-Feather Broiler Heat Stress Behavior Recognition and Evaluation Index Based on Visual Technology and Deep Learning. Master’s Thesis, Nanjing Agricultural University, Nanjing, China, 2021. (In Chinese). [Google Scholar]
- Özentürk, U.; Chen, Z.; Jamone, L.; Versace, E. Robotics for Poultry Farming: Challenges and Opportunities. Comput. Electron. Agric. 2024, 226, 109411. [Google Scholar] [CrossRef]
- Abd Aziz, N.S.N.; Mohd Daud, S.; Dziyauddin, R.A.; Adam, M.Z.; Azizan, A. A Review on Computer Vision Technology for Monitoring Poultry Farm—Application, Hardware, and Software. IEEE Access 2021, 9, 12431–12445. [Google Scholar] [CrossRef]
- Yang, X.; Bahadur Bist, R.; Paneru, B.; Liu, T.; Applegate, T.; Ritz, C.; Kim, W.; Regmi, P.; Chai, L. Computer Vision-Based Cybernetics Systems for Promoting Modern Poultry Farming: A Critical Review. Comput. Electron. Agric. 2024, 225, 109339. [Google Scholar] [CrossRef]
- 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]
- Ding, C.C.; Ni, J.X.; Chen, Y.H.; Chen, Z.B. Development of Sick Chicken Recognition Based on Deep Learning. Ind. Control. Comput. 2021, 34, 48–50. (In Chinese) [Google Scholar]
- Liu, Y.; Zhou, H.; Ni, Z.; Jiang, Z.; Wang, X. An Accurate and Lightweight Algorithm for Caged Chickens Detection Based on Deep Learning. Pak. J. Agri. Sci. 2024, 61, 403–415. [Google Scholar]
- Zhao, C.J.; Liang, X.W.; Yu, H.L.; Wang, H.F.; Fan, S.J.; Li, B. Automatic Identification and Counting Method of Caged Hens and Eggs Based on Improved YOLOv7. Trans. Chin. Soc. Agric. Mach. 2023, 54, 300–312. (In Chinese) [Google Scholar]
- Chen, J.; Ding, Q.; Yao, W.; Shen, M.; Liu, L. Fine-Grained Detection of Caged-Hen Head States Using Adaptive Brightness Adjustment in Combination with Convolutional Neural Networks. Int. J. Agric. Biol. Eng. 2023, 16, 208–216. [Google Scholar] [CrossRef]
- Ma, W.; Wang, X.; Xue, X.; Li, M.; Yang, S.X.; Guo, Y.; Gao, R.; Song, L.; Li, Q. A Dataset of Visible Light and Thermal Infrared Images for Health Monitoring of Caged Laying Hens in Large-Scale Farming. Sensors 2024, 24, 6385. [Google Scholar] [CrossRef]
- Zu, L.; Chu, X.; Wang, Q.; Ju, Y.; Zhang, M. Joint Feature Target Detection Algorithm of Beak State Based on YOLOv5. IEEE Access 2023, 11, 64458–64467. [Google Scholar] [CrossRef]
- Ultralytics/Ultralytics YOLO11. 2024. Available online: https://docs.ultralytics.com/zh/models/yolo11/ (accessed on 28 April 2025).
- Qin, L.; Tan, Z.F.; Lei, G.P.; Chen, Q.B. EMF-YOLO: Lightweight Multi-scale Feature Extraction Algorithm for Road Surface Defect Detection. Comput. Eng. Appl. 2025, 61, 101. (In Chinese) [Google Scholar]
- Cui, Y.; Ren, W.; Cao, X.; Knoll, A. Focal Network for Image Restoration. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Paris, France, 1–6 October 2023; pp. 13001–13011. [Google Scholar] [CrossRef]
- Wu, T.; Tang, S.; Zhang, R.; Cao, J.; Zhang, Y. CGNet: A Light-Weight Context Guided Network for Semantic Segmentation. IEEE Trans. Image Process. 2021, 30, 1169–1179. [Google Scholar] [CrossRef] [PubMed]
- Lv, K. CCi-YOLOv8n: Enhanced Fire Detection with CARAFE and Context-Guided Modules. arXiv 2024, arXiv:2411.11011. [Google Scholar]
- Yu, Z.; Huang, H.; Chen, W.; Su, Y.; Liu, Y.; Wang, X. YOLO-FaceV2: A Scale and Occlusion Aware Face Detector. Pattern Recognit. 2024, 155, 110714. [Google Scholar] [CrossRef]
- Gai, R.; Liu, Y.; Xu, G. TL-YOLOv8: A Blueberry Fruit Detection Algorithm Based on Improved YOLOv8 and Transfer Learning. IEEE Access 2024, 12, 86378–86390. [Google Scholar] [CrossRef]
- Sunkara, R.; Luo, T. No More Strided Convolutions or Pooling: A New CNN Building Block for Low-Resolution Images and Small Objects. In Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Grenoble, France, 19–23 September 2022; Springer Nature: Cham, Switzerland, 2022; pp. 443–459. [Google Scholar]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 7464–7475. [Google Scholar]
- Williams, T.; Li, R. Wavelet Pooling for Convolutional Neural Networks. In Proceedings of the 6th International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Lu, W.; Chen, S.B.; Tang, J.; Ding, C.H.Q.; Luo, B. A Robust Feature Downsampling Module for Remote-Sensing Visual Tasks. IEEE Trans. Geosci. Remote Sens. 2023, 61, 4404312. [Google Scholar] [CrossRef]
- Xu, G.; Liao, W.; Zhang, X.; Li, C.; He, X.; Wu, X. Haar Wavelet Downsampling: A Simple but Effective Downsampling Module for Semantic Segmentation. Pattern Recognit. 2023, 143, 109819. [Google Scholar] [CrossRef]
- Wang, C.Y.; Yeh, I.H.; Liao, H.Y.M. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. In Proceedings of the 18th European Conference on Computer Vision, Milan, Italy, 29 September–4 October 2024; Springer Nature: Cham, Switzerland, 2024; pp. 1–21. [Google Scholar]
- Wang, Y.; Chen, J.; Duan, X.; Li, Z. EMPA-YOLO: A Lightweight Real-Time Weed Detection Method Suitable for Natural. In Proceedings of the 2024 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Kuching, Malaysia, 6–10 October 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 2713–2720. [Google Scholar]
- Yang, J.; Liu, S.; Wu, J.; Su, X.; Hai, N.; Huang, X. Pinwheel-Shaped Convolution and Scale-Based Dynamic Loss for Infrared Small Target Detection. Proc. AAAI Conf. Artif. Intell. 2025, 39, 9202–9210. [Google Scholar] [CrossRef]
- Yin, B. Lightweight Fire Detection Algorithm Based on LSCD-FasterC2f-YOLOv8. In Proceedings of the 2024 5th International Conference on Big Data & Artificial Intelligence & Software Engineering (ICBASE), Wenzhou, China, 20–22 September 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 64–67. [Google Scholar]
- Sun, H.; Zhang, W.; Ma, D.; Zhang, Y.; Li, D.; Gao, X. YOLO-WTDL: A Lightweight Wind Turbine Blades Defect Detection Model Based on YOLOv8. In Proceedings of the 2024 7th Asia Conference on Energy and Electrical Engineering (ACEEE), Chengdu, China, 20–22 July 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 46–51. [Google Scholar]
- Cao, Q.; Chen, H.; Wang, S.; Wang, Y.; Fu, H.; Chen, Z.; Liang, F. LH-YOLO: A Lightweight and High-Precision SAR Ship Detection Model Based on the Improved YOLOv8n. Remote Sens. 2024, 16, 4340. [Google Scholar] [CrossRef]
- Zhang, S.; Wang, B.T.; Tu, J.Y.; Chen, C.S. SCE-YOLO: Improved Lightweight YOLOv8 Algorithm for UAV Visual Detection. Comput. Eng. Appl. 2025, 1–14. (In Chinese) [Google Scholar]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. Int. J. Comput. Vis. 2020, 128, 336–359. [Google Scholar] [CrossRef]
- Weimer, S.L.; Mauromoustakos, A.; Karcher, D.M.; Erasmus, M.A. Differences in Performance, Body Conformation, and Welfare of Conven-tional and Slow-Growing Broiler Chickens Raised at 2 Stocking Densities. Poult. Sci. 2020, 99, 4398–4407. [Google Scholar] [CrossRef]
- Xie, W.Y.; Pan, N.X.; Zeng, H.R.; Yan, H.C.; Wang, X.Q.; Gao, C.Q. Comparison of Nonlinear Models to Describe the Feather Growth and Development Curve in Yellow-Feathered Chickens. Animal 2020, 14, 1005–1013. [Google Scholar] [CrossRef]
- Wu, Z.; Yang, J.; Zhang, H.; Fang, C. Enhanced Methodology and Experimental Research for Caged Chicken Counting Based on YOLOv8. Animals 2025, 15, 853. [Google Scholar] [CrossRef]
- Yu, Z.; Wan, L.; Yousaf, K.; Lin, H.; Zhang, J.; Jiao, H.; Yan, G.; Song, Z.; Tian, F. An Enhancement Algorithm for Head Characteristics of Caged Chickens Detection Based on Cyclic Consistent Migration Neural Network. Poult. Sci. 2024, 103, 103663. [Google Scholar] [CrossRef] [PubMed]
- Yang, J.; Zhang, T.; Fang, C.; Zheng, H. A Defencing Algorithm Based on Deep Learning Improves the Detection Accuracy of Caged Chickens. Comput. Electron. Agric. 2023, 204, 107501. [Google Scholar] [CrossRef]
Configuration | Parameter |
---|---|
CPU | AMD Ryzen 5 5500 |
GPU | Nvidia GeForce RTX 3060 |
Operating system | Windows 11 |
GPU computing platform | CUDA 12.6 |
Development environment | Python 3.10.14 Pytorch 2.2.2 |
Hyperparameter | Value |
---|---|
Optimizer | SGD |
Learning rate | 0.01 |
Momentum | 0.937 |
Weight decay | 0.0005 |
Batch size | 32 |
Epoch | 400 |
Image size | 640 × 640 |
Model | P (%) | R (%) | F1 Score (%) | mAP50 (%) | mAP50:90 (%) | Params (M) | GFLOPs (G) |
---|---|---|---|---|---|---|---|
Faster R-CNN | 69.8 | 85.2 | 76.7 | 85.7 | 44.2 | 136.7 | 200.8 |
SSD | 89.7 | 68.9 | 78.0 | 80.5 | 41.1 | 23.6 | 136.6 |
RetinaNet | 86.0 | 82.3 | 84.1 | 87.0 | 48.9 | 36.3 | 81.7 |
YOLOv5n | 88.0 | 78.5 | 83.0 | 87.0 | 55.9 | 1.8 | 4.1 |
YOLOX-nano | 87.6 | 68.8 | 77.0 | 79.3 | 41.2 | 0.9 | 1.2 |
YOLOv8n | 86.3 | 74.9 | 80.2 | 83.5 | 51.4 | 3.0 | 8.1 |
YOLOv9-tiny | 90.6 | 81.4 | 85.8 | 90.1 | 60.0 | 2.7 | 10.7 |
YOLOv10n | 88.6 | 80.4 | 84.3 | 88.8 | 58.6 | 2.7 | 8.2 |
Hyper-YOLOn | 89.1 | 81.7 | 85.2 | 89.7 | 59.2 | 3.6 | 9.5 |
YOLO11s | 89.6 | 83.8 | 86.6 | 90.0 | 60.8 | 9.4 | 21.3 |
YOLO11n | 89.3 | 81.8 | 85.4 | 89.2 | 58.8 | 2.6 | 6.3 |
Chicken-YOLO | 89.6 | 82.8 | 86.1 | 90.9 | 60.4 | 5.5 | 9.0 |
Model | P (%) | R (%) | F1 Score (%) | mAP50 (%) | mAP50:90 (%) | Params (M) | GFLOPs (G) |
---|---|---|---|---|---|---|---|
YOLO11n | 89.3 | 81.8 | 85.4 | 89.2 | 58.8 | 2.58 | 6.3 |
+SPDConv | 90.3 | 79.3 | 84.4 | 89.4 | 58.6 | 4.59 | 11.3 |
+v7DS | 88.1 | 81.5 | 84.7 | 89.3 | 58.3 | 2.23 | 5.7 |
+WaveletPool | 88.0 | 81.9 | 84.8 | 89.2 | 58.5 | 2.17 | 5.4 |
+SRFD | 90.7 | 80.0 | 85.0 | 89.6 | 58.9 | 2.56 | 7.6 |
+HWD | 89.6 | 81.2 | 85.2 | 89.7 | 59.5 | 2.21 | 5.8 |
+ADown | 88.8 | 81.0 | 84.7 | 89.4 | 58.5 | 2.10 | 5.3 |
+LAWDS | 90.1 | 79.4 | 84.4 | 89.2 | 58.8 | 2.24 | 6.4 |
+PSConv | 89.0 | 80.3 | 84.4 | 89.0 | 58.6 | 2.46 | 6.3 |
+CGDown | 89.8 | 81.9 | 85.7 | 90.0 | 60.0 | 3.53 | 9.0 |
Model | P (%) | R (%) | F1 Score (%) | mAP50 (%) | mAP50:90 (%) | Params (M) | GFLOPs (G) |
---|---|---|---|---|---|---|---|
YOLO11n | 89.3 | 81.8 | 85.4 | 89.2 | 58.8 | 2.58 | 6.3 |
+LSCD | 90.6 | 79.9 | 84.9 | 89.6 | 59.2 | 2.42 | 5.6 |
+TADDH | 87.9 | 82.7 | 85.2 | 89.6 | 59.2 | 2.20 | 7.9 |
+RSCD | 88.5 | 79.0 | 83.5 | 88.7 | 56.8 | 2.42 | 5.6 |
+ES-Head | 89.5 | 81.7 | 85.4 | 89.4 | 59.1 | 2.26 | 6.0 |
+DHSEAM | 89.4 | 81.5 | 85.3 | 89.6 | 58.7 | 2.49 | 5.8 |
+DHMSEAM | 89.7 | 81.7 | 85.5 | 89.8 | 58.9 | 4.59 | 6.0 |
Model | P (%) | R (%) | F1 Score (%) | mAP50 (%) | mAP50:90 (%) |
---|---|---|---|---|---|
YOLO11n | 84.5 | 72.3 | 77.9 | 81.8 | 51.1 |
Chicken-YOLO | 87.2 | 73.9 | 80.0 | 84.8 | 52.8 |
Model | P (%) | R (%) | F1 Score (%) | mAP50 (%) | mAP50:90 (%) |
---|---|---|---|---|---|
YOLO11n | 89.3 | 80.1 | 84.5 | 88.4 | 58.8 |
Chicken-YOLO | 88.6 | 84.9 | 86.7 | 90.2 | 61.1 |
Model | DHMSEAM | MSEIExtractor | CGDown | P (%) | R (%) | F1 Score (%) | mAP50 (%) | mAP50:90 (%) | Params (M) | GFLOPs (G) |
---|---|---|---|---|---|---|---|---|---|---|
YOLO11n | 89.3 | 81.8 | 85.4 | 89.2 | 58.8 | 2.58 | 6.3 | |||
Model1 | ✓ | 89.7 | 81.7 | 85.5 | 89.8 | 58.9 | 4.59 | 6.0 | ||
Model2 | ✓ | 91.3 | 80.8 | 85.7 | 90.3 | 59.9 | 2.57 | 6.5 | ||
Model3 | ✓ | 89.8 | 81.9 | 85.7 | 90.0 | 60.0 | 3.53 | 9.0 | ||
Model4 | ✓ | ✓ | 90.6 | 81.3 | 85.7 | 90.5 | 59.6 | 4.58 | 6.3 | |
Model5 | ✓ | ✓ | 89.6 | 81.7 | 85.5 | 90.5 | 60.0 | 5.54 | 8.8 | |
Model6 | ✓ | ✓ | 89.5 | 82.7 | 86.0 | 90.6 | 60.4 | 3.52 | 9.3 | |
Chicken-YOLO | ✓ | ✓ | ✓ | 89.6 | 82.8 | 86.1 | 90.9 | 60.4 | 5.53 | 9.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
Pan, F.; Huang, F.; Zhang, L.; Yin, H.; Ruan, Y.; Yang, D.; Wang, S. Occlusion-Aware Caged Chicken Detection Based on Multi-Scale Edge Information Extractor and Context Fusion. Animals 2025, 15, 2669. https://doi.org/10.3390/ani15182669
Pan F, Huang F, Zhang L, Yin H, Ruan Y, Yang D, Wang S. Occlusion-Aware Caged Chicken Detection Based on Multi-Scale Edge Information Extractor and Context Fusion. Animals. 2025; 15(18):2669. https://doi.org/10.3390/ani15182669
Chicago/Turabian StylePan, Fei, Fang Huang, Luping Zhang, Huadong Yin, Ying Ruan, Daizhuang Yang, and Shuheng Wang. 2025. "Occlusion-Aware Caged Chicken Detection Based on Multi-Scale Edge Information Extractor and Context Fusion" Animals 15, no. 18: 2669. https://doi.org/10.3390/ani15182669
APA StylePan, F., Huang, F., Zhang, L., Yin, H., Ruan, Y., Yang, D., & Wang, S. (2025). Occlusion-Aware Caged Chicken Detection Based on Multi-Scale Edge Information Extractor and Context Fusion. Animals, 15(18), 2669. https://doi.org/10.3390/ani15182669