Implementation of Computer-Vision-Based Farrowing Prediction in Pens with Temporary Sow Confinement
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Ethical Statement
2.2. Experimental Setup
2.2.1. Animals and Housing
2.2.2. Video Recording
2.3. Dataset
2.4. Data Labeling
2.4.1. Dataset 1
2.4.2. Dataset 2
2.5. YOLOX
2.5.1. The Model and the Methods
2.5.2. Experiments
2.6. Activity Level of Sows
2.7. Farrowing Prediction
3. Results
3.1. Selection of YOLOX Methods
3.2. Farrowing Prediction
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- EU. The European Citizens’ Initiative End the Cage Age; European Commission: Brussels, Belgium, 2021. [Google Scholar]
- BMGÖ. Verordnung Des Bundesministers Für Gesundheit, Mit Der Die 1. In Tierhaltungsverordnung Geändert Wird; Federal Law Journal for the Republic of Austria: Vienna, Austria, 2012; Volume 61. [Google Scholar]
- BMEL. Siebte Verordnung zur Änderung der Tierschutz-Nutztierhaltungsverordnung; Federal Law Journal for the Republic of Austria: Vienna, Austria, 2021; Volume 5. [Google Scholar]
- Goumon, S.; Illmann, G.; Moustsen, V.A.; Baxter, E.M.; Edwards, S.A. Review of Temporary Crating of Farrowing and Lactating Sows. Front. Vet. Sci. 2022, 9, 811810. [Google Scholar] [CrossRef] [PubMed]
- Sasaki, Y.; Koketsu, Y. Variability and Repeatability in Gestation Length Related to Litter Performance in Female Pigs on Commercial Farms. Theriogenology 2007, 68, 123–127. [Google Scholar] [CrossRef] [PubMed]
- Oczak, M.; Maschat, K.; Baumgartner, J. Dynamics of Sows’ Activity Housed in Farrowing Pens with Possibility of Temporary Crating Might Indicate the Time When Sows Should Be Confined in a Crate before the Onset of Farrowing. Animals 2020, 10, 6. [Google Scholar] [CrossRef] [PubMed]
- Oczak, M.; Maschat, K.; Berckmans, D.; Vranken, E.; Baumgartner, J. Classification of Nest-Building Behaviour in Non-Crated Farrowing Sows on the Basis of Accelerometer Data. Biosyst. Eng. 2015, 140, 48–58. [Google Scholar] [CrossRef]
- Pastell, M.; Hietaoja, J.; Yun, J.; Tiusanen, J.; Valros, A. Predicting Farrowing of Sows Housed in Crates and Pens Using Accelerometers and CUSUM Charts. Comput. Electron. Agric. 2016, 127, 197–203. [Google Scholar] [CrossRef]
- Erez, B.; Hartsock, T.G. A Microcomputer-Photocell System to Monitor Periparturient Activity of Sows and Transfer Data to Remote Location. J. Anim. Sci. 1990, 68, 88–94. [Google Scholar] [CrossRef]
- Oliviero, C.; Pastell, M.; Heinonen, M.; Heikkonen, J.; Valros, A.; Ahokas, J.; Vainio, O.; Peltoniemi, O.A.T. Using Movement Sensors to Detect the Onset of Farrowing. Biosyst. Eng. 2008, 100, 281–285. [Google Scholar] [CrossRef]
- Lee, J.; Jin, L.; Park, D.; Chung, Y. Automatic Recognition of Aggressive Behavior in Pigs Using a Kinect Depth Sensor. Sensors 2016, 16, 631. [Google Scholar] [CrossRef]
- Chen, C.; Zhu, W.; Ma, C.; Guo, Y.; Huang, W.; Ruan, C. Image Motion Feature Extraction for Recognition of Aggressive Behaviors among Group-Housed Pigs. Comput. Electron. Agric. 2017, 142, 380–387. [Google Scholar] [CrossRef]
- Oczak, M.; Bayer, F.; Vetter, S.; Maschat, K.; Baumgartner, J. Comparison of the Automated Monitoring of the Sow Activity in Farrowing Pens Using Video and Accelerometer Data. Comput. Electron. Agric. 2022, 192, 106517. [Google Scholar] [CrossRef]
- Redmon, J.; Farhadi, A. YOLOv3: An Incremental Improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar]
- Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal Loss for Dense Object Detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
- Friard, O.; Gamba, M. BORIS: A Free, Versatile Open-source Event-logging Software for Video/audio Coding and Live Observations. Methods Ecol. Evol. 2016, 7, 1325–1330. [Google Scholar] [CrossRef]
- Pereira, T.D.; Aldarondo, D.E.; Willmore, L.; Kislin, M.; Wang, S.S.-H.; Murthy, M.; Shaevitz, J.W. Fast Animal Pose Estimation Using Deep Neural Networks. Nat. Methods 2019, 16, 117–125. [Google Scholar] [CrossRef] [PubMed]
- Sekachev, B.; Manovich, N.; Zhiltsov, M.; Zhavoronkov, A.; Kalinin, D.; Hoff, B.; Osmanov, T.; Kruchinin, D.; Zankevich, A.; Sidnev, D.; et al. Opencv/cvat: v1.1.0. Available online: https://github.com/opencv/cvat (accessed on 15 September 2020).
- Brooks, J. COCO Annotator. 2019. Available online: https://github.com/jsbroks/coco-annotator (accessed on 20 June 2022).
- MMDetection Contributors. OpenMMLab Detection Toolbox and Benchmark. Available online: https://github.com/open-mmlab/mmdetection (accessed on 10 November 2022).
- Lin, T.-Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft COCO: Common Objects in Context. In Computer Vision–ECCV 2014, Proceedings of the 13th European Conference, Zurich, Switzerland, 6–12 September 2014, Proceedings, Part V 13; Springer International Publishing: Berlin/Heidelberg, Germany, 2014; pp. 740–755. [Google Scholar]
- Young, P. The Captain Toolbox for Matlab. IFAC Proc. Vol. 2006, 39, 909–914. [Google Scholar] [CrossRef]
- Berckmans, D. Basic Principles of PLF: Gold Standard, Labelling and Field Data. In Precision Livestock Farming 2013, Proceedings of the the 6th European Conference on Precision Livestock Farming, ECPLF 2013, Leuven, Belgium, 10–12 September 2013; KU Leuven University: Leuven, Belgium, 2013; pp. 21–29. [Google Scholar]
- Küster, S.; Nolte, P.; Meckbach, C.; Stock, B.; Traulsen, I. Automatic Behavior and Posture Detection of Sows in Loose Farrowing Pens Based on 2D-Video Images. Front. Anim. Sci. 2021, 2, 64. [Google Scholar] [CrossRef]
- van der Zande, L.E.; Guzhva, O.; Rodenburg, T.B. Individual Detection and Tracking of Group Housed Pigs in Their Home Pen Using Computer Vision. Front. Anim. Sci. 2021, 2, 669312. [Google Scholar] [CrossRef]
- Berckmans, D. General Introduction to Precision Livestock Farming. Anim. Front. 2017, 7, 6–11. [Google Scholar] [CrossRef]
- Wu, L.; Zhu, Z.; Weinan, E. Towards Understanding Generalization of Deep Learning: Perspective of Loss Landscapes. arXiv 2017, arXiv:1706.10239. [Google Scholar]
- Borkman, S.; Crespi, A.; Dhakad, S.; Ganguly, S.; Hogins, J.; Jhang, Y.-C.; Kamalzadeh, M.; Li, B.; Leal, S.; Parisi, P.; et al. Unity Perception: Generate Synthetic Data for Computer Vision. arXiv 2021, arXiv:2107.04259. [Google Scholar]
- Oczak, M.; Bayer, F.; Vetter, S.G.; Maschat, K.; Baumgartner, J. Where Is Sow’s Nose?—RetinaNet Object Detector as a Basis For Monitoring Use Of Rack with Nest-Building Material. Front. Anim. Sci. 2022, 3, 92. [Google Scholar] [CrossRef]
- Wang, D.; Zhang, S. Contextual Instance Decoupling for Robust Multi-Person Pose Estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 19–24 June 2022; pp. 11060–11068. [Google Scholar]
- Cai, Y.; Wang, Z.; Luo, Z.; Yin, B.; Du, A.; Wang, H.; Zhang, X.; Zhou, X.; Zhou, E.; Sun, J. Learning Delicate Local Representations for Multi-Person Pose Estimation. In Computer Vision—ECCV 2020, Proceedings of the 16th European Conference, Glasgow, UK, 23–28 August 2020, Proceedings, Part III 16; Springer International Publishing: Berlin/Heidelberg, Germany, 2020; pp. 455–472. [Google Scholar]
- Gleerup, K.B.; Forkman, B.; Lindegaard, C.; Andersen, P.H. An Equine Pain Face. Vet. Anaesth. Analg. 2015, 42, 103–114. [Google Scholar] [CrossRef]
- Ison, S.H.; Jarvis, S.; Rutherford, K.M.D. The Identification of Potential Behavioural Indicators of Pain in Periparturient Sows. Res. Vet. Sci. 2016, 109, 114–120. [Google Scholar] [CrossRef]
- Kupfer, S.; Iwersen, M.; Oczak, M. Evaluation of an Arduino Based Individual Water Intake Measurement System While Using InfluxDB and Grafana for Integration, Storage and Visualization of Data. In Proceedings of the European Conference on Precision Livestock Farming 2022, Vienna, Austria, 29 August–2 September 2022; Berckmans, D., Oczak, M., Iwersen, M., Wagener, K., Eds.; The Organising Committee of the 10th European Conference on Precision Livestock Farming: Vienna, Austria, 2022; pp. 911–917. [Google Scholar]
Dataset | Duration of Video Recordings (h) 1 | Frames Selected from Periods | N. Frames Selected |
---|---|---|---|
1 | 4667 | Introduction to farrowing pen, one day before farrowing, day of farrowing. | 14,242 |
2 | 17,713 | From introduction to farrowing pen to one day after farrowing. | 1000 |
Method | Parameters [millions] | AP on COCO 1 |
---|---|---|
Nano | 0.91 | 25.3 |
Tiny | 5.06 | 32.8 |
Small | 9.0 | 39.6 |
Medium | 25.3 | 46.4 |
Large | 54.2 | 50.0 |
Extra large | 99.1 | 51.2 |
Experiment | Dataset | Method | Epoch | AP | AP50 | AP75 |
---|---|---|---|---|---|---|
1 | Validation | YOLOX-large | 100 | 96.9 | 99.0 | 98.9 |
1 | Test | YOLOX-medium | 70 | 84.2 | 99.0 | 98.9 |
2 | Validation | YOLOX-medium | 100 | 96.5 | 100 | 99.0 |
2 | Test | YOLOX-large | 100 | 95.4 | 99.0 | 98.9 |
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. |
© 2023 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
Oczak, M.; Maschat, K.; Baumgartner, J. Implementation of Computer-Vision-Based Farrowing Prediction in Pens with Temporary Sow Confinement. Vet. Sci. 2023, 10, 109. https://doi.org/10.3390/vetsci10020109
Oczak M, Maschat K, Baumgartner J. Implementation of Computer-Vision-Based Farrowing Prediction in Pens with Temporary Sow Confinement. Veterinary Sciences. 2023; 10(2):109. https://doi.org/10.3390/vetsci10020109
Chicago/Turabian StyleOczak, Maciej, Kristina Maschat, and Johannes Baumgartner. 2023. "Implementation of Computer-Vision-Based Farrowing Prediction in Pens with Temporary Sow Confinement" Veterinary Sciences 10, no. 2: 109. https://doi.org/10.3390/vetsci10020109
APA StyleOczak, M., Maschat, K., & Baumgartner, J. (2023). Implementation of Computer-Vision-Based Farrowing Prediction in Pens with Temporary Sow Confinement. Veterinary Sciences, 10(2), 109. https://doi.org/10.3390/vetsci10020109