The invention discloses a sow side-lying posture real-time detection system based on joint partitioning of sow key parts and environment, and the system comprises a delivery room, a camera, a video storage unit, and a server, and the delivery room is used for placing a to-be-delivered sow; the camera monitors and obtains video data of a delivery room, continuously stores the video data to the video storage unit on one hand, and is directly connected with the server on the other hand; the server calls the backup video data and analyzes the monitoring data in real time; the working steps of thedetection system are as follows: monitoring the postures of the sows in real time, simultaneously detecting three areas of an approval area, a lactation area and a delivery area through a convolutional neural network area identification model, identifying the sows as lying postures when more than two areas are simultaneously detected, and outputting an identification result to a database. Comparedwith a method for recognizing the posture of the sow through a sensor technology, the computer vision technology avoids contact with the sow, stress response is reduced, and the method has the advantages of being low in cost and high in efficiency.