# Detection of Threats to Farm Animals Using Deep Learning Models: A Comparative Study
## 5 Discussion  
This research extensively examined the capabilities of deep learning algorithms such as YOLOv8, Yolo-NAS, and Fast-RNN in detecting animal species that could potentially pose threats to farm environments. This study was conducted on various animal images comprising multiple species that could pose potential risks to farm animals. The results showed that each model could detect animals with high accuracy and reliability under real-world conditions. Figure 10: Example YOLOv8 output for detecting wild and farm animals. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Yolo-Nas** & **Yolo v8** & **Fast RNN** \\ \hline BATCH & 16 & 16 & 16 \\ EPOCH & 100 & 100 & 100 \\ DECAY (MS) & 9 & 9 & 9 \\ Weight Decay & 0.9 & 0.9 & None \\ Score Threshold & 0.01 & 0.01 & 0.01 \\ Max Predictions & 300 & 300 & 300 \\ Speed & 1.54/it & 1.42/it & 1.97/it \\ Train Operation Time & 10 h 40 min & 11 h 25 min & 8 h 12 min \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparative overview of training parameters and performance metrics for Yolo-NAS, Yolo v8, and Fast RNN Models. According to the analysis results, the YOLOv8 model demonstrated superior performance, with precision of 93%, recall of 85.2%, and a mAP50 value of 93.1%. This proves that YOLOv8 can successfully detect objects with high accuracy in most cases. On the other hand, while showing a lower precision rate of 52%, the Yolo-NAS model achieved a remarkable recall value of 98.7%, indicating its comprehensive detection ability, especially among a broad and diverse range of species. The Fast-RNN model displayed balanced performance, with precision of 85.2% and recall of 91.8%, reaching an overall effective detection ability, with a mAP50 value of 91.2%. The outcomes of this study highlight the need for a detailed examination of the success of the class-based detection of the relevant algorithms. Specifically, it was determined that algorithms' detection success is significantly high for specific classes, such as birds of prey. This presents significant opportunities for customizing and optimizing algorithms for detecting particular animal types. In evaluating the efficacy of various deep learning models across a multitude of animal detection studies, our research situates itself within a dynamic field characterized by significant variability in model performance, as reflected in the comparative Table 6. For instance, studies leveraging high-capacity networks like NasNet Large and AlexNet, as demonstrated by [PERSON] et al. [15] and [PERSON] et al. [14], reported accuracy levels of 95% and 96.65%, respectively, showcasing their effectiveness in structured environments with relatively uniform subjects such as cattle and dairy cows. Conversely, [PERSON] et al. [13] and [PERSON] et al. [41], employing Faster R-CNN and Scaled-YoloV4, achieved lower accuracies of 89.6% and 82%, respectively. These outcomes may reflect the challenges associated with more complex or heterogeneous datasets, underscoring the necessity for models that can adapt to diverse visual inputs without sacrificing accuracy. Interestingly, the perfect accuracy of 100% reported by [PERSON] et al. [35] using YoloV4 on a dataset of fox images illustrates the potential of finely tuned models to achieve exceptional results in highly specialized settings. Our study, employing YoloV8 on a dataset comprising 2462 images of seven specific animal types, achieved a commendable accuracy of 93%. This positions our findings competitively, particularly when considering the diversity of our dataset, which included