企业级安全保障: 符合 ISO 27001 + SOC 2 Type I 标准。
No license

Link to this sectionAfrican Wildlife 数据集#

Ultralytics African Wildlife 数据集是一个包含 1,504 张图像的目标检测数据集,涵盖了南非自然保护区中常见的 4 种动物类别——水牛 (buffalo)、大象 (elephant)、犀牛 (rhino) 和斑马 (zebra)。这些图像预先划分为 1,052 张训练集、225 张验证集和 227 张测试集图像,数据集会在你首次训练时自动下载(约 100 MB)。它是一个紧凑、开箱即用的基准,用于训练计算机视觉模型,以进行野生动物监测、保护和生态研究。



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

Link to this section数据集结构#

Ultralytics African Wildlife 数据集包含 1,504 张图像,涵盖 4 个类别(水牛、大象、犀牛和斑马),预先划分为三个子集:

  • 训练集:1,052 张图像,每张都有相应的标注。
  • 验证集:225 张图像,每张都有对应的标注。
  • 测试集:227 张图像,每张都有对应的标注。
自动下载

African Wildlife 数据集(约 100 MB)会在你首次开始训练时自动下载,因此无需手动下载或准备。

浏览 Ultralytics 平台上的 African Wildlife 以查看带有标注覆盖图的图像,在 Charts 选项卡中查看类别分布和边界框热图,并将其克隆到云端以训练你自己的模型。

Link to this section应用#

Ultralytics African Wildlife 数据集支持多种目标检测应用:

  • 野生动物保护 — 检测并统计水牛、大象、犀牛和斑马,以支持自然保护区和受保护区域的动物种群监测
  • 生态研究 — 研究不同栖息地中物种的分布和行为。
  • 防盗猎监控 — 在大片保护区的红外相机或无人机拍摄的画面中标记动物。
  • 教育和原型设计 — 一个紧凑的四类数据集,用于学习模型训练预测

Link to this section数据集 YAML#

YAML 文件定义了数据集的配置,包括路径、类别以及其他相关详情。对于 African Wildlife 数据集,african-wildlife.yaml 文件位于 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 section用法#

要在 African Wildlife 数据集上训练 YOLO26n 模型,以 640 的图像大小进行 100 个 epoch 的训练,请使用提供的代码示例。如需可用参数的完整列表,请参考模型的训练页面。

训练示例
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)

训练完成后,使用微调后的模型对新图像运行推理

推理示例
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 section样本图像和标注#

African Wildlife 数据集包含多种展示不同动物物种及其自然栖息地的图像。以下是来自该数据集的图像示例,每张图像都附有相应的标注。

African wildlife dataset sample image

  • 马赛克图像:在这里,我们展示了一个由马赛克数据集图像组成的训练批次。马赛克(Mosaicing)是一种训练技术,将多张图像组合成一张,从而丰富了批次的多样性。这种方法有助于增强模型在不同对象大小、纵横比和上下文中的泛化能力。

Link to this section引用、许可和致谢#

我们感谢原始数据集作者 Bianca Ferreira 将此数据集发布给社区。Ultralytics 团队已在内部对其进行了更新和适配,以便它能与 Ultralytics YOLO 模型无缝配合使用。源数据集未指定许可证。

如果你在研究中使用此数据集,请使用所述详细信息对其进行引用:

引用

@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 section常见问题解答#

Link to this section什么是 African Wildlife 数据集,它如何用于计算机视觉项目?#

African Wildlife 数据集是一个包含 1,504 张图像的目标检测数据集,涵盖了南非自然保护区中发现的 4 种动物类别——水牛、大象、犀牛和斑马。它用于训练和评估识别图像中非洲野生动物的模型,这有助于自然保护区内的野生动物保护、生态研究和监测。它也为学习计算机视觉的学生和研究人员提供了一个易于获取的资源。

Link to this sectionAfrican Wildlife 数据集中有多少张图像和类别?#

Ultralytics African Wildlife 数据集包含 1,504 张图像,涵盖 4 个类别:水牛、大象、犀牛和斑马。图像预先划分为 1,052 张训练集、225 张验证集和 227 张测试集图像,数据集会在你首次训练时自动下载(约 100 MB)。

Link to this section如何使用 African Wildlife 数据集训练 YOLO26 模型?#

你可以通过使用 african-wildlife.yaml 配置文件在 African Wildlife 数据集上训练 YOLO26 模型。以下是如何训练 YOLO26n 模型 100 个 epoch(图像大小为 640)的示例:

示例
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)

有关额外的训练参数和选项,请参阅 Training 文档。

Link to this section在哪里可以找到 African Wildlife 数据集的 YAML 配置文件?#

African Wildlife 数据集的 YAML 配置文件 african-wildlife.yaml 可以在此 GitHub 链接中找到。该文件定义了数据集配置,包括对于训练机器学习模型至关重要的路径、类别和其他详细信息。

Link to this sectionAfrican Wildlife 数据集是在什么许可协议下发布的?#

源数据集 未指定许可证。它最初由 Bianca Ferreira 发布在 Kaggle 上,并由 Ultralytics 进行适配,以便与 Ultralytics YOLO 模型无缝配合使用。如果你在研究中使用该数据集,请使用 Citations 部分中的 BibTeX 条目进行引用。

评论