Automatic quantification and assessment of grouped pig movement using the XGBoost and YOLOv5s models
Abstract
The movements of grouped pigs reflect the health of the pigs to a certain extent. Monitoring pig movement is dependent upon daily patrols and the experience and judgment of breeders. This study innovatively proposes an automatic quantification and assessment method for the movements of grouped pigs using video data from the top view of a pigpen. The YOLOv5s model was used to detect the positions of grouped pigs. The mean-shift algorithm was used to identify the movement center of grouped pigs, and then the movement center was tracked, quantified, and counted. Based on the quantized values, we divided the movements of pigs into three levels. The extreme gradient boosting (XGBoost) model was used to assess the movements of grouped pigs. In the model training and position detection experiments, the P-R curve value of the YOLOv5s position detection model was 0.985, the precision was 0.97, the recall was 0.96, and the mean average precision was 0.5 (mAP_0.5) = 0.99. The XGBoost classification model was used to assess and classify the movement of grouped pigs, and the overall accuracy was 97.4%. Using this method to investigate movement over time, we found that the pigs were more active from 08:00 to 11:00 and 16:00 to 19:00 and that the movement center of grouped pigs changed over time. These results were consistent with the actual observations of grouped pigs, indicating that it is feasible to apply the method proposed in this study to large-scale farming operations.
- Publication:
-
Biosystems Engineering
- Pub Date:
- June 2023
- DOI:
- 10.1016/j.biosystemseng.2023.04.010
- Bibcode:
- 2023BiSyE.230..145X
- Keywords:
-
- Pig;
- Movement quantification;
- Movement assessment;
- YOLOv5s;
- XGBoost