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

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

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

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

  • VOC ๋ฐ์ดํ„ฐ ์„ธํŠธ์—๋Š” ๋‘ ๊ฐ€์ง€ ์ฃผ์š” ๊ณผ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค: VOC2007๊ณผ VOC2012.
  • ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ์ž๋™์ฐจ, ์ž์ „๊ฑฐ, ๋™๋ฌผ๊ณผ ๊ฐ™์€ ์ผ๋ฐ˜์ ์ธ ๊ฐ์ฒด์™€ ๋ณดํŠธ, ์†ŒํŒŒ, ์‹ํƒ๊ณผ ๊ฐ™์€ ๋ณด๋‹ค ๊ตฌ์ฒด์ ์ธ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ํฌํ•จํ•œ 20๊ฐœ์˜ ๊ฐ์ฒด ์นดํ…Œ๊ณ ๋ฆฌ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์ฃผ์„์—๋Š” ๊ฐ์ฒด ๊ฐ์ง€ ๋ฐ ๋ถ„๋ฅ˜ ์ž‘์—…์„ ์œ„ํ•œ ๊ฐ์ฒด ๊ฒฝ๊ณ„ ์ƒ์ž ๋ฐ ํด๋ž˜์Šค ๋ ˆ์ด๋ธ”, ์„ธ๋ถ„ํ™” ์ž‘์—…์„ ์œ„ํ•œ ์„ธ๋ถ„ํ™” ๋งˆ์Šคํฌ๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.
  • VOC provides standardized evaluation metrics like mean Average Precision (mAP) for object detection and classification, making it suitable for comparing model performance.

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

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

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

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

The VOC dataset is widely used for training and evaluating deep learning models in object detection (such as YOLO, Faster R-CNN, and SSD), instance segmentation (such as Mask R-CNN), and image classification. The dataset's diverse set of object categories, large number of annotated images, and standardized evaluation metrics make it an essential resource for computer vision researchers and practitioners.

๋ฐ์ดํ„ฐ ์„ธํŠธ 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

์‚ฌ์šฉ๋ฒ•

To train a YOLO11n model on the VOC dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model Training page.

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

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

We would like to acknowledge the PASCAL VOC Consortium for creating and maintaining this valuable resource for the computer vision community. For more information about the VOC dataset and its creators, visit the PASCAL VOC dataset website.

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

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

The PASCAL VOC (Visual Object Classes) dataset is a renowned benchmark for object detection, segmentation, and classification in computer vision. It includes comprehensive annotations like bounding boxes, class labels, and segmentation masks across 20 different object categories. Researchers use it widely to evaluate the performance of models like Faster R-CNN, YOLO, and Mask R-CNN due to its standardized evaluation metrics such as mean Average Precision (mAP).

How do I train a YOLO11 model using the VOC dataset?

To train a YOLO11 model with the VOC dataset, you need the dataset configuration in a YAML file. Here's an example to start training a YOLO11n model for 100 epochs with an image size of 640:

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

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 ๋ฐ์ดํ„ฐ ์„ธํŠธ๋Š” ๋ชจ๋ธ ๋ฒค์น˜๋งˆํ‚น ๋ฐ ํ‰๊ฐ€๋ฅผ ์–ด๋–ป๊ฒŒ ํ–ฅ์ƒ์‹œํ‚ค๋‚˜์š”?

The PASCAL VOC dataset enhances model benchmarking and evaluation through its detailed annotations and standardized metrics like mean Average Precision (mAP). These metrics are crucial for assessing the performance of object detection and classification models. The dataset's diverse and complex images ensure comprehensive model evaluation across various real-world scenarios.

How do I use the VOC dataset for semantic segmentation in YOLO models?

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


๐Ÿ“… Created 11 months ago โœ๏ธ Updated 12 days ago

๋Œ“๊ธ€