Submitted:
21 August 2024
Posted:
22 August 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Materials
2.1. Source of Video Data
2.2. Preprocessing and Labeling.
2.3. Dataset Composition
3. Methods
3.1. Background
3.2. The Workflow of Aggression Detection
3.3. Detail of Architecture
3.3.1. CNN
3.3.2. LSTM Autoencoder
3.3.3. Reconstruction Error
3.4. Reconstruction Loss Inversion: RLI
- -
- is the size of the flattened spatial feature vector. Here, it is 240.
- -
- the parameters of the model including CNN model and LSTM autoencoder
- -
- a scalar that controls the balance between the loss terms for non-aggressive and aggressive episode.
3.4.1. Reconstruction of Feature Vector
3.5. Evaluation Metrics
3.6. Hyperparameters
- Lambda () in the objective function of Eq (1)
- Dimension of a spatial feature vector extracted from a frame after passing through the CNN model and FC Layer
- Batch size that determines the number of data [13] for one iteration
4. Results and Discussion
4.1. Lambda in the Objective Function of RLI
4.2. Dimension of the Spatial Feature
4.3. Batch Size
4.4. Distribution of Reconstruction Errors
4.5. Comparative Experiments
4.5.1. Models for Comparison
4.5.2. Comparative Performance
4.6. Reliability of Proposed Method
4.7. Implications and Limitations
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- McGlone, J.J., The future of pork production in the world: towards sustainable, welfare-positive systems. Animals, 2013. 3(2): p. 401-415. [CrossRef]
- Siegford, J.M., W. Powers, and H. Grimes-Casey, Environmental aspects of ethical animal production. Poultry Science, 2008. 87(2): p. 380-386. [CrossRef]
- Matthews, S.G., et al., Automated tracking to measure behavioural changes in pigs for health and welfare monitoring. Scientific reports, 2017. 7(1): p. 17582. [CrossRef]
- Matthews, S.G., et al., Early detection of health and welfare compromises through automated detection of behavioural changes in pigs. The Veterinary Journal, 2016. 217: p. 43-51. [CrossRef]
- Turner, S.P., et al., The accumulation of skin lesions and their use as a predictor of individual aggressiveness in pigs. Applied Animal Behaviour Science, 2006. 96(3-4): p. 245-259. [CrossRef]
- O’Malley, C.I., et al., Relationships among aggressiveness, fearfulness and response to humans in finisher pigs. Applied Animal Behaviour Science, 2018. 205: p. 194-201. [CrossRef]
- Viazzi, S., et al., Image feature extraction for classification of aggressive interactions among pigs. Computers and Electronics in Agriculture, 2014. 104: p. 57-62. [CrossRef]
- Lee, J., et al., Automatic recognition of aggressive behavior in pigs using a kinect depth sensor. Sensors, 2016. 16(5): p. 631. [CrossRef]
- Chen, C., et al., Image motion feature extraction for recognition of aggressive behaviors among group-housed pigs. Computers and Electronics in Agriculture, 2017. 142: p. 380-387. [CrossRef]
- Chen, C., et al., A kinetic energy model based on machine vision for recognition of aggressive behaviours among group-housed pigs. Livestock science, 2018. 218: p. 70-78. [CrossRef]
- Chen, C., et al., Detection of aggressive behaviours in pigs using a RealSence depth sensor. Computers and Electronics in Agriculture, 2019. 166: p. 105003. [CrossRef]
- Chen, C., et al., Recognition of aggressive episodes of pigs based on convolutional neural network and long short-term memory. Computers and Electronics in Agriculture, 2020. 169: p. 105166. [CrossRef]
- Alzubaidi, L., et al., Review of deep learning: concepts, CNN architectures, challenges, applications, future directions. Journal of big Data, 2021. 8: p. 1-74. [CrossRef]
- Johnson, J.M. and T.M. Khoshgoftaar, Survey on deep learning with class imbalance. Journal of Big Data, 2019. 6(1): p. 1-54. [CrossRef]
- T. Psota, E., et al., Long-term tracking of group-housed livestock using keypoint detection and map estimation for individual animal identification. Sensors, 2020. 20(13): p. 3670.
- Verdon, M. and J.-L. Rault, Aggression in group housed sows and fattening pigs, in Advances in pig welfare. 2018, Elsevier. p. 235-260.
- Jensen, P., An ethogram of social interaction patterns in group-housed dry sows. Applied Animal Ethology, 1980. 6(4): p. 341-350. [CrossRef]
- Jensen, P., An analysis of agonistic interaction patterns in group-housed dry sows—aggression regulation through an “avoidance order”. Applied Animal Ethology, 1982. 9(1): p. 47-61.
- Li, Y.-w., et al., Anomaly detection for herd pigs based on YOLOX. 2023. [CrossRef]
- Wei, J., et al., Detection of Pig Movement and Aggression Using Deep Learning Approaches. Animals, 2023. 13(19): p. 3074. [CrossRef]
- Pang, G., C. Shen, and A. Van Den Hengel. Deep anomaly detection with deviation networks. in Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining. 2019.
- Ruff, L., et al., Deep semi-supervised anomaly detection. arXiv preprint arXiv:1906.02694, 2019.
- Pang, G., et al. Deep weakly-supervised anomaly detection. in Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 2023.
- Zhou, C. and R.C. Paffenroth. Anomaly detection with robust deep autoencoders. in Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining. 2017.
- Beggel, L., M. Pfeiffer, and B. Bischl. Robust anomaly detection in images using adversarial autoencoders. in Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2019, Würzburg, Germany, September 16–20, 2019, Proceedings, Part I. 2020. Springer.
- Simonyan, K. and A. Zisserman, Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
- Deng, J., et al. Imagenet: A large-scale hierarchical image database. in 2009 IEEE conference on computer vision and pattern recognition. 2009. Ieee.
- Hochreiter, S. and J. Schmidhuber, Long short-term memory. Neural computation, 1997. 9(8): p. 1735-1780.
- Fabius, O. and J.R. Van Amersfoort, Variational recurrent auto-encoders. arXiv preprint arXiv:1412.6581, 2014.
- Shi, X., et al., Convolutional LSTM network: A machine learning approach for precipitation nowcasting. Advances in neural information processing systems, 2015. 28.
- Hanson, A., et al. Bidirectional convolutional lstm for the detection of violence in videos. in Proceedings of the European conference on computer vision (ECCV) workshops. 2018.
- Shi, B., X. Bai, and C. Yao, An end-to-end trainable neural network for image-based sequence recognition and its application to scene text recognition. IEEE transactions on pattern analysis and machine intelligence, 2016. 39(11): p. 2298-2304. [CrossRef]





| Nursery (3~10 weeks) | Early Finisher (11~18 weeks) | Late Finisher (19~26 weeks) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Video | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |
| Day | O | O | O | O | O | O | O | O | O | |||||||
| Night | O | O | O | O | O | O | ||||||||||
| # of the Pigs | 16 | 16 | 15 | 16 | 16 | 7 | 15 | 7 | 8 | 8 | 16 | 14 | 12 | 14 | 13 | |
| Activity Level | H | M | L | M | L | H | M | L | M | L | H | M | L | M | L | |
| train | test | ratio | |
|---|---|---|---|
| Non-aggression (0) | 6660 | 1668 | 0.93 |
| Aggression (1) | 531 | 132 | 0.07 |
| Dimension | 16 | 32 | 64 | 128 | 256 | 512 |
|---|---|---|---|---|---|---|
| AUC-ROC | 0.9364 | 0.9382 | 0.9372 | 0.9367 | 0.9373 | 0.9386 |
| AUC-PR | 0.7433 | 0.7296 | 0.7385 | 0.7369 | 0.7324 | 0.7352 |
| Lambda | 0.03 | 0.05 | 0.1 | 0.2 | 0.4 | 0.6 | 0.8 | 1.0 | 2.0 |
|---|---|---|---|---|---|---|---|---|---|
| AUC-ROC | 0.9368 | 0.9367 | 0.9351 | 0.9340 | 0.9327 | 0.9326 | 0.9320 | 0.9336 | 0.9252 |
| AUC-PR | 0.7301 | 0.7369 | 0.7295 | 0.7106 | 0.7120 | 0.6984 | 0.6491 | 0.7050 | 0.6564 |
| Batch size | 2 | 4 | 6 | 8 | 10 | 12 | 14 |
|---|---|---|---|---|---|---|---|
| AUC-ROC | 0.9274 | 0.9364 | 0.9353 | 0.9349 | 0.9407 | 0.9367 | 0.9409 |
| AUC-PR | 0.6967 | 0.7433 | 0.7343 | 0.7398 | 0.7405 | 0.7387 | 0.7463 |
| Task | Classification | Anomaly detection | |||
|---|---|---|---|---|---|
| Model | ConvLSTM | ConvLSTM(over) | CNN+LSTM | CNN+LSTM(over) | Ours |
| AUC-ROC | 0.9090 | 0.8954 | 0.9313 | 0.9227 | 0.9409 |
| AUC-PR | 0.5481 | 0.5388 | 0.6965 | 0.6954 | 0.7463 |
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 (http://creativecommons.org/licenses/by/4.0/).