Automated Wildlife Monitoring using a YOLOv8-based Object Detection Model for Conservation and Ecological Management Applications

F
Fenglian Hong1
Z
Ziyi Xu2,*
C
Chaofan Ye2,*
1School of Low-Altitude Technology and Service Economics, Quanzhou College of Technology, Fujian, 362200, China.
2School of Rural Revitalization, Fujian Agriculture and Forestry University, Fujian, 350002, China.

Background: Wildlife detection is an important component of biodiversity monitoring and conservation research. Conventional wildlife surveys and manual inspection of camera-trap imagery are labor-intensive and difficult to scale. Deep learning- based object detection provides an opportunity to automate the identification and localization of wildlife in digital images. However, the effectiveness of such models must be evaluated using clearly separated training, validation and independent test data.

Methods: This study evaluates a YOLOv8-based object detection model for four African wildlife species: buffalo, elephant, rhino and zebra. The model was trained using the publicly available African wildlife dataset containing 1,504 annotated images. The dataset was divided into training (1,052 images), validation (225 images) and independent test (227 images) subsets. Data augmentation was applied only to the training subset to improve model generalization. The model was evaluated using precision, recall, mAP@50 and mAP@50-95, together with class-wise analysis, confusion-matrix assessment and qualitative visualization of detection results.

Result: The final evaluation on the held-out test set demonstrated an overall mAP @ 50 of 0.83 and mAP@50-95 of 0.61, with overall precision and recall of 0.80 and 0.75, respectively. Class-wise evaluation showed precision values ranging from 0.780 to 0.923 and recall values from 0.814 to 0.916. Rhino achieved the highest class-wise mAP@50 (0.855), whereas elephant showed the lowest (0.813). The corresponding mAP @ 50-95 values ranged from 0.564 to 0.693. Qualitative examples demonstrated successful detection under variations in animal scale, pose, background complexity and partial occlusion, although these conditions were not evaluated as separate quantitative subgroups.

Global biodiversity and ecological balance depend on the conservation of wildlife. Accurate animal population monitoring promotes species conservation, habitat management and the creation of evidence-based policies (Chand et al., 2025). Traditional monitoring approaches rely on manual surveys, camera trap inspections and direct field observations. These methods are labor-intensive and costly. They are also limited in spatial and temporal coverage and are vulnerable to observer bias and delayed data processing (Zwerts et al., 2021; Fennell et al., 2022).
       
Recent developments in deep learning and computer vision have revolutionized wildlife monitoring techniques. Large amounts of visual data can be processed effectively and reliably using automated object detection models (Axford et al., 2024; Converse et al., 2024; Mulero-Pázmány et al., 2025). This capability has potential value for protected areas requiring large-scale monitoring, although field validation is necessary before operational implementation. Deep learning systems have been successfully applied to images acquired from camera traps, unmanned aerial vehicles and fixed surveillance platforms (Urbano et al., 2023; Van Der Plas et al., 2025).
       
Among object detection frameworks, the you only look once (YOLO) family has demonstrated strong performance in fast object detection applications. YOLO models are single-stage detectors that perform object localization and classification simultaneously, enabling fast inference with high accuracy (Vijayakumar and Vairavasundaram, 2024; Mohammad et al., 2026; Ozçelik et al., 2026). Recent versions, including YOLOv8, introduce architectural enhancements such as improved feature fusion, anchor-free detection and decoupled heads, leading to better training stability and localization precision (Elgamily et al., 2025; ; Paek et al., 2026; Souza et al., 2026; Sriram and Kumari, 2026).
       
Wildlife detection in natural environments remains challenging. Animals vary significantly in size, posture and appearance. Outdoor imagery is affected by changing illumination, shadows and weather conditions (Delplanque et al., 2024; Cho et al., 2024; Kim and AlZubi, 2024). Occlusion from vegetation and background clutter further complicates detection. Large mammals such as elephants, buffalo and rhinos often exhibit visual similarity, increasing inter-class confusion. Robust multi-scale detection strategies are therefore required .
       
DL methods has been used for animal detection in a number of research, although many models have poor generalization and large processing costs (Chen et al., 2019; Raza et al., 2025). In order to recognize lions, tigers, leopards and bears from camera footage, Dave et al., (2023) suggested a real-time wild animal detection system using YOLOv8, obtaining 94.3% mAP at 20 FPS. Verma and Gupta (2018) developed a deep learning framework for camera-trap images, combining graph-cut proposals with DCNN features, achieving 91.4% detection accuracy. However, most existing studies focus on large carnivores or restricted species datasets and there is limited research addressing multi-species detection of African herbivores across diverse habitats and environmental conditions.
       
To address this gap, the present study evaluates a YOLOv8-based object detection framework for four ecologically important African wildlife species: buffalo, elephant, rhino and zebra. The contribution of this study is not the development of a new YOLO architecture, but the systematic application and evaluation of an established YOLOv8 detector on the African Wildlife Dataset using a defined training-validation-test protocol. The study further provides class-wise detection analysis, confusion-matrix assessment, qualitative examination of detection outputs and an evaluation of performance under the visual variability represented in the dataset.
Dataset description
 
This study developed and assessed an object identification model for recognizing common wildlife species in South African nature reserves using the African wildlife dataset (Ferreira, 2019). The dataset was obtained from Kaggle and contains annotated images of four wildlife classes: buffalo, elephant, rhino and zebra. The dataset was downloaded on 03 January 2025 using the version available on Kaggle at the time of acquisition. The original annotations were provided with the dataset in YOLO-compatible format. The dataset license and usage conditions follow those specified by the dataset provider on Kaggle.
       
The dataset includes variations in animal appearance, pose, scale, illumination and background conditions. Such variability provides a suitable basis for evaluating the ability of an object detector to identify wildlife under heterogeneous visual conditions.
       
A total of 1,504 annotated images were used in the study. The dataset was divided into three mutually exclusive subsets: 1,052 images (70.0%) for training, 225 images (15.0%) for validation and 227 images (15.1%) for final testing. The split was generated using a fixed random seed (seed = 0) to ensure reproducibility. Images were randomly assigned to the three subsets before any augmentation was applied. Augmentation was performed exclusively on the training subset after data splitting. The validation and test subsets remained unchanged throughout model development. No images from the test subset were used for model training, hyperparameter selection, or checkpoint selection.
       
Each image was associated with bounding-box annotations in YOLO-compatible format, specifying the class identifier and normalized bounding-box coordinates. The training subset was used to optimize model parameters, while the validation subset was used for monitoring model performance during training and selecting the best-performing checkpoint based only on validation metrics. The independent test subset was reserved for a single final performance assessment after completion of model development. Because this study used a single publicly available dataset, the reported results demonstrate model performance on this benchmark only. Generalization to independent camera-trap, drone, or field-acquired wildlife datasets remains unvalidated and should be experimentally assessed in future studies. Sample images containing bounding-box annotations for buffalo, elephant, rhino and zebra are presented in Fig 1.

Fig 1: Annotated images from dataset.


 
Dataset configuration
 
The dataset was configured using a YAML file (custom.yaml) compatible with the Ultralytics YOLOv8 training framework. The configuration specified the training and validation image directories and the four target wildlife classes. The class labels were defined consistently across the training, validation and test datasets. The model was configured as a four-class object detection problem. The use of the YAML configuration ensured consistent class definitions and dataset paths throughout model training and evaluation.
 
Data augmentation and preprocessing
 
Images were processed using the preprocessing and augmentation pipeline implemented in Ultralytics YOLOv8. All input images were resized/letterboxed to 640 × 640 pixels while maintaining the original aspect ratio. During training, the following augmentation parameters were used according to the recorded YOLOv8 training configuration: horizontal flipping with a probability of 0.5 (fliplr = 0.5), random scaling with a factor of 0.5 (scale = 0.5), translation up to 0.1 (translate = 0.1), HSV hue variation of 0.015 (hsv_h = 0.015), HSV saturation variation of 0.7 (hsv_s = 0.7) and HSV value variation of 0.4 (hsv_v = 0.4). Mosaic augmentation was enabled (mosaic = 1.0) during training. Vertical flipping, rotation, shear, perspective transformation, MixUp and copy-paste augmentation were not used (flipud = 0.0, degrees = 0.0, shear = 0.0, perspective = 0.0, mixup = 0.0 and copy_paste = 0.0).
       
To reduce the influence of aggressive mosaic augmentation during the final stage of training, mosaic augmentation was automatically disabled during the last 10 epochs (close_mosaic = 10). Importantly, augmentation was applied only to the training data; the validation and final test images were evaluated without training-time augmentation. All augmentation operations were applied online only to the training subset during model optimization. Neither the validation subset nor the independent test subset underwent augmentation, ensuring unbiased performance evaluation.
 
Model architecture
 
The YOLOv8n (nano) object detection model from Ultralytics YOLO version 8.0.163 was adopted in this study. The model was initialized using pretrained weights (yolov8n.pt) trained on the MS COCO dataset and subsequently fine-tuned on the African Wildlife dataset. YOLOv8 is a one-stage detector that enables near real-time inference by performing object localization and classification in a single forward pass. The model consists of a convolutional backbone for hierarchical feature extraction, a multi-scale feature-fusion neck and a decoupled detection head for bounding-box regression and classification. The YOLOv8 detection head predicts bounding box distributions, class probabilities and distribution focal loss (DFL)-based localization outputs. The backbone, neck and decoupled detection head of the YOLOv8 architecture utilized for wildlife detection are depicted in Fig 2.

Fig 2: Architecture of the YOLOv8n-based multi-scale wildlife detection model.


 
Input representation
 
In accordance with Ultralytics YOLOv8’s default setting, the input image is shrunk to 640 × 640 × 3. Hierarchical feature extraction is performed by the YOLOv8 backbone. The backbone consists of convolutional layers, batch normalization, SiLU activation functions, C2f modules and an SPPF (Spatial pyramid pooling-fast) block. The SiLU activation function used in YOLOv8 is defined as:
 
Where,
x= The input feature value.
σ (x)= The sigmoid activation function.
       
This activation improves gradient propagation and training stability. It performs well under changing illumination conditions, which are common in outdoor wildlife environments such as forests and grasslands. The backbone employs C2f (Cross stage partial with two convolutions) modules, which improve feature reuse by splitting and merging feature representations while maintaining computational efficiency. Compared to traditional CSP blocks, C2f modules reduce memory consumption while preserving representational capacity. Feature maps are extracted at three spatial scales.
 
{P3, P4, P5} = B (I)
 
Here,
P3= Stride 8 and captures fine-grained details suitable for small animals.
P4= Stride 16 and represents medium-scale features.
P5= Stride 32 and encodes high-level semantic information for large animals.
       
This multi-scale representation is useful for datasets containing animals with different apparent sizes, such as buffalo, elephants, rhinos and zebras.
 
The backbone terminates with SPPF (Spatial pyramid pooling-fast)
 
SPPF increases the receptive field by applying serial max-pooling operations of different kernel sizes.
 

 
This design enhances contextual understanding and improves detection performance in cluttered natural backgrounds.
 
Neck: FPN-PAN feature fusion (YOLOv8 neck)
 
YOLOv8 employs a hybrid feature pyramid network (FPN) and Path Aggregation Network (PAN) structure to achieve multi-scale feature fusion. In the top-down FPN pathway, high-level semantic features are upsampled and concatenated with lower-level spatial features. This improves localization accuracy, particularly for small and partially occluded animals.
       
The bottom-up PAN pathway further aggregates features by combining lower-level spatial information with deeper semantic representations. This enhances feature consistency across different scales and reduces false detections caused by background elements such as vegetation, shadows and terrain textures. Each fused feature representation is refined using C2f modules following the original Ultralytics YOLOv8 architecture. The neck generates multi-scale feature maps.
 
{F3,F4,F5}; Corresponding to stride 8, stride 16 and stride 32 detection scales
 
YOLOv8 adopts an anchor-free decoupled detection head, where bounding box regression and classification are optimized through separate branches. Unlike previous YOLO versions, YOLOv8 does not employ an independent objectness prediction branch. Instead, detection confidence is integrated within the classification and localization formulation. At each scale, the detection head predicts.
 
B=(x,y,w,h),C = (c1 ,c2 ,…,cn)
 
Where,
B= The predicted bounding box coordinates.
C= The class probability vector.
       
YOLOv8 uses an anchor-free bounding box regression strategy in which bounding boxes are predicted using distribution-based localization. The localization loss is optimized using Complete IoU (CIoU) loss and distribution focal loss (DFL). The regression loss is based on complete IoU (CIoU).
 
Where,
ρ= The Euclidean distance between predicted and ground-truth box centers.
c= The diagonal length of the smallest enclosing box and
αv= The aspect ratio consistency term.
 
Class prediction
 
Class probabilities are predicted using sigmoid activation. This formulation supports multi-species wildlife detection within a single model. The classification loss is defined as:
 
Multi-scale wildlife detection strategy
 
Detection heads operate at different spatial resolutions. The P3 head (stride 8) focuses on small or distant animals. The P4 head (stride 16) targets medium-sized animals. The P5 head (stride 32) specializes in large animals such as elephants and buffalo. This hierarchy effectively handles scale variation present in camera-trap and aerial wildlife imagery.
 
Overall loss function
 
The total YOLOv8 training loss is computed as a weighted combination of localization, classification and distribution focal losses.
 
Ltotal = Lbox + Lcls+ LDFL 
 
Where,
Lbox= The CIoU-based bounding box regression loss.
Lcls= The classification loss.
LDFL = The distribution focal loss used for accurate bounding box localization.
       
The YOLOv8n architecture is well suited for wildlife detection because of its efficient backbone, multi-scale feature fusion capability and anchor-free decoupled detection head. These characteristics enable effective detection under challenging conditions involving occlusion, scale variation, illumination changes and complex natural backgrounds.
 
Training procedure
 
The software environment consisted of python 3.10.12, PyTorch 2.0.1+cu118, CUDA 11.8 and Ultralytics YOLO version 8.0.163. Training was conducted on an NVIDIA Tesla T4 GPU with approximately 15 GB of available GPU memory. The YOLOv8n pretrained checkpoint (yolov8n.pt) was used as the initialization point. The model was trained for 25 epochs with a batch size of 16 and an input image size of 640 × 640 pixels. A fixed random seed of 0 was used and deterministic training was enabled. The optimizer was specified as auto in the Ultralytics configuration. The recorded training configuration used an initial learning rate of 0.01 (lr0 = 0.01) and a final learning-rate factor of 0.01 (lrf = 0.01). The momentum parameter was 0.937 and weight decay was 0.0005. The warm-up period was 3 epochs, with warm-up momentum of 0.8 and warm-up bias learning rate of 0.1.
       
Model performance was assessed using standard object-detection metrics, including precision, recall, mean Average Precision at an IoU threshold of 0.50 (mAP@50) and mean Average Precision averaged across IoU thresholds from 0.50 to 0.95 in increments of 0.05 (mAP@50-95). Precision measures the proportion of predicted detections that correspond to correct detections, whereas recall measures the proportion of annotated objects that were successfully detected. mAP@50 evaluates detection performance at an IoU threshold of 0.50, while mAP@50-95 provides a stricter assessment by averaging average precision across multiple IoU thresholds. During model development, performance metrics were computed exclusively on the validation subset after each training epoch to monitor convergence and to select the best-performing model checkpoint. The independent test subset was not accessed during model training or checkpoint selection and was evaluated only once after completion of model development.
       
Unless otherwise specified, object detections were generated using the default Ultralytics confidence threshold (confidence = 0.25) and non-maximum suppression IoU threshold (IoU = 0.70). The confusion matrix was generated using object-level matched detections after applying the confidence threshold (0.25) and non-maximum suppression (IoU = 0.70) implemented in the Ultralytics YOLOv8 validation pipeline. It summarizes classification results for the four wildlife classes only and therefore does not include a separate background category. Unmatched false-positive detections and missed ground-truth objects are incorporated into the reported object-detection metrics (precision, recall, mAP@50 and mAP@50-95) but are not represented as separate background entries in the confusion matrix.
Training loss convergence
 
Fig 3(a) illustrates the evolution of the training losses, including box loss, classification loss and distribution focal loss (DFL), over 25 epochs. All three loss components exhibit a consistent downward trend throughout training, indicating stable optimization and effective learning of object localization and classification features. The box loss decreases from 3.10 in the first epoch to 0.99 at epoch 25, reflecting a substantial improvement in bounding box regression accuracy. Similarly, the classification loss declines from 3.87 to 1.06, demonstrating enhanced class discrimination capability as training progresses. The DFL loss also shows steady convergence, reducing from 4.06 to 1.56, which suggests improved modeling of bounding box distributions and localization confidence. Minor fluctuations observed around epochs 13-15 are typical during intermediate training stages and may be attributed to model adjustments as it learns more complex feature representations. Overall, the smooth convergence of the training loss curves indicates stable optimization during model learning. Because validation loss was not analyzed, these results alone cannot confirm the absence of overfitting. Nevertheless, the stable validation precision, recall and mAP trends indicate consistent validation performance during training; however, they do not replace a dedicated overfitting analysis using validation-loss comparison.

Fig 3: (a) Training loss curves, (b) Validation precision and validation recall across training epochs and (c) Validation mAP @ 50 and validation mAP @ 50-95 across training epochs.


 
Precision and recall performance
 
The precision and recall trends across epochs are presented in Fig 3(b). During the early training stages, both metrics exhibit instability, particularly within the first five epochs, which is expected as the model initially struggles to generalize meaningful object features. Precision improves substantially after epoch 6, increasing from below 0.30 to above 0.80 by the final epoch. This indicates a marked reduction in false positive detections as the model becomes more confident in its predictions. Recall also shows a steady upward trend, rising from near-zero values in the initial epochs to 0.75 at epoch 25. This improvement suggests that the model progressively learns to detect a higher proportion of true objects in the dataset. The balanced growth of both precision and recall implies that the detector achieves an effective trade-off between detection accuracy and completeness, which is crucial for reliable wildlife detection under the evaluated conditions.
 
Mean average precision analysis
 
Fig 3(c) presents the progression of mean average precision (mAP) at different IoU thresholds. The mAP@50 increases sharply from 0.01 in the first epoch to 0.83 at epoch 25, highlighting the model’s strong detection capability under a moderate IoU criterion. In contrast, the mAP@50-95 curve grows more gradually, reaching 0.61 by the final epoch. This behavior is expected, as stricter IoU thresholds demand higher localization accuracy. The widening gap between mAP@50 and mAP@50-95 during early epochs gradually narrows as training progresses, indicating improved bounding box refinement and spatial accuracy. The final validation metrics indicate improved detection and localization performance during training. However, these results reflect performance on the validation subset and do not establish generalization to independent datasets. These results demonstrate that the training configuration enables efficient learning and stable convergence, making the model effective for the evaluated wildlife detection task.
 
Confusion matrix for each class
 
The performance of the African wildlife detection model was evaluated using both a confusion matrix and class-wise detection metrics, including precision, recall and mean Average Precision (mAP). The confusion matrix (Fig 4) summarizes the object-level classification performance of the model across the four target wildlife species: buffalo, elephant, rhino and zebra.

Fig 4: Object-level confusion matrix for the four wildlife classes generated from matched detections after applying a confidence threshold of 0.25 and non-maximum suppression with an IoU threshold of 0.70.


       
Among the four species, zebra recorded the highest number of correctly classified detections, with 275 correctly identified instances. Rhino exhibited the lowest misclassification rate, whereas buffalo showed a comparatively higher number of misclassified instances. Several classification errors were observed between elephant and rhino, while additional errors involved zebra predictions being assigned to elephant and rhino classes. Overall, the confusion matrix indicates that the YOLOv8 model achieved strong class discrimination while maintaining relatively low inter-class confusion across the four wildlife categories.
 
Class-wise detection performance
 
Class-wise detection performance (Table 1) further demonstrates the effectiveness of the YOLOv8-based wildlife detection model. Precision values ranged from 0.780 for elephants to 0.923 for zebras, indicating that most predicted detections corresponded to the correct wildlife classes. Recall values ranged from 0.814 for elephants to 0.916 for rhinos, demonstrating the ability of the model to identify a high proportion of annotated instances for each species.

Table 1: Class-wise detection performance.


       
The mAP@50 values were consistently high across all classes, ranging from 0.813 for elephants to 0.855 for rhinos, indicating reliable object localization at an IoU threshold of 0.50. The stricter mAP@50-95 metric ranged from 0.564 for zebras to 0.693 for rhinos, reflecting the increased difficulty of achieving precise bounding-box localization across multiple IoU thresholds. Among the evaluated classes, rhino achieved the strongest localization performance based on mAP@50-95, while zebra achieved the highest precision value. Elephant detection showed comparatively lower performance, which may be associated with occasional confusion with visually similar large-bodied species.
       
The performance values reported in Table 1 correspond to the standard object-detection evaluation generated by the Ultralytics YOLOv8 validation pipeline after applying the confidence threshold (0.25) and non-maximum suppression (IoU = 0.70). Therefore, precision, recall, mAP@50 and mAP@50-95 incorporate matched detections, unmatched false-positive predictions and missed ground-truth objects according to the object-detection evaluation protocol. These values are not calculated solely from the displayed confusion matrix, which represents matched class predictions only.
 
Qualitative outputs of the YOLO-based wildlife detection model
 
Fig 5 presents representative qualitative outputs of the YOLO-based wildlife detection model on test images. The model successfully detects and localizes multiple African wildlife species, including rhino, buffalo, zebra and elephant, with high confidence scores ranging from 0.86 to 0.93. Bounding boxes are accurately aligned with animal bodies under varying backgrounds, poses and scales.

Fig 5: Qualitative detection results of African wildlife species using the YOLOv8-based object detection model.


       
The qualitative examples illustrate successful detections under varying visual conditions, including differences in animal pose, object scale, partial occlusion and complex natural backgrounds. These observations provide visual evidence of successful model predictions; however, they should not be interpreted as quantitative evidence of robustness because no separate performance analysis based on object size, illumination conditions, or occlusion levels was conducted.
       
The results include examples such as partially occluded rhino and elephant instances, buffalo appearing within vegetation and zebra images captured from different viewpoints. These examples illustrate successful predictions on selected test images but do not represent a complete assessment of model robustness. However, additional evaluation using challenging field conditions and systematically categorized datasets is required to determine the generalization capability of the model under diverse wildlife monitoring scenarios.
       
Representative failure cases, including missed detections, false-positive predictions, low-confidence detections and heavily occluded animals, were also observed during testing but are not comprehensively presented in Fig 5. Future studies should include detailed failure-case analysis and quantitative evaluation across different object sizes, illumination levels, occlusion categories and environmental conditions.
       
Comparison of recent wildlife detection studies highlights differences in models, datasets, species categories and evaluation protocols (Table 2). Senbagam and Bharathi (2024) evaluated a single-stage YOLO-based detector on multiple wildlife species under varying environmental conditions and reported a mAP of 93.8%. Roy et al., (2022) proposed WilDect-YOLO, which incorporated CSPDarknet53, residual and DenseNet-based feature extraction, SPP and modified PANet modules, achieving mAP of 96.89%, F1-score of 97.87%, precision of 97.18% and an inference speed of 59.2 FPS on their dataset. Kim (2026) applied YOLOv8 for tiger detection using 4,413 images from the ATRW dataset and reported a mAP of 0.944. Nagaraj et al., (2025) evaluated YOLOv8 using 9,000 images containing tigers, deer and elephants and reported accuracy of 89.26%, sensitivity of 81.7%, precision of 83.6% and specificity of 91.5%.

Table 2: Comparison of recent wildlife detection studies.


       
The studies included in Table 2 were selected because they addressed wildlife object detection; however, differences in datasets, species categories, annotation protocols, evaluation thresholds and reporting standards prevent direct numerical comparison.
       
However, direct numerical comparison among these studies is challenging because differences exist in dataset size, species composition, annotation procedures, evaluation metrics, IoU thresholds, hardware configurations and experimental protocols. Therefore, the reported values are presented only as contextual information regarding different wildlife detection approaches and should not be interpreted as a definitive ranking of model performance.
       
The present study evaluates YOLOv8n for four African wildlife species: buffalo, elephant, rhino and zebra. The model achieved precision values ranging from 0.780 to 0.923, recall values from 0.814 to 0.916, mAP@50 values from 0.813 to 0.855 and mAP@50-95 values from 0.564 to 0.693. These results demonstrate the detection capability of the YOLOv8n model on the evaluated African Wildlife Dataset under the defined experimental protocol. However, the transferability of these results to other wildlife environments, including independent camera-trap, drone-acquired, or field-collected datasets, remains unvalidated.
       
Several limitations should be considered when interpreting the reported results. First, the model was evaluated using only one publicly available benchmark dataset and external validation using independent wildlife datasets was not performed. Second, inference speed, computational efficiency, model size, memory consumption and energy requirements were not experimentally measured; therefore, real-time deployment capability cannot be concluded from the current study. Finally, comparisons with alternative object detectors, different YOLOv8 variants using the same dataset split and augmentation ablation experiments would provide additional insights into the contribution of model architecture and training strategies and should be investigated in future work.
This study demonstrated the effectiveness of a YOLOv8-based object detection framework for automated monitoring of African wildlife species. The model was trained on a publicly available dataset containing images of buffalo, elephant, rhino and zebra with variation in visual appearance and background conditions. Quantitative evaluation confirmed strong detection performance, with effective precision, recall and mean Average Precision values across all evaluated classes. Class-wise results showed relatively high detection performance for rhino and zebra, while limited confusion was observed between visually similar large mammals such as elephants and buffalo. Despite the promising results, the study has certain limitations. The dataset includes only four species and does not fully capture extreme environmental conditions such as heavy rain, night-time imagery, or dense vegetation. In addition, temporal information was not utilized. Future work should focus on expanding the dataset to include more species, habitats and challenging scenarios. Incorporating temporal tracking, behavior analysis and video-based inputs could further improve monitoring accuracy. Overall, the YOLOv8-based framework demonstrated effective object detection performance on the evaluated African Wildlife Dataset using the defined train-validation-test protocol. Additional validation using independent wildlife datasets, more species, night-time imagery, video-based tracking and edge-device benchmarking will be necessary before practical field deployment can be recommended.
Disclaimers
 
The views and conclusions expressed in this article are solely those of the authors and do not necessarily represent the views of their affiliated institutions. The authors are responsible for the accuracy and completeness of the information provided, but do not accept any liability for any direct or indirect losses resulting from the use of this content.
 
Authors’ contributions
 
All authors contributed toward data analysis, drafting and revising the paper and agreed to be responsible for all the aspects of this work.
 
Funding details
 
This research received no external funding.
 
Data availability
 
The African Wildlife Dataset used in this study is publicly available through Kaggle (https://www.kaggle.com/datasets/biancaferreira/african-wildlife). The dataset was used in accordance with the license and terms of use specified by the original dataset provider. The training configuration, dataset split information and implementation details described in this manuscript are sufficient to reproduce the reported experiments. Source code and trained model weights will be made available by the corresponding author upon reasonable request.

Declarations
 
Authors declare that all works are original and this manuscript has not been published in any other journal.
 
Ethics statement
 
Ethical approval was not required because this study used a publicly available image dataset and did not involve live animals, animal handling, human participants, or collection of new biological data. The original dataset does not provide sensitive geographic location metadata for wildlife species represented in the dataset.
The authors declare that they have no conflict of interest.

  1. Axford, D., Sohel, F., Vanderklift, M. and Hodgson, A. (2024). Collectively advancing deep learning for animal detection in drone imagery: Successes, challenges and research gaps. Ecological Informatics. 83: 102842. https://doi.org/ 10.1016/j.ecoinf.2024.102842.

  2. Chand, H.B., Kumar, A., Vatsala, Joshi, P.R., Gautam, M.K. and Singh, S. (2025). Global Efforts and Framework for Biodiversity Conservation. In: Biodiversity Conservation and Land Degradation Neutrality. [Singh, S. and Gautam, M.K. (Eds.)], Springer. https://doi.org/10.1007/978-981- 96-7210-3_2.

  3. Chen, R., Little, R., Mihaylova, L., Delahay, R. and Cox, R. (2019). Wildlife surveillance using deep learning methods. Ecology and Evolution. 9(17): 9453-9466. https://doi.org/10.1002/ ece3.5410.

  4. Cho, O.H. (2024). Machine learning algorithms for early detection of legume crop disease. Legume Research. 47(3): 463- 469. doi: 10.18805/LRF-788.

  5. Converse, R.L., Lippitt, C.D., Koneff, M.D., White, T.P., Weinstein, B.G., Gibbons, R., Stewart, D.R., Fleishman, A.B., Butler, M.J., Sesnie, S.E. and Harris, G.M. (2024). Remote sensing and machine learning to improve aerial wildlife population surveys. Frontiers in Conservation Science. 5. https:// doi.org/10.3389/fcosc.2024.1416706.

  6. Dave, B., Mori, M., Bathani, A. and Goel, P. (2023). Wild animal detection using YOLOv8. Procedia Computer Science. 230: 100-111. https://doi.org/10.1016/j.procs.2023.12.065.

  7. Delplanque, A., Théau, J., Foucher, S., Serati, G., Durand, S. and Lejeune, P. (2024). Wildlife detection, counting and survey using satellite imagery: Are we there yet? GIScience and Remote Sensing. 61(1). https://doi.org/ 10.1080/15481603.2024.2348863.

  8. Elgamily, K.M., Mohamed, M.A., Abou-Taleb, A.M. and Ata, M.M. (2025). Enhanced object detection in remote sensing images by applying metaheuristic and hybrid metaheuristic optimizers to YOLOv7 and YOLOv8. Scientific Reports. 15(1): 7226. https://doi.org/10.1038/s41598-025-89124-8.

  9. Fennell, M., Beirne, C. and Burton, A. C. (2022). Use of object detection in camera trap image identification: Assessing a method to rapidly and accurately classify human and animal detections for research and application in recreation ecology. Global Ecology and Conservation. 35: e02104. https://doi.org/10.1016/j.gecco.2022.e02104.

  10. Ferreira, B. (2019). African Wildlife Dataset [Access on 03.01.2025]. Kaggle. https://www.kaggle.com/datasets/biancaferreira/ african-wildlife.

  11. Kim, T. (2026). Wild animal tracking for effective wildlife conservation using YOLOv8 and machine learning technologies. Indian Journal of Animal Research. 60(6): 1080-1087. doi: 10.18805/IJAR.BF-2054.

  12. Kim, S.Y. and AlZubi, A.A. (2024). Blockchain and artificial intelligence for ensuring the authenticity of organic legume products in supply chains. Legume Research. 47(7): 1144-1150. doi: 10.18805/LRF-786.

  13. Mohammad, A.A.S., Mohammad, S.I., Vasudevan, A. and Heindric, A. (2026). Intelligent decision support system for crop management using data analytics. Journal of Experimental Biology and Agricultural Sciences. 14(3): 9-14. https:// jebas.org/ojs/index.php/jebas/article/view/3796.

  14. Mulero-Pázmány, M., Hurtado, S., Barba-González, C., Antequera- Gómez, M.L., Díaz-Ruiz, F., Real, R., Navas-Delgado, I. and Aldana-Montes, J.F. (2025). Addressing significant challenges for animal detection in camera trap images: A novel deep learning-based approach. Scientific Reports. 15(1): 16191. https://doi.org/10.1038/s41598-025-90249-z.

  15. Nagaraj, N., Likhitha, R., Indu, B.N. and Manjunath, R.V. (2025). Automated approach for wildlife detection and tracking using YOLOv8 deep learning algorithm. Discover Electronics. 2(1). https://doi.org/10.1007/s44291-025-00126-2.

  16. Ozçelik, H., Sağlam, B. and Öcal, A.S. (2026). New natural methods for combating mold fungi in agricultural products: The isparta example. Bulletin of Pure and Applied Sciences- Botany. 45B(2): 1-17. https://bpasjournals.com/botany/ index.php/journal/article/view/174/150.

  17. Paek, J.J., Kim, J., Bae, S., Paek, K. and Lee, Y. (2026). Chive- fortified fermentation enhances gamma-aminobutyric acid production by Levilactobacillus brevis PL9014. International Journal of Probiotics and Prebiotics. 21(1): 1-6. https://doi.org/10.37290/ijpp.v21i1.12.

  18. Raza, A., Hanif, F. and Mohammed, H.A. (2025). Analyzing the enhancement of CNN-YOLO and transformer based architectures for real-time animal detection in complex ecological environments. Scientific Reports. 15(1): 39142. https://doi.org/10.1038/s41598-025-26645-2.

  19. Roy, A.M., Bhaduri, J., Kumar, T. and Raj, K. (2022). WilDect-YOLO: An efficient and robust computer vision-based accurate object localization model for automated endangered wildlife detection. Ecological Informatics. 75: 101919. https://doi.org/10.1016/j.ecoinf.2022.101919.

  20. Senbagam, B. and Bharathi, S. (2024). Animal Detection in Wildlife Conservation Using Deep Learning. In Lecture Notes in Networks and Systems. (pp. 217-228). https://doi.org/ 10.1007/978-981-97-0744-7_18.

  21. Souza, K.F., Gonçalves, L.C.O. and Espindola, F.S. (2026). A broad overview of the multifaceted royal jelly and its applicability in health and performance. Current Topics in Nutraceutical Research. 24(1): 4-14. https://doi.org/10.37290/ctnr.v24i1.8.

  22. Sriram, P. and Kumari, Y.S. (2026). Game theory in urban birds: A nash equilibrium analysis using crows and pigeons. Bio- Science Research Bulletin. 42(1): 1-6. https://bpasjournals. com/life-sciences/index.php/journal/article/view/150/ 140.

  23. Urbano, F., Viterbi, R., Pedrotti, L., Vettorazzo, E., Movalli, C. and Corlatti, L. (2023). Enhancing biodiversity conservation and monitoring in protected areas through efficient data management. Environmental Monitoring and Assessment. 196(1): 12. https://doi.org/10.1007/s10661-023-11851-0.

  24. Van Der Plas, T.L., Alexander, D.G. and Pocock, M J.O. (2025). Monitoring protected areas by integrating machine learning, remote sensing and citizen science. Ecological Solutions and Evidence. 6(2). https://doi.org/10.1002/2688-8319. 70040.

  25. Verma, G.K. and Gupta, P. (2018). Wild Animal Detection Using Deep Convolutional Neural Network. In Advances in Intelligent Systems and Computing. (pp. 327-338). https:// doi.org/10.1007/978-981-10-7898-9_27.

  26. Vijayakumar, A. and Vairavasundaram, S. (2024). YOLO-based object detection models: A review and its applications. Multimedia Tools and Applications. 83(35): 83535- 83574. https://doi.org/10.1007/s11042-024-18872-y.

  27. Zwerts, J.A., Stephenson, P.J., Maisels, F., Rowcliffe, M., Astaras, C., Jansen, P.A., Van Der Waarde, J., Sterck, L.E.H.M., Verweij, P.A., Bruce, T., Brittain, S. and Van Kuijk, M. (2021). Methods for wildlife monitoring in tropical forests: Comparing human observations, camera traps and passive acoustic sensors. Conservation Science and Practice. 3(12): e568. https://doi.org/10.1111/csp2.568.

Automated Wildlife Monitoring using a YOLOv8-based Object Detection Model for Conservation and Ecological Management Applications

F
Fenglian Hong1
Z
Ziyi Xu2,*
C
Chaofan Ye2,*
1School of Low-Altitude Technology and Service Economics, Quanzhou College of Technology, Fujian, 362200, China.
2School of Rural Revitalization, Fujian Agriculture and Forestry University, Fujian, 350002, China.

Background: Wildlife detection is an important component of biodiversity monitoring and conservation research. Conventional wildlife surveys and manual inspection of camera-trap imagery are labor-intensive and difficult to scale. Deep learning- based object detection provides an opportunity to automate the identification and localization of wildlife in digital images. However, the effectiveness of such models must be evaluated using clearly separated training, validation and independent test data.

Methods: This study evaluates a YOLOv8-based object detection model for four African wildlife species: buffalo, elephant, rhino and zebra. The model was trained using the publicly available African wildlife dataset containing 1,504 annotated images. The dataset was divided into training (1,052 images), validation (225 images) and independent test (227 images) subsets. Data augmentation was applied only to the training subset to improve model generalization. The model was evaluated using precision, recall, mAP@50 and mAP@50-95, together with class-wise analysis, confusion-matrix assessment and qualitative visualization of detection results.

Result: The final evaluation on the held-out test set demonstrated an overall mAP @ 50 of 0.83 and mAP@50-95 of 0.61, with overall precision and recall of 0.80 and 0.75, respectively. Class-wise evaluation showed precision values ranging from 0.780 to 0.923 and recall values from 0.814 to 0.916. Rhino achieved the highest class-wise mAP@50 (0.855), whereas elephant showed the lowest (0.813). The corresponding mAP @ 50-95 values ranged from 0.564 to 0.693. Qualitative examples demonstrated successful detection under variations in animal scale, pose, background complexity and partial occlusion, although these conditions were not evaluated as separate quantitative subgroups.

Global biodiversity and ecological balance depend on the conservation of wildlife. Accurate animal population monitoring promotes species conservation, habitat management and the creation of evidence-based policies (Chand et al., 2025). Traditional monitoring approaches rely on manual surveys, camera trap inspections and direct field observations. These methods are labor-intensive and costly. They are also limited in spatial and temporal coverage and are vulnerable to observer bias and delayed data processing (Zwerts et al., 2021; Fennell et al., 2022).
       
Recent developments in deep learning and computer vision have revolutionized wildlife monitoring techniques. Large amounts of visual data can be processed effectively and reliably using automated object detection models (Axford et al., 2024; Converse et al., 2024; Mulero-Pázmány et al., 2025). This capability has potential value for protected areas requiring large-scale monitoring, although field validation is necessary before operational implementation. Deep learning systems have been successfully applied to images acquired from camera traps, unmanned aerial vehicles and fixed surveillance platforms (Urbano et al., 2023; Van Der Plas et al., 2025).
       
Among object detection frameworks, the you only look once (YOLO) family has demonstrated strong performance in fast object detection applications. YOLO models are single-stage detectors that perform object localization and classification simultaneously, enabling fast inference with high accuracy (Vijayakumar and Vairavasundaram, 2024; Mohammad et al., 2026; Ozçelik et al., 2026). Recent versions, including YOLOv8, introduce architectural enhancements such as improved feature fusion, anchor-free detection and decoupled heads, leading to better training stability and localization precision (Elgamily et al., 2025; ; Paek et al., 2026; Souza et al., 2026; Sriram and Kumari, 2026).
       
Wildlife detection in natural environments remains challenging. Animals vary significantly in size, posture and appearance. Outdoor imagery is affected by changing illumination, shadows and weather conditions (Delplanque et al., 2024; Cho et al., 2024; Kim and AlZubi, 2024). Occlusion from vegetation and background clutter further complicates detection. Large mammals such as elephants, buffalo and rhinos often exhibit visual similarity, increasing inter-class confusion. Robust multi-scale detection strategies are therefore required .
       
DL methods has been used for animal detection in a number of research, although many models have poor generalization and large processing costs (Chen et al., 2019; Raza et al., 2025). In order to recognize lions, tigers, leopards and bears from camera footage, Dave et al., (2023) suggested a real-time wild animal detection system using YOLOv8, obtaining 94.3% mAP at 20 FPS. Verma and Gupta (2018) developed a deep learning framework for camera-trap images, combining graph-cut proposals with DCNN features, achieving 91.4% detection accuracy. However, most existing studies focus on large carnivores or restricted species datasets and there is limited research addressing multi-species detection of African herbivores across diverse habitats and environmental conditions.
       
To address this gap, the present study evaluates a YOLOv8-based object detection framework for four ecologically important African wildlife species: buffalo, elephant, rhino and zebra. The contribution of this study is not the development of a new YOLO architecture, but the systematic application and evaluation of an established YOLOv8 detector on the African Wildlife Dataset using a defined training-validation-test protocol. The study further provides class-wise detection analysis, confusion-matrix assessment, qualitative examination of detection outputs and an evaluation of performance under the visual variability represented in the dataset.
Dataset description
 
This study developed and assessed an object identification model for recognizing common wildlife species in South African nature reserves using the African wildlife dataset (Ferreira, 2019). The dataset was obtained from Kaggle and contains annotated images of four wildlife classes: buffalo, elephant, rhino and zebra. The dataset was downloaded on 03 January 2025 using the version available on Kaggle at the time of acquisition. The original annotations were provided with the dataset in YOLO-compatible format. The dataset license and usage conditions follow those specified by the dataset provider on Kaggle.
       
The dataset includes variations in animal appearance, pose, scale, illumination and background conditions. Such variability provides a suitable basis for evaluating the ability of an object detector to identify wildlife under heterogeneous visual conditions.
       
A total of 1,504 annotated images were used in the study. The dataset was divided into three mutually exclusive subsets: 1,052 images (70.0%) for training, 225 images (15.0%) for validation and 227 images (15.1%) for final testing. The split was generated using a fixed random seed (seed = 0) to ensure reproducibility. Images were randomly assigned to the three subsets before any augmentation was applied. Augmentation was performed exclusively on the training subset after data splitting. The validation and test subsets remained unchanged throughout model development. No images from the test subset were used for model training, hyperparameter selection, or checkpoint selection.
       
Each image was associated with bounding-box annotations in YOLO-compatible format, specifying the class identifier and normalized bounding-box coordinates. The training subset was used to optimize model parameters, while the validation subset was used for monitoring model performance during training and selecting the best-performing checkpoint based only on validation metrics. The independent test subset was reserved for a single final performance assessment after completion of model development. Because this study used a single publicly available dataset, the reported results demonstrate model performance on this benchmark only. Generalization to independent camera-trap, drone, or field-acquired wildlife datasets remains unvalidated and should be experimentally assessed in future studies. Sample images containing bounding-box annotations for buffalo, elephant, rhino and zebra are presented in Fig 1.

Fig 1: Annotated images from dataset.


 
Dataset configuration
 
The dataset was configured using a YAML file (custom.yaml) compatible with the Ultralytics YOLOv8 training framework. The configuration specified the training and validation image directories and the four target wildlife classes. The class labels were defined consistently across the training, validation and test datasets. The model was configured as a four-class object detection problem. The use of the YAML configuration ensured consistent class definitions and dataset paths throughout model training and evaluation.
 
Data augmentation and preprocessing
 
Images were processed using the preprocessing and augmentation pipeline implemented in Ultralytics YOLOv8. All input images were resized/letterboxed to 640 × 640 pixels while maintaining the original aspect ratio. During training, the following augmentation parameters were used according to the recorded YOLOv8 training configuration: horizontal flipping with a probability of 0.5 (fliplr = 0.5), random scaling with a factor of 0.5 (scale = 0.5), translation up to 0.1 (translate = 0.1), HSV hue variation of 0.015 (hsv_h = 0.015), HSV saturation variation of 0.7 (hsv_s = 0.7) and HSV value variation of 0.4 (hsv_v = 0.4). Mosaic augmentation was enabled (mosaic = 1.0) during training. Vertical flipping, rotation, shear, perspective transformation, MixUp and copy-paste augmentation were not used (flipud = 0.0, degrees = 0.0, shear = 0.0, perspective = 0.0, mixup = 0.0 and copy_paste = 0.0).
       
To reduce the influence of aggressive mosaic augmentation during the final stage of training, mosaic augmentation was automatically disabled during the last 10 epochs (close_mosaic = 10). Importantly, augmentation was applied only to the training data; the validation and final test images were evaluated without training-time augmentation. All augmentation operations were applied online only to the training subset during model optimization. Neither the validation subset nor the independent test subset underwent augmentation, ensuring unbiased performance evaluation.
 
Model architecture
 
The YOLOv8n (nano) object detection model from Ultralytics YOLO version 8.0.163 was adopted in this study. The model was initialized using pretrained weights (yolov8n.pt) trained on the MS COCO dataset and subsequently fine-tuned on the African Wildlife dataset. YOLOv8 is a one-stage detector that enables near real-time inference by performing object localization and classification in a single forward pass. The model consists of a convolutional backbone for hierarchical feature extraction, a multi-scale feature-fusion neck and a decoupled detection head for bounding-box regression and classification. The YOLOv8 detection head predicts bounding box distributions, class probabilities and distribution focal loss (DFL)-based localization outputs. The backbone, neck and decoupled detection head of the YOLOv8 architecture utilized for wildlife detection are depicted in Fig 2.

Fig 2: Architecture of the YOLOv8n-based multi-scale wildlife detection model.


 
Input representation
 
In accordance with Ultralytics YOLOv8’s default setting, the input image is shrunk to 640 × 640 × 3. Hierarchical feature extraction is performed by the YOLOv8 backbone. The backbone consists of convolutional layers, batch normalization, SiLU activation functions, C2f modules and an SPPF (Spatial pyramid pooling-fast) block. The SiLU activation function used in YOLOv8 is defined as:
 
Where,
x= The input feature value.
σ (x)= The sigmoid activation function.
       
This activation improves gradient propagation and training stability. It performs well under changing illumination conditions, which are common in outdoor wildlife environments such as forests and grasslands. The backbone employs C2f (Cross stage partial with two convolutions) modules, which improve feature reuse by splitting and merging feature representations while maintaining computational efficiency. Compared to traditional CSP blocks, C2f modules reduce memory consumption while preserving representational capacity. Feature maps are extracted at three spatial scales.
 
{P3, P4, P5} = B (I)
 
Here,
P3= Stride 8 and captures fine-grained details suitable for small animals.
P4= Stride 16 and represents medium-scale features.
P5= Stride 32 and encodes high-level semantic information for large animals.
       
This multi-scale representation is useful for datasets containing animals with different apparent sizes, such as buffalo, elephants, rhinos and zebras.
 
The backbone terminates with SPPF (Spatial pyramid pooling-fast)
 
SPPF increases the receptive field by applying serial max-pooling operations of different kernel sizes.
 

 
This design enhances contextual understanding and improves detection performance in cluttered natural backgrounds.
 
Neck: FPN-PAN feature fusion (YOLOv8 neck)
 
YOLOv8 employs a hybrid feature pyramid network (FPN) and Path Aggregation Network (PAN) structure to achieve multi-scale feature fusion. In the top-down FPN pathway, high-level semantic features are upsampled and concatenated with lower-level spatial features. This improves localization accuracy, particularly for small and partially occluded animals.
       
The bottom-up PAN pathway further aggregates features by combining lower-level spatial information with deeper semantic representations. This enhances feature consistency across different scales and reduces false detections caused by background elements such as vegetation, shadows and terrain textures. Each fused feature representation is refined using C2f modules following the original Ultralytics YOLOv8 architecture. The neck generates multi-scale feature maps.
 
{F3,F4,F5}; Corresponding to stride 8, stride 16 and stride 32 detection scales
 
YOLOv8 adopts an anchor-free decoupled detection head, where bounding box regression and classification are optimized through separate branches. Unlike previous YOLO versions, YOLOv8 does not employ an independent objectness prediction branch. Instead, detection confidence is integrated within the classification and localization formulation. At each scale, the detection head predicts.
 
B=(x,y,w,h),C = (c1 ,c2 ,…,cn)
 
Where,
B= The predicted bounding box coordinates.
C= The class probability vector.
       
YOLOv8 uses an anchor-free bounding box regression strategy in which bounding boxes are predicted using distribution-based localization. The localization loss is optimized using Complete IoU (CIoU) loss and distribution focal loss (DFL). The regression loss is based on complete IoU (CIoU).
 
Where,
ρ= The Euclidean distance between predicted and ground-truth box centers.
c= The diagonal length of the smallest enclosing box and
αv= The aspect ratio consistency term.
 
Class prediction
 
Class probabilities are predicted using sigmoid activation. This formulation supports multi-species wildlife detection within a single model. The classification loss is defined as:
 
Multi-scale wildlife detection strategy
 
Detection heads operate at different spatial resolutions. The P3 head (stride 8) focuses on small or distant animals. The P4 head (stride 16) targets medium-sized animals. The P5 head (stride 32) specializes in large animals such as elephants and buffalo. This hierarchy effectively handles scale variation present in camera-trap and aerial wildlife imagery.
 
Overall loss function
 
The total YOLOv8 training loss is computed as a weighted combination of localization, classification and distribution focal losses.
 
Ltotal = Lbox + Lcls+ LDFL 
 
Where,
Lbox= The CIoU-based bounding box regression loss.
Lcls= The classification loss.
LDFL = The distribution focal loss used for accurate bounding box localization.
       
The YOLOv8n architecture is well suited for wildlife detection because of its efficient backbone, multi-scale feature fusion capability and anchor-free decoupled detection head. These characteristics enable effective detection under challenging conditions involving occlusion, scale variation, illumination changes and complex natural backgrounds.
 
Training procedure
 
The software environment consisted of python 3.10.12, PyTorch 2.0.1+cu118, CUDA 11.8 and Ultralytics YOLO version 8.0.163. Training was conducted on an NVIDIA Tesla T4 GPU with approximately 15 GB of available GPU memory. The YOLOv8n pretrained checkpoint (yolov8n.pt) was used as the initialization point. The model was trained for 25 epochs with a batch size of 16 and an input image size of 640 × 640 pixels. A fixed random seed of 0 was used and deterministic training was enabled. The optimizer was specified as auto in the Ultralytics configuration. The recorded training configuration used an initial learning rate of 0.01 (lr0 = 0.01) and a final learning-rate factor of 0.01 (lrf = 0.01). The momentum parameter was 0.937 and weight decay was 0.0005. The warm-up period was 3 epochs, with warm-up momentum of 0.8 and warm-up bias learning rate of 0.1.
       
Model performance was assessed using standard object-detection metrics, including precision, recall, mean Average Precision at an IoU threshold of 0.50 (mAP@50) and mean Average Precision averaged across IoU thresholds from 0.50 to 0.95 in increments of 0.05 (mAP@50-95). Precision measures the proportion of predicted detections that correspond to correct detections, whereas recall measures the proportion of annotated objects that were successfully detected. mAP@50 evaluates detection performance at an IoU threshold of 0.50, while mAP@50-95 provides a stricter assessment by averaging average precision across multiple IoU thresholds. During model development, performance metrics were computed exclusively on the validation subset after each training epoch to monitor convergence and to select the best-performing model checkpoint. The independent test subset was not accessed during model training or checkpoint selection and was evaluated only once after completion of model development.
       
Unless otherwise specified, object detections were generated using the default Ultralytics confidence threshold (confidence = 0.25) and non-maximum suppression IoU threshold (IoU = 0.70). The confusion matrix was generated using object-level matched detections after applying the confidence threshold (0.25) and non-maximum suppression (IoU = 0.70) implemented in the Ultralytics YOLOv8 validation pipeline. It summarizes classification results for the four wildlife classes only and therefore does not include a separate background category. Unmatched false-positive detections and missed ground-truth objects are incorporated into the reported object-detection metrics (precision, recall, mAP@50 and mAP@50-95) but are not represented as separate background entries in the confusion matrix.
Training loss convergence
 
Fig 3(a) illustrates the evolution of the training losses, including box loss, classification loss and distribution focal loss (DFL), over 25 epochs. All three loss components exhibit a consistent downward trend throughout training, indicating stable optimization and effective learning of object localization and classification features. The box loss decreases from 3.10 in the first epoch to 0.99 at epoch 25, reflecting a substantial improvement in bounding box regression accuracy. Similarly, the classification loss declines from 3.87 to 1.06, demonstrating enhanced class discrimination capability as training progresses. The DFL loss also shows steady convergence, reducing from 4.06 to 1.56, which suggests improved modeling of bounding box distributions and localization confidence. Minor fluctuations observed around epochs 13-15 are typical during intermediate training stages and may be attributed to model adjustments as it learns more complex feature representations. Overall, the smooth convergence of the training loss curves indicates stable optimization during model learning. Because validation loss was not analyzed, these results alone cannot confirm the absence of overfitting. Nevertheless, the stable validation precision, recall and mAP trends indicate consistent validation performance during training; however, they do not replace a dedicated overfitting analysis using validation-loss comparison.

Fig 3: (a) Training loss curves, (b) Validation precision and validation recall across training epochs and (c) Validation mAP @ 50 and validation mAP @ 50-95 across training epochs.


 
Precision and recall performance
 
The precision and recall trends across epochs are presented in Fig 3(b). During the early training stages, both metrics exhibit instability, particularly within the first five epochs, which is expected as the model initially struggles to generalize meaningful object features. Precision improves substantially after epoch 6, increasing from below 0.30 to above 0.80 by the final epoch. This indicates a marked reduction in false positive detections as the model becomes more confident in its predictions. Recall also shows a steady upward trend, rising from near-zero values in the initial epochs to 0.75 at epoch 25. This improvement suggests that the model progressively learns to detect a higher proportion of true objects in the dataset. The balanced growth of both precision and recall implies that the detector achieves an effective trade-off between detection accuracy and completeness, which is crucial for reliable wildlife detection under the evaluated conditions.
 
Mean average precision analysis
 
Fig 3(c) presents the progression of mean average precision (mAP) at different IoU thresholds. The mAP@50 increases sharply from 0.01 in the first epoch to 0.83 at epoch 25, highlighting the model’s strong detection capability under a moderate IoU criterion. In contrast, the mAP@50-95 curve grows more gradually, reaching 0.61 by the final epoch. This behavior is expected, as stricter IoU thresholds demand higher localization accuracy. The widening gap between mAP@50 and mAP@50-95 during early epochs gradually narrows as training progresses, indicating improved bounding box refinement and spatial accuracy. The final validation metrics indicate improved detection and localization performance during training. However, these results reflect performance on the validation subset and do not establish generalization to independent datasets. These results demonstrate that the training configuration enables efficient learning and stable convergence, making the model effective for the evaluated wildlife detection task.
 
Confusion matrix for each class
 
The performance of the African wildlife detection model was evaluated using both a confusion matrix and class-wise detection metrics, including precision, recall and mean Average Precision (mAP). The confusion matrix (Fig 4) summarizes the object-level classification performance of the model across the four target wildlife species: buffalo, elephant, rhino and zebra.

Fig 4: Object-level confusion matrix for the four wildlife classes generated from matched detections after applying a confidence threshold of 0.25 and non-maximum suppression with an IoU threshold of 0.70.


       
Among the four species, zebra recorded the highest number of correctly classified detections, with 275 correctly identified instances. Rhino exhibited the lowest misclassification rate, whereas buffalo showed a comparatively higher number of misclassified instances. Several classification errors were observed between elephant and rhino, while additional errors involved zebra predictions being assigned to elephant and rhino classes. Overall, the confusion matrix indicates that the YOLOv8 model achieved strong class discrimination while maintaining relatively low inter-class confusion across the four wildlife categories.
 
Class-wise detection performance
 
Class-wise detection performance (Table 1) further demonstrates the effectiveness of the YOLOv8-based wildlife detection model. Precision values ranged from 0.780 for elephants to 0.923 for zebras, indicating that most predicted detections corresponded to the correct wildlife classes. Recall values ranged from 0.814 for elephants to 0.916 for rhinos, demonstrating the ability of the model to identify a high proportion of annotated instances for each species.

Table 1: Class-wise detection performance.


       
The mAP@50 values were consistently high across all classes, ranging from 0.813 for elephants to 0.855 for rhinos, indicating reliable object localization at an IoU threshold of 0.50. The stricter mAP@50-95 metric ranged from 0.564 for zebras to 0.693 for rhinos, reflecting the increased difficulty of achieving precise bounding-box localization across multiple IoU thresholds. Among the evaluated classes, rhino achieved the strongest localization performance based on mAP@50-95, while zebra achieved the highest precision value. Elephant detection showed comparatively lower performance, which may be associated with occasional confusion with visually similar large-bodied species.
       
The performance values reported in Table 1 correspond to the standard object-detection evaluation generated by the Ultralytics YOLOv8 validation pipeline after applying the confidence threshold (0.25) and non-maximum suppression (IoU = 0.70). Therefore, precision, recall, mAP@50 and mAP@50-95 incorporate matched detections, unmatched false-positive predictions and missed ground-truth objects according to the object-detection evaluation protocol. These values are not calculated solely from the displayed confusion matrix, which represents matched class predictions only.
 
Qualitative outputs of the YOLO-based wildlife detection model
 
Fig 5 presents representative qualitative outputs of the YOLO-based wildlife detection model on test images. The model successfully detects and localizes multiple African wildlife species, including rhino, buffalo, zebra and elephant, with high confidence scores ranging from 0.86 to 0.93. Bounding boxes are accurately aligned with animal bodies under varying backgrounds, poses and scales.

Fig 5: Qualitative detection results of African wildlife species using the YOLOv8-based object detection model.


       
The qualitative examples illustrate successful detections under varying visual conditions, including differences in animal pose, object scale, partial occlusion and complex natural backgrounds. These observations provide visual evidence of successful model predictions; however, they should not be interpreted as quantitative evidence of robustness because no separate performance analysis based on object size, illumination conditions, or occlusion levels was conducted.
       
The results include examples such as partially occluded rhino and elephant instances, buffalo appearing within vegetation and zebra images captured from different viewpoints. These examples illustrate successful predictions on selected test images but do not represent a complete assessment of model robustness. However, additional evaluation using challenging field conditions and systematically categorized datasets is required to determine the generalization capability of the model under diverse wildlife monitoring scenarios.
       
Representative failure cases, including missed detections, false-positive predictions, low-confidence detections and heavily occluded animals, were also observed during testing but are not comprehensively presented in Fig 5. Future studies should include detailed failure-case analysis and quantitative evaluation across different object sizes, illumination levels, occlusion categories and environmental conditions.
       
Comparison of recent wildlife detection studies highlights differences in models, datasets, species categories and evaluation protocols (Table 2). Senbagam and Bharathi (2024) evaluated a single-stage YOLO-based detector on multiple wildlife species under varying environmental conditions and reported a mAP of 93.8%. Roy et al., (2022) proposed WilDect-YOLO, which incorporated CSPDarknet53, residual and DenseNet-based feature extraction, SPP and modified PANet modules, achieving mAP of 96.89%, F1-score of 97.87%, precision of 97.18% and an inference speed of 59.2 FPS on their dataset. Kim (2026) applied YOLOv8 for tiger detection using 4,413 images from the ATRW dataset and reported a mAP of 0.944. Nagaraj et al., (2025) evaluated YOLOv8 using 9,000 images containing tigers, deer and elephants and reported accuracy of 89.26%, sensitivity of 81.7%, precision of 83.6% and specificity of 91.5%.

Table 2: Comparison of recent wildlife detection studies.


       
The studies included in Table 2 were selected because they addressed wildlife object detection; however, differences in datasets, species categories, annotation protocols, evaluation thresholds and reporting standards prevent direct numerical comparison.
       
However, direct numerical comparison among these studies is challenging because differences exist in dataset size, species composition, annotation procedures, evaluation metrics, IoU thresholds, hardware configurations and experimental protocols. Therefore, the reported values are presented only as contextual information regarding different wildlife detection approaches and should not be interpreted as a definitive ranking of model performance.
       
The present study evaluates YOLOv8n for four African wildlife species: buffalo, elephant, rhino and zebra. The model achieved precision values ranging from 0.780 to 0.923, recall values from 0.814 to 0.916, mAP@50 values from 0.813 to 0.855 and mAP@50-95 values from 0.564 to 0.693. These results demonstrate the detection capability of the YOLOv8n model on the evaluated African Wildlife Dataset under the defined experimental protocol. However, the transferability of these results to other wildlife environments, including independent camera-trap, drone-acquired, or field-collected datasets, remains unvalidated.
       
Several limitations should be considered when interpreting the reported results. First, the model was evaluated using only one publicly available benchmark dataset and external validation using independent wildlife datasets was not performed. Second, inference speed, computational efficiency, model size, memory consumption and energy requirements were not experimentally measured; therefore, real-time deployment capability cannot be concluded from the current study. Finally, comparisons with alternative object detectors, different YOLOv8 variants using the same dataset split and augmentation ablation experiments would provide additional insights into the contribution of model architecture and training strategies and should be investigated in future work.
This study demonstrated the effectiveness of a YOLOv8-based object detection framework for automated monitoring of African wildlife species. The model was trained on a publicly available dataset containing images of buffalo, elephant, rhino and zebra with variation in visual appearance and background conditions. Quantitative evaluation confirmed strong detection performance, with effective precision, recall and mean Average Precision values across all evaluated classes. Class-wise results showed relatively high detection performance for rhino and zebra, while limited confusion was observed between visually similar large mammals such as elephants and buffalo. Despite the promising results, the study has certain limitations. The dataset includes only four species and does not fully capture extreme environmental conditions such as heavy rain, night-time imagery, or dense vegetation. In addition, temporal information was not utilized. Future work should focus on expanding the dataset to include more species, habitats and challenging scenarios. Incorporating temporal tracking, behavior analysis and video-based inputs could further improve monitoring accuracy. Overall, the YOLOv8-based framework demonstrated effective object detection performance on the evaluated African Wildlife Dataset using the defined train-validation-test protocol. Additional validation using independent wildlife datasets, more species, night-time imagery, video-based tracking and edge-device benchmarking will be necessary before practical field deployment can be recommended.
Disclaimers
 
The views and conclusions expressed in this article are solely those of the authors and do not necessarily represent the views of their affiliated institutions. The authors are responsible for the accuracy and completeness of the information provided, but do not accept any liability for any direct or indirect losses resulting from the use of this content.
 
Authors’ contributions
 
All authors contributed toward data analysis, drafting and revising the paper and agreed to be responsible for all the aspects of this work.
 
Funding details
 
This research received no external funding.
 
Data availability
 
The African Wildlife Dataset used in this study is publicly available through Kaggle (https://www.kaggle.com/datasets/biancaferreira/african-wildlife). The dataset was used in accordance with the license and terms of use specified by the original dataset provider. The training configuration, dataset split information and implementation details described in this manuscript are sufficient to reproduce the reported experiments. Source code and trained model weights will be made available by the corresponding author upon reasonable request.

Declarations
 
Authors declare that all works are original and this manuscript has not been published in any other journal.
 
Ethics statement
 
Ethical approval was not required because this study used a publicly available image dataset and did not involve live animals, animal handling, human participants, or collection of new biological data. The original dataset does not provide sensitive geographic location metadata for wildlife species represented in the dataset.
The authors declare that they have no conflict of interest.

  1. Axford, D., Sohel, F., Vanderklift, M. and Hodgson, A. (2024). Collectively advancing deep learning for animal detection in drone imagery: Successes, challenges and research gaps. Ecological Informatics. 83: 102842. https://doi.org/ 10.1016/j.ecoinf.2024.102842.

  2. Chand, H.B., Kumar, A., Vatsala, Joshi, P.R., Gautam, M.K. and Singh, S. (2025). Global Efforts and Framework for Biodiversity Conservation. In: Biodiversity Conservation and Land Degradation Neutrality. [Singh, S. and Gautam, M.K. (Eds.)], Springer. https://doi.org/10.1007/978-981- 96-7210-3_2.

  3. Chen, R., Little, R., Mihaylova, L., Delahay, R. and Cox, R. (2019). Wildlife surveillance using deep learning methods. Ecology and Evolution. 9(17): 9453-9466. https://doi.org/10.1002/ ece3.5410.

  4. Cho, O.H. (2024). Machine learning algorithms for early detection of legume crop disease. Legume Research. 47(3): 463- 469. doi: 10.18805/LRF-788.

  5. Converse, R.L., Lippitt, C.D., Koneff, M.D., White, T.P., Weinstein, B.G., Gibbons, R., Stewart, D.R., Fleishman, A.B., Butler, M.J., Sesnie, S.E. and Harris, G.M. (2024). Remote sensing and machine learning to improve aerial wildlife population surveys. Frontiers in Conservation Science. 5. https:// doi.org/10.3389/fcosc.2024.1416706.

  6. Dave, B., Mori, M., Bathani, A. and Goel, P. (2023). Wild animal detection using YOLOv8. Procedia Computer Science. 230: 100-111. https://doi.org/10.1016/j.procs.2023.12.065.

  7. Delplanque, A., Théau, J., Foucher, S., Serati, G., Durand, S. and Lejeune, P. (2024). Wildlife detection, counting and survey using satellite imagery: Are we there yet? GIScience and Remote Sensing. 61(1). https://doi.org/ 10.1080/15481603.2024.2348863.

  8. Elgamily, K.M., Mohamed, M.A., Abou-Taleb, A.M. and Ata, M.M. (2025). Enhanced object detection in remote sensing images by applying metaheuristic and hybrid metaheuristic optimizers to YOLOv7 and YOLOv8. Scientific Reports. 15(1): 7226. https://doi.org/10.1038/s41598-025-89124-8.

  9. Fennell, M., Beirne, C. and Burton, A. C. (2022). Use of object detection in camera trap image identification: Assessing a method to rapidly and accurately classify human and animal detections for research and application in recreation ecology. Global Ecology and Conservation. 35: e02104. https://doi.org/10.1016/j.gecco.2022.e02104.

  10. Ferreira, B. (2019). African Wildlife Dataset [Access on 03.01.2025]. Kaggle. https://www.kaggle.com/datasets/biancaferreira/ african-wildlife.

  11. Kim, T. (2026). Wild animal tracking for effective wildlife conservation using YOLOv8 and machine learning technologies. Indian Journal of Animal Research. 60(6): 1080-1087. doi: 10.18805/IJAR.BF-2054.

  12. Kim, S.Y. and AlZubi, A.A. (2024). Blockchain and artificial intelligence for ensuring the authenticity of organic legume products in supply chains. Legume Research. 47(7): 1144-1150. doi: 10.18805/LRF-786.

  13. Mohammad, A.A.S., Mohammad, S.I., Vasudevan, A. and Heindric, A. (2026). Intelligent decision support system for crop management using data analytics. Journal of Experimental Biology and Agricultural Sciences. 14(3): 9-14. https:// jebas.org/ojs/index.php/jebas/article/view/3796.

  14. Mulero-Pázmány, M., Hurtado, S., Barba-González, C., Antequera- Gómez, M.L., Díaz-Ruiz, F., Real, R., Navas-Delgado, I. and Aldana-Montes, J.F. (2025). Addressing significant challenges for animal detection in camera trap images: A novel deep learning-based approach. Scientific Reports. 15(1): 16191. https://doi.org/10.1038/s41598-025-90249-z.

  15. Nagaraj, N., Likhitha, R., Indu, B.N. and Manjunath, R.V. (2025). Automated approach for wildlife detection and tracking using YOLOv8 deep learning algorithm. Discover Electronics. 2(1). https://doi.org/10.1007/s44291-025-00126-2.

  16. Ozçelik, H., Sağlam, B. and Öcal, A.S. (2026). New natural methods for combating mold fungi in agricultural products: The isparta example. Bulletin of Pure and Applied Sciences- Botany. 45B(2): 1-17. https://bpasjournals.com/botany/ index.php/journal/article/view/174/150.

  17. Paek, J.J., Kim, J., Bae, S., Paek, K. and Lee, Y. (2026). Chive- fortified fermentation enhances gamma-aminobutyric acid production by Levilactobacillus brevis PL9014. International Journal of Probiotics and Prebiotics. 21(1): 1-6. https://doi.org/10.37290/ijpp.v21i1.12.

  18. Raza, A., Hanif, F. and Mohammed, H.A. (2025). Analyzing the enhancement of CNN-YOLO and transformer based architectures for real-time animal detection in complex ecological environments. Scientific Reports. 15(1): 39142. https://doi.org/10.1038/s41598-025-26645-2.

  19. Roy, A.M., Bhaduri, J., Kumar, T. and Raj, K. (2022). WilDect-YOLO: An efficient and robust computer vision-based accurate object localization model for automated endangered wildlife detection. Ecological Informatics. 75: 101919. https://doi.org/10.1016/j.ecoinf.2022.101919.

  20. Senbagam, B. and Bharathi, S. (2024). Animal Detection in Wildlife Conservation Using Deep Learning. In Lecture Notes in Networks and Systems. (pp. 217-228). https://doi.org/ 10.1007/978-981-97-0744-7_18.

  21. Souza, K.F., Gonçalves, L.C.O. and Espindola, F.S. (2026). A broad overview of the multifaceted royal jelly and its applicability in health and performance. Current Topics in Nutraceutical Research. 24(1): 4-14. https://doi.org/10.37290/ctnr.v24i1.8.

  22. Sriram, P. and Kumari, Y.S. (2026). Game theory in urban birds: A nash equilibrium analysis using crows and pigeons. Bio- Science Research Bulletin. 42(1): 1-6. https://bpasjournals. com/life-sciences/index.php/journal/article/view/150/ 140.

  23. Urbano, F., Viterbi, R., Pedrotti, L., Vettorazzo, E., Movalli, C. and Corlatti, L. (2023). Enhancing biodiversity conservation and monitoring in protected areas through efficient data management. Environmental Monitoring and Assessment. 196(1): 12. https://doi.org/10.1007/s10661-023-11851-0.

  24. Van Der Plas, T.L., Alexander, D.G. and Pocock, M J.O. (2025). Monitoring protected areas by integrating machine learning, remote sensing and citizen science. Ecological Solutions and Evidence. 6(2). https://doi.org/10.1002/2688-8319. 70040.

  25. Verma, G.K. and Gupta, P. (2018). Wild Animal Detection Using Deep Convolutional Neural Network. In Advances in Intelligent Systems and Computing. (pp. 327-338). https:// doi.org/10.1007/978-981-10-7898-9_27.

  26. Vijayakumar, A. and Vairavasundaram, S. (2024). YOLO-based object detection models: A review and its applications. Multimedia Tools and Applications. 83(35): 83535- 83574. https://doi.org/10.1007/s11042-024-18872-y.

  27. Zwerts, J.A., Stephenson, P.J., Maisels, F., Rowcliffe, M., Astaras, C., Jansen, P.A., Van Der Waarde, J., Sterck, L.E.H.M., Verweij, P.A., Bruce, T., Brittain, S. and Van Kuijk, M. (2021). Methods for wildlife monitoring in tropical forests: Comparing human observations, camera traps and passive acoustic sensors. Conservation Science and Practice. 3(12): e568. https://doi.org/10.1111/csp2.568.
In this Article
Published In
Indian Journal of Animal Research

Editorial Board

View all (0)