ADE20K Dataset
The ADE20K dataset is a large-scale semantic segmentation and scene parsing benchmark released by MIT CSAIL. It provides densely annotated images covering a wide variety of indoor, outdoor, object, and stuff categories, making it an essential resource for researchers and developers working on dense scene understanding tasks with Ultralytics YOLO models.
Key Features
- ADE20K contains 20,210 training images, 2,000 validation images, and 3,352 test images.
- The dataset covers 150 semantic classes spanning indoor, outdoor, object, and stuff categories.
- Annotations are pixel-level segmentation masks suitable for dense scene parsing.
Dataset Structure
The Ultralytics configuration expects the official ADEChallengeData2016 layout:
ADEChallengeData2016/
├── images/
│ ├── training/
│ └── validation/
└── annotations/
├── training/
└── validation/The masks_dir field is set to annotations, so each image under images/ is paired with its corresponding mask under annotations/. The original ADE20K masks use source label IDs where 0 is ignored, and the label_mapping section converts valid labels 1 through 150 to contiguous train IDs 0 through 149, mapping ignored pixels to 255.
Applications
ADE20K is widely used for training and evaluating deep learning models in semantic segmentation and scene parsing. Its diverse set of categories and complex scenes make it valuable for applications such as autonomous navigation, robotics, augmented reality, and image editing.
The breadth of indoor and outdoor scenes also makes ADE20K a strong benchmark for evaluating model generalization across domains.
Dataset YAML
A dataset YAML file defines the ADE20K paths, classes, mask directory, and label mapping. The ade20k.yaml file is maintained at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/ade20k.yaml.
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# ADE20K semantic segmentation dataset (150 classes)
# Documentation: https://docs.ultralytics.com/datasets/semantic/ade20k/
# Example usage: yolo semantic train data=ade20k.yaml model=yolo26n-sem.pt
# parent
# ├── ultralytics
# └── datasets
# └── ADEChallengeData2016 ← downloads here (1 GB)
# └── images
# └── annotations
# Dataset root directory
path: ADEChallengeData2016
train: images/training
val: images/validation
masks_dir: annotations # semantic mask directory
# ADE20K 150-class labels
names:
0: wall
1: building
2: sky
3: floor
4: tree
5: ceiling
6: road
7: bed
8: windowpane
9: grass
10: cabinet
11: sidewalk
12: person
13: earth
14: door
15: table
16: mountain
17: plant
18: curtain
19: chair
20: car
21: water
22: painting
23: sofa
24: shelf
25: house
26: sea
27: mirror
28: rug
29: field
30: armchair
31: seat
32: fence
33: desk
34: rock
35: wardrobe
36: lamp
37: bathtub
38: railing
39: cushion
40: base
41: box
42: column
43: signboard
44: chest of drawers
45: counter
46: sand
47: sink
48: skyscraper
49: fireplace
50: refrigerator
51: grandstand
52: path
53: stairs
54: runway
55: case
56: pool table
57: pillow
58: screen door
59: stairway
60: river
61: bridge
62: bookcase
63: blind
64: coffee table
65: toilet
66: flower
67: book
68: hill
69: bench
70: countertop
71: stove
72: palm
73: kitchen island
74: computer
75: swivel chair
76: boat
77: bar
78: arcade machine
79: hovel
80: bus
81: towel
82: light
83: truck
84: tower
85: chandelier
86: awning
87: streetlight
88: booth
89: television receiver
90: airplane
91: dirt track
92: apparel
93: pole
94: land
95: bannister
96: escalator
97: ottoman
98: bottle
99: buffet
100: poster
101: stage
102: van
103: ship
104: fountain
105: conveyor belt
106: canopy
107: washer
108: plaything
109: swimming pool
110: stool
111: barrel
112: basket
113: waterfall
114: tent
115: bag
116: minibike
117: cradle
118: oven
119: ball
120: food
121: step
122: tank
123: trade name
124: microwave
125: pot
126: animal
127: bicycle
128: lake
129: dishwasher
130: screen
131: blanket
132: sculpture
133: hood
134: sconce
135: vase
136: traffic light
137: tray
138: ashcan
139: fan
140: pier
141: crt screen
142: plate
143: monitor
144: bulletin board
145: shower
146: radiator
147: glass
148: clock
149: flag
# Map source label IDs to train IDs; ignore_label is converted to 255.
label_mapping:
0: ignore_label
1: 0
2: 1
3: 2
4: 3
5: 4
6: 5
7: 6
8: 7
9: 8
10: 9
11: 10
12: 11
13: 12
14: 13
15: 14
16: 15
17: 16
18: 17
19: 18
20: 19
21: 20
22: 21
23: 22
24: 23
25: 24
26: 25
27: 26
28: 27
29: 28
30: 29
31: 30
32: 31
33: 32
34: 33
35: 34
36: 35
37: 36
38: 37
39: 38
40: 39
41: 40
42: 41
43: 42
44: 43
45: 44
46: 45
47: 46
48: 47
49: 48
50: 49
51: 50
52: 51
53: 52
54: 53
55: 54
56: 55
57: 56
58: 57
59: 58
60: 59
61: 60
62: 61
63: 62
64: 63
65: 64
66: 65
67: 66
68: 67
69: 68
70: 69
71: 70
72: 71
73: 72
74: 73
75: 74
76: 75
77: 76
78: 77
79: 78
80: 79
81: 80
82: 81
83: 82
84: 83
85: 84
86: 85
87: 86
88: 87
89: 88
90: 89
91: 90
92: 91
93: 92
94: 93
95: 94
96: 95
97: 96
98: 97
99: 98
100: 99
101: 100
102: 101
103: 102
104: 103
105: 104
106: 105
107: 106
108: 107
109: 108
110: 109
111: 110
112: 111
113: 112
114: 113
115: 114
116: 115
117: 116
118: 117
119: 118
120: 119
121: 120
122: 121
123: 122
124: 123
125: 124
126: 125
127: 126
128: 127
129: 128
130: 129
131: 130
132: 131
133: 132
134: 133
135: 134
136: 135
137: 136
138: 137
139: 138
140: 139
141: 140
142: 141
143: 142
144: 143
145: 144
146: 145
147: 146
148: 147
149: 148
150: 149
# Download URL (manual): http://data.csail.mit.edu/places/ADEchallenge/ADEChallengeData2016.zipUsage
To train a YOLO26n-sem model on the ADE20K dataset for 100 epochs with an image size of 512, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model Training page.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n-sem.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="ade20k.yaml", epochs=100, imgsz=512)Citations and Acknowledgments
If you use the ADE20K dataset in your research or development work, please cite the following paper:
@inproceedings{zhou2017scene,
title={Scene Parsing through ADE20K Dataset},
author={Zhou, Bolei and Zhao, Hang and Puig, Xavier and Fidler, Sanja and Barriuso, Adela and Torralba, Antonio},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
year={2017}
}We would like to acknowledge the MIT CSAIL Computer Vision Group for creating and maintaining this valuable resource for the computer vision community. For more information about the ADE20K dataset and its creators, visit the ADE20K dataset website.
FAQ
What is the ADE20K dataset and why is it important for computer vision?
The ADE20K dataset is a large-scale scene parsing benchmark used for semantic segmentation. It contains 25,562 densely annotated images across 150 categories covering indoor, outdoor, object, and stuff classes. Researchers use ADE20K because of its diverse scenes, fine-grained category set, and standardized evaluation metrics like mean Intersection over Union (mIoU), which make it ideal for benchmarking dense prediction models.
How can I train a YOLO model using the ADE20K dataset?
To train a YOLO26n-sem model on the ADE20K dataset for 100 epochs with an image size of 512, you can use the following code snippets. For a detailed list of available arguments, refer to the model Training page.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n-sem.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="ade20k.yaml", epochs=100, imgsz=512)How is the ADE20K dataset structured?
The ADE20K dataset follows the official ADEChallengeData2016 layout, with images organized under images/training/ and images/validation/, and corresponding masks under annotations/training/ and annotations/validation/. The Ultralytics YAML file pairs each image with its mask via the masks_dir: annotations field, and uses label_mapping to convert source label IDs 1–150 into contiguous train IDs 0–149, mapping the ignore label to 255.
Why does ADE20K use label_mapping?
ADE20K annotation masks store source label IDs where 0 denotes the ignore or background class. The label_mapping section maps valid labels 1 through 150 to contiguous train IDs 0 through 149, and assigns 255 to ignored pixels so they are excluded from the loss and metrics during training and validation.