Meet YOLO26: next-gen vision AI.

Link to this sectionAfrican Wildlife 数据集#

该数据集展示了南非自然保护区中常见的四种动物类别。它包含了非洲野生动物(如水牛、大象、犀牛和斑马)的图像,提供了对其特征的宝贵见解。该数据集对于训练 computer vision 算法至关重要,有助于在从动物园到森林等各种栖息地中识别动物,并支持野生动物研究。



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

Link to this section数据集结构#

African Wildlife 对象检测数据集被拆分为三个子集:

  • 训练集:包含 1052 张图像,每张图像都有相应的标注。
  • 验证集:包含 225 张图像,每张图像都有配对的标注。
  • 测试集:包含 227 张图像,每张图像都有配对的标注。

Link to this section应用#

该数据集可应用于各种计算机视觉任务,如 object detection、目标跟踪和研究。具体而言,它可用于训练和评估模型,以识别图像中的 African Wildlife 对象,这在自然保护区和保护区的野生动物保护、生态研究和监测工作中具有应用价值。此外,它还可以作为教育目的的宝贵资源,使学生和研究人员能够学习和了解不同动物物种的特征和行为。

Link to this section数据集 YAML#

YAML (Yet Another Markup Language) 文件定义了数据集配置,包括路径、类别和其他相关详细信息。对于 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用法#

若要使用大小为 640 的图像,在 African Wildlife 数据集上训练 YOLO26n 模型 100 个 epochs,请使用提供的代码示例。有关可用参数的完整列表,请参阅该模型的 Training 页面。

训练示例
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)是一种训练技术,将多张图像组合成一张,从而丰富了批次的多样性。这种方法有助于增强模型在不同对象大小、纵横比和上下文中的泛化能力。

此示例说明了 African Wildlife 数据集中图像的多样性和复杂性,强调了在训练过程中包含马赛克处理的优势。

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

我们要感谢原始数据集作者 Bianca Ferreira 将此数据集发布给社区。Ultralytics 团队已在内部对其进行了更新和适配,以便它能与 Ultralytics YOLO 模型无缝配合使用。此数据集可在 AGPL-3.0 License 下获得。

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

引用

@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 = {AGPL-3.0},
    version = {1.0.0},
    year    = {2024}
}

Link to this section常见问题解答#

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

African Wildlife 数据集包含了在南非自然保护区中发现的四种常见动物物种的图像:水牛、大象、犀牛和斑马。它是用于训练对象检测和动物识别计算机视觉算法的宝贵资源。该数据集支持诸如目标跟踪、研究和保护工作等各种任务。有关其结构和应用的更多信息,请参阅 Dataset Structure 部分和数据集的 Applications 部分。

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 链接 中找到。该文件定义了数据集配置,包括对训练 machine learning 模型至关重要的路径、类别和其他详细信息。有关更多详细信息,请参阅 Dataset YAML 部分。

Link to this section我可以查看 African Wildlife 数据集中的样本图像和标注吗?#

可以,African Wildlife 数据集包含了展示其自然栖息地中多样化动物物种的各种图像。你可以在 Sample Images and Annotations 部分查看样本图像及其对应的标注。该部分还说明了马赛克技术的使用,该技术将多张图像合并为一张,以丰富批次多样性,从而提高模型的泛化能力。

Link to this sectionAfrican Wildlife 数据集如何用于支持野生动物保护和研究?#

African Wildlife Dataset 非常适合支持野生动物保护和研究,通过它你可以训练并评估在不同栖息地识别非洲野生动物的模型。这些模型可以辅助监测动物种群、研究其行为并识别保护需求。此外,该数据集还可用于教育目的,帮助学生和研究人员了解不同动物物种的特征和行为。更多详细信息请参阅 Applications 部分。

评论