Enterprise-ready security: ISO 27001 + SOC 2 Type I compliant.
No license

Link to this sectionAfrican Wildlife Dataset#

The Ultralytics African Wildlife Dataset is an object detection dataset of 1,504 images across 4 animal classes — buffalo, elephant, rhino, and zebra — commonly found in South African nature reserves. The images are pre-split into 1,052 training, 225 validation, and 227 test images, and the dataset downloads automatically (~100 MB) the first time you train. It is a compact, ready-to-use benchmark for training computer vision models for wildlife monitoring, conservation, and ecological research.



Watch: How to Train Ultralytics YOLO26 on the African Wildlife Dataset | Inference, Metrics & ONNX Export 🐘

Link to this sectionDataset Structure#

The Ultralytics African Wildlife Dataset contains 1,504 images across 4 classes (buffalo, elephant, rhino, and zebra), pre-split into three subsets:

  • Training set: 1,052 images, each with corresponding annotations.
  • Validation set: 225 images, each with paired annotations.
  • Testing set: 227 images, each with paired annotations.
Automatic download

The African Wildlife Dataset (~100 MB) downloads automatically the first time you start training, so no manual download or preparation is required.

Explore African Wildlife on Ultralytics Platform to browse the images with their annotation overlays, view the class distribution and bounding-box heatmaps in the Charts tab, and clone it to train your own model in the cloud.

Link to this sectionApplications#

The Ultralytics African Wildlife Dataset supports a range of object detection applications:

  • Wildlife conservation — detect and count buffalo, elephant, rhino, and zebra to support animal population monitoring in nature reserves and protected areas.
  • Ecological research — study species distribution and behavior across different habitats.
  • Anti-poaching surveillance — flag animals in camera-trap or drone footage over large protected areas.
  • Education and prototyping — a compact four-class dataset for learning model training and prediction.

Link to this sectionDataset YAML#

A YAML file defines the dataset configuration, including paths, classes, and other pertinent details. For the African Wildlife Dataset, the african-wildlife.yaml file is located at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/african-wildlife.yaml.

ultralytics/cfg/datasets/african-wildlife.yaml
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# African Wildlife dataset by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/detect/african-wildlife
# Example usage: yolo train data=african-wildlife.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── african-wildlife ← downloads here (100 MB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: african-wildlife # dataset root dir
train: images/train # train images (relative to 'path') 1052 images
val: images/val # val images (relative to 'path') 225 images
test: images/test # test images (relative to 'path') 227 images

# Classes
names:
  0: buffalo
  1: elephant
  2: rhino
  3: zebra

# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/african-wildlife.zip

Link to this sectionUsage#

To train a YOLO26n model on the African Wildlife Dataset for 100 epochs with an image size of 640, use the provided code samples. For a comprehensive list of available parameters, refer to the model's Training page.

Train Example
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="african-wildlife.yaml", epochs=100, imgsz=640)

Once trained, run inference with the fine-tuned model on new images:

Inference Example
from ultralytics import YOLO

# Load a model
model = YOLO("path/to/best.pt")  # load an African wildlife fine-tuned model

# Inference using the model
results = model.predict("https://ultralytics.com/assets/african-wildlife-sample.jpg")

Link to this sectionSample Images and Annotations#

The African Wildlife Dataset comprises a wide variety of images showcasing diverse animal species and their natural habitats. Below are examples of images from the dataset, each accompanied by its corresponding annotations.

African wildlife dataset sample image

  • Mosaiced Image: Here, we present a training batch consisting of mosaiced dataset images. Mosaicing, a training technique, combines multiple images into one, enriching batch diversity. This method helps enhance the model's ability to generalize across different object sizes, aspect ratios, and contexts.

Link to this sectionCitations, License and Acknowledgments#

We'd like to thank the original dataset author, Bianca Ferreira, for releasing this dataset to the community. The Ultralytics team has updated and adapted it internally so it can be used seamlessly with Ultralytics YOLO models. The source dataset does not specify a license.

If you use this dataset in your research, please cite it using the mentioned details:

Quote

@dataset{Ferreira_African_Wildlife_Ultralytics_Adaptation_2024,
    author  = {Ferreira, Bianca},
    title   = {African Wildlife Detection Dataset (Ultralytics YOLO Adaptation)},
    url     = {https://docs.ultralytics.com/datasets/detect/african-wildlife/},
    note    = {Original dataset by Bianca Ferreira; adapted for Ultralytics YOLO by Glenn Jocher and Muhammad Rizwan Munawar},
    license = {Not specified},
    version = {1.0.0},
    year    = {2024}
}

Link to this sectionFAQ#

Link to this sectionWhat is the African Wildlife Dataset, and how can it be used in computer vision projects?#

The African Wildlife Dataset is an object detection dataset of 1,504 images across 4 animal classes — buffalo, elephant, rhino, and zebra — found in South African nature reserves. It is used to train and evaluate models for identifying African wildlife in images, which supports wildlife conservation, ecological research, and monitoring in natural reserves. It also serves as an accessible resource for students and researchers studying computer vision.

Link to this sectionHow many images and classes are in the African Wildlife Dataset?#

The Ultralytics African Wildlife Dataset contains 1,504 images across 4 classes: buffalo, elephant, rhino, and zebra. The images are pre-split into 1,052 training, 225 validation, and 227 test images, and the dataset downloads automatically (~100 MB) the first time you train.

Link to this sectionHow do I train a YOLO26 model using the African Wildlife Dataset?#

You can train a YOLO26 model on the African Wildlife Dataset by using the african-wildlife.yaml configuration file. Below is an example of how to train the YOLO26n model for 100 epochs with an image size of 640:

Example
from ultralytics import YOLO

# Load a model
model = YOLO("yolo26n.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="african-wildlife.yaml", epochs=100, imgsz=640)

For additional training parameters and options, refer to the Training documentation.

Link to this sectionWhere can I find the YAML configuration file for the African Wildlife Dataset?#

The YAML configuration file for the African Wildlife Dataset, named african-wildlife.yaml, can be found at this GitHub link. This file defines the dataset configuration, including paths, classes, and other details crucial for training machine learning models.

Link to this sectionWhat license is the African Wildlife Dataset released under?#

The source dataset does not specify a license. It was originally published on Kaggle by Bianca Ferreira and adapted by Ultralytics for seamless use with Ultralytics YOLO models. If you use the dataset in your research, please cite it using the BibTeX entry in the Citations section.

Comments