Dead Broiler Detection and Segmentation Using Transformer-Based Dual Stream Network
Abstract
:1. Introduction
2. Materials and Methods
2.1. Dataset Collection and Description
2.2. Methodology
2.2.1. Overall Architecture
2.2.2. Transformer Module
2.2.3. Joint Loss Function
2.2.4. Implementation Detail
2.3. Evaluation Metrics
3. Results and Discussion
3.1. Performance Comparison
3.2. Visualization Results
3.3. Discussion
4. Conclusions
- We proposed a novel dual-stream architecture that simultaneously handles the detection and segmentation of dead broilers. The detection module located potential areas containing dead broilers, and the segmentation module refined these identified areas, enabling precise boundary delineation.
- To improve the ability of the model to capture long-range dependencies and contextual information, we integrated self-attention layers into the network architecture. This enabled a better understanding of the spatial relationships between the detected dead broilers and the overall scene context, enhancing the robustness of the model in complex environments.
- This method utilizes heat map regression to map the probable locations of dead broilers by overlaying Gaussian distributions at these points. This approach provides a refined method for prioritizing critical areas during detection and segmentation.
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Liu, H.-W.; Chen, C.-H.; Tsai, Y.-C.; Hsieh, K.-W.; Lin, H.-T. Identifying Images of Dead Chickens with a Chicken Removal System Integrated with a Deep Learning Algorithm. Sensors 2021, 21, 3579. [Google Scholar] [CrossRef] [PubMed]
- Abdalla, A.; Cen, H.; Wan, L.; Mehmood, K.; He, Y. Nutrient Status Diagnosis of Infield Oilseed Rape via Deep Learning-Enabled Dynamic Model. IEEE Trans. Ind. Inform. 2020, 17, 4379–4389. [Google Scholar] [CrossRef]
- Abdanan Mehdizadeh, S.; Neves, D.P.; Tscharke, M.; Nääs, I.A.; Banhazi, T.M. Image Analysis Method to Evaluate Beak and Head Motion of Broiler Chickens During Feeding. Comput. Electron. Agric. 2015, 114, 88–95. [Google Scholar] [CrossRef]
- Pereira, D.F.; Miyamoto, B.C.B.; Maia, G.D.N.; Sales, G.T.; Magalhães, M.M.; Gates, R.S. Machine Vision to Identify Broiler Breeder Behavior. Comput. Electron. Agric. 2013, 99, 194–199. [Google Scholar] [CrossRef]
- Zhuang, X.; Zhang, T. Detection of Sick Broilers by Digital Image Processing and Deep Learning. Biosyst. Eng. 2019, 179, 106–116. [Google Scholar] [CrossRef]
- Hao, H.; Fang, P.; Duan, E.; Yang, Z.; Wang, L.; Wang, H. A Dead Broiler Inspection System for Large-Scale Breeding Farms Based on Deep Learning. Agriculture 2022, 12, 1176. [Google Scholar] [CrossRef]
- Bist, R.B.; Yang, X.; Subedi, S.; Chai, L. Mislaying Behavior Detection in Cage-Free Hens with Deep Learning Technologies. Poult. Sci. 2023, 102, 102729. [Google Scholar] [CrossRef]
- Mollah, M.B.R.; Hasan, M.A.; Salam, M.A.; Ali, M.A. Digital Image Analysis to Estimate the Live Weight of Broiler. Comput. Electron. Agric. 2010, 72, 48–52. [Google Scholar] [CrossRef]
- Mortensen, A.K.; Lisouski, P.; Ahrendt, P. Weight Prediction of Broiler Chickens Using 3D Computer Vision. Comput. Electron. Agric. 2016, 123, 319–326. [Google Scholar] [CrossRef]
- Amraei, S.; Mehdizadeh, S.A.; Nääs, I.D.A. Development of a Transfer Function for Weight Prediction of Live Broiler Chicken Using Machine Vision. Eng. Agric. 2018, 38, 776–782. [Google Scholar] [CrossRef]
- Ye, C.-W.; Yu, Z.-W.; Kang, R.; Yousaf, K.; Qi, C.; Chen, K.-J.; Huang, Y.-P. An Experimental Study of Stunned State Detection for Broiler Chickens Using an Improved Convolution Neural Network Algorithm. Comput. Electron. Agric. 2020, 170, 105284. [Google Scholar] [CrossRef]
- Mansor, M.A.; Baki, S.R.M.S.; Tahir, N.M.; Rahman, R.A. An Approach of Halal Poultry Meat Comparison Based on Mean-Shift Segmentation. In Proceedings of the 2013 IEEE Conference on Systems, Process & Control (ICSPC), Kuala Lumpur, Malaysia, 13–15 December 2013; pp. 279–282. [Google Scholar] [CrossRef]
- Alon, A.S.; Technological Institute of the Philippines-Manila. An Image Processing Approach of Multiple Eggs’ Quality Inspection. Int. J. Adv. Trends Comput. Sci. Eng. 2019, 8, 2794–2799. [Google Scholar] [CrossRef]
- Neethirajan, S. Recent Advances in Wearable Sensors for Animal Health Management. Sens. Bio-Sens. Res. 2017, 12, 15–29. [Google Scholar] [CrossRef]
- Neethirajan, S.; Tuteja, S.K.; Huang, S.T.; Kelton, D. Recent Advancement in Biosensors Technology for Animal and Livestock Health Management. Biosens. Bioelectron. 2017, 98, 398–407. [Google Scholar] [CrossRef]
- Syauqi, M.N.; Zaffrie, M.M.A.; Hasnul, H.I. Broiler Industry in Malaysia. Available online: http://ap.fftc.agnet.org/files/ap_policy/532/532_1.pdf (accessed on 25 January 2018).
- Okinda, C.; Lu, M.; Liu, L.; Nyalala, I.; Muneri, C.; Wang, J.; Zhang, H.; Shen, M. A Machine Vision System for Early Detection and Prediction of Sick Birds: A Broiler Chicken Model. Biosyst. Eng. 2019, 188, 229–242. [Google Scholar] [CrossRef]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep Learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
- Zhou, B.; Khosla, A.; Lapedriza, A.; Oliva, A.; Torralba, A. Learning Deep Features for Discriminative Localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 2921–2929. [Google Scholar] [CrossRef]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. In Medical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference, Munich, Germany, 5–9 October 2015; Proceedings, Part III; Springer International Publishing: Cham, Switzerland, 2015; Volume 18, pp. 234–241. [Google Scholar] [CrossRef]
- Chen, L.-C.; Zhu, Y.; Papandreou, G.; Schroff, F.; Adam, H. Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation. In Proceedings of the European Conference on Computer Vision, Munich, Germany, 8–14 September 2018; pp. 801–818. [Google Scholar] [CrossRef]
- van der Eijk, J.A.J.; Guzhva, O.; Voss, A.; Möller, M.; Giersberg, M.F.; Jacobs, L.; de Jong, I.C. Seeing Is Caring—Automated Assessment of Resource Use of Broilers with Computer Vision Techniques. Front. Anim. Sci. 2022, 3, 945534. [Google Scholar] [CrossRef]
- Yang, J.; Zhang, T.; Fang, C.; Zheng, H.; Ma, C.; Wu, Z. A Detection Method for Dead Caged Hens Based on Improved YOLOv7. Comput. Electron. Agric. 2024, 226, 109388. [Google Scholar] [CrossRef]
- Bao, Y.; Lu, H.; Zhao, Q.; Yang, Z.; Xu, W. Detection System of Dead and Sick Chickens in Large Scale Farms Based on Artificial Intelligence. Math. Biosci. Eng. 2021, 18, 6117–6135. [Google Scholar] [CrossRef]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask R-CNN. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2961–2969. [Google Scholar] [CrossRef]
- Li, P.; Zhang, T.; Wang, X.; Liu, J.; Huang, Y. Detection of Sick Laying Hens by Infrared Thermal Imaging and Deep Learning. J. Phys. Conf. Ser. 2021, 2025, 012008. [Google Scholar] [CrossRef]
- Massari, J.M.; de Moura, D.J.; de Alencar Nääs, I.; Pereira, D.F.; Branco, T. Computer-Vision-Based Indexes for Analyzing Broiler Response to Rearing Environment: A Proof of Concept. Animals 2022, 12, 846. [Google Scholar] [CrossRef] [PubMed]
- Qiu, Z.; Hu, Y.; Chen, X.; Zeng, D.; Hu, Q.; Liu, J. Rethinking Dual-Stream Super-Resolution Semantic Learning in Medical Image Segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 451–464. [Google Scholar] [CrossRef] [PubMed]
- Liu, L.; Yang, Z.; Li, G.; Wang, K.; Chen, T.; Lin, L. Aerial Images Meet Crowdsourced Trajectories: A New Approach to Robust Road Extraction. IEEE Trans. Neural Netw. Learn. Syst. 2022, 34, 3308–3322. [Google Scholar] [CrossRef] [PubMed]
- Ham, G.S.; Oh, K. Learning Spatial Configuration Feature for Landmark Localization in Hand X-rays. Electronics 2023, 12, 4038. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention Is All You Need. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NeurIPS), Long Beach, CA, USA, 4–9 December 2017; pp. 6000–6010. [Google Scholar] [CrossRef]
- Wayne, B. Dead Chickens Dataset. Universe by Roboflow. Available online: https://universe.roboflow.com/bruce-wayne-wja03/dead-chikens (accessed on 11 October 2024).
- Ba, J.L. Layer normalization. arXiv 2016, arXiv:1607.06450. [Google Scholar] [CrossRef]
- Long, J.; Shelhamer, E.; Darrell, T. Fully Convolutional Networks for Semantic Segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 3431–3440. [Google Scholar] [CrossRef]
- Chaurasia, A.; Culurciello, E. LinkNet: Exploiting Encoder Representations for Efficient Semantic Segmentation. In Proceedings of the IEEE Visual Communications and Image Processing (VCIP), St. Petersburg, FL, USA, 10–13 December 2018; pp. 1–4. [Google Scholar] [CrossRef]
Study | Year | Proposed Architecture | Dataset Used | Result |
---|---|---|---|---|
Liu et al. [1] | 2021 | YOLO v4-based automated chicken removal system | Chicken Mortality Detection Dataset | Accurately identifies and removes dead chickens, reducing human contact and improving biosecurity. |
J. A. J. et al. [22] | 2022 | Mask R-CNN with zone-based classifiers for resource monitoring | Custom dataset from research facility and commercial farm | Achieved accurate broiler detection and effective monitoring of resource use in various zones (feeders, bales, perches, etc.). |
Yang et al. [23] | 2024 | Enhanced YOLOv7 with CBAM | Caged hen farm images | Achieved high accuracy for dead hen detection, optimized for mobile deployment |
Bao et al. [24] | 2021 | Machine learning-based sensor network | Custom sensor data from chicken farms | Effectively detects dead and sick chickens, enhancing automation in large-scale farms. |
Okinda et al. [17] | 2019 | Machine vision with RBF-SVM classifier | Video and depth camera data | Enables automated, early disease detection in broilers. |
Hao et al. [6] | 2022 | Improved YOLOv3 with SPP and CIoU loss | Custom broiler farm dataset | Achieved effective dead broiler detection in stacked cages, enhancing farm inspection automation. |
Li et al. [26] | 2021 | CNN with infrared thermal imaging | Infrared images of laying hens | Detects sick hens by analyzing temperature patterns, enabling early identification. |
Massari et al. [27] | 2022 | Computer vision with cluster and unrest indices | Video data from controlled environment | Demonstrated effectiveness in monitoring broiler movement and detecting heat stress, highlighting environmental impact on behavior. |
Method | Metrics (Standard Deviation) | |||
---|---|---|---|---|
IOU | Precision | Recall | F-Measure | |
U-Net | 83.86 (0.69) | 87.76 (0.67) | 89.13 (0.68) | 88.17 (0.99) |
FCN | 82.94 (1.46) | 82.50 (0.54) | 91.98 (0.59) | 86.15 (0.69) |
LinkNet | 82.78 (1.52) | 82.73 (0.49) | 89.43 (1.36) | 85.64 (0.78) |
DeepLabV3 | 84.53 (0.88) | 91.39 (0.78) | 89.61 (0.87) | 89.97 (0.87) |
Proposed method | 85.58 (1.41) | 90.60 (1.06) | 93.76 (0.53) | 92.05 (1.14) |
Number of Heads | Metrics (Standard Deviation) | |||
---|---|---|---|---|
IOU | Precision | Recall | F-Measure | |
1 | 84.82 (0.55) | 88.23 (0.77) | 93.43 (1.06) | 90.33 (0.81) |
2 | 85.04 (1.32) | 87.58 (0.39) | 92.58 (1.06) | 90.27 (0.81) |
3 | 84.73 (0.42) | 89.25 (1.32) | 94.51 (1.19) | 91.36 (0.52) |
4 | 85.58 (1.41) | 90.60 (1.06) | 93.76 (0.53) | 92.05 (1.14) |
Method | Metrics (Standard Deviation) | |||
---|---|---|---|---|
IOU | Precision | Recall | F-Measure | |
Proposed method without heatmap regression | 84.88 (1.66) | 91.11 (1.13) | 89.44 (0.68) | 91.33 (1.33) |
Proposed method without feature sharing | 85.13 (1.33) | 89.85 (0.99) | 94.45 (0.63) | 91.53 (0.86) |
Proposed method | 85.58 (1.41) | 90.60 (1.06) | 93.76 (0.53) | 92.05 (1.14) |
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. |
© 2024 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
Ham, G.-S.; Oh, K. Dead Broiler Detection and Segmentation Using Transformer-Based Dual Stream Network. Agriculture 2024, 14, 2082. https://doi.org/10.3390/agriculture14112082
Ham G-S, Oh K. Dead Broiler Detection and Segmentation Using Transformer-Based Dual Stream Network. Agriculture. 2024; 14(11):2082. https://doi.org/10.3390/agriculture14112082
Chicago/Turabian StyleHam, Gyu-Sung, and Kanghan Oh. 2024. "Dead Broiler Detection and Segmentation Using Transformer-Based Dual Stream Network" Agriculture 14, no. 11: 2082. https://doi.org/10.3390/agriculture14112082
APA StyleHam, G. -S., & Oh, K. (2024). Dead Broiler Detection and Segmentation Using Transformer-Based Dual Stream Network. Agriculture, 14(11), 2082. https://doi.org/10.3390/agriculture14112082