跳至内容

全球小麦头数据集

全球小麦头数据集是一个图像集合,旨在支持开发精确的小麦头检测模型,以应用于小麦表型和作物管理。小麦头又称麦穗,是小麦植株的结粒部分。准确估计小麦头部密度和大小对于评估作物健康、成熟度和产量潜力至关重要。该数据集由来自 7 个国家的 9 个研究机构合作创建,涵盖多个种植区域,以确保模型在不同环境下具有良好的通用性。

主要功能

  • 该数据集包含来自欧洲(法国、英国、瑞士)和北美(加拿大)的 3,000 多张训练图像。
  • 其中包括来自澳大利亚、日本和中国的约 1,000 张测试图像。
  • 图像为室外田间图像,捕捉了小麦头部外观的自然变化。
  • 注释包括小麦头边界框,以支持物体检测任务。

数据集结构

全球麦头数据集主要分为两个子集:

  1. 训练集:该子集包含来自欧洲和北美的 3000 多张图像。这些图像标有麦头边界框,为训练物体检测模型提供了基本事实。
  2. 测试集:该子集由来自澳大利亚、日本和中国的约 1,000 张图像组成。这些图像用于评估训练有素的模型在未见过的基因型、环境和观察条件下的表现。

应用

全球小麦头数据集被广泛用于训练和评估小麦头检测任务中的深度学习模型。该数据集的图像种类繁多,捕捉了各种外观、环境和条件,是植物表型和作物管理领域研究人员和从业人员的宝贵资源。

数据集 YAML

YAML(另一种标记语言)文件用于定义数据集配置。它包含数据集的路径、类和其他相关信息。就全球小麦头数据集而言,YAML 文件包括 GlobalWheat2020.yaml 文件保存在 https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/GlobalWheat2020.yaml.

ultralytics/cfg/datasets/GlobalWheat2020.yaml

# Ultralytics YOLO 🚀, AGPL-3.0 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: ../datasets/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 ultralytics.utils.downloads import download
  from pathlib import Path

  # Download
  dir = Path(yaml['path'])  # dataset root dir
  urls = ['https://zenodo.org/record/4298502/files/global-wheat-codalab-official.zip',
          'https://github.com/ultralytics/yolov5/releases/download/v1.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 /annotations

使用方法

要在图像大小为 640 的全球小麦头数据集上训练YOLOv8n 模型 100 次,可以使用以下代码片段。有关可用参数的完整列表,请参阅模型训练页面。

列车示例

from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n.pt')  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data='GlobalWheat2020.yaml', epochs=100, imgsz=640)
# Start training from a pretrained *.pt model
yolo detect train data=GlobalWheat2020.yaml model=yolov8n.pt epochs=100 imgsz=640

样本数据和注释

全球小麦头部数据集包含一组不同的室外田间图像,捕捉了小麦头部外观、环境和条件的自然变化。以下是数据集中的一些数据示例及其相应的注释:

数据集样本图像

  • 麦头检测:这张图片展示了麦头检测的一个示例,麦头用边界框标注。该数据集提供了各种图像,便于为这项任务开发模型。

该示例展示了全球小麦头数据集中数据的多样性和复杂性,并强调了精确的小麦头检测对于小麦表型和作物管理应用的重要性。

引文和致谢

如果您在研究或开发工作中使用全球小麦头数据集,请引用以下论文:

@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}
}

全球小麦头部数据集是植物表型和作物管理研究界的宝贵资源,我们在此向为全球小麦头部数据集的创建和维护做出贡献的研究人员和机构表示感谢。有关该数据集及其创建者的更多信息,请访问全球小麦头数据集网站



创建于 2023-11-12,更新于 2024-01-12
作者:glenn-jocher(4),Laughing-q(1)

评论