# Real-Time Farm Surveillance Using IoT and YOLOv8 for Animal Intrusion Detection
## 3 Results and Experiments
### Training and Validation of the Models  
In machine learning, \"training\" refers to the critical stage at which a model learns the ability to recognize complex patterns and provide predictions based on an annotated dataset. During this training phase, the model diligently optimizes its internal parameters--weights and biases--by closely examining the input data and comparing its predictions to the unquestionable truths contained in the training dataset. This process is essentially a matter of the model constantly trying to reduce the discrepancy between its predictions and the true values stored in the training dataset. After this stage, \"validation\" takes center stage, because it is the next stage of the model's development. The cornerstone of objectivity, validation aims to understand the model's capabilities in the realm of unknown data. It is a form of critical analysis that takes place when the trained model is exposed to a separate dataset--the validation dataset--that was intentionally omitted from the scope of its original training. This evaluation determines how well the model can generalize its knowledge to deal with new and unobserved cases, which serves as a benchmark for its proficiency.  
The validation dataset acts as a critical assessment tool, apart from the training data, and gives insights into potential flaws such as overfitting. Overfitting happens when a model displays an outstanding performance on training data but becomes unresponsive to fresh data. In the specific context of the agricultural surveillance project, the foundational dataset was applied to rigorously enhance four well-known machine learning models: Inception, Xception, VGG16, and AlexNet.  
These algorithms' ability to decipher the meaning of objects and incursions in the dataset was developed through training. After training, a careful assessment was conducted, putting these models to the ultimate test on a validation dataset. This assessment measured their ability to skillfully extrapolate their learned knowledge and provide predictive identifications when confronted with new and unknown material. Training and validation are inextricably linked processes that must be addressed to develop models proficient in intrusion detection and to safeguard agricultural land.  
Figure 13 provides a detailed analysis of how training and validation accuracies have changed over several epochs for a group of well-known neural network architectures: Inception Net, Xception Net, AlexNet, and VGG16 Net. Both Xception Net and Inception Net exhibit very stable training accuracies, approaching roughly 1.0 over the course of one epoch. Although the validation accuracy of Inception Net does not change at all, that of Xception Net shows a clear upward trend, indicating a good level of model improvement. On the other hand, AlexNet exhibits dramatic fluctuations in its accuracy, suggestive of  
overfitting episodes at particular epochs. VGG16 Net has a high training accuracy to start. But after the fourth epoch, there is a noticeable drop in its validation accuracy, which is indicative of overfitting when compared to a consistently high training accuracy. To summarize, while Inception Net is a model with good stability and resilience, both AlexNet and VGG16 have observable overfitting weaknesses at different points in time.