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'3': alley
|
14 |
+
'4': amphitheater
|
15 |
+
'5': amusement arcade
|
16 |
+
'6': amusement park
|
17 |
+
'7': anechoic chamber
|
18 |
+
'8': apartment building outdoor
|
19 |
+
'9': apse indoor
|
20 |
+
'10': aquarium
|
21 |
+
'11': aqueduct
|
22 |
+
'12': arch
|
23 |
+
'13': archive
|
24 |
+
'14': arrival gate outdoor
|
25 |
+
'15': art gallery
|
26 |
+
'16': art school
|
27 |
+
'17': art studio
|
28 |
+
'18': assembly line
|
29 |
+
'19': athletic field outdoor
|
30 |
+
'20': atrium public
|
31 |
+
'21': attic
|
32 |
+
'22': auditorium
|
33 |
+
'23': auto factory
|
34 |
+
'24': badlands
|
35 |
+
'25': badminton court indoor
|
36 |
+
'26': baggage claim
|
37 |
+
'27': bakery shop
|
38 |
+
'28': balcony exterior
|
39 |
+
'29': balcony interior
|
40 |
+
'30': ball pit
|
41 |
+
'31': ballroom
|
42 |
+
'32': bamboo forest
|
43 |
+
'33': banquet hall
|
44 |
+
'34': bar
|
45 |
+
'35': barn
|
46 |
+
'36': barndoor
|
47 |
+
'37': baseball field
|
48 |
+
'38': basement
|
49 |
+
'39': basilica
|
50 |
+
'40': basketball court outdoor
|
51 |
+
'41': bathroom
|
52 |
+
'42': batters box
|
53 |
+
'43': bayou
|
54 |
+
'44': bazaar indoor
|
55 |
+
'45': bazaar outdoor
|
56 |
+
'46': beach
|
57 |
+
'47': beauty salon
|
58 |
+
'48': bedroom
|
59 |
+
'49': berth
|
60 |
+
'50': biology laboratory
|
61 |
+
'51': bistro indoor
|
62 |
+
'52': boardwalk
|
63 |
+
'53': boat deck
|
64 |
+
'54': boathouse
|
65 |
+
'55': bookstore
|
66 |
+
'56': booth indoor
|
67 |
+
'57': botanical garden
|
68 |
+
'58': bow window indoor
|
69 |
+
'59': bow window outdoor
|
70 |
+
'60': bowling alley
|
71 |
+
'61': boxing ring
|
72 |
+
'62': brewery indoor
|
73 |
+
'63': bridge
|
74 |
+
'64': building facade
|
75 |
+
'65': bullring
|
76 |
+
'66': burial chamber
|
77 |
+
'67': bus interior
|
78 |
+
'68': butchers shop
|
79 |
+
'69': butte
|
80 |
+
'70': cabin outdoor
|
81 |
+
'71': cafeteria
|
82 |
+
'72': campsite
|
83 |
+
'73': campus
|
84 |
+
'74': canal natural
|
85 |
+
'75': canal urban
|
86 |
+
'76': candy store
|
87 |
+
'77': canyon
|
88 |
+
'78': car interior backseat
|
89 |
+
'79': car interior frontseat
|
90 |
+
'80': carrousel
|
91 |
+
'81': casino indoor
|
92 |
+
'82': castle
|
93 |
+
'83': catacomb
|
94 |
+
'84': cathedral indoor
|
95 |
+
'85': cathedral outdoor
|
96 |
+
'86': cavern indoor
|
97 |
+
'87': cemetery
|
98 |
+
'88': chalet
|
99 |
+
'89': cheese factory
|
100 |
+
'90': chemistry lab
|
101 |
+
'91': chicken coop indoor
|
102 |
+
'92': chicken coop outdoor
|
103 |
+
'93': childs room
|
104 |
+
'94': church indoor
|
105 |
+
'95': church outdoor
|
106 |
+
'96': classroom
|
107 |
+
'97': clean room
|
108 |
+
'98': cliff
|
109 |
+
'99': cloister indoor
|
110 |
+
'100': closet
|
111 |
+
'101': clothing store
|
112 |
+
'102': coast
|
113 |
+
'103': cockpit
|
114 |
+
'104': coffee shop
|
115 |
+
'105': computer room
|
116 |
+
'106': conference center
|
117 |
+
'107': conference room
|
118 |
+
'108': construction site
|
119 |
+
'109': control room
|
120 |
+
'110': control tower outdoor
|
121 |
+
'111': corn field
|
122 |
+
'112': corral
|
123 |
+
'113': corridor
|
124 |
+
'114': cottage garden
|
125 |
+
'115': courthouse
|
126 |
+
'116': courtroom
|
127 |
+
'117': courtyard
|
128 |
+
'118': covered bridge exterior
|
129 |
+
'119': creek
|
130 |
+
'120': crevasse
|
131 |
+
'121': crosswalk
|
132 |
+
'122': cubicle office
|
133 |
+
'123': dam
|
134 |
+
'124': delicatessen
|
135 |
+
'125': dentists office
|
136 |
+
'126': desert sand
|
137 |
+
'127': desert vegetation
|
138 |
+
'128': diner indoor
|
139 |
+
'129': diner outdoor
|
140 |
+
'130': dinette home
|
141 |
+
'131': dinette vehicle
|
142 |
+
'132': dining car
|
143 |
+
'133': dining room
|
144 |
+
'134': discotheque
|
145 |
+
'135': dock
|
146 |
+
'136': doorway outdoor
|
147 |
+
'137': dorm room
|
148 |
+
'138': driveway
|
149 |
+
'139': driving range outdoor
|
150 |
+
'140': drugstore
|
151 |
+
'141': electrical substation
|
152 |
+
'142': elevator door
|
153 |
+
'143': elevator interior
|
154 |
+
'144': elevator shaft
|
155 |
+
'145': engine room
|
156 |
+
'146': escalator indoor
|
157 |
+
'147': excavation
|
158 |
+
'148': factory indoor
|
159 |
+
'149': fairway
|
160 |
+
'150': fastfood restaurant
|
161 |
+
'151': field cultivated
|
162 |
+
'152': field wild
|
163 |
+
'153': fire escape
|
164 |
+
'154': fire station
|
165 |
+
'155': firing range indoor
|
166 |
+
'156': fishpond
|
167 |
+
'157': florist shop indoor
|
168 |
+
'158': food court
|
169 |
+
'159': forest broadleaf
|
170 |
+
'160': forest needleleaf
|
171 |
+
'161': forest path
|
172 |
+
'162': forest road
|
173 |
+
'163': formal garden
|
174 |
+
'164': fountain
|
175 |
+
'165': galley
|
176 |
+
'166': game room
|
177 |
+
'167': garage indoor
|
178 |
+
'168': garbage dump
|
179 |
+
'169': gas station
|
180 |
+
'170': gazebo exterior
|
181 |
+
'171': general store indoor
|
182 |
+
'172': general store outdoor
|
183 |
+
'173': gift shop
|
184 |
+
'174': golf course
|
185 |
+
'175': greenhouse indoor
|
186 |
+
'176': greenhouse outdoor
|
187 |
+
'177': gymnasium indoor
|
188 |
+
'178': hangar indoor
|
189 |
+
'179': hangar outdoor
|
190 |
+
'180': harbor
|
191 |
+
'181': hayfield
|
192 |
+
'182': heliport
|
193 |
+
'183': herb garden
|
194 |
+
'184': highway
|
195 |
+
'185': hill
|
196 |
+
'186': home office
|
197 |
+
'187': hospital
|
198 |
+
'188': hospital room
|
199 |
+
'189': hot spring
|
200 |
+
'190': hot tub outdoor
|
201 |
+
'191': hotel outdoor
|
202 |
+
'192': hotel room
|
203 |
+
'193': house
|
204 |
+
'194': hunting lodge outdoor
|
205 |
+
'195': ice cream parlor
|
206 |
+
'196': ice floe
|
207 |
+
'197': ice shelf
|
208 |
+
'198': ice skating rink indoor
|
209 |
+
'199': ice skating rink outdoor
|
210 |
+
'200': iceberg
|
211 |
+
'201': igloo
|
212 |
+
'202': industrial area
|
213 |
+
'203': inn outdoor
|
214 |
+
'204': islet
|
215 |
+
'205': jacuzzi indoor
|
216 |
+
'206': jail cell
|
217 |
+
'207': jail indoor
|
218 |
+
'208': jewelry shop
|
219 |
+
'209': kasbah
|
220 |
+
'210': kennel indoor
|
221 |
+
'211': kennel outdoor
|
222 |
+
'212': kindergarden classroom
|
223 |
+
'213': kitchen
|
224 |
+
'214': kitchenette
|
225 |
+
'215': labyrinth outdoor
|
226 |
+
'216': lake natural
|
227 |
+
'217': landfill
|
228 |
+
'218': landing deck
|
229 |
+
'219': laundromat
|
230 |
+
'220': lecture room
|
231 |
+
'221': library indoor
|
232 |
+
'222': library outdoor
|
233 |
+
'223': lido deck outdoor
|
234 |
+
'224': lift bridge
|
235 |
+
'225': lighthouse
|
236 |
+
'226': limousine interior
|
237 |
+
'227': living room
|
238 |
+
'228': lobby
|
239 |
+
'229': lock chamber
|
240 |
+
'230': locker room
|
241 |
+
'231': mansion
|
242 |
+
'232': manufactured home
|
243 |
+
'233': market indoor
|
244 |
+
'234': market outdoor
|
245 |
+
'235': marsh
|
246 |
+
'236': martial arts gym
|
247 |
+
'237': mausoleum
|
248 |
+
'238': medina
|
249 |
+
'239': moat water
|
250 |
+
'240': monastery outdoor
|
251 |
+
'241': mosque indoor
|
252 |
+
'242': mosque outdoor
|
253 |
+
'243': motel
|
254 |
+
'244': mountain
|
255 |
+
'245': mountain snowy
|
256 |
+
'246': movie theater indoor
|
257 |
+
'247': museum indoor
|
258 |
+
'248': music store
|
259 |
+
'249': music studio
|
260 |
+
'250': nuclear power plant outdoor
|
261 |
+
'251': nursery
|
262 |
+
'252': oast house
|
263 |
+
'253': observatory outdoor
|
264 |
+
'254': ocean
|
265 |
+
'255': office
|
266 |
+
'256': office building
|
267 |
+
'257': oil refinery outdoor
|
268 |
+
'258': oilrig
|
269 |
+
'259': operating room
|
270 |
+
'260': orchard
|
271 |
+
'261': outhouse outdoor
|
272 |
+
'262': pagoda
|
273 |
+
'263': palace
|
274 |
+
'264': pantry
|
275 |
+
'265': park
|
276 |
+
'266': parking garage indoor
|
277 |
+
'267': parking garage outdoor
|
278 |
+
'268': parking lot
|
279 |
+
'269': parlor
|
280 |
+
'270': pasture
|
281 |
+
'271': patio
|
282 |
+
'272': pavilion
|
283 |
+
'273': pharmacy
|
284 |
+
'274': phone booth
|
285 |
+
'275': physics laboratory
|
286 |
+
'276': picnic area
|
287 |
+
'277': pilothouse indoor
|
288 |
+
'278': planetarium outdoor
|
289 |
+
'279': playground
|
290 |
+
'280': playroom
|
291 |
+
'281': plaza
|
292 |
+
'282': podium indoor
|
293 |
+
'283': podium outdoor
|
294 |
+
'284': pond
|
295 |
+
'285': poolroom establishment
|
296 |
+
'286': poolroom home
|
297 |
+
'287': power plant outdoor
|
298 |
+
'288': promenade deck
|
299 |
+
'289': pub indoor
|
300 |
+
'290': pulpit
|
301 |
+
'291': putting green
|
302 |
+
'292': racecourse
|
303 |
+
'293': raceway
|
304 |
+
'294': raft
|
305 |
+
'295': railroad track
|
306 |
+
'296': rainforest
|
307 |
+
'297': reception
|
308 |
+
'298': recreation room
|
309 |
+
'299': residential neighborhood
|
310 |
+
'300': restaurant
|
311 |
+
'301': restaurant kitchen
|
312 |
+
'302': restaurant patio
|
313 |
+
'303': rice paddy
|
314 |
+
'304': riding arena
|
315 |
+
'305': river
|
316 |
+
'306': rock arch
|
317 |
+
'307': rope bridge
|
318 |
+
'308': ruin
|
319 |
+
'309': runway
|
320 |
+
'310': sandbar
|
321 |
+
'311': sandbox
|
322 |
+
'312': sauna
|
323 |
+
'313': schoolhouse
|
324 |
+
'314': sea cliff
|
325 |
+
'315': server room
|
326 |
+
'316': shed
|
327 |
+
'317': shoe shop
|
328 |
+
'318': shopfront
|
329 |
+
'319': shopping mall indoor
|
330 |
+
'320': shower
|
331 |
+
'321': skatepark
|
332 |
+
'322': ski lodge
|
333 |
+
'323': ski resort
|
334 |
+
'324': ski slope
|
335 |
+
'325': sky
|
336 |
+
'326': skyscraper
|
337 |
+
'327': slum
|
338 |
+
'328': snowfield
|
339 |
+
'329': squash court
|
340 |
+
'330': stable
|
341 |
+
'331': stadium baseball
|
342 |
+
'332': stadium football
|
343 |
+
'333': stage indoor
|
344 |
+
'334': staircase
|
345 |
+
'335': street
|
346 |
+
'336': subway interior
|
347 |
+
'337': subway station platform
|
348 |
+
'338': supermarket
|
349 |
+
'339': sushi bar
|
350 |
+
'340': swamp
|
351 |
+
'341': swimming pool indoor
|
352 |
+
'342': swimming pool outdoor
|
353 |
+
'343': synagogue indoor
|
354 |
+
'344': synagogue outdoor
|
355 |
+
'345': television studio
|
356 |
+
'346': temple east asia
|
357 |
+
'347': temple south asia
|
358 |
+
'348': tennis court indoor
|
359 |
+
'349': tennis court outdoor
|
360 |
+
'350': tent outdoor
|
361 |
+
'351': theater indoor procenium
|
362 |
+
'352': theater indoor seats
|
363 |
+
'353': thriftshop
|
364 |
+
'354': throne room
|
365 |
+
'355': ticket booth
|
366 |
+
'356': toll plaza
|
367 |
+
'357': topiary garden
|
368 |
+
'358': tower
|
369 |
+
'359': toyshop
|
370 |
+
'360': track outdoor
|
371 |
+
'361': train railway
|
372 |
+
'362': train station platform
|
373 |
+
'363': tree farm
|
374 |
+
'364': tree house
|
375 |
+
'365': trench
|
376 |
+
'366': underwater coral reef
|
377 |
+
'367': utility room
|
378 |
+
'368': valley
|
379 |
+
'369': van interior
|
380 |
+
'370': vegetable garden
|
381 |
+
'371': veranda
|
382 |
+
'372': veterinarians office
|
383 |
+
'373': viaduct
|
384 |
+
'374': videostore
|
385 |
+
'375': village
|
386 |
+
'376': vineyard
|
387 |
+
'377': volcano
|
388 |
+
'378': volleyball court indoor
|
389 |
+
'379': volleyball court outdoor
|
390 |
+
'380': waiting room
|
391 |
+
'381': warehouse indoor
|
392 |
+
'382': water tower
|
393 |
+
'383': waterfall block
|
394 |
+
'384': waterfall fan
|
395 |
+
'385': waterfall plunge
|
396 |
+
'386': watering hole
|
397 |
+
'387': wave
|
398 |
+
'388': wet bar
|
399 |
+
'389': wheat field
|
400 |
+
'390': wind farm
|
401 |
+
'391': windmill
|
402 |
+
'392': wine cellar barrel storage
|
403 |
+
'393': wine cellar bottle storage
|
404 |
+
'394': wrestling ring indoor
|
405 |
+
'395': yard
|
406 |
+
'396': youth hostel
|
407 |
+
splits:
|
408 |
+
- name: train
|
409 |
+
num_bytes: 2597332
|
410 |
+
num_examples: 19850
|
411 |
+
- name: test
|
412 |
+
num_bytes: 2557632
|
413 |
+
num_examples: 19850
|
414 |
+
download_size: 14342875038
|
415 |
+
dataset_size: 5154964
|
416 |
+
---
|
417 |
+
|
418 |
+
|
419 |
+
# SUN397 dataset
|
420 |
+
|
421 |
+
The database contains 397 categories subset from the SUN dataset for Scene Recognition used in the following paper.
|
422 |
+
The number of images varies across categories, but there are at least 100 images per category, and 108,754 images in total.
|
423 |
+
All images are in jpg format. The images provided here are for research purposes only.
|
424 |
+
|
425 |
+
The file ClassName.txt contains the name list for the 397 categories.
|
426 |
+
|
427 |
+
Please cite the following paper if you use this dataset in your research.
|
428 |
+
|
429 |
+
J. Xiao, J. Hays, K. Ehinger, A. Oliva, and A. Torralba.
|
430 |
+
SUN Database: Large-scale Scene Recognition from Abbey to Zoo.
|
431 |
+
Proceedings of 23rd IEEE Conference on Computer Vision and Pattern Recognition (CVPR2010).
|
432 |
+
|
433 |
+
Please visit our project webpage for more information:
|
434 |
+
http://groups.csail.mit.edu/vision/SUN/
|
435 |
+
|
436 |
+
|
437 |
+
## Usage
|
438 |
+
|
439 |
+
```python
|
440 |
+
from datasets import load_dataset
|
441 |
+
|
442 |
+
dataset = load_dataset('tanganke/sun397')
|
443 |
+
```
|
444 |
+
|
data/test.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5a9cd27961918172a4245bfaed70a4239dc80fcd33425d109cc3e4da912178bd
|
3 |
+
size 7143245981
|
data/train.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9bc8179ecaa9b944a3c8ea9b3080014edd2c8245fc7b21581b156e728e3b4f31
|
3 |
+
size 7199629057
|
sun397.py
ADDED
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
from datasets.data_files import DataFilesDict
|
3 |
+
from datasets.packaged_modules.imagefolder.imagefolder import ImageFolder, ImageFolderConfig
|
4 |
+
|
5 |
+
logger = datasets.logging.get_logger(__name__)
|
6 |
+
|
7 |
+
|
8 |
+
class SUN397(ImageFolder):
|
9 |
+
R"""
|
10 |
+
SUN397 dataset for image classification.
|
11 |
+
"""
|
12 |
+
|
13 |
+
BUILDER_CONFIG_CLASS = ImageFolderConfig
|
14 |
+
BUILDER_CONFIGS = [
|
15 |
+
ImageFolderConfig(
|
16 |
+
name="default",
|
17 |
+
features=("images", "labels"),
|
18 |
+
data_files=DataFilesDict({split: f"data/{split}.zip" for split in ["train", "test"]}),
|
19 |
+
)
|
20 |
+
]
|
21 |
+
|
22 |
+
classnames = [
|
23 |
+
"abbey",
|
24 |
+
"airplane cabin",
|
25 |
+
"airport terminal",
|
26 |
+
"alley",
|
27 |
+
"amphitheater",
|
28 |
+
"amusement arcade",
|
29 |
+
"amusement park",
|
30 |
+
"anechoic chamber",
|
31 |
+
"apartment building outdoor",
|
32 |
+
"apse indoor",
|
33 |
+
"aquarium",
|
34 |
+
"aqueduct",
|
35 |
+
"arch",
|
36 |
+
"archive",
|
37 |
+
"arrival gate outdoor",
|
38 |
+
"art gallery",
|
39 |
+
"art school",
|
40 |
+
"art studio",
|
41 |
+
"assembly line",
|
42 |
+
"athletic field outdoor",
|
43 |
+
"atrium public",
|
44 |
+
"attic",
|
45 |
+
"auditorium",
|
46 |
+
"auto factory",
|
47 |
+
"badlands",
|
48 |
+
"badminton court indoor",
|
49 |
+
"baggage claim",
|
50 |
+
"bakery shop",
|
51 |
+
"balcony exterior",
|
52 |
+
"balcony interior",
|
53 |
+
"ball pit",
|
54 |
+
"ballroom",
|
55 |
+
"bamboo forest",
|
56 |
+
"banquet hall",
|
57 |
+
"bar",
|
58 |
+
"barn",
|
59 |
+
"barndoor",
|
60 |
+
"baseball field",
|
61 |
+
"basement",
|
62 |
+
"basilica",
|
63 |
+
"basketball court outdoor",
|
64 |
+
"bathroom",
|
65 |
+
"batters box",
|
66 |
+
"bayou",
|
67 |
+
"bazaar indoor",
|
68 |
+
"bazaar outdoor",
|
69 |
+
"beach",
|
70 |
+
"beauty salon",
|
71 |
+
"bedroom",
|
72 |
+
"berth",
|
73 |
+
"biology laboratory",
|
74 |
+
"bistro indoor",
|
75 |
+
"boardwalk",
|
76 |
+
"boat deck",
|
77 |
+
"boathouse",
|
78 |
+
"bookstore",
|
79 |
+
"booth indoor",
|
80 |
+
"botanical garden",
|
81 |
+
"bow window indoor",
|
82 |
+
"bow window outdoor",
|
83 |
+
"bowling alley",
|
84 |
+
"boxing ring",
|
85 |
+
"brewery indoor",
|
86 |
+
"bridge",
|
87 |
+
"building facade",
|
88 |
+
"bullring",
|
89 |
+
"burial chamber",
|
90 |
+
"bus interior",
|
91 |
+
"butchers shop",
|
92 |
+
"butte",
|
93 |
+
"cabin outdoor",
|
94 |
+
"cafeteria",
|
95 |
+
"campsite",
|
96 |
+
"campus",
|
97 |
+
"canal natural",
|
98 |
+
"canal urban",
|
99 |
+
"candy store",
|
100 |
+
"canyon",
|
101 |
+
"car interior backseat",
|
102 |
+
"car interior frontseat",
|
103 |
+
"carrousel",
|
104 |
+
"casino indoor",
|
105 |
+
"castle",
|
106 |
+
"catacomb",
|
107 |
+
"cathedral indoor",
|
108 |
+
"cathedral outdoor",
|
109 |
+
"cavern indoor",
|
110 |
+
"cemetery",
|
111 |
+
"chalet",
|
112 |
+
"cheese factory",
|
113 |
+
"chemistry lab",
|
114 |
+
"chicken coop indoor",
|
115 |
+
"chicken coop outdoor",
|
116 |
+
"childs room",
|
117 |
+
"church indoor",
|
118 |
+
"church outdoor",
|
119 |
+
"classroom",
|
120 |
+
"clean room",
|
121 |
+
"cliff",
|
122 |
+
"cloister indoor",
|
123 |
+
"closet",
|
124 |
+
"clothing store",
|
125 |
+
"coast",
|
126 |
+
"cockpit",
|
127 |
+
"coffee shop",
|
128 |
+
"computer room",
|
129 |
+
"conference center",
|
130 |
+
"conference room",
|
131 |
+
"construction site",
|
132 |
+
"control room",
|
133 |
+
"control tower outdoor",
|
134 |
+
"corn field",
|
135 |
+
"corral",
|
136 |
+
"corridor",
|
137 |
+
"cottage garden",
|
138 |
+
"courthouse",
|
139 |
+
"courtroom",
|
140 |
+
"courtyard",
|
141 |
+
"covered bridge exterior",
|
142 |
+
"creek",
|
143 |
+
"crevasse",
|
144 |
+
"crosswalk",
|
145 |
+
"cubicle office",
|
146 |
+
"dam",
|
147 |
+
"delicatessen",
|
148 |
+
"dentists office",
|
149 |
+
"desert sand",
|
150 |
+
"desert vegetation",
|
151 |
+
"diner indoor",
|
152 |
+
"diner outdoor",
|
153 |
+
"dinette home",
|
154 |
+
"dinette vehicle",
|
155 |
+
"dining car",
|
156 |
+
"dining room",
|
157 |
+
"discotheque",
|
158 |
+
"dock",
|
159 |
+
"doorway outdoor",
|
160 |
+
"dorm room",
|
161 |
+
"driveway",
|
162 |
+
"driving range outdoor",
|
163 |
+
"drugstore",
|
164 |
+
"electrical substation",
|
165 |
+
"elevator door",
|
166 |
+
"elevator interior",
|
167 |
+
"elevator shaft",
|
168 |
+
"engine room",
|
169 |
+
"escalator indoor",
|
170 |
+
"excavation",
|
171 |
+
"factory indoor",
|
172 |
+
"fairway",
|
173 |
+
"fastfood restaurant",
|
174 |
+
"field cultivated",
|
175 |
+
"field wild",
|
176 |
+
"fire escape",
|
177 |
+
"fire station",
|
178 |
+
"firing range indoor",
|
179 |
+
"fishpond",
|
180 |
+
"florist shop indoor",
|
181 |
+
"food court",
|
182 |
+
"forest broadleaf",
|
183 |
+
"forest needleleaf",
|
184 |
+
"forest path",
|
185 |
+
"forest road",
|
186 |
+
"formal garden",
|
187 |
+
"fountain",
|
188 |
+
"galley",
|
189 |
+
"game room",
|
190 |
+
"garage indoor",
|
191 |
+
"garbage dump",
|
192 |
+
"gas station",
|
193 |
+
"gazebo exterior",
|
194 |
+
"general store indoor",
|
195 |
+
"general store outdoor",
|
196 |
+
"gift shop",
|
197 |
+
"golf course",
|
198 |
+
"greenhouse indoor",
|
199 |
+
"greenhouse outdoor",
|
200 |
+
"gymnasium indoor",
|
201 |
+
"hangar indoor",
|
202 |
+
"hangar outdoor",
|
203 |
+
"harbor",
|
204 |
+
"hayfield",
|
205 |
+
"heliport",
|
206 |
+
"herb garden",
|
207 |
+
"highway",
|
208 |
+
"hill",
|
209 |
+
"home office",
|
210 |
+
"hospital",
|
211 |
+
"hospital room",
|
212 |
+
"hot spring",
|
213 |
+
"hot tub outdoor",
|
214 |
+
"hotel outdoor",
|
215 |
+
"hotel room",
|
216 |
+
"house",
|
217 |
+
"hunting lodge outdoor",
|
218 |
+
"ice cream parlor",
|
219 |
+
"ice floe",
|
220 |
+
"ice shelf",
|
221 |
+
"ice skating rink indoor",
|
222 |
+
"ice skating rink outdoor",
|
223 |
+
"iceberg",
|
224 |
+
"igloo",
|
225 |
+
"industrial area",
|
226 |
+
"inn outdoor",
|
227 |
+
"islet",
|
228 |
+
"jacuzzi indoor",
|
229 |
+
"jail cell",
|
230 |
+
"jail indoor",
|
231 |
+
"jewelry shop",
|
232 |
+
"kasbah",
|
233 |
+
"kennel indoor",
|
234 |
+
"kennel outdoor",
|
235 |
+
"kindergarden classroom",
|
236 |
+
"kitchen",
|
237 |
+
"kitchenette",
|
238 |
+
"labyrinth outdoor",
|
239 |
+
"lake natural",
|
240 |
+
"landfill",
|
241 |
+
"landing deck",
|
242 |
+
"laundromat",
|
243 |
+
"lecture room",
|
244 |
+
"library indoor",
|
245 |
+
"library outdoor",
|
246 |
+
"lido deck outdoor",
|
247 |
+
"lift bridge",
|
248 |
+
"lighthouse",
|
249 |
+
"limousine interior",
|
250 |
+
"living room",
|
251 |
+
"lobby",
|
252 |
+
"lock chamber",
|
253 |
+
"locker room",
|
254 |
+
"mansion",
|
255 |
+
"manufactured home",
|
256 |
+
"market indoor",
|
257 |
+
"market outdoor",
|
258 |
+
"marsh",
|
259 |
+
"martial arts gym",
|
260 |
+
"mausoleum",
|
261 |
+
"medina",
|
262 |
+
"moat water",
|
263 |
+
"monastery outdoor",
|
264 |
+
"mosque indoor",
|
265 |
+
"mosque outdoor",
|
266 |
+
"motel",
|
267 |
+
"mountain",
|
268 |
+
"mountain snowy",
|
269 |
+
"movie theater indoor",
|
270 |
+
"museum indoor",
|
271 |
+
"music store",
|
272 |
+
"music studio",
|
273 |
+
"nuclear power plant outdoor",
|
274 |
+
"nursery",
|
275 |
+
"oast house",
|
276 |
+
"observatory outdoor",
|
277 |
+
"ocean",
|
278 |
+
"office",
|
279 |
+
"office building",
|
280 |
+
"oil refinery outdoor",
|
281 |
+
"oilrig",
|
282 |
+
"operating room",
|
283 |
+
"orchard",
|
284 |
+
"outhouse outdoor",
|
285 |
+
"pagoda",
|
286 |
+
"palace",
|
287 |
+
"pantry",
|
288 |
+
"park",
|
289 |
+
"parking garage indoor",
|
290 |
+
"parking garage outdoor",
|
291 |
+
"parking lot",
|
292 |
+
"parlor",
|
293 |
+
"pasture",
|
294 |
+
"patio",
|
295 |
+
"pavilion",
|
296 |
+
"pharmacy",
|
297 |
+
"phone booth",
|
298 |
+
"physics laboratory",
|
299 |
+
"picnic area",
|
300 |
+
"pilothouse indoor",
|
301 |
+
"planetarium outdoor",
|
302 |
+
"playground",
|
303 |
+
"playroom",
|
304 |
+
"plaza",
|
305 |
+
"podium indoor",
|
306 |
+
"podium outdoor",
|
307 |
+
"pond",
|
308 |
+
"poolroom establishment",
|
309 |
+
"poolroom home",
|
310 |
+
"power plant outdoor",
|
311 |
+
"promenade deck",
|
312 |
+
"pub indoor",
|
313 |
+
"pulpit",
|
314 |
+
"putting green",
|
315 |
+
"racecourse",
|
316 |
+
"raceway",
|
317 |
+
"raft",
|
318 |
+
"railroad track",
|
319 |
+
"rainforest",
|
320 |
+
"reception",
|
321 |
+
"recreation room",
|
322 |
+
"residential neighborhood",
|
323 |
+
"restaurant",
|
324 |
+
"restaurant kitchen",
|
325 |
+
"restaurant patio",
|
326 |
+
"rice paddy",
|
327 |
+
"riding arena",
|
328 |
+
"river",
|
329 |
+
"rock arch",
|
330 |
+
"rope bridge",
|
331 |
+
"ruin",
|
332 |
+
"runway",
|
333 |
+
"sandbar",
|
334 |
+
"sandbox",
|
335 |
+
"sauna",
|
336 |
+
"schoolhouse",
|
337 |
+
"sea cliff",
|
338 |
+
"server room",
|
339 |
+
"shed",
|
340 |
+
"shoe shop",
|
341 |
+
"shopfront",
|
342 |
+
"shopping mall indoor",
|
343 |
+
"shower",
|
344 |
+
"skatepark",
|
345 |
+
"ski lodge",
|
346 |
+
"ski resort",
|
347 |
+
"ski slope",
|
348 |
+
"sky",
|
349 |
+
"skyscraper",
|
350 |
+
"slum",
|
351 |
+
"snowfield",
|
352 |
+
"squash court",
|
353 |
+
"stable",
|
354 |
+
"stadium baseball",
|
355 |
+
"stadium football",
|
356 |
+
"stage indoor",
|
357 |
+
"staircase",
|
358 |
+
"street",
|
359 |
+
"subway interior",
|
360 |
+
"subway station platform",
|
361 |
+
"supermarket",
|
362 |
+
"sushi bar",
|
363 |
+
"swamp",
|
364 |
+
"swimming pool indoor",
|
365 |
+
"swimming pool outdoor",
|
366 |
+
"synagogue indoor",
|
367 |
+
"synagogue outdoor",
|
368 |
+
"television studio",
|
369 |
+
"temple east asia",
|
370 |
+
"temple south asia",
|
371 |
+
"tennis court indoor",
|
372 |
+
"tennis court outdoor",
|
373 |
+
"tent outdoor",
|
374 |
+
"theater indoor procenium",
|
375 |
+
"theater indoor seats",
|
376 |
+
"thriftshop",
|
377 |
+
"throne room",
|
378 |
+
"ticket booth",
|
379 |
+
"toll plaza",
|
380 |
+
"topiary garden",
|
381 |
+
"tower",
|
382 |
+
"toyshop",
|
383 |
+
"track outdoor",
|
384 |
+
"train railway",
|
385 |
+
"train station platform",
|
386 |
+
"tree farm",
|
387 |
+
"tree house",
|
388 |
+
"trench",
|
389 |
+
"underwater coral reef",
|
390 |
+
"utility room",
|
391 |
+
"valley",
|
392 |
+
"van interior",
|
393 |
+
"vegetable garden",
|
394 |
+
"veranda",
|
395 |
+
"veterinarians office",
|
396 |
+
"viaduct",
|
397 |
+
"videostore",
|
398 |
+
"village",
|
399 |
+
"vineyard",
|
400 |
+
"volcano",
|
401 |
+
"volleyball court indoor",
|
402 |
+
"volleyball court outdoor",
|
403 |
+
"waiting room",
|
404 |
+
"warehouse indoor",
|
405 |
+
"water tower",
|
406 |
+
"waterfall block",
|
407 |
+
"waterfall fan",
|
408 |
+
"waterfall plunge",
|
409 |
+
"watering hole",
|
410 |
+
"wave",
|
411 |
+
"wet bar",
|
412 |
+
"wheat field",
|
413 |
+
"wind farm",
|
414 |
+
"windmill",
|
415 |
+
"wine cellar barrel storage",
|
416 |
+
"wine cellar bottle storage",
|
417 |
+
"wrestling ring indoor",
|
418 |
+
"yard",
|
419 |
+
"youth hostel",
|
420 |
+
]
|
421 |
+
|
422 |
+
clip_templates = [
|
423 |
+
lambda c: f"a photo of a {c}.",
|
424 |
+
lambda c: f"a photo of the {c}.",
|
425 |
+
]
|
426 |
+
|
427 |
+
def _info(self):
|
428 |
+
return datasets.DatasetInfo(
|
429 |
+
description="SUN397 dataset for image classification.",
|
430 |
+
features=datasets.Features(
|
431 |
+
{
|
432 |
+
"image": datasets.Image(),
|
433 |
+
"label": datasets.ClassLabel(names=self.classnames),
|
434 |
+
}
|
435 |
+
),
|
436 |
+
supervised_keys=("image", "label"),
|
437 |
+
task_templates=[datasets.ImageClassification(image_column="image", label_column="label")],
|
438 |
+
)
|