Abstract:
Objective To reduce the manual workload of measuring pig body measurements in pig farms and improve measurement accuracy and efficiency.
Method An automatic pig body measurement estimation method based on keypoint detection and multi-object tracking was proposed. The method utilized Yolov8-Pose model to identify keypoints and bounding boxes of individual pigs. ByteTrack algorithm was employed for real-time tracking of the pig herd. Regions of interest were introduced to mitigate image distortion and improve recognition speed. Additionally, a posture and anomaly detection filter algorithm was designed to reduce errors caused by motion blur, posture abnormality and other factors.
Result The mean absolute errors of the body length, shoulder width, and hip width of 24 pigs in five pigpens were less than 3 cm, the mean absolute percentage errors were maintained below 4%, 6% and 7% respectively. The data processing speed reached 19.3 frames/s.
Conclusion The proposed method for pig body measurement estimation based on keypoint detection and multi-object tracking provides a lightweight and easily deployable solution for automatic body measurement in pig farming scenarios.