## 2 Materials and Methods
### Drinking Behavior Detection
For each level perch frame in the scene, the predicted depth is computed as the inverse of its disparity, we converted these to physical depth values using a known reference scale derived from ground truth data. Specifically, the predicted depth was calculated as the inverse of disparity, scaled by a calibration factor determined from the ratio between known true depths and predicted disparities. The scale for each perch frame is determined by the ratio between the true depth and the predicted depth, and the average scale across all perch frames is then calculated. Finally, this average scale is used to convert the predicted depths into actual depths, ensuring alignment within a realistic physical range. To evaluate the accuracy of the DAM in detecting disparity in cage-free facilities, we compared the actual perch depth with the corresponding detected disparity at each level of the perch frame. The root mean square error (RMSE) was calculated to quantifyperformance, where a lower RMSE indicates better accuracy. One-way ANOVA followed by [PERSON]'s Honest Significant Difference (HSD) test was performed using JMP software (JMP Pro 16 for Mac, SAS Institute, Cary, NC, USA) to determine if there were significant differences between the predicted disparity and the actual depth across perch frames. \[RMSE=\sqrt{\frac{1}{n}{\sum_{i=1}^{n}{(\widehat{y}_{i}-y_{i})}^{2}}}\]

where n is the number of observations, \(\widehat{y}_{i}\) is the predicted value, \(y_{i}\) is the actual value, and \(\sum\) represents the summation over all observations. ## 3 Results and Discussion

### Results of Monocular Depth Estimation for Perch Frame Evaluation

To evaluate the performance of the DAM on depth prediction in poultry farms, we used perch frames as a reference due to their fixed height at different levels (from bottom to top: 1 m, 1.6 m, 2 m, 2.4 m, and 2.7 m). A total of 20 images containing the perch frames were used for the evaluation. The results are summarized in the table below (Table 1). Figure 4 presents the depth detection results obtained through the DAM. For each level, the predicted disparity values were calculated. After applying the scale factor of 258.21, the predicted depths were adjusted to reflect real-world physical measurements. The comparison between the predicted and adjusted real depths demonstrates that the model's predictions are closely aligned with the actual perch heights, with minor deviations across different levels [26]. The calculated RMSE between the adjusted depth and the actual depth for the provided data is approximately 0.11 m, indicating that the predicted and adjusted depths are quite close to the actual values, with only a minor error. This result demonstrates that the DAM can accurately predict the depths of perch frames with reasonable precision. This finding is significant for practical applications in cage-free poultry houses, where DAM can be effectively used to predict the depth of various facilities using only RGB camera input. Such depth information can enable further analysis of \begin{table}
\begin{tabular}{l l l l} \hline
**Perch Level** & **Predicted Disparity** & **Adjusted Depth (m)** & **Actual Depth (m)** \\ \hline
1 & 0.00456 & 1.18 & 1.00 \\
2 & 0.00575 & 1.49 & 1.60 \\
3 & 0.00748 & 1.93 & 2.00 \\
4 & 0.00984 & 2.31 & 2.40 \\
5 & 0.01048 & 2.71 & 2.70 \\ \hline \end{tabular}
\end{table} 
Table 1: Predicted and actual depths of perch frames with adjusted predictions. Figure 4: Depth detection of perching frame in poultry using DAM (Depth Anything Model). (**A**) shows the original camera image of poultry perching on a multi-level structure, while (**B**) represents the corresponding depth map generated by DAM. chickens' interactions with these facilities, such as tracking the number of chickens staying around the perches or other equipment. This could contribute to research on flock behavior, welfare, and environmental preferences [27]. One of the major advantages of using DAM in combination with standard RGB cameras is the cost-effectiveness of this setup [28].