Ultralytics YOLO27:

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 masks

마스크는 masks_dir: masks 필드를 통해 이미지와 연결되며, label_mapping은 소스 Cityscapes 레이블 ID를 전체 Cityscapes 데이터셋 구조에 설명된 19개의 연속적인 train ID로 변환합니다.

데이터셋 YAML#

Cityscapes8 데이터셋 구성은 데이터셋 경로, 클래스 이름 및 기타 필수 메타데이터를 지정하는 데이터셋 YAML 파일에 정의되어 있습니다. Ultralytics GitHub 리포지토리에서 공식 cityscapes8.yaml 파일을 확인할 수 있습니다. YAML에는 패키징된 소규모 서브셋의 다운로드 URL이 포함되어 있습니다.

ultralytics/cfg/datasets/cityscapes8.yaml
# 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 데이터셋에서 이미지 크기 1024로 100 epoch 동안 YOLO26n-sem 모델을 학습하려면 다음 예제를 사용하십시오. 전체 학습 옵션 목록은 YOLO 학습 문서를 참조하십시오.

학습 예제
from ultralytics import YOLO

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

# Train the model on 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 팀에 특별히 감사드립니다.

FAQ#

  • Ultralytics Cityscapes8 데이터셋은 시맨틱 세그멘테이션 모델을 신속하게 테스트하고 디버깅하기 위해 설계되었습니다. 이미지가 8개(학습용 4개, 검증용 4개)뿐이므로 전체 Cityscapes 데이터셋으로 확장하기 전에 마스크 로딩, 증강, 검증 및 export 경로를 비롯한 YOLO 시맨틱 세그멘테이션 파이프라인을 확인하는 데 이상적입니다. 자세한 내용은 Cityscapes8 YAML 구성을 살펴보십시오.

  • Cityscapes8은 Cityscapes의 2,975개 학습/500개 검증 분할에서 이미지 8개(학습 4개, 검증 4개)를 샘플링하며, 동일한 19개 클래스와 label_mapping을 사용합니다. 따라서 Cityscapes8에서 실행되는 파이프라인은 수정 없이 전체 데이터셋에서도 실행됩니다. cityscapes8.yaml 대신 cityscapes.yaml를 가리키도록 data=만 지정하면 됩니다. 전체 데이터셋과 달리 Cityscapes8에는 수동 다운로드 단계와 test 분할이 없습니다.

  • Python 또는 CLI를 사용하여 Cityscapes8에서 YOLO26 시맨틱 세그멘테이션 모델을 학습할 수 있습니다:

    학습 예제
    from ultralytics import YOLO
    
    # Load a pretrained YOLO26n-sem model
    model = YOLO("yolo26n-sem.pt")
    
    # Train the model on Cityscapes8
    results = model.train(data="cityscapes8.yaml", epochs=100, imgsz=1024)

    추가 학습 옵션은 YOLO 학습 문서를 참조하십시오.

  • 아니요. Cityscapes8은 의미 있는 모델 비교를 수행하기에는 너무 작으며, 학습 및 평가 파이프라인 점검을 위한 데이터셋입니다. 시맨틱 세그멘테이션에 대해 대표성 있는 벤치마크 결과가 필요할 때는 전체 Cityscapes 검증 세트를 사용하십시오.

댓글