# A Review of Posture Detection Methods for Pigs Using Deep Learning
## 3 Application of Deep Learning Methods to Pig Posture Detection
### One-Stage Detection Models  
YOLOv1 is the first one-stage model in the deep learning era, followed by subsequential versions (such as YOLOv2, YOLOv3 [80], and YOLOv5 [81]) and refined models based on them, have been increasingly developed and applied to pig posture detection, showing dramatic improvement of speed over two-stage detection models. In an experiment aimed at constructing high-quality pig posture datasets for the development of deep learning models, [PERSON] et al. [60] found that, in a specific dataset, YOLOv2 could reach an average precision (AP) as high as 97%, which is seven times superior to that of SSD (a one-stage model). [PERSON] et al. [28] initiatively detected several pig postures at the individual level, including sitting, a tricky posture type, and additionally implemented pig identification and tracking without the use of any marks or sensors on pigs. In their research, two deep learning models were tested for behavior and posture detection, and they finally found that YOLOv2 was clearly superior to Faster R-CNN in terms of mAP and speed, with a high mAP above 98%. Furthermore, it can generate a profile for each pig that includes movement history and corresponding postures at a certain time point, which is valuable for commercial applications in automatic pig monitoring. [PERSON] et al. [38] trained the tiny YOLOv3 model with datasets from nine pens to detect six pig postures. The results demonstrated that the model prevails over most two-stage deep learning models, such as Faster R-CNN, R-FCN, and machine learning models such as SVM [7], with a high mAP of 95.9%. [PERSON] et al. [42] designed an assembled model for pig detection, segmentation, and classification, which are executed by YOLOv5, DeepLabv3+, and Resnet, respectively, and obtained a classification accuracy of 92.26% over four postures. Compared with static \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Posture Classification** & **Data Source** & **Detection Model** & **Evaluation Index** & **Results** & **Advantage** & **References** \\ \hline \multirow{8}{*}{Lying and not lying} & \multirow{8}{*}{2D RGB image} & Faster R-CNN + NASNet & \begin{tabular}{c} APIoU=0.5 of \\ localization \\ \end{tabular} & 87.4\% & \begin{tabular}{c} Consider dataset diversity and \\ focus on generalization under \\ limited training data and different \\ application settings \\ \end{tabular} & [51] \\ \cline{3-6}  & & & [EMAIL_ADDRESS] on day & 84\% & \\ \cline{3-6}  & & & [EMAIL_ADDRESS] on & 58\% & \begin{tabular}{c} Enable continuous 24/7 pig \\ posture detection and provide an \\ optimal deep learning model after \\ experimenting with over 150 \\ different model configurations \\ \end{tabular} & [75] \\ \cline{3-6}  & & & & Precision of & 93\% & \\ \cline{3-6}  & & & & \begin{tabular}{c} R-FCN + ResNet \\ 101 \\ \end{tabular} & mAP & \textgreater{}93\% & High flexibility and robustness & [20] \\ \hline \multirow{8}{*}{\begin{tabular}{c} Standing, sitting, \\ stemal recumbency, \\ ventral \\ \end{tabular} } & \multirow{2}{*}{Depth images} & Faster R-CNN & mAP & 87.1\% & \begin{tabular}{c} Reach real-time detection speed; \\ Summarize the changing laws of \\ pig position and posture \\ \end{tabular} & [29] \\ \cline{3-6}  & & & & & \\ \cline{3-6}  & 2D RGB image + & \
\begin{tabular}{c} Refined \\ two-stream \\ RGB-D faster \\ R-CNN \\ \end{tabular} & mAP & 95.47\% &
\begin{tabular}{c} Improve the accuracy of posture \\ recognition by feature-level fusion \\ strategy using RGB-D data \\ \end{tabular} & [79] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Summary of two-stage deep learning methods on pig posture detection. posture detection, the method proposed by [PERSON] et al. focuses on the detection of dynamic posture to facilitate detecting pathological changes in pigs. Besides native YOLO frameworks, improved or refined models based on them have been designed for pig posture detection as well.