# Broiler Behavior Detection and Tracking Method Based on Lightweight Transformer
###### Abstract  
Detecting the daily behavior of broiler chickens allows early detection of irregular activity patterns and, thus, problems in the flock. In an attempt to resolve the problems of the slow detection speed, low accuracy, and poor generalization ability of traditional detection models in the actual breeding environment, we propose a chicken behavior detection method called FCBD-DETR (Faster Chicken Behavior Detection Transformer). The FasterNet network based on partial convolution (PConv) was used to replace the Resnet18 backbone network to reduce the computational complexity of the model and to improve the speed of model detection. In addition, we propose a new cross-scale feature fusion network to optimize the neck network of the original model. These improvements led to a 78% decrease in the number of parameters and a 68% decrease in GFLOPs. The experimental results show that the proposed model is superior to the traditional network in the speed, accuracy and generalization ability of broiler behavior detection. (1) The detection speed is improved from 49.5 frames per second to 68.5 frames per second, which is 22.6 frames and 10.9 frames higher than Yolov7 and Yolov8, respectively. (2) mAP0.5 reaches 99.4%, and MAP0.5\(\pm\)0.95 increases from 84.9 to 88.4%. (3) Combined with the multi-target tracking algorithm, the chicken flock counting, behavior recognition, and individual tracking tasks are successfully realized. broiler chicken behavior detection; FCBD-DETR; FasterNet; behavior recognition 10 February  
behaviors of broilers can facilitate the tracking of flock health status and enable the early detection and prevention of leg diseases, thereby minimizing significant losses within the flock [8; 9]. Traditional disease detection in poultry flocks is typically performed by farmers and veterinarians through visual observation of poultry behavior and vocalizations [10; 11]. However, in large-scale production environments, this method often fails to provide timely detection [12], potentially leading to significant losses for the entire flock [13]. Additionally, some studies examining the effects of varying light intensities, colors, and feeding methods on chicken behavior [14; 15; 16] frequently utilize video recordings to manually quantify behavioral changes. This approach, however, is not only time-consuming and labor-intensive but is also susceptible to numerous statistical errors. To address the afore-mentioned issues, researchers are continually exploring more effective behavior detection methods. For instance, [PERSON] et al. (2017) [17], utilized the UHF RFID system to monitor the feeding and nesting behaviors of individual hens. [PERSON] (2017) [18] assessed the lameness behavior of broiler chickens through the application of image processing algorithms. Furthermore, [PERSON] et al. (2018) [19], employed the UHF RFID system to continuously observe the feeding behavior of individual broilers. Furthermore, due to the ease of camera positioning and minimal interference to animals [20], deep learning-based animal behavior detection technology has emerged as a non-invasive, efficient, and cost-effective solution, widely applied to study the behavior, movement, and activities of animals in group environments. For example, [PERSON] et al. (2023) [21] used the YOLOX algorithm to detect key behaviors (eating, drinking, resting, and stress) in Majang geese. [PERSON]. (2020) [22] used the YOLOV3 algorithm to identify the behavior of caged laying hens. [PERSON] et al. (2024) [23] used the lightweight YOLOV4 network to successfully detect dead chickens in a large-scale caged layer environment. [PERSON] et al. (2022) [24] applied the YOLOV5 detection algorithm to identify the daily behaviors of laying ducks, and [PERSON] et al. (2022) [25] utilized a CNN network model to effectively detect eating, drinking, standing, and resting behaviors in broilers of various ages. However, broiler chickens exhibit more dynamic behaviors, with frequent changes in morphology and orientation compared to laying hens.