A Low-Power Piglet Crushing Detection System Based on Multi-Modal Fusion
Abstract
1. Introduction
- A “Motion-Gated Acoustic Detection” multi-modal fusion strategy: This research innovatively combines contact-based posture sensing with non-contact acoustic inference. By utilizing a back-mounted IMU to monitor the sow’s status in real-time, the system activates the acoustic recognition module only when high-risk postural transitions (e.g., standing/lying or rolling over) are detected. This mechanism fundamentally eliminates false alarms caused by environmental noise and “adjacent pen interference” at the physical source, serving as a resource-efficient paradigm for event-driven sensing in precision farming.
- An ultra-low-overhead edge inference architecture: A lightweight 1D-CNN specifically designed for scream recognition was developed and compressed to 5.1 KB using Int8 quantization. This achieved a classification accuracy of 95.56% and an ultra-fast inference latency of 2 ms on low-cost ESP32-S3 nodes, with a battery life sufficient to seamlessly cover the entire piglet lactation period.
- A cloud-free, closed-loop physical intervention system: Given that physical stimuli can effectively prompt sows to change postures [32], this study established an “Edge-Fog-Cloud” heterogeneous network based on ESP-NOW and MQTT protocols. The end-to-end intervention latency was strictly controlled within 179 ms, successfully triggering the edge physical intervention unit. This established a low-latency, highly reliable edge rescue link that operates independently of central servers.
2. Materials and Methods
2.1. Data Acquisition and Acoustic Characteristic Analysis
2.2. Edge Computing System Design
2.2.1. “Edge-Fog-Cloud” Hierarchical Collaborative Architecture
2.2.2. Hardware Prototyping and Deployment Strategy
2.3. Lightweight Edge Neural Network Design
2.4. Multi-Modal Closed-Loop Control Strategy
2.4.1. Motion-Gated Sensing Logic for High-Risk Postural Transitions
2.4.2. Event-Driven Control Logic and Intervention Phases
- Phase 1: Sentry Mode and Motion Gating
- Phase 2: Tactile Warning Stage
- Phase 3: Forceful Rescue Intervention
- Phase 4: Intelligent Closed-loop Feedback
- Phase 5: High-Alert Mechanism
2.5. Performance Evaluation Metrics
2.5.1. Classification Performance Metrics
- TP (True Positive): Samples correctly predicted as the target category.
- FP (False Positive): Samples of other categories incorrectly predicted as the target category.
- FN (False Negative): Samples of the target category incorrectly predicted as other categories.
- TN (True Negative): Samples of other categories correctly excluded.
- Accuracy:
- 2.
- Precision:
- 3.
- Recall:
- 4.
- F1-Score:
2.5.2. Edge Deployment Efficiency Metrics
- Inference Latency:
- 2.
- Flash Usage:
- 3.
- Peak RAM Usage:
3. Results and Discussion
3.1. Acoustic Feature Analysis
3.2. Classification Accuracy and Model Robustness
3.3. Edge Model Deployment Performance
3.4. Energy Efficiency Evaluation and Remote Monitoring
3.4.1. Edge Node Energy Efficiency Model and Battery Life Analysis
3.4.2. Multi-Terminal Collaborative Monitoring and Human–Machine Collaborative Intervention
3.5. General Discussion
4. Conclusions
- Optimal Efficiency and Determinism: The proposed Int8-quantized 1D-CNN model (5.1 KB) achieved 95.56% accuracy with only 2 ms inference latency on the ESP32-S3. Compared to LSTM, the 1D-CNN significantly reduces computational overhead while ensuring the inference determinism required for real-time rescue.
- Robust Multi-modal Fusion: The “Motion-Gating” mechanism effectively filters ambient noise and cross-talk from adjacent pens by using postural transitions as a trigger for acoustic detection. Field tests confirmed this logic ensures high specificity and overcomes the limitations of single-modal monitoring.
- End-to-End Autonomy and Endurance: The system maintains an end-to-end response latency within 179 ms, ensuring intervention well within the 60 s “golden rescue window.” Furthermore, the motion-triggering design ensures the battery life covers the entire 28-day lactation cycle, achieving a maintenance-free “single-deployment” design.
- Preliminary Field Validation of the Hierarchical Strategy: Field trials spanning three lactation cycles demonstrated that the system was able to effectively intercept critical crushing risks within the test environment. In the analyzed 28-day period involving ten sows, no fatalities were recorded within this monitored cohort, supporting the potential feasibility of the synergy between autonomous interventions and remote oversight. While further large-scale validation is required, this human–machine collaboration model shows potential as a scalable tool for enhancing piglet survival. Furthermore, this hierarchical sensing logic provides a practical reference for developing other low-power, multi-modal monitoring solutions in resource-constrained agricultural environments.
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Nuntapaitoon, M.; Tummaruk, P. Piglet Preweaning Mortality in a Commercial Swine Herd in Thailand. Trop. Anim. Health Prod. 2015, 47, 1539–1546. [Google Scholar] [CrossRef]
- Nuntapaitoon, M.; Tummaruk, P. Factors Influencing Piglet Pre-Weaning Mortality in 47 Commercial Swine Herds in Thailand. Trop. Anim. Health Prod. 2018, 50, 129–135. [Google Scholar] [CrossRef] [PubMed]
- Fraser, D. Behavioural Perspectives on Piglet Survival. J. Reprod. Fertil. Suppl. 1990, 40, 355–370. [Google Scholar] [CrossRef]
- Liu, T. New Insights into Factors Affecting Piglet Crushing and Anti-Crushing Techniques. Livest. Sci. 2022, 265, 105080. [Google Scholar] [CrossRef]
- Weary, D.M.; Pajor, E.A.; Fraser, D.; Honkanen, A.-M. Sow Body Movements That Crush Piglets: A Comparison between Two Types of Farrowing Accommodation. Appl. Anim. Behav. Sci. 1996, 49, 149–158. [Google Scholar] [CrossRef]
- Valros, A.; Rundgren, M.; Špinka, M.; Saloniemi, H.; Algers, B. Sow Activity Level, Frequency of Standing-to-Lying Posture Changes and Anti-Crushing Behaviour—Within Sow-Repeatability and Interactions with Nursing Behaviour and Piglet Performance. Appl. Anim. Behav. Sci. 2003, 83, 29–40. [Google Scholar] [CrossRef]
- Andersen, I.L.; Berg, S.; Bøe, K.E. Crushing of Piglets by the Mother Sow (Sus Scrofa)—Purely Accidental or a Poor Mother? Appl. Anim. Behav. Sci. 2005, 93, 229–243. [Google Scholar] [CrossRef]
- Friend, T.; O’Connor, L.; Knabe, D.; Dellmeier, G. Preliminary Trials of a Sound-Activated Device to Reduce Crushing of Piglets by Sows. Appl. Anim. Behav. Sci. 1989, 24, 23–29. [Google Scholar] [CrossRef]
- Cravero, A.; Sepúlveda, S.; Gutiérrez, F.; Muñoz, L. From Precision Agriculture to Intelligent Agricultural Ecosystems: A Systematic Review of Machine Learning and Big Data Applications. Agronomy 2026, 16, 516. [Google Scholar] [CrossRef]
- Botero-Valencia, J.; García-Pineda, V.; Valencia-Arias, A.; Valencia, J.; Reyes-Vera, E.; Mejia-Herrera, M.; Hernández-García, R. Machine Learning in Sustainable Agriculture: Systematic Review and Research Perspectives. Agriculture 2025, 15, 377. [Google Scholar] [CrossRef]
- Thongsrimoung, K.; Kusakunniran, W.; Wisetpaitoon, K.; Thongkanchorn, K.; Yano, T.; Thanapongtharm, W.; Boonyo, K. Sow Posture Detection for Determining Piglet Crushing through a Camera System. PeerJ Comput. Sci. 2025, 11, e3400. [Google Scholar] [CrossRef]
- Wei, J.; Tang, Y.; Chen, J.; Wang, K.; Li, P.; Shen, M.; Liu, L. SPMF-YOLO-Tracker: A Method for Quantifying Individual Activity Levels and Assessing Health in Newborn Piglets. Agriculture 2025, 15, 2087. [Google Scholar] [CrossRef]
- Chen, J.; Liu, L.; Li, P.; Yao, W.; Shen, M.; Liu, L. Resting Posture Recognition Method for Suckling Piglets Based on Piglet Posture Recognition (PPR)–You Only Look Once. Agriculture 2025, 15, 230. [Google Scholar] [CrossRef]
- Chapel, N.; Lucas, J.; Radcliffe, S.; Stewart, K.; Lay, D. Comparison of Vocalization Patterns in Piglets Which Were Crushed to Those Which Underwent Human Restraint. Animals 2018, 8, 138. [Google Scholar] [CrossRef] [PubMed]
- Illmann, G.; Hammerschmidt, K.; Špinka, M.; Tallet, C. Calling by Domestic Piglets during Simulated Crushing and Isolation: A Signal of Need? PLoS ONE 2013, 8, e83529. [Google Scholar] [CrossRef]
- Appleby, M.C.; Weary, D.M.; Taylor, A.A.; Illmann, G. Vocal Communication in Pigs: Who Are Nursing Piglets Screaming At? Ethology 1999, 105, 881–892. [Google Scholar] [CrossRef]
- Moura, D.J.; Silva, W.T.; Naas, I.A.; Tolón, Y.A.; Lima, K.A.O.; Vale, M.M. Real Time Computer Stress Monitoring of Piglets Using Vocalization Analysis. Comput. Electron. Agric. 2008, 64, 11–18. [Google Scholar] [CrossRef]
- Jahns, G. Call Recognition to Identify Cow Conditions—A Call-Recogniser Translating Calls to Text. Comput. Electron. Agric. 2008, 62, 54–58. [Google Scholar] [CrossRef]
- Vinayagam, P.; Kanagamalliga, S.; Mahalakshmi, B.; Pradisha, P. Acoustic Deep Learning Models for Early Detection of Distress Calls in Farm Animals. In Proceedings of the 2025 10th International Conference on Smart Structures and Systems (ICSSS), Chennai, India, 12 December 2025; IEEE: Chennai, India, 2025; pp. 1–6. [Google Scholar]
- Pann, V.; Kwon, K.-S.; Kim, B.; Jang, D.-H.; Kim, J.; Kim, J.-B. Robustness of CNN-Based Model Assessment for Pig Vocalization Classification across Diverse Acoustic Environments. Comput. Electron. Agric. 2026, 240, 111181. [Google Scholar] [CrossRef]
- Chen, W.-E.; Chen, L.-X.; Chiu, Y.-C. An Intelligent Detection and Notification (iDN) System for Handling Piglet Crushing Based on Machine Learning. In Cognitive Cities; Shen, J., Chang, Y.-C., Su, Y.-S., Ogata, H., Eds.; Communications in Computer and Information Science; Springer: Singapore, 2020; Volume 1227, pp. 475–484. ISBN 978-981-15-6112-2. [Google Scholar]
- Chen, W.-E.; Lin, Y.-B.; Chen, L.-X. PigTalk: An AI-Based IoT Platform for Piglet Crushing Mitigation. IEEE Trans. Ind. Informat. 2021, 17, 4345–4355. [Google Scholar] [CrossRef]
- Reza, M.N.; Do, M.-G.; Seo, J.-B.; Song, M.; Chung, S.-O.; Kim, G. Sound Based Approaches for Pig Diseases and Crush Symptoms Monitoring in Pig Farms: A Review. Precis. Agric. Sci. Technol. 2022, 4, 35–49. [Google Scholar] [CrossRef]
- Reza, M.N.; Ali, M.R.; Haque, M.A.; Jin, H.; Kyoung, H.; Choi, Y.K.; Kim, G.; Chung, S.-O. A Review of Sound-Based Pig Monitoring for Enhanced Precision Production. J. Anim. Sci. Technol. 2025, 67, 277–302. [Google Scholar] [CrossRef]
- Kong, Q.; Cao, Y.; Iqbal, T.; Wang, Y.; Wang, W.; Plumbley, M.D. PANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition. IEEE/ACM Trans. Audio Speech Lang. Process. 2020, 28, 2880–2894. [Google Scholar] [CrossRef]
- Wang, R.-F.; Su, W.-H. The Application of Deep Learning in the Whole Potato Production Chain: A Comprehensive Review. Agriculture 2024, 14, 1225. [Google Scholar] [CrossRef]
- Wang, R.-F.; Qu, H.-R.; Su, W.-H. From Sensors to Insights: Technological Trends in Image-Based High-Throughput Plant Phenotyping. Smart Agric. Technol. 2025, 12, 101257. [Google Scholar] [CrossRef]
- Mihigo, I.N.; Zennaro, M.; Uwitonze, A.; Rwigema, J.; Rovai, M. On-Device IoT-Based Predictive Maintenance Analytics Model: Comparing TinyLSTM and TinyModel from Edge Impulse. Sensors 2022, 22, 5174. [Google Scholar] [CrossRef]
- Gookyi, D.A.N.; Wulnye, F.A.; Arthur, E.A.E.; Ahiadormey, R.K.; Agyemang, J.O.; Agyekum, K.O.-B.O.; Gyaang, R. TinyML for Smart Agriculture: Comparative Analysis of TinyML Platforms and Practical Deployment for Maize Leaf Disease Identification. Smart Agric. Technol. 2024, 8, 100490. [Google Scholar] [CrossRef]
- Miller, T.; Mikiciuk, G.; Durlik, I.; Mikiciuk, M.; Łobodzińska, A.; Śnieg, M. The IoT and AI in Agriculture: The Time Is Now—A Systematic Review of Smart Sensing Technologies. Sensors 2025, 25, 3583. [Google Scholar] [CrossRef]
- Michielon, A.; Litta, P.; Bonelli, F.; Don, G.; Farisè, S.; Giannuzzi, D.; Milanesi, M.; Pietrucci, D.; Vezzoli, A.; Cecchinato, A.; et al. Mind the Step: An Artificial Intelligence-Based Monitoring Platform for Animal Welfare. Sensors 2024, 24, 8042. [Google Scholar] [CrossRef] [PubMed]
- Manteuffel, C.; Tuchscherer, A.; Schmidt, M.; Hoffmann, G.; Schön, P.C. Using Air-Blow and Floor Vibration to Trigger Posture Changes in Gestating and Lactating Sows. Comput. Electron. Agric. 2014, 104, 105–110. [Google Scholar] [CrossRef]
- Düpjan, S.; Schön, P.-C.; Puppe, B.; Tuchscherer, A.; Manteuffel, G. Differential Vocal Responses to Physical and Mental Stressors in Domestic Pigs (Sus Scrofa). Appl. Anim. Behav. Sci. 2008, 114, 105–115. [Google Scholar] [CrossRef]
- Kittle, O.J.; Knauer, M.T.; Almond, G.W.; Stamenos, A.; Kushner, L.; Weisenhorn, S.; Leonard, S.M. Effects of Indoor Temperature, Relative Humidity, and Carbon Dioxide Conditions on Wean-to-Finish Swine Survivability. Agriculture 2025, 15, 2050. [Google Scholar] [CrossRef]
- Thompson, R.; Matheson, S.M.; Plötz, T.; Edwards, S.A.; Kyriazakis, I. Porcine Lie Detectors: Automatic Quantification of Posture State and Transitions in Sows Using Inertial Sensors. Comput. Electron. Agric. 2016, 127, 521–530. [Google Scholar] [CrossRef] [PubMed]









| Category | Description | Raw Samples | Training Set | Test Set | Total |
|---|---|---|---|---|---|
| Distress | Acute pain screams (Field + Web) | 408 | 1306 | 326 | 1632 |
| Interaction | Squeals during fighting/playing | 446 | 1427 | 357 | 1784 |
| Nursing | Rhythmic grunting of sows | 503 | 1610 | 402 | 2012 |
| Ambient | Fan, machinery, and background noise | 426 | 1363 | 341 | 1704 |
| Total | - | 1783 | 5706 | 1426 | 7132 |
| Feature | Model | Quantization | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|---|---|
| 8 | Base-1D-CNN | INT8 | 92.95% | 92.97% | 92.95% | 92.93% |
| 8 | Base-1D-CNN | FLOAT32 | 92.88% | 92.91% | 92.88% | 92.85% |
| 8 | SE-1D-CNN | INT8 | 96.12% | 96.10% | 96.12% | 96.10% |
| 8 | SE-1D-CNN | FLOAT32 | 96.12% | 96.11% | 96.12% | 96.09% |
| 8 | LSTM | INT8 | 98.45% | 98.45% | 98.45% | 98.44% |
| 8 | LSTM | FLOAT32 | 98.45% | 98.46% | 98.45% | 98.45% |
| 13 | Base-1D-CNN | INT8 | 95.56% | 95.54% | 95.56% | 95.54% |
| 13 | Base-1D-CNN | FLOAT32 | 95.56% | 95.53% | 95.56% | 95.54% |
| 13 | SE-1D-CNN | INT8 | 96.97% | 96.99% | 96.97% | 96.97% |
| 13 | SE-1D-CNN | FLOAT32 | 97.04% | 97.06% | 97.04% | 97.04% |
| 13 | LSTM | INT8 | 98.38% | 98.39% | 98.38% | 98.38% |
| 13 | LSTM | FLOAT32 | 98.38% | 98.40% | 98.38% | 98.38% |
| 32 | Base-1D-CNN | INT8 | 95.77% | 95.80% | 95.77% | 95.77% |
| 32 | Base-1D-CNN | FLOAT32 | 96.05% | 96.08% | 96.05% | 96.05% |
| 32 | SE-1D-CNN | INT8 | 96.62% | 96.68% | 96.62% | 96.63% |
| 32 | SE-1D-CNN | FLOAT32 | 97.04% | 97.10% | 97.04% | 97.05% |
| 32 | LSTM | INT8 | 99.72% | 99.72% | 99.72% | 99.72% |
| 32 | LSTM | FLOAT32 | 99.65% | 99.65% | 99.65% | 99.65% |
| Model | MFCC | Quant. | Test Acc. | Peak RAM | DSP Time | Inference Time | Total Latency |
|---|---|---|---|---|---|---|---|
| Base-1D-CNN | 8 | Int8 | 92.95% | 4.1 KB | 124 ms | 2 ms | 126 ms |
| Base-1D-CNN | 13 | Int8 | 95.56% | 5.1 KB | 135 ms | 2 ms | 137 ms |
| Base-1D-CNN | 32 | Int8 | 95.77% | 9.0 KB | 181 ms | 3 ms | 184 ms |
| SE-1D-CNN | 8 | Int8 | 96.12% | 5.1 KB | 124 ms | 4 ms | 128 ms |
| SE-1D-CNN | 13 | Int8 | 96.97% | 6.1 KB | 135 ms | 4 ms | 139 ms |
| SE-1D-CNN | 32 | Int8 | 96.62% | 10.0 KB | 181 ms | 5 ms | 186 ms |
| LSTM | 8 | Int8 | 98.45% | 8.5 KB | 124 ms | 55 ms | 179 ms |
| LSTM | 13 | Int8 | 98.38% | 8.5 KB | 135 ms | 57 ms | 192 ms |
| LSTM | 32 | Int8 | 99.72% | 11.9 KB | 181 ms | 169 ms | 350 ms |
| Feature | Proposed System (TinyML Edge) | Vision-Based (Cloud/Server) | Audio-Only (Cloud/Server) |
|---|---|---|---|
| Inference Mode | Edge-based (Local) | Cloud or Local Server | Cloud or Local Server |
| Hardware Cost | <$20 (Low-power node) | >$100 (GPU/Camera/Gateway) | ~$40 (Mic/Processing PC) |
| Connectivity Requirement | Minimal (Metadata only) | High bandwidth (Raw video) | Medium bandwidth (Raw audio) |
| Latency & Stability | Real-time; Offline-capable | Network-dependent | Network-dependent |
| Privacy & Security | High (Raw data on node) | Low (Raw video streaming) | Low (Raw audio streaming) |
| Main Technical Limit | IMU threshold calibration | Occlusion & light sensitivity | High false alarms (Noise) |
| Payback Period | <1 Lactation cycle | 3–5 Lactation cycles | Uncertain (false alarms) |
| Economic Benefit | Extremely High | Moderate | Low |
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. |
© 2026 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.
Share and Cite
Liu, H.; Li, H.; Cao, Y.; Cao, R.; Hu, G.; Liu, Z. A Low-Power Piglet Crushing Detection System Based on Multi-Modal Fusion. Agriculture 2026, 16, 753. https://doi.org/10.3390/agriculture16070753
Liu H, Li H, Cao Y, Cao R, Hu G, Liu Z. A Low-Power Piglet Crushing Detection System Based on Multi-Modal Fusion. Agriculture. 2026; 16(7):753. https://doi.org/10.3390/agriculture16070753
Chicago/Turabian StyleLiu, Hao, Haopu Li, Yue Cao, Riliang Cao, Guangying Hu, and Zhenyu Liu. 2026. "A Low-Power Piglet Crushing Detection System Based on Multi-Modal Fusion" Agriculture 16, no. 7: 753. https://doi.org/10.3390/agriculture16070753
APA StyleLiu, H., Li, H., Cao, Y., Cao, R., Hu, G., & Liu, Z. (2026). A Low-Power Piglet Crushing Detection System Based on Multi-Modal Fusion. Agriculture, 16(7), 753. https://doi.org/10.3390/agriculture16070753

