Link to this sectionCOCO12-Formats Veri Kümesi#
Link to this sectionGiriş#
Ultralytics COCO12-Formats veri kümesi, desteklenen 12 görsel format uzantısında görsel yüklemeyi doğrulamak için tasarlanmış özel bir test veri kümesidir. Görüntü yükleme hattının kapsamlı bir şekilde test edilmesini sağlamak için her biri farklı bir formatta kaydedilmiş 12 görsel (6 eğitim, 6 doğrulama için) içerir.
Bu veri kümesi şunlar için paha biçilmezdir:
- Görsel formatı desteğini test etme: Yaygın görsel formatlarının doğru şekilde yüklendiğini doğrula
- CI/CD hatları: Format uyumluluğunun otomatik olarak test edilmesi
- Hata ayıklama: Eğitim hatlarındaki formata özel sorunları yalıt
- Geliştirme: Yeni format eklemelerini veya değişikliklerini doğrula
Link to this sectionDesteklenen Formatlar#
Veri kümesi, ultralytics/data/utils.py içinde tanımlanan desteklenen 12 format uzantısının her biri için bir görsel içerir:
| Format | Uzantı | Açıklama | Eğitim/Doğrulama |
|---|---|---|---|
| AVIF | .avif | AV1 Görsel Dosya Formatı (modern) | Eğit (Train) |
| BMP | .bmp | Bitmap - sıkıştırılmamış raster formatı | Eğit (Train) |
| DNG | .dng | Dijital Negatif - Adobe RAW formatı | Eğit (Train) |
| HEIC | .heic | Yüksek Verimli Görsel Kodlama | Eğit (Train) |
| JPEG | .jpeg | Tam uzantılı JPEG | Eğit (Train) |
| JPG | .jpg | Kısa uzantılı JPEG | Eğit (Train) |
| JP2 | .jp2 | JPEG 2000 - tıbbi/coğrafi | Doğrula (Val) |
| MPO | .mpo | Çoklu Resim Nesnesi (stereo görseller) | Doğrula (Val) |
| PNG | .png | Taşınabilir Ağ Grafikleri | Doğrula (Val) |
| TIF | .tif | Kısa uzantılı TIFF | Doğrula (Val) |
| TIFF | .tiff | Etiketli Görsel Dosya Formatı | Doğrula (Val) |
| WebP | .webp | Modern web görsel formatı | Doğrula (Val) |
Link to this sectionVeri Kümesi Yapısı#
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 configurationLink to this sectionVeri Kümesi YAML#
COCO12-Formats veri kümesi, veri kümesi yollarını ve sınıf adlarını tanımlayan bir YAML dosyası kullanılarak yapılandırılmıştır. Resmi coco12-formats.yaml dosyasını Ultralytics GitHub deposunda inceleyebilirsin.
# 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.zipLink to this sectionGereksinimler#
Bazı formatlar ek bağımlılıklar gerektirir:
pip install pillow pillow-heif pillow-avif-pluginLink to this sectionAVIF Sistem Kütüphanesi (İsteğe bağlı)#
OpenCV'nin AVIF dosyalarını doğrudan okuyabilmesi için, OpenCV derlenmeden önce libavif kurulmuş olmalıdır:
brew install libavifPip ile kurulan opencv-python paketi önceden derlendiği için AVIF desteği içermeyebilir. Ultralytics, OpenCV desteği olmadığında AVIF görselleri için yedek olarak pillow-avif-plugin ile Pillow kullanır.
Link to this sectionKullanım#
Bir YOLO modelini COCO12-Formats veri kümesi üzerinde eğitmek için aşağıdaki örnekleri kullan:
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 sectionFormata Özel Notlar#
Link to this sectionAVIF (AV1 Görsel Dosya Formatı)#
AVIF, AV1 video kodlayıcısını temel alan ve mükemmel sıkıştırma sunan modern bir görsel formatıdır. pillow-avif-plugin gerektirir:
pip install pillow-avif-pluginLink to this sectionDNG (Dijital Negatif)#
DNG, Adobe'nin TIFF tabanlı açık RAW formatıdır. Test amaçlı olarak veri kümesi, .dng uzantılı TIFF tabanlı dosyalar kullanır.
Link to this sectionJP2 (JPEG 2000)#
JPEG 2000, geleneksel JPEG'e göre daha iyi sıkıştırma ve kalite sunan, dalgacık tabanlı bir görsel sıkıştırma standardıdır. Tıbbi görüntülemede (DICOM), coğrafi uygulamalarda ve dijital sinemada yaygın olarak kullanılır. Hem OpenCV hem de Pillow tarafından yerel olarak desteklenir.
Link to this sectionMPO (Çoklu Resim Nesnesi)#
MPO dosyaları stereoskopik (3D) görseller için kullanılır. Veri kümesi, format testi için .mpo uzantılı standart JPEG verilerini depolar.
Link to this sectionHEIC (Yüksek Verimli Görsel Kodlama)#
HEIC, düzgün kodlama için pillow-heif paketini gerektirir:
pip install pillow-heifLink to this sectionKullanım Durumları#
Link to this sectionCI/CD Testi#
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 NoneLink to this sectionFormat Doğrulama#
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 sectionAlıntılar ve Teşekkür#
COCO veri kümesini araştırmanda kullanıyorsan lütfen kaynak göster:
@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 sectionSSS#
Link to this sectionCOCO12-Formats Veri Kümesi Ne İçin Kullanılır?#
COCO12-Formats veri kümesi, Ultralytics YOLO eğitim hatlarında görsel formatı uyumluluğunu test etmek için tasarlanmıştır. Desteklenen 12 görsel formatının (AVIF, BMP, DNG, HEIC, JP2, JPEG, JPG, MPO, PNG, TIF, TIFF, WebP) doğru şekilde yüklenmesini ve işlenmesini sağlar.
Link to this sectionNeden Birden Fazla Görsel Formatı Test Edilmeli?#
Farklı görsel formatları benzersiz özelliklere (sıkıştırma, renk derinliği, renk uzayları) sahiptir. Tüm formatları test etmek şunları sağlar:
- Sağlam görsel yükleme kodu
- Çeşitli veri kümelerinde uyumluluk
- Formata özel hataların erkenden tespit edilmesi
Link to this sectionHangi Formatlar Özel Bağımlılıklar Gerektirir?#
- AVIF:
pillow-avif-plugingerektirir - HEIC:
pillow-heifgerektirir