1. Introduction
Animal welfare is a growing global concern, as are public ethics, food security, and sustainable production. In broiler chicken systems, welfare impairments often manifest as mobility issues, such as gait instability, leg disorders, and inactivity, compromising health and productivity [
1,
2]. Assessing welfare at scale in these high-density environments remains challenging, especially when traditional individual-based evaluations are neither feasible nor timely [
3,
4].
Animal welfare is about how animals feel, ensuring that they experience minimal suffering and high positive emotions. To properly assess their well-being, it is essential to understand these internal states [
5]. However, we cannot directly measure feelings; therefore, we rely on indirect methods to infer what the animal is experiencing. Preference and motivational tests provide insights into animals’ choices and the strength of their preferences [
6]. Physiological indicators of compromised health and stress responses offer valuable corroborating evidence of impaired welfare [
7,
8]. Vučinić and Lazić [
9] explored the definition of animal welfare and various assessment methods, emphasizing the role of feeding, housing, health, and appropriate behavior in influencing animal welfare.
Animal behavior is a crucial tool for assessing animal welfare, both in research and on farms. It helps us understand animal health and identify needs, especially when combined with new technologies and preference tests [
1,
5]. Behavioral diversity is increasingly used as an indicator of welfare. Studies suggest that animals exhibiting a wide range of natural behaviors experience better welfare, while those restricted to fewer behaviors might be under stress or discomfort [
10,
11]. However, this approach requires careful interpretation, as aggressive behaviors, restlessness, and dominance do not contribute to the flock’s welfare and must be considered in isolation. The Five Domains Model approach, involving nutrition, environment, health, behavior, and sentience, underscores the significance of the ability to assess positive welfare states by incorporating an animal’s capacity for choice, control, challenge, agency, and behavioral interactions. This attempt enables a more holistic evaluation of animal well-being, moving beyond a singular focus on physiological parameters [
10,
11,
12,
13].
Natural behavior detection addresses the challenges of detecting and tracking individual chickens and classifying natural behaviors. New deep learning-based models, such as YOLO, have brought about significant advances in the detection and tracking of broiler chickens [
14,
15,
16]. However, tracking remains challenging due to the high-density conditions typically found in commercial farming systems, where birds are often crowded together, and equipment causes occlusions in the images, making it challenging to maintain the identification of chickens over time [
17,
18]. Group behaviors are essential and do not require animal identification. Flock behavior can be assessed through multiple methodologies, including acoustic monitoring [
19,
20], thermal imaging [
21], and the use of video cameras [
22,
23].
Walking ability is increasingly recognized as a critical indicator of animal welfare, particularly in broiler chickens. Impaired walking ability is linked to numerous welfare issues, including pain, restricted access to food and water, and an inability to express natural behaviors [
24,
25]. Automated gait analysis has been shown to correlate with other welfare measures, such as leg health, and it offers the potential for more efficient monitoring in large-scale animal production systems [
3,
26]. These objective assessments are crucial in modern farming, where welfare monitoring must be efficient [
1]. However, modern broiler production systems house thousands of birds, making traditional individual-based monitoring inefficient and impractical [
27], as these flocks’ activity levels can provide essential information on animal welfare outcomes.
Among the computer vision methods applied to standard video camera images, two widely tested approaches in experimental settings stand out: Optical Flow [
28] and the Unrest Index [
29]. The two methods use different strategies and resources to obtain metrics of body displacement in videos. While Optical Flow uses statistical methods to monitor the variation in brightness between frames and thus obtain the average, variance, skewness, and kurtosis metrics to summarize the displacement in time (speed), the Unrest Index uses the Hausdorff distance, which is a mathematical method, to calculate the distance that represents the displacement of the entire group of animals between two frames. Both methods depend on the frame rate of the camera used to capture the images since the higher the image capture rate, the smaller the variation in the position of the bodies in the images, and therefore, the smaller the measurements obtained. In this case, both techniques depend on standardizing the frame rate to be processed by the methods.
Optical Flow, which analyzes apparent motion between video frames, is increasingly applied in precision livestock farming to monitor broiler movement. While this technique has seen broad application in fields such as robotics [
30,
31,
32], medical imaging [
33,
34], and fluid dynamics [
35,
36], its relevance in poultry lies in its ability to capture flock-level motion patterns without individual identification, enabling automated welfare assessments [
23,
27]. Previous studies have shown that Optical Flow metrics such as the mean, variance, skewness, and kurtosis of movement distributions correlate with crucial animal welfare indicators like mortality, the gait score, and the prevalence of leg disorders such as hock burns and pododermatitis [
22,
37]. These metrics allow producers to infer flock-wide health trends from video data, offering a non-invasive and automated approach to welfare assessments [
38]. However, establishing a direct and clear link between flock-level Optical Flow patterns and the welfare of individual birds remains a complex endeavor [
39,
40].
Del Valle et al. [
29] proposed the Unrest Index using video images. Based on the Hausdorff distance measure, the index was evaluated using video recordings of chickens from various experimental settings. The index effectively detected signs of different movement patterns in poultry under different thermal conditions, indicating its sensitivity to changes in environmental stressors. Pereira et al. [
41] used the Unrest Index to evaluate the gait of broiler chickens, while Fernandes et al. [
42] applied it to estimate the welfare of laying hens raised under different lighting sources and thermal conditions.
In deep learning, YOLO models have been widely used for animal detection in complex environments. In poultry farming, several studies have successfully applied it to chicken detection [
43,
44]. The method has also been used to track individual chickens [
14,
15,
16,
45]. Despite the high computational cost of training a YOLO model for chicken detection and tracking, this appears to be the most accurate method for assessing bird movement in complex environments. All three methods for evaluating the movement of chicken flocks described have been widely tested, but there has not yet been a comparison between these methods. To what extent are the measurements from these methods equivalent? Is it possible to replace one method with another, depending on the availability of computational resources or the quality of the sensor and the images collected?
These questions are essential because the conditions of poultry farms may not be conducive to replicating a given method on farms. Lighting conditions and image resolution resulting from camera quality may not favor using a given technique. The unavailability of better computational resources or the difficulty of training YOLO-based detection models may restrict their use. Therefore, knowing the equivalence of the metrics provided by the methods is essential for this field of knowledge and poultry farming, which can benefit from these tools for flock monitoring.
This study hypothesizes that the metrics derived from the Unrest Index, YOLO-based tracking, and Optical Flow are equivalent, providing robust indicators of flock movement for the early detection of welfare issues. Confirming this hypothesis will lay the foundation for integrating vision-based tools into commercial broiler management systems. This study aimed to verify the equivalence of metrics from three computer vision methods: (1) the Unrest Index, which calculates restlessness from the displacement of the body’s geometric centers (centroids) between frames; (2) the average walking distance measured using YOLO-based detection and tracking; and (3) Optical Flow, which measures the speed of frame-to-frame displacement of pixel clusters. The methods were tested on images from an experiment monitoring three broiler breeds. Confirming the equivalence of these methods will ensure robust movement indicators for early welfare problem detection and support the integration of vision-based tools in future broiler management.
4. Discussion
The Optical Flow, Unrest Index, and walking distance measurements showed strong correlations, demonstrating equivalence for using these methods in monitoring the movement of chicken flocks. Walking distance is the most accurate method if the chicken detection and tracking model is precise. With this method, it is possible to detect clustered individuals accurately, and tracking allows us to know the movement of each individual. Although YOLO tracks individual chickens [
14,
15,
16], the equipment occlusion of birds causes identification to be lost. In this study, a summary of the walking distance data obtained in YOLO was made, representing the group, so this measurement was compared and equated with the Optical Flow and Unrest Index metrics.
However, solving the problem of bird occlusion by equipment or even the loss of identification due to model confusion is challenging [
15,
17]. Mehdizadeh et al. [
18] worked on this issue by using image segmentation to minimize these identification losses during the tracking process.
The Unrest Index is a method that does not aim to monitor the movement of each chicken but to extract a displacement measurement that represents the flock frame by frame. In this proposal, tracking the bird is not relevant, and only its detection is important, which makes it very accurate in its proposal when combined with the YOLO method for bird detection. In this method, it is also possible to apply other image-processing techniques to segment the chickens and determine the centroids, making it a more flexible method for use in cases where computational resources are limited.
Optical Flow was the simplest method used. There is no need to propose a previous training or detection step for the birds. The videos were processed according to the original recordings, and the metrics were easily extracted. This method provides four statistical metrics (average, variance, skewness, and kurtosis) that describe the data distribution on the movement speed of the bodies in the video. The metric that most correlated with walking distance and the Unrest Index was the average. Still, the variance, skewness, and kurtosis provide relevant information about the flock’s movement, as the higher these values are, the more individuals with different speeds move in the video.
All methods had an error resulting from frame-by-frame processing. While the Optical Flow metrics are affected by the lack of camera stabilization and the movement of other objects in the scene, walking distance identifies a more significant number of animals in the confined environment due to identification losses and restarts tracking the same animal, resulting in shorter walking distances than those that occurred. The Unrest Index depends on bird detection, and although it suffers less from the effects of identification loss when the chicken is completely hidden behind some equipment, the loss of that centroid between frames and its reappearance in the next frame increases the value of this metric. However, all methods are sufficiently accurate for automatically monitoring chicken movement.
Previous studies have shown correlations between flock Optical Flow and average individual behavior through specific tests like runway and water tests [
22]. However, the precise individual behavioral mechanisms that give rise to these flock-level patterns and their direct causal relationship with various welfare states are not fully understood [
40].
The primary advantage of using Optical Flow in broiler management lies in its computational simplicity and scalability. By detecting changes in brightness across successive frames, Optical Flow algorithms can capture collective behavior patterns within large groups of birds [
48]. This methodology enables real-time monitoring of broiler movements and behaviors, identifying deviations from expected activity levels that may indicate health or welfare issues [
23]. Flocks with poor welfare outcomes tend to exhibit reduced movement, increased variance in Optical Flow, and a higher percentage of birds displaying abnormal walking behavior [
22]. These findings underscore the potential of Optical Flow as a powerful tool for the early detection of welfare problems, allowing for timely interventions to improve flock health and productivity [
27].
As the poultry industry increasingly adopts precision livestock farming technologies, integrating computer vision and big data analytics will further enhance the predictive capabilities of Optical Flow-based systems. Advances in machine learning and deep learning algorithms will allow for more accurate analysis of complex movement patterns, facilitating a shift toward predictive rather than reactive flock management [
37,
38]. This transition will enable poultry producers to monitor and anticipate welfare issues, contributing to a more sustainable and ethical approach to broiler production [
47].
The bird’s unimpeded movement, lacking any signs of lameness, is a crucial indicator of its overall health, reflecting the optimal functioning of a well-maintained physical form. An animal’s voluntary active participation demonstrates motivation and a sense of well-being [
1,
37]. Consequently, active locomotion can be a reliable indicator of physical well-being and positive emotional welfare.
When comparing the methods, we found the effectiveness of the Unrest Index and Optical Flow methods in detecting movement and correlating it with welfare indicators. Traditional welfare assessments apply the walking distance to infer welfare metrics like gait scores and walking distances, implying that the bird moving, as usual, is in good health [
23]. These methods’ computational simplicity, non-invasiveness, and relevance favor modern farming practices associated with precision livestock farming [
27].
The ability to continuously monitor movement and activity levels allows for the early identification of leg disorders, pododermatitis, or hock burns. These conditions often correlate with decreased mobility and increased inactivity in broiler chickens [
26]. By identifying abnormal movement patterns early, these methods enable timely interventions, such as adjustments to feeding, housing, or temperature, which can prevent the progression of these issues. Leg disorders, a prevalent welfare concern in broilers, are often linked to rapid growth rates and poor walking ability. The present study demonstrates that walking ability, captured through movement metrics like the Unrest Index and Optical Flow, correlates with the birds’ health [
22]. The early detection of reduced mobility supports interventions that reduce pain and prevent the progression to severe leg disorders, thus improving health outcomes.
Automated systems can alert farm managers to potential welfare issues in real time, providing opportunities for quick interventions. This proactive approach can prevent the escalation of welfare problems, leading to healthier flocks and improved productivity [
47]. Van der Eijk et al. [
40] demonstrated high movement detection using Mask R-CNN, which was trained on mixed data, and robust resource tracking via zone classifiers, suggesting a scalable, real-time solution for commercial farms.
Integrating Optical Flow, Unrest Index techniques, and machine learning algorithms can revolutionize precision livestock farming. Optical Flow offers the advantage of real-time analysis without extensive model training. Valuable insights into flock behavior can be extracted by calculating the four variables (mean, variance, skew, and kurtosis) from the recorded videos. The variables could be stored efficiently while the image data can be discarded, reducing storage requirements. In contrast, the Unrest Index requires a prior step for centroid localization, and once obtained, it also discards the original images. Implementing a strategy for automated dataset expansion is crucial to ensure the model’s continued accuracy and adaptability.
A multi-faceted strategy can be employed to harness the strengths of both approaches. Initially, Optical flow algorithms will provide a foundational understanding of overall flock movement patterns. Subsequently, a more granular analysis will be conducted using the Unrest Index and other relevant metrics derived from the YOLO object detection framework. This combined methodology will comprehensively assess flock behavior, capturing subtle and overt movement dynamics.
These methods and data analytics could shift welfare management from reactive to predictive, allowing for more proactive approaches to animal health [
38,
47]. Technologies like Optical Flow contribute significantly to animal welfare assessments by providing a non-invasive, continuous evaluation of their movement behavior. This approach aligns with welfare standards such as the Five Domains Model, which expands traditional welfare assessments beyond the physical to include emotional and mental states [
12]. By enabling real-time monitoring of movement and behavior, Optical Flow can detect signs of discomfort, stress, or pain without requiring intrusive procedures like manual handling, which can cause additional stress to the animals.
Thermal stress has been extensively documented to have detrimental effects on poultry welfare. Elevated temperatures can lead to heat stress, which disrupts normal physiological functions, impairs immune responses, and leads to oxidative stress [
8]. Heat-stressed birds often show lethargy, reduced feed intake, and diminished movement, negatively impacting their welfare. Prolonged exposure to heat stress can result in higher mortality rates, lower productivity, and an increased incidence of welfare issues like leg disorders, as inactivity exacerbates conditions like pododermatitis and hock burns [
4,
26].
In the present study, all three methods have the potential to provide real-time data on movement patterns, enabling the identification of reductions in activity caused by high environmental temperatures. These technologies allow for the early detection of thermal stress, which is linked to welfare outcomes like decreased walking ability and leg health issues. Effective environmental management strategies, particularly those focused on temperature control, play a crucial role in mitigating the negative impacts of thermal stress. Proper ventilation, temperature regulation, and housing design can help maintain conditions within the birds’ thermoneutral zone, thus reducing the likelihood of thermal stress and associated behavioral changes. Ventilation systems that provide consistent airflow can help dissipate excess heat, while automated temperature control systems can adjust heating and cooling mechanisms based on real-time environmental data.
Previous research shows that environmental adjustments, such as improved ventilation or cooling systems (e.g., evaporative cooling), can alleviate thermal stress and promote more natural behavior in broilers, including increased movement and feed intake [
21]. Additionally, providing shaded areas, adjusting stocking densities, and optimizing lighting conditions further support broiler welfare by minimizing environmental stressors that lead to unrest or abnormal behaviors [
20]. The strains (Hybro
®, Cobb
®, and Ross
®) exhibited different behaviors, and these differences in walking patterns could inform selective breeding strategies to enhance welfare outcomes [
3].
The large volumes of data generated by machine vision systems can be integrated with big data analytics and machine learning algorithms to improve decision-making in poultry management [
38]. Machine learning models can be trained to recognize patterns in flock movement data that correlate with specific welfare outcomes, enabling more accurate predictions and interventions. For instance, predictive models could be developed to flag potential health issues based on movement pattern deviations, providing farm managers with actionable insights [
49,
50]. This represents a significant step toward data-driven precision livestock farming, where welfare management is continuously optimized using advanced computational tools [
47].
All three methods leverage inexpensive camera equipment and do not require sophisticated sensors or invasive tracking systems [
29,
43]. These methods make it affordable for farmers to implement automated welfare monitoring systems. In addition, as technology advances, the cost of computational power required to process images is expected to decrease, making it even more accessible to a broader range of poultry producers [
38]. The combination of low-cost hardware and robust software analysis renders all three evaluated methods highly cost-effective solutions for enhancing welfare monitoring in poultry production.
The Unrest Index is sensitive to temperature changes; however, further research could refine its application in varying environmental conditions. Future research should refine the Unrest Index and Optical flow algorithms, particularly in minimizing the impact of the artifacts (e.g., camera stability and feeder movement) and improving sensitivity to welfare changes.
The application of Optical Flow analysis holds significant promise for the automated and continuous assessment of broiler welfare in commercial settings. Current research has successfully demonstrated correlations between flock-level optical flow patterns and key welfare indicators, particularly those related to locomotion and mortality. However, several research gaps must be addressed to leverage this technology fully. Future research should focus on exploring the potential of Optical Flow to predict a broader range of welfare indicators, including early disease detection, stress levels, and thermal comfort. It is also crucial to conduct more comprehensive studies that evaluate the effectiveness of Optical Flow across diverse commercial housing systems, management practices, and geographical locations.
This study evaluated Optical Flow and the Unrest Index independently and does not propose integrating these methods into a single hybrid model. The results highlight the differences between the two approaches. Optical Flow offers rapid, continuous flock-level movement analysis based on the difference in pixel-by-pixel brightness between two frames [
23]. In contrast, the Unrest Index is based on the Hausdorff distance, which is calculated from the centroids of the hens between two frames, to evaluate the movement of the birds [
29].
The Optical Flow approach does not differentiate the objects of interest in the scenes, so it is much more sensitive to variations in the brightness of the equipment and other objects in the scene. Such a characteristic was observed in our results, where the swing of the feeder and the camera’s swing interfered with the observed values. However, the equivalence of the measurements with the other two approaches added to its ease of application and low computational cost, making it a suitable tool for monitoring the movement of flocks of chickens.
The Unrest Index only requires the location of the centroids of the hens. These coordinates can be obtained through several object recognition or image segmentation methods [
29,
42]. In this study, we used the centroids obtained from the bounding boxes of the birds detected via the YOLO model, but it is worth noting that another method could be used. The need to detect birds in scenes makes this tool more accurate than Optical Flow but with a higher application cost. However, there is no need to identify and track the chickens; it is only necessary to recognize their location in the frames. Finally, tracking chickens using YOLO tends to be the most accurate method since, in theory, it allows for the accumulation of distances traveled by each monitored chicken [
15]. We emphasize that this approach would be the most accurate if there were no loss of identification of the chickens due to occlusion of the equipment or in other situations when they are removed from the filming area [
15,
22]. Considering that identifications are lost, this study summarized the distances traveled for the group of chickens and, therefore, lost individual information. It also compared this method for flock monitoring with the other two evaluated methods. Notably, in the absence of an ideal method, strategies for using the available methods for assessing chicken welfare are equally important in the context of precision livestock farming [
22].
These distinct tools can enhance the flexibility and robustness of welfare monitoring strategies within precision livestock farming systems, allowing producers to select the most appropriate method based on specific operational needs and technological constraints. Combining Optical Flow with other sensing technologies and AI-driven analytics offers a promising avenue for developing more holistic and robust welfare monitoring systems.
Future research could benefit from integrating thermal imaging and real-time temperature monitoring to deepen the analysis of environmental influences on broiler behavior. Thermal cameras would allow for detecting microclimate variations within the housing environment, identifying localized areas of heat accumulation or inadequate ventilation. By combining thermal data with Optical Flow and Unrest Index metrics, it would be possible to distinguish behavior changes driven by environmental stressors, such as heat stress, from those caused by internal factors like lameness. Moreover, fusing visual and thermal data through machine learning models could enhance predictive welfare assessments, enabling earlier and more targeted interventions to improve flock health and productivity.
Furthermore, more extensive longitudinal studies that track broiler welfare throughout their lifespan in commercial environments are needed. Finally, a deeper investigation into the specific behavioral correlates of different Optical Flow metrics at both the individual and flock levels is essential for improving the accuracy and interpretability of this technology. Addressing these research gaps will pave the way for developing more effective tools to improve broiler welfare and promote sustainable poultry production.