# Detection of Threats to Farm Animals Using Deep Learning Models: A Comparative Study
## 2 Related Work  
Numerous studies in recent years have proven the impact of advanced imaging and machine learning technologies on agricultural and wildlife monitoring. These technologies have facilitated significant advancements in various applications, such as animal counting, species recognition, and individual animal tracking (Table 1). One innovative work in this area is the machine vision system developed by [PERSON] et al. [13], capable of automatically counting chickens in commercial poultry farms. The system was tested in a facility housing approximately 11,000 laying hens distributed across 37 battery cages. The system collected data using a camera mounted on a feed trough, traversing the length of the cages. It was equipped with a wide-angle lens to encompass all enclosures. The videos processed by a Faster R-CNN--an object detection CNN fed with multi-angle images--applied algorithms designed to detect and track chicken movements within the cages, achieving an accuracy of 89.6% at the cage level, with an average error margin of 2.5 chickens per cage. In the dairy sector, a system based on the YOLO algorithm developed by [PERSON] et al. [14] achieved 96.65% accuracy in the lateral identification of dairy cows on farms. This study enhanced operational efficiency in dairy operations by providing faster and more accurate identification than traditional methods. Focusing on breed differentiation, [PERSON] et al. [15] employed a CNN architecture that achieved over 95% accuracy in distinguishing between Nelore and Canchim breeds. Their study encompassed 1853 images containing 8629 animal samples and tested 15 different CNN architectures, revealing that most models achieved over 95% accuracy, with some deeper architectures like NasNet Large nearing 100% accuracy. This is an essential tool for managing genetic diversity and selective breeding programs. In wildlife monitoring, the system developed by [PERSON] et al. [16], based on the ResNet-18 architecture, was able to automatically classify 48 different species in the Serengeti with over 93.8% accuracy. They trained the networks to identify, count, and describe behaviors of 48 species across 3.2 million images from the Snapshot Serengeti dataset, with the deep neural networks achieving identification accuracy exceeding 93.8%. However, the system could automatically identify animals in 99.3% of the data when only classifying images with high confidence, while crowdsourced teams of human volunteers achieved a performance accuracy of 96.6%. This represents a valuable resource for the conservation of biodiversity and the monitoring of ecosystem health. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Author(s)** & **Year** & **Description** \\ \hline [PERSON] [1] & 2020 & The role of sensors, big data, and machine learning in modern animal farming. \\ \hline [PERSON] et al. [2] & 2017 & The impacts of climate change on livestock: Adaptation and mitigation strategies. \\ \hline [PERSON] et al. [3] & 2011 & Global food demand and the sustainable intensification of agriculture. \\ \hline [PERSON] [4] & 2019 & Trends in livestock and livestock product requirements by 2050. \\ \hline [PERSON] et al. [13] & 2020 & A machine vision system for the automatic counting of chickens in battery cages. \\ \hline [PERSON] et al. [14] & 2020 & Utilization of the YOLO algorithm for the lateral identification of dairy cows \\ \hline [PERSON] et al. [15] & 2019 & A study on cattle detection using UAV imagery with deep learning techniques. \\ \hline [PERSON] et al. [16] & 2018 & Automatic identification, counting, and description of wild animals using \\ \hline [PERSON] et al. [17] & 2018 & Development of an object detection method for dairy goat surveillance in videos. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Chronological overview of key studies in animal detection and farming technologies. Studies on surveillance videos are also noteworthy. A method developed by [PERSON] et al.