Link to this sectionGlobal Wheat Head Dataset#
Global Wheat Head Dataset (GWHD) 是一个单类目标检测数据集,用于检测室外田间图像中的 小麦穗 (wheat heads)——即小麦植株上的结实穗状花序。该数据集由七个国家的九个研究机构合作创建,包含 3,422 张训练图像、748 张验证图像和 1,276 张测试图像,覆盖多个种植区域,旨在确保模型在不同环境下的泛化能力。在植物表型分析和作物管理中,精确的小麦穗检测是评估穗密度、大小和产量潜力的基础。
Link to this section主要特性#
- 真实的室外田间图像,捕捉了小麦穗外观、光照和生长阶段的自然变异。
- 由七个国家的九个研究机构构建,横跨欧洲、北美、亚洲和澳大利亚种植区域,具有强大的跨环境泛化能力。
- 单类
wheat_head的边界框标注,可直接用于目标检测和跟踪流程。 - 测试图像来自训练期间未见过的基因型和区域,提供了真实的泛化基准。
Link to this section数据集结构#
Global Wheat Head Dataset 被组织为由 GlobalWheat2020.yaml 配置文件定义的三个子集,所有数据均标注为单一类别:wheat_head。
| 拆分 | 图像 | 区域 |
|---|---|---|
| 训练 | 3,422 | 欧洲(法国、英国、瑞士)、北美(加拿大) |
| 验证 | 748 | 瑞士 (ETH Zürich) |
| 测试 | 1,276 | 澳大利亚、日本、中国 |
验证集(748 张图像)是 ethz_1 子集,它也是训练域的一部分,因此验证指标反映了域内性能。来自澳大利亚、日本和中国的留出测试集用于衡量模型对训练期间未见过的环境的泛化能力。
Link to this section应用#
Global Wheat Head Dataset 被广泛用于训练和评估用于小麦穗检测的深度学习模型。其跨区域、基因型和条件的丰富图像资源,使其成为植物表型分析和作物管理的宝贵资源,支持产量评估、作物健康监测和表型分析。
若要在浏览器中对田间图像进行标注、训练并管理数据集版本,请使用 Ultralytics Platform 运行完整工作流。
Link to this section数据集 YAML#
YAML 文件用于定义数据集配置。它定义了数据集的路径、类别以及其他配置详情。对于 Global Wheat Head 数据集,GlobalWheat2020.yaml 文件维护在 https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/GlobalWheat2020.yaml。
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# Global Wheat 2020 dataset https://www.global-wheat.com/ by University of Saskatchewan
# Documentation: https://docs.ultralytics.com/datasets/detect/globalwheat2020
# Example usage: yolo train data=GlobalWheat2020.yaml
# parent
# ├── ultralytics
# └── datasets
# └── GlobalWheat2020 ← downloads here (7.0 GB)
# 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: GlobalWheat2020 # dataset root dir
train: # train images (relative to 'path') 3422 images
- images/arvalis_1
- images/arvalis_2
- images/arvalis_3
- images/ethz_1
- images/rres_1
- images/inrae_1
- images/usask_1
val: # val images (relative to 'path') 748 images (WARNING: train set contains ethz_1)
- images/ethz_1
test: # test images (optional) 1276 images
- images/utokyo_1
- images/utokyo_2
- images/nau_1
- images/uq_1
# Classes
names:
0: wheat_head
# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
from pathlib import Path
from ultralytics.utils.downloads import download
# Download
dir = Path(yaml["path"]) # dataset root dir
urls = [
"https://zenodo.org/record/4298502/files/global-wheat-codalab-official.zip",
"https://github.com/ultralytics/assets/releases/download/v0.0.0/GlobalWheat2020_labels.zip",
]
download(urls, dir=dir)
# Make Directories
for p in "annotations", "images", "labels":
(dir / p).mkdir(parents=True, exist_ok=True)
# Move
for p in (
"arvalis_1",
"arvalis_2",
"arvalis_3",
"ethz_1",
"rres_1",
"inrae_1",
"usask_1",
"utokyo_1",
"utokyo_2",
"nau_1",
"uq_1",
):
(dir / "global-wheat-codalab-official" / p).rename(dir / "images" / p) # move to /images
f = (dir / "global-wheat-codalab-official" / p).with_suffix(".json") # json file
if f.exists():
f.rename((dir / "annotations" / p).with_suffix(".json")) # move to /annotationsLink to this section用法#
若要使用图像大小 640 在 Global Wheat Head Dataset 上训练 YOLO26n 模型 100 个 epochs,你可以使用以下代码片段。数据集 (~7.0 GB) 会在首次使用时自动下载。有关可用参数的完整列表,请参阅模型训练页面。
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="GlobalWheat2020.yaml", epochs=100, imgsz=640)Link to this section样本图像和标注#
Global Wheat Head Dataset 包含多样化的室外田间图像,捕捉了小麦穗外观、环境和条件的自然变异。以下是来自该数据集的图像示例及其相应的标注:

- 小麦穗检测:小麦穗被标注有用于目标检测的边界框,涵盖了反映数据集多样性和复杂性的各种田间条件。
Link to this section引用与致谢#
如果你在研究或开发工作中使用了 Global Wheat Head Dataset,请引用以下论文:
@article{david2020global,
title={Global Wheat Head Detection (GWHD) Dataset: A Large and Diverse Dataset of High-Resolution RGB-Labelled Images to Develop and Benchmark Wheat Head Detection Methods},
author={David, Etienne and Madec, Simon and Sadeghi-Tehran, Pouria and Aasen, Helge and Zheng, Bangyou and Liu, Shouyang and Kirchgessner, Norbert and Ishikawa, Goro and Nagasawa, Koichi and Badhon, Minhajul and others},
journal={arXiv preprint arXiv:2005.02162},
year={2020}
}我们衷心感谢为创建和维护 Global Wheat Head Dataset 做出贡献的研究人员和机构,他们为植物表型分析和作物管理研究社区提供了一项宝贵的资源。欲了解更多关于该数据集及其创建者的信息,请访问 Global Wheat Head Dataset 网站。
Link to this section常见问题解答#
Link to this sectionGlobal Wheat Head Dataset 有什么用途?#
Global Wheat Head Dataset 主要用于开发和训练旨在进行小麦穗检测的深度学习模型。这对于小麦表型分析和作物管理应用至关重要,可以更准确地评估小麦穗密度、大小和整体作物产量潜力。精确的检测方法有助于评估作物健康和成熟度,这对于高效的作物管理至关重要。
Link to this sectionGlobal Wheat Head Dataset 中有多少张图像和类别?#
Global Wheat Head Dataset 只有一个类别 wheat_head,并分为三个子集:3,422 张训练图像、748 张验证图像和 1,276 张测试图像。训练和验证图像来自欧洲和北美,而测试集则取自澳大利亚、日本和中国,以评估模型对未见过环境的泛化能力。
Link to this section如何使用 Global Wheat Head Dataset 训练 YOLO26n 模型?#
要使用 Global Wheat Head Dataset 训练 YOLO26n 模型,你可以使用以下代码片段。确保你拥有指定数据集路径和类别的 GlobalWheat2020.yaml 配置文件:
from ultralytics import YOLO
# Load a pretrained model (recommended for training)
model = YOLO("yolo26n.pt")
# Train the model
results = model.train(data="GlobalWheat2020.yaml", epochs=100, imgsz=640)有关可用参数的完整列表,请参考模型 Training 页面。
Link to this section如何下载 Global Wheat Head Dataset?#
数据集 (~7.0 GB) 会在你首次使用 data="GlobalWheat2020.yaml" 进行训练时自动下载,无需手动操作。Ultralytics 会获取图像和标签,并将它们解压到你的本地数据集目录中。你可以在检测数据集概览中浏览相关数据集。
Link to this section在哪里可以找到 Global Wheat Head Dataset 的配置 YAML 文件?#
Global Wheat Head Dataset 的配置文件 YAML,即 GlobalWheat2020.yaml,可在 GitHub 上获取。你可以访问 https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/GlobalWheat2020.yaml。该文件包含了在 Ultralytics YOLO 中进行模型训练所需的数据集路径、类别和其他配置详细信息。
Link to this section为什么麦穗检测在作物管理中很重要?#
小麦穗检测在作物管理中至关重要,因为它能实现对小麦穗密度和大小的准确估算,这对评估作物健康状况、成熟度以及产量潜力不可或缺。通过利用在诸如 Global Wheat Head Dataset 等数据集上训练的 deep learning models,农民和研究人员可以更好地监测和管理作物,从而提高农业生产力并优化资源利用。这一技术进步支持了 sustainable agriculture 和粮食安全倡议。
想了解更多关于 AI 在农业中的应用,请访问 AI in Agriculture。