Detecting Animal Contacts—A Deep Learning-Based Pig Detection and Tracking Approach for the Quantification of Social Contacts
Abstract
:1. Introduction
2. Materials and Methods
2.1. Data Acquisition and Processing
2.2. Pig Detection
2.3. Pig Tracking
2.4. Identifying Contact Information
2.5. Pig Detection and Tracking Evaluation Rationale
3. Results and Discussion
3.1. Pig Detection and Tracking
3.2. Animal-to-Animal Contact Identification
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
CNN | Convolutional neural network |
KF | Kalman filter |
SNA | Social network analysis |
TBD | Tracking-by-detection |
References
- Verdon, M.; Rault, J.L. Aggression in group housed sows and fattening pigs. In Advances in Pig Welfare; Woodhead Publishing: Oxford, UK, 2018; pp. 235–260. [Google Scholar]
- Foister, S.; Doeschl-Wilson, A.; Roehe, R.; Arnott, G.; Boyle, L.; Turner, S. Social network properties predict chronic aggression in commercial pig systems. PLoS ONE 2018, 13, e0205122. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Büttner, K.; Scheffler, K.; Czycholl, I.; Krieter, J. Social network analysis-centrality parameters and individual network positions of agonistic behavior in pigs over three different age levels. Springerplus 2015, 4, 185. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Rhim, S.J.; Son, S.H.; Hwang, H.S.; Lee, J.K.; Hong, J.K. Effects of mixing on the aggressive behavior of commercially housed pigs. Asian-Australas. J. Anim. Sci. 2015, 28, 1038. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Stukenborg, A.; Traulsen, I.; Puppe, B.; Presuhn, U.; Krieter, J. Agonistic behaviour after mixing in pigs under commercial farm conditions. Appl. Anim. Behav. Sci. 2011, 129, 28–35. [Google Scholar] [CrossRef]
- Morrone, B.; Bernardino, T.; Tatemoto, P.; Rodrigues, F.A.M.L.; de Moraes, J.E.; da Cruz, T.D.A.; Zanella, A.J. Indication that the presence of older conspecifics reduces agonistic behaviour in piglets at weaning. Appl. Anim. Behav. Sci. 2021, 234, 105201. [Google Scholar] [CrossRef]
- Camerlink, I.; Proßegger, C.; Kubala, D.; Galunder, K.; Rault, J.L. Keeping littermates together instead of social mixing benefits pig social behaviour and growth post-weaning. Appl. Anim. Behav. Sci. 2021, 235, 105230. [Google Scholar] [CrossRef]
- Marinelli, L.; Mongillo, P.; Carnier, P.; Schiavon, S.; Gallo, L. A Short Period of Darkness after Mixing of Growing Pigs Intended for PDO Hams Production Reduces Skin Lesions. Animals 2020, 10, 1729. [Google Scholar] [CrossRef] [PubMed]
- Brajon, S.; Ahloy-Dallaire, J.; Devillers, N.; Guay, F. The role of genetic selection on agonistic behavior and welfare of gestating sows housed in large semi-static groups. Animals 2020, 10, 2299. [Google Scholar] [CrossRef]
- Weller, J.E.; Camerlink, I.; Turner, S.P.; Farish, M.; Arnott, G. Socialisation and its effect on play behaviour and aggression in the domestic pig (Sus scrofa). Sci. Rep. 2019, 9, 4180. [Google Scholar] [CrossRef] [Green Version]
- Psota, E.; Schmidt, T.; Mote, B.; Pérez, L.C. Long-term tracking of group-housed livestock using keypoint detection and map estimation for individual animal identification. Sensors 2020, 20, 3670. [Google Scholar] [CrossRef] [PubMed]
- Li, G.; Huang, Y.; Chen, Z.; Chesser, G.D.; Purswell, J.L.; Linhoss, J.; Zhao, Y. Practices and Applications of Convolutional Neural Network-Based Computer Vision Systems in Animal Farming: A Review. Sensors 2021, 21, 1492. [Google Scholar] [CrossRef]
- Liu, C.; Zhou, H.; Cao, J.; Guo, X.; Su, J.; Wang, L.; Lu, S.; Li, L. Behavior Trajectory Tracking of Piglets Based on DLC-KPCA. Agriculture 2021, 11, 843. [Google Scholar] [CrossRef]
- Matthews, S.G.; Miller, A.L.; Clapp, J.; Plötz, T.; Kyriazakis, I. Early detection of health and welfare compromises through automated detection of behavioural changes in pigs. Vet. J. 2016, 217, 43–51. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Brünger, J.; Traulsen, I.; Koch, R. Randomized global optimization for robust pose estimation of multiple targets in image sequences. Math. Model. Comput. Methods 2015, 2, 45–53. [Google Scholar]
- Russakovsky, O.; Deng, J.; Su, H.; Krause, J.; Satheesh, S.; Ma, S.; Huang, Z.; Karpathy, A.; Khosla, A.; Bernstein, M.; et al. Imagenet large scale visual recognition challenge. Int. J. Comput. Vis. 2015, 115, 211–252. [Google Scholar] [CrossRef] [Green Version]
- Kale, K.; Pawar, S.; Dhulekar, P. Moving object tracking using optical flow and motion vector estimation. In Proceedings of the 2015 4th International Conference on Reliability, Infocom Technologies and Optimization (ICRITO) (Trends and Future Directions), Noida, India, 2–4 September 2015; pp. 1–6. [Google Scholar]
- Padilla, R.; Netto, S.L.; da Silva, E.A. A survey on performance metrics for object-detection algorithms. In Proceedings of the 2020 International Conference on Systems, Signals and Image Processing (IWSSIP), Niteroi, Brazil, 1–3 July 2020; pp. 237–242. [Google Scholar]
- Van Der Zande, L.; 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, 10. [Google Scholar] [CrossRef]
- Ahn, H.; Son, S.; Kim, H.; Lee, S.; Chung, Y.; Park, D. EnsemblePigDet: Ensemble Deep Learning for Accurate Pig Detection. Appl. Sci. 2021, 11, 5577. [Google Scholar] [CrossRef]
- Zhang, L.; Gray, H.; Ye, X.; Collins, L.; Allinson, N. Automatic individual pig detection and tracking in pig farms. Sensors 2019, 19, 1188. [Google Scholar] [CrossRef] [Green Version]
- Steffen Küster, P.; Nolte, C.; Meckbach, B.; Stock, I.; Traulsen, I. Automatic behavior and posture detection of sows in loose farrowing pens based on 2D-video images. Front. Anim. Sci. 2021, 2, 23. [Google Scholar]
- Psota, E.T.; Mittek, M.; Pérez, L.C.; Schmidt, T.; Mote, B. Multi-pig part detection and association with a fully-convolutional network. Sensors 2019, 19, 852. [Google Scholar] [CrossRef] [Green Version]
- Madhukar, P.S.; Prasad, L. State Estimation using Extended Kalman Filter and Unscented Kalman Filter. In Proceedings of the 2020 International Conference on Emerging Trends in Communication, Control and Computing (ICONC3), Lakshmangarh, India, 21–22 February 2020; pp. 1–4. [Google Scholar]
- Corrales, J.A.; Candelas, F.; Torres, F. Hybrid tracking of human operators using IMU/UWB data fusion by a Kalman filter. In Proceedings of the 2008 3rd ACM/IEEE International Conference on Human-Robot Interaction (HRI), Amsterdam, The Netherlands, 12–15 March 2008; pp. 193–200. [Google Scholar]
- Sun, Z.; Chen, J.; Chao, L.; Ruan, W.; Mukherjee, M. A survey of multiple pedestrian tracking based on tracking-by-detection framework. IEEE Trans. Circuits Syst. Video Technol. 2020, 31, 1819–1833. [Google Scholar] [CrossRef]
- Bogun, I.; Ribeiro, E. Robstruck: Improving occlusion handling of structured tracking-by-detection using robust kalman filter. In Proceedings of the 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, AZ, USA, 25–28 September 2016; pp. 3479–3483. [Google Scholar]
- Lange, A.; Gentz, M.; Hahne, M.; Lambertz, C.; Gauly, M.; Burfeind, O.; Traulsen, I. Effects of different farrowing and rearing systems on post-weaning stress in piglets. Agriculture 2020, 10, 230. [Google Scholar] [CrossRef]
- Gentz, M.; Lange, A.; Zeidler, S.; Lambertz, C.; Gauly, M.; Burfeind, O.; Traulsen, I. Tail lesions and losses of docked and undocked pigs in different farrowing and rearing systems. Agriculture 2020, 10, 130. [Google Scholar] [CrossRef] [Green Version]
- Wutke, M.; Schmitt, A.O.; Traulsen, I.; Gültas, M. Investigation of Pig Activity Based on Video Data and Semi-Supervised Neural Networks. AgriEngineering 2020, 2, 581–595. [Google Scholar] [CrossRef]
- Deepak, K.; Chandrakala, S.; Mohan, C.K. Residual spatiotemporal autoencoder for unsupervised video anomaly detection. Signal Image Video Process. 2021, 15, 215–222. [Google Scholar] [CrossRef]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Rossum, G.V. Python Software Foundation. Python Language Reference, Version 3.7. 1995. Available online: http://www.python.org (accessed on 9 November 2021).
- Chollet, F. Keras. 2015. Available online: https://keras.io (accessed on 9 November 2021).
- Abadi, M.; Agarwal, A.; Barham, P.; Brevdo, E.; Chen, Z.; Citro, C.; Corrado, G.S.; Davis, A.; Dean, J.; Devin, M.; et al. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. 2015. Available online: https://www.tensorflow.org/ (accessed on 9 November 2021).
- Spampinato, D.G.; Sridhar, U.; Low, T.M. Linear algebraic depth-first search. In Proceedings of the 6th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming, Phoenix, AZ, USA, 22 June 2019; pp. 93–104. [Google Scholar]
- Sun, L.; Li, Y. Multi-target pig tracking algorithm based on joint probability data association and particle filter. Int. J. Agric. and Biol. Eng. 2021, 14, 199–207. [Google Scholar] [CrossRef]
- Gan, H.; Ou, M.; Zhao, F.; Xu, C.; Li, S.; Chen, C.; Xue, Y. Automated piglet tracking using a single convolutional neural network. Biosyst. Eng. 2021, 205, 48–63. [Google Scholar] [CrossRef]
- Bochinski, E.; Senst, T.; Sikora, T. Extending IOU based multi-object tracking by visual information. In Proceedings of the 2018 15th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS), Auckland, New Zealand, 27–30 November 2018; pp. 1–6. [Google Scholar]
- Kalman, R.E. A new approach to linear filtering and prediction problems. J. Basic Eng. 1960, 82, 35–45. [Google Scholar] [CrossRef] [Green Version]
- Welch, G.; Bishop, G. An Introduction to the Kalman Filter; University of North Carolina, Department of Computer Science: Chapel Hill, NC, USA, 1995. [Google Scholar]
- Luiten, J.; Osep, A.; Dendorfer, P.; Torr, P.; Geiger, A.; Leal-Taixé, L.; Leibe, B. Hota: A higher order metric for evaluating multi-object tracking. Int. J. Comput. Vis. 2021, 129, 548–578. [Google Scholar] [CrossRef]
- Fan, H.; Bai, H.; Lin, L.; Yang, F.; Chu, P.; Deng, G.; Yu, S.; Huang, M.; Liu, J.; Xu, Y.; et al. Lasot: A high-quality large-scale single object tracking benchmark. Int. J. Comput. Vis. 2021, 129, 439–461. [Google Scholar] [CrossRef]
- Cowton, J.; Kyriazakis, I.; Bacardit, J. Automated individual pig localisation, tracking and behaviour metric extraction using deep learning. IEEE Access 2019, 7, 108049–108060. [Google Scholar] [CrossRef]
- Leichter, I.; Krupka, E. Monotonicity and error type differentiability in performance measures for target detection and tracking in video. IEEE Trans. Pattern Anal. Mach. Intell. 2013, 35, 2553–2560. [Google Scholar] [CrossRef] [PubMed]
- Luo, W.; Xing, J.; Milan, A.; Zhang, X.; Liu, W.; Kim, T.K. Multiple object tracking: A literature review. Artif. Intell. 2020, 293, 103448. [Google Scholar] [CrossRef]
- Wang, A.; Sun, Y.; Kortylewski, A.; Yuille, A.L. Robust object detection under occlusion with context-aware compositionalnets. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 12645–12654. [Google Scholar]
- Kortylewski, A.; Liu, Q.; Wang, A.; Sun, Y.; Yuille, A. Compositional convolutional neural networks: A robust and interpretable model for object recognition under occlusion. Int. J. Comput. Vis. 2021, 129, 736–760. [Google Scholar] [CrossRef]
- Cosgrove, C.; Kortylewski, A.; Yang, C.; Yuille, A. Robustness Out of the Box: Compositional Representations Naturally Defend Against Black-Box Patch Attacks. arXiv 2020, arXiv:2012.00558. [Google Scholar]
- Kortylewski, A.; He, J.; Liu, Q.; Yuille, A.L. Compositional convolutional neural networks: A deep architecture with innate robustness to partial occlusion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 8940–8949. [Google Scholar]
- Jeong, J.M.; Yoon, T.S.; Park, J.B. Kalman filter based multiple objects detection-tracking algorithm robust to occlusion. In Proceedings of the 2014 Proceedings of the SICE Annual Conference (SICE), Sapporo, Japan, 9–12 September 2014; pp. 941–946. [Google Scholar]
- Li, X.; Wang, K.; Wang, W.; Li, Y. A multiple object tracking method using Kalman filter. In Proceedings of the 2010 IEEE International Conference on Information and Automation, Harbin, China, 20–23 June 2010; pp. 1862–1866. [Google Scholar]
- Hou, X.; Wang, Y.; Chau, L.P. Vehicle tracking using deep sort with low confidence track filtering. In Proceedings of the 2019 16th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS), Taipei, Taiwan, 18–21 September 2019; pp. 1–6. [Google Scholar]
- Frossard, D.; Urtasun, R. End-to-end learning of multi-sensor 3D tracking by detection. In Proceedings of the 2018 IEEE International Conference on Robotics and Automation (ICRA), Brisbane, Australia, 21–25 May 2018; pp. 635–642. [Google Scholar]
- Smith, J.E.; Pinter-Wollman, N. Observing the unwatchable: Integrating automated sensing, naturalistic observations and animal social network analysis in the age of big data. J. Anim. Ecol. 2021, 90, 62–75. [Google Scholar] [CrossRef]
- Kakanis, M.; Sossidou, E.; Kritas, S.; Tzika, E. Update on Tail biting in pigs: An undesirable damaging behaviour. J. Hell. Vet. Med Soc. 2021, 72, 2629–2646. [Google Scholar] [CrossRef]
- Larsen, M.L.V.; Pedersen, L.J.; Edwards, S.; Albanie, S.; Dawkins, M.S. Movement change detected by optical flow precedes, but does not predict, tail-biting in pigs. Livest. Sci. 2020, 240, 104136. [Google Scholar] [CrossRef]
- D’Eath, R.B.; Jack, M.; Futro, A.; Talbot, D.; Zhu, Q.; Barclay, D.; Baxter, E.M. Automatic early warning of tail biting in pigs: 3D cameras can detect lowered tail posture before an outbreak. PLoS ONE 2018, 13, e0194524. [Google Scholar]
- Liu, D.; Oczak, M.; Maschat, K.; Baumgartner, J.; Pletzer, B.; He, D.; Norton, T. A computer vision-based method for spatial-temporal action recognition of tail-biting behaviour in group-housed pigs. Biosyst. Eng. 2020, 195, 27–41. [Google Scholar] [CrossRef]
- Ghaffarian, S.; Valente, J.; Van Der Voort, M.; Tekinerdogan, B. Effect of Attention Mechanism in Deep Learning-Based Remote Sensing Image Processing: A Systematic Literature Review. Remote Sens. 2021, 13, 2965. [Google Scholar] [CrossRef]
- Xu, R.; Tao, Y.; Lu, Z.; Zhong, Y. Attention-mechanism-containing neural networks for high-resolution remote sensing image classification. Remote Sens. 2018, 10, 1602. [Google Scholar] [CrossRef] [Green Version]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural machine translation by jointly learning to align and translate. arXiv 2014, arXiv:1409.0473. [Google Scholar]
Test Set | TP | FP | FN | IDSW | Sensitivity (%) | Precision (%) | F1 (%) | MOTA (%) |
---|---|---|---|---|---|---|---|---|
Detection | 1019 | 51 | 35 | - | 94.2 | 95.4 | 95.1 | - |
Tracking | 640 | 20 | 8 | 10 | - | - | - | 94.4 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Wutke, M.; Heinrich, F.; Das, P.P.; Lange, A.; Gentz, M.; Traulsen, I.; Warns, F.K.; Schmitt, A.O.; Gültas, M. Detecting Animal Contacts—A Deep Learning-Based Pig Detection and Tracking Approach for the Quantification of Social Contacts. Sensors 2021, 21, 7512. https://doi.org/10.3390/s21227512
Wutke M, Heinrich F, Das PP, Lange A, Gentz M, Traulsen I, Warns FK, Schmitt AO, Gültas M. Detecting Animal Contacts—A Deep Learning-Based Pig Detection and Tracking Approach for the Quantification of Social Contacts. Sensors. 2021; 21(22):7512. https://doi.org/10.3390/s21227512
Chicago/Turabian StyleWutke, Martin, Felix Heinrich, Pronaya Prosun Das, Anita Lange, Maria Gentz, Imke Traulsen, Friederike K. Warns, Armin Otto Schmitt, and Mehmet Gültas. 2021. "Detecting Animal Contacts—A Deep Learning-Based Pig Detection and Tracking Approach for the Quantification of Social Contacts" Sensors 21, no. 22: 7512. https://doi.org/10.3390/s21227512
APA StyleWutke, M., Heinrich, F., Das, P. P., Lange, A., Gentz, M., Traulsen, I., Warns, F. K., Schmitt, A. O., & Gültas, M. (2021). Detecting Animal Contacts—A Deep Learning-Based Pig Detection and Tracking Approach for the Quantification of Social Contacts. Sensors, 21(22), 7512. https://doi.org/10.3390/s21227512