# Motion-Status-Driven Piglet Tracking Method for Monitoring Piglet Movement Patterns Under Sow Posture Changes

**Authors:** Aqing Yang, Shimei Li, Shuqin Tu, Na Han, Lei Zhang, Yizhi Luo, Yueju Xue

PMC · DOI: 10.3390/vetsci12070616 · Veterinary Sciences · 2025-06-24

## TL;DR

A new tracking method called MSHMTracker improves piglet monitoring during sow posture changes, helping understand piglet behavior and improve farm safety.

## Contribution

The novel MSHMTracker method introduces a motion-status-driven hierarchical matching mechanism for improved piglet tracking and behavior analysis.

## Key findings

- MSHMTracker improved tracking accuracy (MOTA) by 2.1% and identity consistency (IDF1) by 2.3% over baseline models.
- Piglet stress behaviors (aggregation/dispersion) were recognized with 87.49% accuracy in response to sow posture changes.
- Strong correlations (0.6 and 0.82) were found between piglet movement patterns and sow posture transitions.

## Abstract

This study first proposed an enhanced JDT-based motion-status-driven hierarchical piglet tracking method, named MSHMTracker, to address the challenges of identity switches and target losses during piglet tracking caused by crowding, occlusion, and shape deformation. In MSHMTracker, a score- and time-driven hierarchical matching mechanism (STHM) was proposed to establish the spatio-temporal association by motion status. Then the piglets’ motion information obtained from MSHMTracker was analyzed to recognize piglet groups’ stress (aggregation/dispersion) behavior responses to the sow’s posture changes. Later, the correlation between the movement patterns (aggregation and dispersion) of piglets and the posture transitions (upwards and downwards) of the sow was explored. MSHMTracker achieved improvements of 2.1% and 2.3% in IDF1 and MOTA, respectively, compared to the baseline model. The average accuracy of piglets’ stress (aggregation/dispersion) behavior recognition reached 87.49%. And the correlation values between piglets’ aggression and dispersion and the sow’s upward and downward posture changes were 0.6 and 0.82, laying the foundation for research on the social relationships and behavioral patterns between lactating sows and piglets.

Understanding how piglets move around sows during posture changes is crucial for their safety and healthy growth. Automated monitoring can reduce farm labor and help prevent accidents like piglet crushing. Current methods (called Joint Detection-and-Tracking-based, abbreviated as JDT-based) struggle with problems like misidentifying piglets or losing track of them due to crowding, occlusion, and shape changes. To solve this, we developed MSHMTracker, a smarter tracking system that introduces a motion-status hierarchical architecture to significantly improve tracking performance by adapting to piglets’ motion statuses. In MSHMTracker, a score- and time-driven hierarchical matching mechanism (STHM) was used to establish the spatio-temporal association by the motion status, helping maintain accurate tracking even in challenging conditions. Finally, piglet group aggregation or dispersion behaviors in response to sow posture changes were identified based on the tracked trajectory information. Tested on 100 videos (30,000+ images), our method achieved 93.8% tracking accuracy (MOTA) and 92.9% identity consistency (IDF1). It outperformed six popular tracking systems (e.g., DeepSort, FairMot). The mean accuracy of behavior recognition was 87.5%. In addition, the correlations (0.6 and 0.82) between piglet stress responses and sow posture changes were explored. This research showed that piglet movements are closely related to sow behavior, offering insights into sow–piglet relationships. This work has the potential to reduce farmers’ labor and improve the productivity of animal husbandry.

## Linked entities

- **Species:** Sus scrofa (taxon 9823)

## Full-text entities

- **Genes:** ID2 (inhibitor of DNA binding 2) [NCBI Gene 654298]
- **Diseases:** ID (MESH:C537985), STHM (MESH:D000377), injury to (MESH:D014947), MOTA (MESH:D014012), JDT (MESH:C000721391), aggression (MESH:D010554)
- **Chemicals:** MSHMTracker (-)
- **Species:** Homo sapiens (human, species) [taxon 9606], Sus scrofa (pig, species) [taxon 9823]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12298939/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/PMC12298939/full.md

## References

30 references — full list in the complete paper: https://tomesphere.com/paper/PMC12298939/full.md

---
Source: https://tomesphere.com/paper/PMC12298939