IEEE Access (Jan 2024)

YOLO-DLHS-P: A Lightweight Behavior Recognition Algorithm for Captive Pigs

  • Changhua Zhong,
  • Hao Wu,
  • Junzhuo Jiang,
  • Chaowen Zheng,
  • Hong Song

DOI
https://doi.org/10.1109/ACCESS.2024.3414859
Journal volume & issue
Vol. 12
pp. 104445 – 104462

Abstract

Read online

To meet the needs of embedded devices for model lightweight and high-precision recognition, this paper proposes a lightweight YOLO-DLHS-P model for pig behavior recognition based on the improved YOLOv8n model. Firstly, the C2f-DRB structure is introduced at the Backbone position, and the sizeable convolutional kernel is used to extend the receptive field to enhance the spatial perception ability of the model, and to enhance the network’s ability to capture spatial information while maintaining the number of learnable parameters and computational efficiency; The LSKA attention mechanism is then introduced to be integrated into the SPPF module to construct the SPPF-LSKA structure, which significantly improves the ability of the SPPF module to aggregate features at multiple scales; Then, the downsampling at the Neck position is optimised to the HWD algorithm, which reduces the spatial resolution of the feature map while retaining more useful information and reduces the uncertainty of the information compared with the downsampling method of the baseline model; finally, the Shape-IoU is used to replace the original CIoU, which significantly improves the detection efficiency and accuracy of the model without increasing the extra computational burden. After constructing the improved YOLO-DLHS model, the improved model is then pruned using the LAMP pruning scoring algorithm to obtain a lightweight YOLO-DLHS-P model. The experimental results show that the YOLO-DLHS model improves P, [email protected], and [email protected] by 4.39%, 1.68%, and 3.97%, respectively, compared to the YOLOv8n model. The YOLO-DLHS-P model improves P, [email protected], and [email protected] by 3.37%, 1.16%, and 2.11%, and the number of parameters, computation, and model occupancy are substantially reduced by 52.49%, 54.32%, and 49.33%, respectively. Moreover, the FPS of the YOLO-DLHS-P model reaches 79 frames, which has good real-time performance for pig behavior recognition. Therefore, the improved YOLO-DLHS-P in this paper is able to reduce the demand for hardware at the time of deployment under the premise of guaranteed accuracy and provides a lightweight behavioral recognition solution for the intelligent farming of captive pigs.

Keywords