Top

TabM-DNN Model with Few-Shot Learning for Abnormal Posture Detection in Livestock and Poultry

Authors

Files

Abstract

Abnormal posture is an early and observable indicator of welfare risk in livestock and poultry, but rare abnormal events are difficult to annotate at the scale required by conventional deep learning models. This paper proposes a TabM-DNN model fused with few-shot learning for abnormal posture detection from skeleton-derived posture descriptors, inertial statistics, activity rhythm variables, and housing-context measurements. The central novelty is a species-aware tabular interaction framework that couples TabM feature crossing with prototype-guided adaptation, allowing rare posture classes to be calibrated from only a small verified support set. The TabM module models crossed interactions among 64 engineered and learned descriptors, while an attention-gated dense neural network separates normal standing, normal lying, feeding, limping, collapse, wing droop, and neck twist patterns. A controlled experimental dataset containing 48,600 posture windows from cattle, pigs, broilers, and laying hens was organized under one-shot, three-shot, five-shot, and ten-shot settings. Compared with a conventional DNN, the proposed model increased macro-F1 from 86.7% to 94.6% in five-shot detection, improved abnormal recall from 88.2% to 95.8%, reduced the false alarm rate from 7.9% to 3.1%, and maintained an average edge inference latency of 18.4 ms per window. The results indicate that tabular modal fusion and few-shot prototype adaptation can improve rare posture recognition without requiring continuous relabeling of farm video and sensor streams.

Details