Abstract:
The analysis of feeding behavior is crucial for precise management of large-scale pigeon farming for meat. Currently, more research is focused on target tracking algorithms, with less attention paid to precise statistics of animal specific behaviors based on target tracking. In addition, In the complex small target scene of caged pigeons, the behavior analysis of pigeons based on machine vision faces challenges such as sparse target pixels, low resolution, overlap, obstruction by cage fences, complexity of background environment, weak lighting conditions, and image blurring. This may make it difficult for the detector of the target tracking algorithm to accurately recognize the feeding behavior of pigeons, resulting in missed or false detections, and ultimately generating false trajectories. Therefore, this work proposes a precise statistical method for pigeon feeding frequency based on feeding behavior tracking algorithm and feeding trajectory, Mask-SCBF (SPD-Conv-BiFormer) -SORT. This method mainly includes three modules: segmentation mask conversion, tracking algorithm, and feeding frequency calculation method. By introducing a segmentation mask conversion module, the segmentation mask is converted into a bounding box and a score, which are used as inputs for the tracking model to obtain the tracking trajectory of the pigeon during feeding. Based on this, the trajectory coordinates are extracted, and a feeding frequency calculation method based on trajectory motion and dynamic threshold is established to accurately calculate the feeding frequency of the meat pigeon. The main contributions of this work include: (1) Designing a segmentation mask transformation framework based on adaptive filtering mechanism, ensuring complete segmentation of feeding pigeon targets while improving the accuracy and robustness of segmentation results; (2) Propose a target tracking algorithm SCBF-SORT based on the SCBF-YOLOv8 detector. In the tracking module, the model tracking accuracy is enhanced by reconstructing the Kalman filter state vector and optimizing the noise covariance matrix parameters; In the detection module, an SCBF-YOLOv8 (SPD-Conv-BiFormer-YOLOv8) detector was designed, which introduces SPD-YOLOv8 to enhance the feature representation ability of small targets based on YOLOv8; In addition, the detector also includes the following improvements: integrating BiFormer attention mechanism to enhance contextual semantic correlation, using WIoU v3 loss function to improve bounding box regression accuracy, and adding a small object detection layer to enhance target size adaptability. (3) A method for accurately counting feeding frequency based on dynamic threshold is constructed on the basis of target tracking trajectory. This study collected over 2,700 original videos, covering three lighting conditions: strong light (daylight), weak light (nighttime illumination), and black light (infrared night vision). Key frames of feeding behavior were extracted from the original videos, and a total of
4386 images with a resolution of 1920×
1080 pixels were produced as the training and validation sets. Additionally, 15 videos with a relatively concentrated occurrence of feeding behavior, each approximately 60 minutes long, were selected for the target tracking task. The experimental results showed that using the target segmentation mask as the input for target behavior tracking resulted in an improvement of 7.15%, 4.17%, 11.24%, and 5.81% in MOTA, IDF1, HOTA, and MOTP, respectively, compared to using the original image as the input. This indicates that the segmentation mask conversion framework proposed in this work can provide more detailed target area information and improve the accuracy of target tracking. The final Mask-SCBF-SORT algorithm, compared to the baseline algorithm BoT-SORT, improved by 7.52%, 5.36%, 14.38%, and 6.41% in the MOTA, IDF1, HOTA, and MOTP, respectively. This demonstrates that the proposed algorithm can adapt well to small target detection and tracking in complex environments of captive pigeons for meat, and the accuracy of feeding frequency statistics reached 94.8%, meeting the demand for rapid statistics of meat pigeon feeding behavior in actual breeding.