Meet YOLO26: next-gen vision AI.

Link to this sectionCOCO12-Formats 데이터셋#

Link to this section소개#

Ultralytics COCO12-Formats 데이터셋은 지원되는 12가지 이미지 형식 확장자 전반에 걸쳐 이미지 로딩을 검증하도록 설계된 전문 테스트 데이터셋입니다. 이 데이터셋은 12개의 이미지(학습용 6개, 검증용 6개)를 포함하며, 각 이미지는 이미지 로딩 파이프라인의 종합적인 테스트를 보장하기 위해 서로 다른 형식으로 저장되어 있습니다.

이 데이터셋은 다음과 같은 용도로 매우 유용합니다:

  • 이미지 형식 지원 테스트: 일반적인 이미지 형식이 올바르게 로드되는지 확인합니다.
  • CI/CD 파이프라인: 형식 호환성에 대한 자동화된 테스트를 수행합니다.
  • 디버깅: 학습 파이프라인 내에서 형식별 문제를 격리합니다.
  • 개발: 새로운 형식 추가 또는 변경 사항을 검증합니다.

Link to this section지원되는 형식#

이 데이터셋에는 ultralytics/data/utils.py에 정의된 12가지 지원 형식 확장자 각각에 대한 이미지 하나가 포함되어 있습니다:

형식확장자설명학습/검증
AVIF.avifAV1 이미지 파일 형식 (최신)학습(Train)
BMP.bmp비트맵 - 비압축 래스터 형식학습(Train)
DNG.dng디지털 네거티브 - Adobe RAW 형식학습(Train)
HEIC.heic고효율 이미지 코딩학습(Train)
JPEG.jpeg전체 확장자를 가진 JPEG학습(Train)
JPG.jpg짧은 확장자를 가진 JPEG학습(Train)
JP2.jp2JPEG 2000 - 의료/지리 공간용검증(Val)
MPO.mpo멀티-픽처 객체 (스테레오 이미지)검증(Val)
PNG.png포터블 네트워크 그래픽검증(Val)
TIF.tif짧은 확장자를 가진 TIFF검증(Val)
TIFF.tiff태그된 이미지 파일 형식검증(Val)
WebP.webp최신 웹 이미지 형식검증(Val)

Link to this section데이터셋 구조#

coco12-formats/
├── images/
│   ├── train/          # 6 images (avif, bmp, dng, heic, jpeg, jpg)
│   └── val/            # 6 images (jp2, mpo, png, tif, tiff, webp)
├── labels/
│   ├── train/          # Corresponding YOLO format labels
│   └── val/
└── coco12-formats.yaml # Dataset configuration

Link to this section데이터셋 YAML#

The COCO12-Formats dataset is configured using a YAML file that defines dataset paths and class names. You can review the official coco12-formats.yaml file in the Ultralytics GitHub repository.

ultralytics/cfg/datasets/coco12-formats.yaml
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# COCO12-Formats dataset (12 images testing all supported image formats) by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/detect/coco12-formats/
# Example usage: yolo train data=coco12-formats.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── coco12-formats ← downloads here (1 MB)

# 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: coco12-formats # dataset root dir
train: images/train # train images (relative to 'path') 6 images
val: images/val # val images (relative to 'path') 6 images
test: # test images (optional)

# Classes
names:
  0: person
  1: bicycle
  2: car
  3: motorcycle
  4: airplane
  5: bus
  6: train
  7: truck
  8: boat
  9: traffic light
  10: fire hydrant
  11: stop sign
  12: parking meter
  13: bench
  14: bird
  15: cat
  16: dog
  17: horse
  18: sheep
  19: cow
  20: elephant
  21: bear
  22: zebra
  23: giraffe
  24: backpack
  25: umbrella
  26: handbag
  27: tie
  28: suitcase
  29: frisbee
  30: skis
  31: snowboard
  32: sports ball
  33: kite
  34: baseball bat
  35: baseball glove
  36: skateboard
  37: surfboard
  38: tennis racket
  39: bottle
  40: wine glass
  41: cup
  42: fork
  43: knife
  44: spoon
  45: bowl
  46: banana
  47: apple
  48: sandwich
  49: orange
  50: broccoli
  51: carrot
  52: hot dog
  53: pizza
  54: donut
  55: cake
  56: chair
  57: couch
  58: potted plant
  59: bed
  60: dining table
  61: toilet
  62: tv
  63: laptop
  64: mouse
  65: remote
  66: keyboard
  67: cell phone
  68: microwave
  69: oven
  70: toaster
  71: sink
  72: refrigerator
  73: book
  74: clock
  75: vase
  76: scissors
  77: teddy bear
  78: hair drier
  79: toothbrush

# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco12-formats.zip

Link to this section요구 사항#

일부 형식은 추가 종속성이 필요합니다:

pip install pillow pillow-heif pillow-avif-plugin

Link to this sectionAVIF 시스템 라이브러리 (선택 사항)#

OpenCV가 AVIF 파일을 직접 읽으려면, OpenCV를 빌드하기 전에 libavif가 설치되어 있어야 합니다:

brew install libavif
참고

pip으로 설치된 opencv-python 패키지는 미리 빌드되어 있기 때문에 AVIF 지원이 포함되지 않을 수 있습니다. Ultralytics는 OpenCV가 지원하지 않는 경우를 대비해 AVIF 이미지를 위한 대체 수단으로 pillow-avif-plugin을 사용하는 Pillow를 활용합니다.

Link to this section사용법#

COCO12-Formats 데이터셋으로 YOLO 모델을 학습하려면 다음 예제를 사용하십시오:

훈련 예제
from ultralytics import YOLO

# Load a pretrained YOLO model
model = YOLO("yolo26n.pt")

# Train on COCO12-Formats to test 12 supported image formats
results = model.train(data="coco12-formats.yaml", epochs=1, imgsz=640)

Link to this section형식별 참고 사항#

Link to this sectionAVIF (AV1 이미지 파일 형식)#

AVIF는 AV1 비디오 코덱을 기반으로 하는 최신 이미지 형식이며 우수한 압축률을 제공합니다. pillow-avif-plugin이 필요합니다:

pip install pillow-avif-plugin

Link to this sectionDNG (디지털 네거티브)#

DNG는 TIFF를 기반으로 하는 Adobe의 개방형 RAW 형식입니다. 테스트를 위해 이 데이터셋은 .dng 확장자를 가진 TIFF 기반 파일을 사용합니다.

Link to this sectionJP2 (JPEG 2000)#

JPEG 2000은 기존 JPEG보다 더 나은 압축률과 품질을 제공하는 웨이브릿 기반 이미지 압축 표준입니다. 의료 영상(DICOM), 지리 공간 애플리케이션 및 디지털 시네마에서 흔히 사용됩니다. OpenCV와 Pillow 모두 기본적으로 지원합니다.

Link to this sectionMPO (멀티-픽처 객체)#

MPO 파일은 입체(3D) 이미지에 사용됩니다. 이 데이터셋은 형식 테스트를 위해 .mpo 확장자를 가진 표준 JPEG 데이터를 저장합니다.

Link to this sectionHEIC (고효율 이미지 코딩)#

HEIC는 올바른 인코딩을 위해 pillow-heif 패키지가 필요합니다:

pip install pillow-heif

Link to this section사용 사례#

Link to this sectionCI/CD 테스트#

from ultralytics import YOLO

def test_image_formats():
    """Test that 12 supported image formats load correctly."""
    model = YOLO("yolo26n.pt")
    results = model.train(data="coco12-formats.yaml", epochs=1, imgsz=64)
    assert results is not None

Link to this section형식 검증#

from pathlib import Path

from ultralytics.data.utils import IMG_FORMATS

# Verify all dataset formats are supported
dataset_dir = Path("datasets/coco12-formats/images")
found_formats = {f.suffix[1:].lower() for f in dataset_dir.rglob("*.*")}
assert found_formats <= IMG_FORMATS, f"Unsupported formats: {found_formats - IMG_FORMATS}"

Link to this section인용 및 감사의 글#

연구에서 COCO 데이터셋을 사용하는 경우, 다음을 인용해 주십시오:

인용
@misc{lin2015microsoft,
      title={Microsoft COCO: Common Objects in Context},
      author={Tsung-Yi Lin and Michael Maire and Serge Belongie and Lubomir Bourdev and Ross Girshick and James Hays and Pietro Perona and Deva Ramanan and C. Lawrence Zitnick and Piotr Doll{\'a}r},
      year={2015},
      eprint={1405.0312},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Link to this sectionFAQ#

Link to this sectionCOCO12-Formats 데이터셋은 어떤 용도로 사용됩니까?#

COCO12-Formats 데이터셋은 Ultralytics YOLO 학습 파이프라인에서 이미지 형식 호환성을 테스트하도록 설계되었습니다. 이 데이터셋은 12가지 지원 이미지 형식(AVIF, BMP, DNG, HEIC, JP2, JPEG, JPG, MPO, PNG, TIF, TIFF, WebP)이 올바르게 로드되고 처리되는지 확인합니다.

Link to this section왜 여러 이미지 형식을 테스트해야 합니까?#

서로 다른 이미지 형식은 고유한 특성(압축, 비트 심도, 색 공간)을 가집니다. 모든 형식을 테스트하면 다음을 보장할 수 있습니다:

  • 견고한 이미지 로딩 코드
  • 다양한 데이터셋 전반의 호환성
  • 형식별 버그 조기 발견

Link to this section어떤 형식이 특별한 종속성을 요구합니까?#

  • AVIF: pillow-avif-plugin 필요
  • HEIC: pillow-heif 필요

댓글