Aiming at the problem of low automation in pig farms, this paper proposes a new pig posture estimation method based on breeding scenarios for intelligent monitoring of pig farms.Firstly, the video image data of indoor and outdoor scenes in pig breeding scenarios were collected and labeled, and a self-constructed pig posture estimation dataset was built; Secondly,Resnet50, VGG16 and MobileNetV2 were used as the back-bone network, and the three methods based on coordinate regression, heat map and simple coordinate classi-fication were analyzed experimentally, and the Simple Coordinate Classification (SimCC) algorithm with the optimal effect was selected as the extraction method of key points of pigs;Finally, we integrated High Resolution Network(HRNet)and HRFormer, which incorporates Transformer modules, as backbone net-works. They were combined with the SimCC to formulate an effective pig pose estimation framework. The experimental results show that the mAP of HRFormer-SimCC reaches 83.2%, which is an average im-provement of 7.2% over the use of traditional CNN model and 0.4% over the HRNet-SimCC, and the float-ing-point computation and parameter counts of HRFormer-SimCC are only 45.05% and 36.48% of it. This is more suitable to be deployed in breeding environments and provides a theoretical basis for intelligent moni-toring of pig farms.