COCO128 데이터 세트
소개
Ultralytics COCO128은 작지만 다용도로 사용할 수 있는 객체 감지 데이터 세트로, COCO 열차 2017 세트의 첫 번째 128개 이미지로 구성되어 있습니다. 이 데이터 세트는 물체 감지 모델을 테스트 및 디버깅하거나 새로운 감지 접근 방식을 실험하는 데 이상적입니다. 128개의 이미지로 구성되어 있어 쉽게 관리할 수 있을 만큼 작지만, 훈련 파이프라인의 오류를 테스트하고 더 큰 데이터 세트를 훈련하기 전에 건전성 검사 역할을 할 수 있을 만큼 다양합니다.
Watch: Ultralytics COCO 데이터 세트 개요
이 데이터 세트는 Ultralytics HUB 및 YOLO11.
데이터 세트 YAML
데이터 세트 구성을 정의하는 데는 YAML(또 다른 마크업 언어) 파일이 사용됩니다. 여기에는 데이터 세트의 경로, 클래스 및 기타 관련 정보에 대한 정보가 포함되어 있습니다. COCO128 데이터 세트의 경우, 데이터 세트의 coco128.yaml
파일은 다음 위치에서 유지됩니다. https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco128.yaml.
ultralytics.yaml
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# COCO128 dataset https://www.kaggle.com/datasets/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/detect/coco/
# Example usage: yolo train data=coco128.yaml
# parent
# ├── ultralytics
# └── datasets
# └── coco128 ← downloads here (7 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: ../datasets/coco128 # dataset root dir
train: images/train2017 # train images (relative to 'path') 128 images
val: images/train2017 # val images (relative to 'path') 128 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/coco128.zip
사용법
이미지 크기가 640인 COCO128 데이터 세트에 대해 100개의 에포크에 대해 YOLO11n 모델을 훈련하려면 다음 코드 조각을 사용할 수 있습니다. 사용 가능한 인수의 전체 목록은 모델 학습 페이지를 참조하세요.
열차 예시
샘플 이미지 및 주석
다음은 COCO128 데이터 세트의 이미지와 해당 주석의 몇 가지 예입니다:
- 모자이크 이미지: 이 이미지는 모자이크된 데이터 세트 이미지로 구성된 훈련 배치의 예시입니다. 모자이크는 여러 이미지를 하나의 이미지로 결합하여 각 훈련 배치 내에서 다양한 개체와 장면을 늘리기 위해 훈련 중에 사용되는 기술입니다. 이를 통해 다양한 객체 크기, 종횡비 및 컨텍스트에 일반화하는 모델의 능력을 향상시킬 수 있습니다.
이 예는 COCO128 데이터 세트에 포함된 이미지의 다양성과 복잡성, 그리고 훈련 과정에서 모자이킹을 사용할 때의 이점을 보여줍니다.
인용 및 감사
연구 또는 개발 작업에 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ár},
year={2015},
eprint={1405.0312},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
컴퓨터 비전 커뮤니티를 위해 이 귀중한 리소스를 만들고 유지 관리해 주신 COCO 컨소시엄에 감사의 말씀을 드립니다. COCO 데이터 세트 및 제작자에 대한 자세한 내용은 COCO 데이터 세트 웹사이트를 참조하세요.
자주 묻는 질문
Ultralytics COCO128 데이터 세트는 어떤 용도로 사용되나요?
Ultralytics COCO128 데이터 세트는 COCO train 2017 데이터 세트의 첫 128개 이미지를 포함하는 컴팩트한 하위 집합입니다. 주로 객체 감지 모델을 테스트 및 디버깅하고, 새로운 감지 접근 방식을 실험하고, 더 큰 데이터 세트로 확장하기 전에 훈련 파이프라인을 검증하는 데 사용됩니다. 관리하기 쉬운 크기로 빠른 반복에 적합하면서도 의미 있는 테스트 사례가 될 만큼 충분한 다양성을 제공합니다.
COCO128 데이터 세트를 사용하여 YOLO11 모델을 훈련하려면 어떻게 해야 하나요?
COCO128 데이터 세트에서 YOLO11 모델을 훈련하려면 Python 또는 CLI 명령을 사용할 수 있습니다. 방법은 다음과 같습니다:
from ultralytics import YOLO
# Load a pretrained model
model = YOLO("yolo11n.pt")
# Train the model
results = model.train(data="coco128.yaml", epochs=100, imgsz=640)
```
=== "CLI"
`bash
yolo detect train data=coco128.yaml model=yolo11n.pt epochs=100 imgsz=640
`
For more training options and parameters, refer to the [Training](../../modes/train.md) documentation.
### What are the benefits of using mosaic augmentation with COCO128?
Mosaic augmentation, as shown in the sample images, combines multiple training images into a single composite image. This technique offers several benefits when training with COCO128:
- Increases the variety of objects and contexts within each training batch
- Improves model generalization across different object sizes and aspect ratios
- Enhances detection performance for objects at various scales
- Maximizes the utility of a small dataset by creating more diverse training samples
This technique is particularly valuable for smaller datasets like COCO128, helping models learn more robust features from limited data.
### How does COCO128 compare to other COCO dataset variants?
COCO128 (128 images) sits between [COCO8](../detect/coco8.md) (8 images) and the full [COCO](../detect/coco.md) dataset (118K+ images) in terms of size:
- **COCO8**: Contains just 8 images (4 train, 4 val) - ideal for quick tests and debugging
- **COCO128**: Contains 128 images - balanced between size and diversity
- **Full COCO**: Contains 118K+ training images - comprehensive but resource-intensive
COCO128 provides a good middle ground, offering more diversity than COCO8 while remaining much more manageable than the full COCO dataset for experimentation and initial model development.
### Can I use COCO128 for tasks other than object detection?
While COCO128 is primarily designed for object detection, the dataset's annotations can be adapted for other computer vision tasks:
- **Instance segmentation**: Using the segmentation masks provided in the annotations
- **Keypoint detection**: For images containing people with keypoint annotations
- **Transfer learning**: As a starting point for fine-tuning models for custom tasks
For specialized tasks like [segmentation](../../tasks/segment.md), consider using purpose-built variants like [COCO8-seg](../segment/coco8-seg.md) which include the appropriate annotations.