Tracking Trans-Generational Stress Susceptibility in the Farm Animal Using AI †
Abstract
1. Introduction
2. Material and Methods
2.1. Dataset Recording Setup
- Camera Type: High-resolution industrial cameras optimized for low-light conditions.
- Resolution: 4K resolution to capture fine details of animal face.
- Lighting Conditions: LED lighting ensures uniform illumination to mitigate shadows and enhance image clarity.
- Placement: Cameras are placed in strategic locations/angles within the dry sow house, which is where sows are housed in individual straw pens equipped with their feed stalls and dunging passages.
2.2. Data Collection and Dataset Construction
- Number of Animals: 23 mothers and 97 daughters monitored over one year.
- Total Images Captured: Approximately six terabytes of data was captured as videos for analysis.
- Dominance test: Pregnant pigs (Mothers) are recorded on day 70 and day 90 of their pregnancy. This test is designed to provide a challenge during pregnancy and determines individual responses to a competitive test of dominance.
- Moving to farrowing crates (at Day 110): Approximately five days before the mothers are due to give birth they are moved from group-housing in straw bedded pens to single housing in farrowing crates. Farrowing crates are known to cause stress as they are restrictive maternity systems that prevent the pigs from turning around.
- In farrowing crate for +24 h: Images are captured after the pigs have experienced 24 h in the farrowing crate.
- Offspring handled (Day 0): Mothers are recorded after they have given birth, when their offspring are being handled. Mothers are expected to show different responses to their piglets being handled by staff during husbandry procedures performed on piglets shortly after birth.
- Offspring handled (Day 3 Iron): Mothers are recorded 3 days after they have given birth, when their offspring are being given their iron injection
- Attention Bias Test (ABT): This test is designed for the daughters after 125 days post birth. All daughters are expected to be startled by the test but respond differently when being challenged to return to the area where the startle took place in order to receive a food reward.
2.3. Dataset Preprocessing
2.4. System Overview
2.5. Training Procedure
2.6. Hardware Configuration
3. Results
3.1. Quantitative Analysis
3.2. Qualitative Analysis
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Biondi, M.; Zannino, L.G. Psychological stress, neuroimmunomodulation, and susceptibility to infectious diseases in animals and man: A review. Psychother. Psychosom. 1997, 66, 3–26. [Google Scholar] [CrossRef]
- Tang, X.; Xiong, K.; Fang, R.; Li, M. Weaning stress and intestinal health of piglets: A review. Front. Immunol. 2022, 13, 1042778. [Google Scholar] [CrossRef]
- Rhouma, M.; Fairbrother, J.M.; Beaudry, F.; Letellier, A. Post weaning diarrhea in pigs: Risk factors and non-colistin-based control strategies. Acta Vet. Scand. 2017, 59, 31. [Google Scholar] [CrossRef]
- Berghof, T.V.L.; Bovenhuis, H.; Mulder, H.A. Body weight deviations as indicator for resilience in layer chickens. Front. Genet. 2019, 10, 1216. [Google Scholar] [CrossRef] [PubMed]
- Homma, C.; Hirose, K.; Ito, T.; Kamikawa, M.; Toma, S.; Nikaido, S.; Satoh, M.; Uemoto, Y. Estimation of genetic parameter for feed efficiency and resilience traits in three pig breeds. Animal 2021, 15, 100384. [Google Scholar] [CrossRef]
- Neethirajan, S. AI in sustainable pig farming: IoT insights into stress and gait. Agriculture 2023, 13, 1706. [Google Scholar] [CrossRef]
- Hansen, M.F.; Baxter, E.M.; Rutherford, K.M.D.; Futro, A.; Smith, M.L.; Smith, L.N. Towards facial expression recognition for on-farm welfare assessment in pigs. Agriculture 2021, 11, 847. [Google Scholar] [CrossRef]
- Mabry, J.W.; Christian, L.L.; Kuhlers, D.L. Inheritance of porcine stress syndrome. J. Hered. 1981, 72, 429–430. [Google Scholar] [CrossRef] [PubMed]
- Otten, W.; Kanitz, E.; Tuchscherer, M. The impact of pre-natal stress on offspring development in pigs. J. Agric. Sci. 2015, 153, 907–919. [Google Scholar] [CrossRef]
- Lagoda, M.E.; O’Driscoll, K.; Galli, M.C.; Cerón, J.J.; Ortín-Bustillo, A.; Marchewka, J.; Boyle, L.A. Indicators of improved gestation housing of sows. Part II: Effects on physiological measures, reproductive performance and health of the offspring. Anim. Welf. 2023, 32, e52. [Google Scholar] [CrossRef]
- Bernardino, T.; Tatemoto, P.; Morrone, B.; Rodrigues, P.H.M.; Zanella, A.J. Piglets born from sows fed high fibre diets during pregnancy are less aggressive prior to weaning. PLoS ONE 2016, 11, e0167363. [Google Scholar] [CrossRef]
- O’Brien, C.E.; Jozet-Alves, C.; Mezrai, N.; Bellanger, C.; Darmaillacq, A.-S.; Dickel, L. Maternal and embryonic stress influence offspring behavior in the cuttlefish Sepia officinalis. Front. Physiol. 2017, 8, 981. [Google Scholar] [CrossRef]
- Rutherford, K.M.D.; Piastowska-Ciesielska, A.; Donald, R.D.; Robson, S.K.; Ison, S.H.; Jarvis, S.; Brunton, P.J.; Russell, J.A.; Lawrence, A.B. Prenatal stress produces anxiety prone female offspring and impaired maternal behaviour in the domestic pig. Physiol. Behav. 2014, 129, 255–264. [Google Scholar] [CrossRef]
- Sabei, L.; Parada Sarmiento, M.; Bernardino, T.; Çakmakçı, C.; Farias, S.d.S.; Sato, D.; Zanella, M.I.G.; Poletto, R.; Zanella, A.J. Inheriting the sins of their fathers: Boar life experiences can shape the emotional responses of their offspring. Front. Anim. Sci. 2023, 4, 1208768. [Google Scholar] [CrossRef]
- Schouten, W.G.; Wiegant, V.M. Individual responses to acute and chronic stress in pigs. Acta Physiol. Scand. Suppl. 1997, 640, 88–91. [Google Scholar]
- Stevens, B.; Karlen, G.M.; Morrison, R.; Gonyou, H.W.; Butler, K.L.; Kerswell, K.J.; Hemsworth, P.H. The behaviour of pigs in response to social stress. Appl. Anim. Behav. Sci. 2015, 165, 40–46. [Google Scholar]
- Lezama-García, K.; Orihuela, A.; Olmos-Hernández, A.; Reyes-Long, S.; Mota-Rojas, D. Facial expressions and emotions in domestic animals. CAB Rev. 2019, 14, 1–12. [Google Scholar] [CrossRef]
- Garcia, M.; Wondrak, M.; Huber, L.; Fitch, W.T. Honest signaling in domestic piglets (Sus scrofa domesticus): Vocal allometry and the information content of grunt calls. J. Exp. Biol. 2016, 219, 1913–1921. [Google Scholar] [CrossRef] [PubMed]
- 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]
- Leliveld, L.M.C.; Düpjan, S.; Tuchscherer, A.; Puppe, B. Vocal correlates of emotional reactivity within and across contexts in domestic pigs (Sus scrofa). Physiol. Behav. 2017, 181, 117–126. [Google Scholar] [CrossRef]
- Jocher, G.; Chaurasia, A.; Stoken, A.; Borovec, J.; NanoCode012; Kwon, Y.; Michael, K.; TaoXie; Fang, J.; Imyhxy; et al. ultralytics/yolov5: V7.0-YOLOv5 SOTA Realtime Instance Segmentation; Technical Report, Ultrlytics; Zonodo: Geneva, Switzerland, 2022. [Google Scholar] [CrossRef]
- Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An Imperative Style, High-Performance Deep Learning Library. arXiv 2019, arXiv:1912.01703. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 26 June–1 July 2016; pp. 770–778. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. In Proceedings of the International Conference on Learning Representations (ICLR), Virtual, 3–7 May 2021. [Google Scholar]
- Jolliffe, I.T.; Cadima, J. Principal Component Analysis; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
- Lloyd, S.P. Least Squares Quantization in PCM. IEEE Trans. Inf. Theory 1982, 28, 129–137. [Google Scholar] [CrossRef]
- Müllner, D. Modern hierarchical, agglomerative clustering algorithms. arXiv 2011, arXiv:1109.2378. [Google Scholar] [CrossRef]










| Model | Dimensionality Reduction | Clustering | Class | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| LS | SS | Average | |||||||||
| P | R | F | P | R | F | P | R | F | |||
| Emoti | PCA | K-means | 0.906 | 0.644 | 0.753 | 0.692 | 0.923 | 0.791 | 0.799 | 0.784 | 0.772 |
| Agglomerative | 0.914 | 0.711 | 0.8 | 0.735 | 0.923 | 0.818 | 0.824 | 0.817 | 0.809 | ||
| ResNet | PCA | K-means | 1 | 0.711 | 0.831 | 0.75 | 1 | 0.857 | 0.875 | 0.856 | 0.844 |
| Agglomerative | 0.703 | 1 | 0.826 | 1 | 0.513 | 0.678 | 0.852 | 0.756 | 0.752 | ||
| ViT | PCA | K-means | 0.849 | 1 | 0.918 | 1 | 0.795 | 0.886 | 0.925 | 0.897 | 0.902 |
| Agglomerative | 0.917 | 0.978 | 0.946 | 0.972 | 0.897 | 0.933 | 0.944 | 0.938 | 0.94 | ||
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
Shahbaz, A.; Yunas, S.U.; Baxter, E.M.; Hansen, M.F.; Smith, M.L.; Smith, L.N. Tracking Trans-Generational Stress Susceptibility in the Farm Animal Using AI. Comput. Sci. Math. Forum 2025, 11, 37. https://doi.org/10.3390/cmsf2025011037
Shahbaz A, Yunas SU, Baxter EM, Hansen MF, Smith ML, Smith LN. Tracking Trans-Generational Stress Susceptibility in the Farm Animal Using AI. Computer Sciences & Mathematics Forum. 2025; 11(1):37. https://doi.org/10.3390/cmsf2025011037
Chicago/Turabian StyleShahbaz, Ajmal, Syed U. Yunas, Emma M. Baxter, Mark F. Hansen, Melvyn L. Smith, and Lyndon N. Smith. 2025. "Tracking Trans-Generational Stress Susceptibility in the Farm Animal Using AI" Computer Sciences & Mathematics Forum 11, no. 1: 37. https://doi.org/10.3390/cmsf2025011037
APA StyleShahbaz, A., Yunas, S. U., Baxter, E. M., Hansen, M. F., Smith, M. L., & Smith, L. N. (2025). Tracking Trans-Generational Stress Susceptibility in the Farm Animal Using AI. Computer Sciences & Mathematics Forum, 11(1), 37. https://doi.org/10.3390/cmsf2025011037
