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

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ

PASCAL VOC (์‹œ๊ฐ์  ๊ฐ์ฒด ํด๋ž˜์Šค) ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์ž˜ ์•Œ๋ ค์ง„ ๊ฐ์ฒด ๊ฐ์ง€, ๋ถ„ํ• , ๋ถ„๋ฅ˜ ๋ฐ์ดํ„ฐ ์„ธํŠธ์ž…๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ๊ฐ์ฒด ๋ฒ”์ฃผ์— ๋Œ€ํ•œ ์—ฐ๊ตฌ๋ฅผ ์žฅ๋ คํ•˜๊ธฐ ์œ„ํ•ด ์„ค๊ณ„๋˜์—ˆ์œผ๋ฉฐ ์ผ๋ฐ˜์ ์œผ๋กœ ์ปดํ“จํ„ฐ ๋น„์ „ ๋ชจ๋ธ์„ ๋ฒค์น˜๋งˆํ‚นํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๊ฐ์ฒด ๊ฐ์ง€, ์„ธ๋ถ„ํ™”, ๋ถ„๋ฅ˜ ์ž‘์—…์„ ํ•˜๋Š” ์—ฐ๊ตฌ์ž์™€ ๊ฐœ๋ฐœ์ž์—๊ฒŒ ํ•„์ˆ˜์ ์ธ ๋ฐ์ดํ„ฐ ์„ธํŠธ์ž…๋‹ˆ๋‹ค.

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

  • VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์—๋Š” ๋‘ ๊ฐ€์ง€ ์ฃผ์š” ๊ณผ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค: VOC2007 ๋ฐ VOC2012.
  • ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์ž๋™์ฐจ, ์ž์ „๊ฑฐ, ๋™๋ฌผ๊ณผ ๊ฐ™์€ ์ผ๋ฐ˜์ ์ธ ๊ฐ์ฒด์™€ ๋ณดํŠธ, ์†ŒํŒŒ, ์‹ํƒ๊ณผ ๊ฐ™์€ ๋ณด๋‹ค ๊ตฌ์ฒด์ ์ธ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ํฌํ•จํ•œ 20๊ฐœ์˜ ๊ฐ์ฒด ์นดํ…Œ๊ณ ๋ฆฌ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ฃผ์„์—๋Š” ๊ฐ์ฒด ๊ฐ์ง€ ๋ฐ ๋ถ„๋ฅ˜ ์ž‘์—…์„ ์œ„ํ•œ ๊ฐ์ฒด ๊ฒฝ๊ณ„ ์ƒ์ž ๋ฐ ํด๋ž˜์Šค ๋ ˆ์ด๋ธ”, ์„ธ๋ถ„ํ™” ์ž‘์—…์„ ์œ„ํ•œ ์„ธ๋ถ„ํ™” ๋งˆ์Šคํฌ๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.
  • VOC๋Š” ๊ฐ์ฒด ๊ฐ์ง€ ๋ฐ ๋ถ„๋ฅ˜๋ฅผ ์œ„ํ•œ ํ‰๊ท  ํ‰๊ท  ์ •๋ฐ€๋„ (mAP)์™€ ๊ฐ™์€ ํ‘œ์ค€ํ™”๋œ ํ‰๊ฐ€ ์ง€ํ‘œ๋ฅผ ์ œ๊ณตํ•˜๋ฏ€๋กœ ๋ชจ๋ธ ์„ฑ๋Šฅ์„ ๋น„๊ตํ•˜๋Š” ๋ฐ ์ ํ•ฉํ•ฉ๋‹ˆ๋‹ค.

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

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์„ธ ๊ฐœ์˜ ํ•˜์œ„ ์ง‘ํ•ฉ์œผ๋กœ ๋‚˜๋‰ฉ๋‹ˆ๋‹ค:

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

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

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๊ฐ์ฒด ๊ฐ์ง€(์˜ˆ: YOLO, Faster R-CNN, SSD), ์ธ์Šคํ„ด์Šค ๋ถ„ํ•  (์˜ˆ: Mask R-CNN), ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜์—์„œ ๋”ฅ ๋Ÿฌ๋‹ ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๊ณ  ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ๋„๋ฆฌ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๋‹ค์–‘ํ•œ ๊ฐ์ฒด ์นดํ…Œ๊ณ ๋ฆฌ, ์ˆ˜๋งŽ์€ ์ฃผ์„์ด ๋‹ฌ๋ฆฐ ์ด๋ฏธ์ง€, ํ‘œ์ค€ํ™”๋œ ํ‰๊ฐ€ ๋ฉ”ํŠธ๋ฆญ์€ ์ปดํ“จํ„ฐ ๋น„์ „ ์—ฐ๊ตฌ์ž์™€ ์‹ค๋ฌด์ž์—๊ฒŒ ํ•„์ˆ˜์ ์ธ ๋ฆฌ์†Œ์Šค์ž…๋‹ˆ๋‹ค.

๋ฐ์ดํ„ฐ ์„ธํŠธ YAML

๋ฐ์ดํ„ฐ ์„ธํŠธ ๊ตฌ์„ฑ์„ ์ •์˜ํ•˜๋Š” ๋ฐ๋Š” YAML(๋˜ ๋‹ค๋ฅธ ๋งˆํฌ์—… ์–ธ์–ด) ํŒŒ์ผ์ด ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—๋Š” ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๊ฒฝ๋กœ, ํด๋ž˜์Šค ๋ฐ ๊ธฐํƒ€ ๊ด€๋ จ ์ •๋ณด์— ๋Œ€ํ•œ ์ •๋ณด๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๊ฒฝ์šฐ, ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ VOC.yaml ํŒŒ์ผ์€ ๋‹ค์Œ ์œ„์น˜์—์„œ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค. https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/VOC.yaml.

ultralytics/cfg/datasets/VOC.yaml

# Ultralytics YOLO ๐Ÿš€, AGPL-3.0 license
# PASCAL VOC dataset http://host.robots.ox.ac.uk/pascal/VOC by University of Oxford
# Documentation: # Documentation: https://docs.ultralytics.com/datasets/detect/voc/
# Example usage: yolo train data=VOC.yaml
# parent
# โ”œโ”€โ”€ ultralytics
# โ””โ”€โ”€ datasets
#     โ””โ”€โ”€ VOC  โ† downloads here (2.8 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/VOC
train: # train images (relative to 'path')  16551 images
  - images/train2012
  - images/train2007
  - images/val2012
  - images/val2007
val: # val images (relative to 'path')  4952 images
  - images/test2007
test: # test images (optional)
  - images/test2007

# Classes
names:
  0: aeroplane
  1: bicycle
  2: bird
  3: boat
  4: bottle
  5: bus
  6: car
  7: cat
  8: chair
  9: cow
  10: diningtable
  11: dog
  12: horse
  13: motorbike
  14: person
  15: pottedplant
  16: sheep
  17: sofa
  18: train
  19: tvmonitor

# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
  import xml.etree.ElementTree as ET

  from tqdm import tqdm
  from ultralytics.utils.downloads import download
  from pathlib import Path

  def convert_label(path, lb_path, year, image_id):
      def convert_box(size, box):
          dw, dh = 1. / size[0], 1. / size[1]
          x, y, w, h = (box[0] + box[1]) / 2.0 - 1, (box[2] + box[3]) / 2.0 - 1, box[1] - box[0], box[3] - box[2]
          return x * dw, y * dh, w * dw, h * dh

      in_file = open(path / f'VOC{year}/Annotations/{image_id}.xml')
      out_file = open(lb_path, 'w')
      tree = ET.parse(in_file)
      root = tree.getroot()
      size = root.find('size')
      w = int(size.find('width').text)
      h = int(size.find('height').text)

      names = list(yaml['names'].values())  # names list
      for obj in root.iter('object'):
          cls = obj.find('name').text
          if cls in names and int(obj.find('difficult').text) != 1:
              xmlbox = obj.find('bndbox')
              bb = convert_box((w, h), [float(xmlbox.find(x).text) for x in ('xmin', 'xmax', 'ymin', 'ymax')])
              cls_id = names.index(cls)  # class id
              out_file.write(" ".join(str(a) for a in (cls_id, *bb)) + '\n')


  # Download
  dir = Path(yaml['path'])  # dataset root dir
  url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
  urls = [f'{url}VOCtrainval_06-Nov-2007.zip',  # 446MB, 5012 images
          f'{url}VOCtest_06-Nov-2007.zip',  # 438MB, 4953 images
          f'{url}VOCtrainval_11-May-2012.zip']  # 1.95GB, 17126 images
  download(urls, dir=dir / 'images', curl=True, threads=3, exist_ok=True)  # download and unzip over existing paths (required)

  # Convert
  path = dir / 'images/VOCdevkit'
  for year, image_set in ('2012', 'train'), ('2012', 'val'), ('2007', 'train'), ('2007', 'val'), ('2007', 'test'):
      imgs_path = dir / 'images' / f'{image_set}{year}'
      lbs_path = dir / 'labels' / f'{image_set}{year}'
      imgs_path.mkdir(exist_ok=True, parents=True)
      lbs_path.mkdir(exist_ok=True, parents=True)

      with open(path / f'VOC{year}/ImageSets/Main/{image_set}.txt') as f:
          image_ids = f.read().strip().split()
      for id in tqdm(image_ids, desc=f'{image_set}{year}'):
          f = path / f'VOC{year}/JPEGImages/{id}.jpg'  # old img path
          lb_path = (lbs_path / f.name).with_suffix('.txt')  # new label path
          f.rename(imgs_path / f.name)  # move image
          convert_label(path, lb_path, year, id)  # convert labels to YOLO format

์‚ฌ์šฉ๋ฒ•

์ด๋ฏธ์ง€ ํฌ๊ธฐ๊ฐ€ 640์ธ 100๊ฐœ์˜ ์—ํฌํฌ์— ๋Œ€ํ•œ VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์—์„œ YOLO11n ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๋ ค๋ฉด ๋‹ค์Œ ์ฝ”๋“œ ์กฐ๊ฐ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ธ์ˆ˜์˜ ์ „์ฒด ๋ชฉ๋ก์€ ๋ชจ๋ธ ํ•™์Šต ํŽ˜์ด์ง€๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

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

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n.pt")  # load a pretrained model (recommended for training)

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

์ƒ˜ํ”Œ ์ด๋ฏธ์ง€ ๋ฐ ์ฃผ์„

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์—๋Š” ๋‹ค์–‘ํ•œ ๊ฐ์ฒด ๋ฒ”์ฃผ์™€ ๋ณต์žกํ•œ ์žฅ๋ฉด์ด ํฌํ•จ๋œ ๋‹ค์–‘ํ•œ ์ด๋ฏธ์ง€ ์„ธํŠธ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ์ด๋ฏธ์ง€์™€ ํ•ด๋‹น ์ฃผ์„์˜ ๋ช‡ ๊ฐ€์ง€ ์˜ˆ์ž…๋‹ˆ๋‹ค:

๋ฐ์ดํ„ฐ ์„ธํŠธ ์ƒ˜ํ”Œ ์ด๋ฏธ์ง€

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

์ด ์˜ˆ๋Š” VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์— ํฌํ•จ๋œ ์ด๋ฏธ์ง€์˜ ๋‹ค์–‘์„ฑ๊ณผ ๋ณต์žก์„ฑ, ๊ทธ๋ฆฌ๊ณ  ํ•™์Šต ๊ณผ์ •์—์„œ ๋ชจ์ž์ดํฌ ์‚ฌ์šฉ์˜ ์ด์ ์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

์ธ์šฉ ๋ฐ ๊ฐ์‚ฌ

์—ฐ๊ตฌ ๋˜๋Š” ๊ฐœ๋ฐœ ์ž‘์—…์— VOC ๋ฐ์ดํ„ฐ์„ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ๋‹ค์Œ ๋…ผ๋ฌธ์„ ์ธ์šฉํ•ด ์ฃผ์„ธ์š”:

@misc{everingham2010pascal,
      title={The PASCAL Visual Object Classes (VOC) Challenge},
      author={Mark Everingham and Luc Van Gool and Christopher K. I. Williams and John Winn and Andrew Zisserman},
      year={2010},
      eprint={0909.5206},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

์ปดํ“จํ„ฐ ๋น„์ „ ์ปค๋ฎค๋‹ˆํ‹ฐ๋ฅผ ์œ„ํ•ด ์ด ๊ท€์ค‘ํ•œ ๋ฆฌ์†Œ์Šค๋ฅผ ๋งŒ๋“ค๊ณ  ์œ ์ง€ ๊ด€๋ฆฌํ•ด ์ฃผ์‹  PASCAL VOC ์ปจ์†Œ์‹œ์—„์— ๊ฐ์‚ฌ์˜ ๋ง์”€์„ ์ „ํ•ฉ๋‹ˆ๋‹ค. VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์™€ ์ œ์ž‘์ž์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ PASCAL VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ ์›น์‚ฌ์ดํŠธ๋ฅผ ๋ฐฉ๋ฌธํ•˜์„ธ์š”.

์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ

PASCAL VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋ฌด์—‡์ด๋ฉฐ ์ปดํ“จํ„ฐ ๋น„์ „ ์ž‘์—…์— ์ค‘์š”ํ•œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?

PASCAL VOC (์‹œ๊ฐ์  ๊ฐ์ฒด ํด๋ž˜์Šค) ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์ปดํ“จํ„ฐ ๋น„์ „์—์„œ ๊ฐ์ฒด ๊ฐ์ง€, ๋ถ„ํ• , ๋ถ„๋ฅ˜๋ฅผ ์œ„ํ•œ ์œ ๋ช…ํ•œ ๋ฒค์น˜๋งˆํฌ์ž…๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์—๋Š” 20๊ฐœ์˜ ์„œ๋กœ ๋‹ค๋ฅธ ๊ฐ์ฒด ๋ฒ”์ฃผ์— ๋Œ€ํ•œ ๊ฒฝ๊ณ„ ์ƒ์ž, ํด๋ž˜์Šค ๋ ˆ์ด๋ธ”, ๋ถ„ํ•  ๋งˆ์Šคํฌ์™€ ๊ฐ™์€ ํฌ๊ด„์ ์ธ ์ฃผ์„์ด ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์—ฐ๊ตฌ์›๋“ค์€ ํ‰๊ท  ํ‰๊ท  ์ •๋ฐ€๋„(mAP)์™€ ๊ฐ™์€ ํ‘œ์ค€ํ™”๋œ ํ‰๊ฐ€ ๋ฉ”ํŠธ๋ฆญ์œผ๋กœ ์ธํ•ด Faster R-CNN, YOLO, Mask R-CNN๊ณผ ๊ฐ™์€ ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ๋„๋ฆฌ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ YOLO11 ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•˜๋‚˜์š”?

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋กœ YOLO11 ๋ชจ๋ธ์„ ํ›ˆ๋ จํ•˜๋ ค๋ฉด YAML ํŒŒ์ผ์— ๋ฐ์ดํ„ฐ ์„ธํŠธ ๊ตฌ์„ฑ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ์€ ์ด๋ฏธ์ง€ ํฌ๊ธฐ๊ฐ€ 640์ธ 100๊ฐœ์˜ ์—ํฌํฌ์— ๋Œ€ํ•œ YOLO11n ๋ชจ๋ธ ํ•™์Šต์„ ์‹œ์ž‘ํ•˜๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค:

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

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n.pt")  # load a pretrained model (recommended for training)

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

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์— ํฌํ•จ๋œ ์ฃผ์š” ๊ณผ์ œ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?

VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์—๋Š” ๋‘ ๊ฐ€์ง€ ์ฃผ์š” ๊ณผ์ œ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค: VOC2007๊ณผ VOC2012. ์ด ๊ณผ์ œ๋“ค์€ 20๊ฐœ์˜ ๋‹ค์–‘ํ•œ ๊ฐ์ฒด ๋ฒ”์ฃผ์— ๊ฑธ์ณ ๊ฐ์ฒด ๊ฐ์ง€, ์„ธ๋ถ„ํ™” ๋ฐ ๋ถ„๋ฅ˜๋ฅผ ํ…Œ์ŠคํŠธํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ์ด๋ฏธ์ง€์—๋Š” ๊ฒฝ๊ณ„ ์ƒ์ž, ํด๋ž˜์Šค ๋ ˆ์ด๋ธ”, ์„ธ๋ถ„ํ™” ๋งˆ์Šคํฌ๊ฐ€ ๊ผผ๊ผผํ•˜๊ฒŒ ์ฃผ์„ ์ฒ˜๋ฆฌ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ฑŒ๋ฆฐ์ง€๋Š” mAP์™€ ๊ฐ™์€ ํ‘œ์ค€ํ™”๋œ ์ง€ํ‘œ๋ฅผ ์ œ๊ณตํ•˜์—ฌ ๋‹ค์–‘ํ•œ ์ปดํ“จํ„ฐ ๋น„์ „ ๋ชจ๋ธ์„ ์‰ฝ๊ฒŒ ๋น„๊ตํ•˜๊ณ  ๋ฒค์น˜๋งˆํ‚นํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

PASCAL VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋ชจ๋ธ ๋ฒค์น˜๋งˆํ‚น ๋ฐ ํ‰๊ฐ€๋ฅผ ์–ด๋–ป๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ค๋‚˜์š”?

PASCAL VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์ƒ์„ธํ•œ ์ฃผ์„๊ณผ ํ‰๊ท  ํ‰๊ท  ์ •๋ฐ€๋„ (mAP)์™€ ๊ฐ™์€ ํ‘œ์ค€ํ™”๋œ ๋ฉ”ํŠธ๋ฆญ์„ ํ†ตํ•ด ๋ชจ๋ธ ๋ฒค์น˜๋งˆํ‚น๊ณผ ํ‰๊ฐ€๋ฅผ ํ–ฅ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๋ฉ”ํŠธ๋ฆญ์€ ๋ฌผ์ฒด ๊ฐ์ง€ ๋ฐ ๋ถ„๋ฅ˜ ๋ชจ๋ธ์˜ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•˜๋Š” ๋ฐ ๋งค์šฐ ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ ์„ธํŠธ์˜ ๋‹ค์–‘ํ•˜๊ณ  ๋ณต์žกํ•œ ์ด๋ฏธ์ง€๋Š” ๋‹ค์–‘ํ•œ ์‹ค์ œ ์‹œ๋‚˜๋ฆฌ์˜ค์—์„œ ํฌ๊ด„์ ์ธ ๋ชจ๋ธ ํ‰๊ฐ€๋ฅผ ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค.

YOLO ๋ชจ๋ธ์—์„œ ์˜๋ฏธ๋ก ์  ์„ธ๋ถ„ํ™”๋ฅผ ์œ„ํ•ด VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜์š”?

YOLO ๋ชจ๋ธ์„ ์‚ฌ์šฉํ•˜์—ฌ ์˜๋ฏธ๋ก ์  ์„ธ๋ถ„ํ™” ์ž‘์—…์— VOC ๋ฐ์ดํ„ฐ์…‹์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด YAML ํŒŒ์ผ์—์„œ ๋ฐ์ดํ„ฐ์…‹์„ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๊ตฌ์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. YAML ํŒŒ์ผ์€ ์„ธ๋ถ„ํ™” ๋ชจ๋ธ ํ•™์Šต์— ํ•„์š”ํ•œ ๊ฒฝ๋กœ์™€ ํด๋ž˜์Šค๋ฅผ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์„ค์ •์€ VOC.yaml์—์„œ V OC ๋ฐ์ดํ„ฐ ์„ธํŠธ YAML ๊ตฌ์„ฑ ํŒŒ์ผ์„ ํ™•์ธํ•˜์„ธ์š”.

๐Ÿ“…1 ๋…„ ์ „ ์ƒ์„ฑ๋จ โœ๏ธ 1๊ฐœ์›” ์ „ ์—…๋ฐ์ดํŠธ๋จ

๋Œ“๊ธ€