# Real-Time Farm Surveillance Using IoT and YOLOv8 for Animal Intrusion Detection
## 2 Methodology and Implementation
### Intrusion Detection
#### 2.1.7 Versions of YOLO Used  
* YOLOv6: A result of the development of the YOLO (You Only Look Once) family, YOLOv6 is renowned for its ability to accurately and quickly detect objects in real time. With an emphasis on more effective feature extraction and computational efficiency, YOLOv6 introduces network architectural advancements that yield a strong performance across various object identification applications. Its streamlined design makes it a valuable asset in the realm of efficient computer vision applications, enabling rapid deployment in systems requiring real-time analysis, such as autonomous vehicles or surveillance. * YOLOv7: You Only Look Once (YOLO) is a prominent real-time object identification system that has transformed the field of computer vision. Developed by [PERSON] and his colleagues at Roboflow, YOLOv7 is distinguished by its exceptional speed and accuracy in recognizing multiple objects within images or video streams. The evolution of YOLOv7 has been characterized by a series of incremental improvements, with each iteration enhancing the capabilities of the previous version. This model emerged from collaborative efforts within the computer vision community to address the challenges of object detection. From YOLOv1 to YOLOv7, the model underwent rigorous optimization techniques to achieve enhanced accuracy and speed. Advances in deep learning algorithms and hardware acceleration have significantly contributed to the development of YOLOv7. The architecture of YOLOv7 is notable for its simplicity and efficacy. The model is built on a single deep neural network capable of real-time object recognition. YOLOv7 employs a CNN architecture comprising a base network (e.g., CSPDarknet53 or CSPDarknet53-slim) and a detection head with multiple detection layers. These layers predict bounding boxes, class probabilities, and objectness scores for the objects present in the input image, resulting in a comprehensive list of identified items, complete with confidence ratings and class labels. * YOLOv8: The latest iteration of the YOLO series, YOLOv8, further advances the capabilities of real-time object detection. Building upon the strengths of its predecessors, YOLOv8 is designed for enhanced accuracy and efficiency in diverse application contexts. This model incorporates cutting-edge feature extraction techniques and employs advanced deep learning algorithms, resulting in significant improvements in both detection speed and precision. The architecture of YOLOv8 features an optimized deep neural network that facilitates rapid object recognition. It includes a refined CNN backbone, which enhances the model's ability to extract relevant features while maintaining computational efficiency. YOLOv8's detection head is equipped with sophisticated layers that predict bounding boxes, class probabilities, and objectness scores, similar to previous versions but with increased accuracy due to its enhanced training methodologies. Notably, YOLOv8 excels in real-time applications, making it suitable for environments such as autonomous driving and smart surveillance systems. Its robust performance and adaptability ensure that it remains at the forefront of object detection technology, responding effectively to the evolving demands of the computer vision landscape. Figure 8 shows the YOLOv7 deep learning model's architecture for object recognition. The backbone, neck, and prediction heads make up the three fundamental components of the model's design. Backbone: This section extracts features from the input image by processing it through a series of layers. The layers contain CBS (Convolution-BatchNorm-SiLU/ReLU) blocks, which use a nonlinear activation function for efficiency and stabilization after the convolutions are applied for feature extraction and batch normalization. To reduce spatial dimensions, Max Pooling (MP) layers are interspersed with ELAN blocks, which are used to improve the network's learning and representational capability. Figure 8: Architecture of YOLOv7 [27].