123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- path: ../datasets/GlobalWheat2020
- train:
- - images/arvalis_1
- - images/arvalis_2
- - images/arvalis_3
- - images/ethz_1
- - images/rres_1
- - images/inrae_1
- - images/usask_1
- val:
- - images/ethz_1
- test:
- - images/utokyo_1
- - images/utokyo_2
- - images/nau_1
- - images/uq_1
- names:
- 0: wheat_head
- download: |
- from utils.general import download, Path
-
- dir = Path(yaml['path'])
- 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)
-
- for p in 'annotations', 'images', 'labels':
- (dir / p).mkdir(parents=True, exist_ok=True)
-
- 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 / p).rename(dir / 'images' / p)
- f = (dir / p).with_suffix('.json')
- if f.exists():
- f.rename((dir / 'annotations' / p).with_suffix('.json'))
|