์ฝ˜ํ…์ธ ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

๊ธ€๋กœ๋ฒŒ ๋ฐ€ ํ—ค๋“œ ๋ฐ์ดํ„ฐ ์„ธํŠธ

๊ธ€๋กœ๋ฒŒ ๋ฐ€ ํ—ค๋“œ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋ฐ€ ํ‘œํ˜„ํ˜• ๋ถ„์„ ๋ฐ ์ž‘๋ฌผ ๊ด€๋ฆฌ ๋ถ„์•ผ์— ์ ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์ •ํ™•ํ•œ ๋ฐ€ ํ—ค๋“œ ๊ฐ์ง€ ๋ชจ๋ธ ๊ฐœ๋ฐœ์„ ์ง€์›ํ•˜๊ธฐ ์œ„ํ•ด ๊ณ ์•ˆ๋œ ์ด๋ฏธ์ง€ ๋ชจ์Œ์ž…๋‹ˆ๋‹ค. ๋ฐ€ ์ด์‚ญ์ด๋ผ๊ณ ๋„ ํ•˜๋Š” ๋ฐ€ ์ด์‚ญ์€ ๋ฐ€ ์‹๋ฌผ์˜ ์•Œ๊ณก์„ ํ’ˆ๊ณ  ์žˆ๋Š” ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค. ๋ฐ€ ์ด์‚ญ์˜ ๋ฐ€๋„์™€ ํฌ๊ธฐ๋ฅผ ์ •ํ™•ํ•˜๊ฒŒ ์ถ”์ •ํ•˜๋Š” ๊ฒƒ์€ ์ž‘๋ฌผ์˜ ๊ฑด๊ฐ•, ์„ฑ์ˆ™๋„, ์ˆ˜ํ™•๋Ÿ‰ ์ž ์žฌ๋ ฅ์„ ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ํ•„์ˆ˜์ ์ž…๋‹ˆ๋‹ค. 7๊ฐœ๊ตญ 9๊ฐœ ์—ฐ๊ตฌ ๊ธฐ๊ด€์ด ํ˜‘๋ ฅํ•˜์—ฌ ๋งŒ๋“  ์ด ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์—์„œ ๋ชจ๋ธ์ด ์ž˜ ์ผ๋ฐ˜ํ™”๋  ์ˆ˜ ์žˆ๋„๋ก ์—ฌ๋Ÿฌ ์žฌ๋ฐฐ ์ง€์—ญ์„ ํฌ๊ด„ํ•ฉ๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ

  • ์ด ๋ฐ์ดํ„ฐ ์„ธํŠธ์—๋Š” ์œ ๋Ÿฝ(ํ”„๋ž‘์Šค, ์˜๊ตญ, ์Šค์œ„์Šค)๊ณผ ๋ถ๋ฏธ(์บ๋‚˜๋‹ค)์˜ 3,000๊ฐœ ์ด์ƒ์˜ ํŠธ๋ ˆ์ด๋‹ ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์—ฌ๊ธฐ์—๋Š” ํ˜ธ์ฃผ, ์ผ๋ณธ, ์ค‘๊ตญ์˜ ์•ฝ 1,000๊ฐœ์˜ ํ…Œ์ŠคํŠธ ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ด๋ฏธ์ง€๋Š” ์‹ค์™ธ ํ˜„์žฅ ์ด๋ฏธ์ง€๋กœ, ๋ฐ€ ๋จธ๋ฆฌ์˜ ์ž์—ฐ์Šค๋Ÿฌ์šด ๋ณ€ํ™”๋ฅผ ํฌ์ฐฉํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค.
  • ์ฃผ์„์—๋Š” ๊ฐ์ฒด ๊ฐ์ง€ ์ž‘์—…์„ ์ง€์›ํ•˜๋Š” ๋ฐ€ ํ—ค๋“œ ๋ฐ”์šด๋”ฉ ๋ฐ•์Šค๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.

๋ฐ์ดํ„ฐ ์„ธํŠธ ๊ตฌ์กฐ

๊ธ€๋กœ๋ฒŒ ๋ฐ€ ํ—ค๋“œ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋‘ ๊ฐ€์ง€ ์ฃผ์š” ํ•˜์œ„ ์ง‘ํ•ฉ์œผ๋กœ ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค:

  1. ํŠธ๋ ˆ์ด๋‹ ์„ธํŠธ: ์ด ํ•˜์œ„ ์ง‘ํ•ฉ์—๋Š” ์œ ๋Ÿฝ๊ณผ ๋ถ๋ฏธ์˜ 3,000๊ฐœ ์ด์ƒ์˜ ์ด๋ฏธ์ง€๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€์—๋Š” ๋ฐ€ ๋จธ๋ฆฌ ๊ฒฝ๊ณ„ ์ƒ์ž๋กœ ๋ ˆ์ด๋ธ”์ด ์ง€์ •๋˜์–ด ๋ฌผ์ฒด ๊ฐ์ง€ ๋ชจ๋ธ ํ•™์Šต์„ ์œ„ํ•œ ๊ธฐ์ค€ ์ •๋ณด๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  2. ํ…Œ์ŠคํŠธ ์„ธํŠธ: ์ด ํ•˜์œ„ ์ง‘ํ•ฉ์€ ํ˜ธ์ฃผ, ์ผ๋ณธ, ์ค‘๊ตญ์˜ ์•ฝ 1,000๊ฐœ์˜ ์ด๋ฏธ์ง€๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ด๋ฏธ์ง€๋Š” ๋ณด์ด์ง€ ์•Š๋Š” ์œ ์ „์žํ˜•, ํ™˜๊ฒฝ ๋ฐ ๊ด€์ฐฐ ์กฐ๊ฑด์— ๋Œ€ํ•œ ํ›ˆ๋ จ๋œ ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜

๊ธ€๋กœ๋ฒŒ ๋ฐ€ ๋จธ๋ฆฌ ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋ฐ€ ๋จธ๋ฆฌ ๊ฒ€์ถœ ์ž‘์—…์—์„œ ๋”ฅ ๋Ÿฌ๋‹ ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๊ณ  ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ๋„๋ฆฌ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์ด ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋‹ค์–‘ํ•œ ๋ชจ์–‘, ํ™˜๊ฒฝ, ์กฐ๊ฑด์„ ํฌ์ฐฉํ•œ ๋‹ค์–‘ํ•œ ์ด๋ฏธ์ง€ ์„ธํŠธ๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ์–ด ์‹๋ฌผ ํ‘œํ˜„ํ˜• ๋ถ„์„ ๋ฐ ์ž‘๋ฌผ ๊ด€๋ฆฌ ๋ถ„์•ผ์˜ ์—ฐ๊ตฌ์ž์™€ ์‹ค๋ฌด์ž์—๊ฒŒ ์œ ์šฉํ•œ ๋ฆฌ์†Œ์Šค๋กœ ํ™œ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

๋ฐ์ดํ„ฐ ์„ธํŠธ 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์ธ ๊ธ€๋กœ๋ฒŒ ๋ฐ€ ๋จธ๋ฆฌ ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ 100๊ฐœ ์‹œ๋Œ€์— ๋Œ€ํ•œ YOLOv8n ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๋ ค๋ฉด ๋‹ค์Œ ์ฝ”๋“œ ์กฐ๊ฐ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ธ์ˆ˜์˜ ์ „์ฒด ๋ชฉ๋ก์€ ๋ชจ๋ธ ํ›ˆ๋ จ ํŽ˜์ด์ง€๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

์—ด์ฐจ ์˜ˆ์‹œ

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

์‹๋ฌผ ํ‘œํ˜„ํ˜• ๋ฐ ์ž‘๋ฌผ ๊ด€๋ฆฌ ์—ฐ๊ตฌ ์ปค๋ฎค๋‹ˆํ‹ฐ๋ฅผ ์œ„ํ•œ ๊ท€์ค‘ํ•œ ๋ฆฌ์†Œ์Šค์ธ ๊ธ€๋กœ๋ฒŒ ๋ฐ€ ํ—ค๋“œ ๋ฐ์ดํ„ฐ์…‹์˜ ์ƒ์„ฑ ๋ฐ ์œ ์ง€ ๊ด€๋ฆฌ์— ๊ธฐ์—ฌํ•œ ์—ฐ๊ตฌ์ž ๋ฐ ๊ธฐ๊ด€์— ๊ฐ์‚ฌ์˜ ๋ง์”€์„ ์ „ํ•ฉ๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ ์„ธํŠธ์™€ ๋ฐ์ดํ„ฐ ์„ธํŠธ ์ œ์ž‘์ž์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๊ธ€๋กœ๋ฒŒ ๋ฐ€ ํ—ค๋“œ ๋ฐ์ดํ„ฐ ์„ธํŠธ ์›น์‚ฌ์ดํŠธ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.



Created 2023-11-12, Updated 2024-06-02
Authors: glenn-jocher (6), Laughing-q (1)

๋Œ“๊ธ€