Cityscapes8 데이터셋#
소개#
Ultralytics Cityscapes8 데이터셋은 Cityscapes 데이터셋에서 추출한 8개 이미지(학습용 4개, 검증용 4개)로 구성된 간결한 시맨틱 세그멘테이션 데이터셋입니다. YOLO 시맨틱 세그멘테이션 모델과 학습 파이프라인을 빠르게 테스트하고 디버깅하며 실험할 수 있도록 설계되었습니다. 도심 장면 데이터는 전체 Cityscapes 데이터셋으로 확장하기 전에 파이프라인을 점검하는 데 유용합니다.
Cityscapes8은 전체 Cityscapes 데이터셋과 동일한 평가 클래스 19개 및 label_mapping 동작을 사용하며, YOLO26 시맨틱 세그멘테이션 워크플로와 완벽하게 호환됩니다.
Cityscapes8은 파이프라인 테스트용이며 벤치마킹용이 아닙니다. 이미지 8개만으로는 의미 있는 mIoU 비교가 어렵습니다. 대표성 있는 결과를 얻으려면 전체 Cityscapes 검증 세트를 사용하세요.
데이터셋 구조#
Cityscapes8은 전체 데이터셋의 구조를 따르지만 test 분할은 없습니다:
cityscapes8/
├── images/
│ ├── train/ # 4 images
│ └── val/ # 4 images
└── masks/
├── train/ # 4 single-channel PNG masks
└── val/ # 4 single-channel PNG masksmasks_dir: masks 필드를 통해 마스크와 이미지를 연결하며, label_mapping은 원본 Cityscapes 레이블 ID를 전체 Cityscapes 데이터셋 구조에 설명된 연속적인 학습 ID 19개로 변환합니다.
데이터셋 YAML#
Cityscapes8 데이터셋 설정은 데이터셋 경로, 클래스 이름 및 기타 필수 메타데이터를 지정하는 데이터셋 YAML 파일에 정의되어 있습니다. Ultralytics GitHub 저장소에서 공식 cityscapes8.yaml 파일을 확인할 수 있습니다. YAML에는 패키지로 제공되는 소규모 하위 집합의 다운로드 URL이 포함되어 있습니다.
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# Cityscapes semantic segmentation dataset (19 classes)
# Documentation: https://docs.ultralytics.com/datasets/semantic/cityscapes8
# Example usage: yolo semantic train data=cityscapes8.yaml model=yolo26n-sem.pt
# parent
# ├── ultralytics
# └── datasets
# └── cityscapes8 ← downloads here (small subset)
# └── images
# └── masks
# Dataset root directory
path: cityscapes8 # dataset root dir
train: images/train # train images (relative to 'path') 4 images
val: images/val # val images (relative to 'path') 4 images
masks_dir: masks # semantic mask directory
# Cityscapes 19-class labels
names:
0: road
1: sidewalk
2: building
3: wall
4: fence
5: pole
6: traffic light
7: traffic sign
8: vegetation
9: terrain
10: sky
11: person
12: rider
13: car
14: truck
15: bus
16: train
17: motorcycle
18: bicycle
# Map source label IDs to train IDs; ignore_label is converted to 255.
label_mapping:
-1: ignore_label
0: ignore_label
1: ignore_label
2: ignore_label
3: ignore_label
4: ignore_label
5: ignore_label
6: ignore_label
7: 0
8: 1
9: ignore_label
10: ignore_label
11: 2
12: 3
13: 4
14: ignore_label
15: ignore_label
16: ignore_label
17: 5
18: ignore_label
19: 6
20: 7
21: 8
22: 9
23: 10
24: 11
25: 12
26: 13
27: 14
28: 15
29: ignore_label
30: ignore_label
31: 16
32: 17
33: 18
# Download URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/cityscapes8.zip사용법#
Cityscapes8 데이터셋으로 YOLO26n-sem 모델을 100 에포크 동안 이미지 크기 1024로 학습하려면 다음 예제를 사용하세요. 학습 옵션 전체 목록은 YOLO 학습 문서를 참조하세요.
from ultralytics import YOLO
# 사전 학습된 YOLO26n-sem 모델 로드
model = YOLO("yolo26n-sem.pt")
# Cityscapes8으로 모델 학습
results = model.train(data="cityscapes8.yaml", epochs=100, imgsz=1024)Ultralytics Platform을 사용해 클라우드에서 Cityscapes8을 관리하고 시맨틱 세그멘테이션 모델을 학습할 수도 있습니다.
인용, 라이선스 및 감사의 말#
Cityscapes8은 독자적인 비상업적 라이선스로 공개된 Cityscapes에서 추출한 데이터셋입니다. 자세한 내용은 전체 Cityscapes 데이터셋 페이지를 참조하세요.
연구 또는 개발 작업에서 Cityscapes 데이터셋을 사용하는 경우 다음 논문을 인용해 주세요:
@inproceedings{Cordts2016Cityscapes,
title={The Cityscapes Dataset for Semantic Urban Scene Understanding},
author={Cordts, Marius and Omran, Mohamed and Ramos, Sebastian and Rehfeld, Timo and Enzweiler, Markus and Benenson, Rodrigo and Franke, Uwe and Roth, Stefan and Schiele, Bernt},
booktitle={Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2016}
}자율 주행 및 컴퓨터 비전 커뮤니티에 지속해서 기여하는 Cityscapes 팀에 특별히 감사드립니다.
자주 묻는 질문#
Ultralytics Cityscapes8 데이터셋은 시맨틱 세그멘테이션 모델을 빠르게 테스트하고 디버깅하도록 설계되었습니다. 이미지가 8개뿐이므로(학습용 4개, 검증용 4개), 전체 Cityscapes 데이터셋으로 확장하기 전에 마스크 로드, 증강, 검증 및 내보내기 경로를 포함한 YOLO 시맨틱 세그멘테이션 파이프라인을 검증하는 데 적합합니다. 자세한 내용은 Cityscapes8 YAML 설정을 살펴보세요.
Cityscapes8은 Cityscapes의 학습 이미지 2,975개/검증 이미지 500개 분할에서 이미지 8개(학습용 4개, 검증용 4개)를 추출하며, 동일한 클래스 19개와
label_mapping을 사용합니다. 따라서data=대신cityscapes8.yaml이 아닌cityscapes.yaml를 가리키도록 설정하면 Cityscapes8에서 실행되는 파이프라인을 수정 없이 전체 데이터셋에서 실행할 수 있습니다. 전체 데이터셋과 달리 Cityscapes8은 수동 다운로드 단계가 필요 없으며test분할도 없습니다.Python 또는 CLI를 사용해 Cityscapes8에서 YOLO26 시맨틱 세그멘테이션 모델을 학습할 수 있습니다:
학습 예제from ultralytics import YOLO # 사전 학습된 YOLO26n-sem 모델 로드 model = YOLO("yolo26n-sem.pt") # Cityscapes8으로 모델 학습 results = model.train(data="cityscapes8.yaml", epochs=100, imgsz=1024)추가 학습 옵션은 YOLO 학습 문서를 참조하세요.
아니요. Cityscapes8은 의미 있는 모델 비교를 하기에는 너무 작으며, 학습 및 평가 파이프라인을 확인하기 위한 용도입니다. 시맨틱 세그멘테이션에서 대표성 있는 벤치마크 결과가 필요하면 전체 Cityscapes 검증 세트를 사용하세요.



