gjuggler commited on
Commit
8e0ad5d
1 Parent(s): a97ec03

Hard-code class names, to match all other HF datasets.

Browse files
Files changed (1) hide show
  1. bird-data.py +408 -1
bird-data.py CHANGED
@@ -31,6 +31,413 @@ _URLS = {
31
  "test": f"{_REPO}/data/test.zip",
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  class Beans(datasets.GeneratorBasedBuilder):
35
  """Beans plant leaf images dataset."""
36
 
@@ -41,7 +448,7 @@ class Beans(datasets.GeneratorBasedBuilder):
41
  {
42
  "image_file_path": datasets.Value("string"),
43
  "image": datasets.Image(),
44
- "labels": datasets.features.ClassLabel(names_file="classes.txt"),
45
  }
46
  ),
47
  supervised_keys=("image", "labels"),
 
31
  "test": f"{_REPO}/data/test.zip",
32
  }
33
 
34
+ _CLASSES = """Little Blue Heron
35
+ Swainson's Hawk
36
+ Glaucous-winged Gull
37
+ Spotted Towhee
38
+ Neotropic Cormorant
39
+ White-eyed Vireo
40
+ Tundra Swan
41
+ Costa's Hummingbird
42
+ American Crow
43
+ American Tree Sparrow
44
+ Savannah Sparrow
45
+ Verdin
46
+ Wild Turkey
47
+ Rufous Hummingbird
48
+ Blue-gray Gnatcatcher
49
+ Song Sparrow
50
+ Tricolored Heron
51
+ Phainopepla
52
+ Harlequin Duck
53
+ Florida Scrub-Jay
54
+ Black-billed Cuckoo
55
+ Laughing Gull
56
+ Lesser Goldfinch
57
+ Common Tern
58
+ Tree Swallow
59
+ Black-billed Magpie
60
+ Surf Scoter
61
+ Black-and-white Warbler
62
+ Mountain Chickadee
63
+ California Thrasher
64
+ Osprey
65
+ Long-tailed Duck
66
+ Semipalmated Plover
67
+ Reddish Egret
68
+ Black Guillemot
69
+ Ring-billed Gull
70
+ American Avocet
71
+ White-faced Ibis
72
+ Western Tanager
73
+ Black-bellied Plover
74
+ Winter Wren
75
+ Mississippi Kite
76
+ Townsend's Solitaire
77
+ Bonaparte's Gull
78
+ Cassin's Finch
79
+ Yellow-rumped Warbler
80
+ Great Black-backed Gull
81
+ Red-naped Sapsucker
82
+ Swamp Sparrow
83
+ Western Screech-Owl
84
+ Rusty Blackbird
85
+ Northern Saw-whet Owl
86
+ Plumbeous Vireo
87
+ Bushtit
88
+ White-tailed Kite
89
+ White Ibis
90
+ Ovenbird
91
+ Cactus Wren
92
+ Fish Crow
93
+ Greater Scaup
94
+ Pacific Loon
95
+ Red-breasted Sapsucker
96
+ Pied-billed Grebe
97
+ Eastern Towhee
98
+ Acorn Woodpecker
99
+ Mourning Dove
100
+ Red-bellied Woodpecker
101
+ Eastern Wood-Pewee
102
+ Northern Mockingbird
103
+ Red Crossbill
104
+ Wood Stork
105
+ Pine Siskin
106
+ Pacific Wren
107
+ Barrow's Goldeneye
108
+ American White Pelican
109
+ Cordilleran Flycatcher
110
+ Eastern Meadowlark
111
+ Yellow-headed Blackbird
112
+ Chipping Sparrow
113
+ Common Grackle
114
+ American Dipper
115
+ Double-crested Cormorant
116
+ Black Phoebe
117
+ Surfbird
118
+ Loggerhead Shrike
119
+ Gila Woodpecker
120
+ Snow Bunting
121
+ Field Sparrow
122
+ Brown Pelican
123
+ Merlin
124
+ Golden Eagle
125
+ Turkey Vulture
126
+ American Wigeon
127
+ Black Turnstone
128
+ Swainson's Thrush
129
+ White-winged Crossbill
130
+ Oak Titmouse
131
+ Least Flycatcher
132
+ Brown-headed Cowbird
133
+ Horned Grebe
134
+ Canvasback
135
+ Yellow-breasted Chat
136
+ Pine Warbler
137
+ Bald Eagle
138
+ Downy Woodpecker
139
+ Black-chinned Hummingbird
140
+ Prothonotary Warbler
141
+ Allen's Hummingbird
142
+ Louisiana Waterthrush
143
+ Gray Catbird
144
+ Western Meadowlark
145
+ House Finch
146
+ Brown Thrasher
147
+ Common Goldeneye
148
+ Hoary Redpoll
149
+ Eastern Kingbird
150
+ Evening Grosbeak
151
+ Mexican Jay
152
+ Mute Swan
153
+ Indigo Bunting
154
+ Brewer's Sparrow
155
+ American Goldfinch
156
+ Red-headed Woodpecker
157
+ Bell's Vireo
158
+ White-winged Scoter
159
+ Sandhill Crane
160
+ Boat-tailed Grackle
161
+ Scissor-tailed Flycatcher
162
+ Great-tailed Grackle
163
+ Common Merganser
164
+ Marsh Wren
165
+ Western Wood-Pewee
166
+ Barred Owl
167
+ Canada Warbler
168
+ Common Nighthawk
169
+ Long-billed Curlew
170
+ Scaled Quail
171
+ Western Sandpiper
172
+ Ruby-crowned Kinglet
173
+ Yellow-bellied Sapsucker
174
+ Killdeer
175
+ Chestnut-backed Chickadee
176
+ Belted Kingfisher
177
+ Blackpoll Warbler
178
+ Eurasian Eagle-Owl
179
+ Purple Gallinule
180
+ American Robin
181
+ Solitary Sandpiper
182
+ Chihuahuan Raven
183
+ Yellow-billed Magpie
184
+ Black Tern
185
+ House Sparrow
186
+ Rufous-crowned Sparrow
187
+ Ring-necked Duck
188
+ Warbling Vireo
189
+ Red-shouldered Hawk
190
+ Northern Harrier
191
+ Bay-breasted Warbler
192
+ Great Cormorant
193
+ Rock Pigeon
194
+ Short-billed Dowitcher
195
+ Bronzed Cowbird
196
+ Hooded Warbler
197
+ Black Vulture
198
+ White-breasted Nuthatch
199
+ Lincoln's Sparrow
200
+ Whimbrel
201
+ Varied Thrush
202
+ Dickcissel
203
+ Snowy Owl
204
+ Bank Swallow
205
+ Veery
206
+ Northern Waterthrush
207
+ Bridled Titmouse
208
+ Semipalmated Sandpiper
209
+ Harris's Hawk
210
+ Northern Rough-winged Swallow
211
+ Northern Pintail
212
+ Pelagic Cormorant
213
+ Clark's Grebe
214
+ Broad-winged Hawk
215
+ Swallow-tailed Kite
216
+ Monk Parakeet
217
+ Blackburnian Warbler
218
+ Burrowing Owl
219
+ Cooper's Hawk
220
+ Black Skimmer
221
+ Forster's Tern
222
+ Black-crested Titmouse
223
+ Northwestern Crow
224
+ Wood Thrush
225
+ Blue Jay
226
+ Dunlin
227
+ Yellow-billed Cuckoo
228
+ Black-throated Blue Warbler
229
+ Carolina Chickadee
230
+ Gadwall
231
+ Nuttall's Woodpecker
232
+ Common Gallinule
233
+ Wilson's Snipe
234
+ Greater White-fronted Goose
235
+ Glossy Ibis
236
+ Brant
237
+ Common Ground-Dove
238
+ Band-tailed Pigeon
239
+ Marbled Godwit
240
+ American Redstart
241
+ Clay-colored Sparrow
242
+ American Coot
243
+ American Pipit
244
+ Cackling Goose
245
+ Northern Shrike
246
+ Ruddy Duck
247
+ Red-necked Grebe
248
+ Ross's Goose
249
+ Townsend's Warbler
250
+ American Kestrel
251
+ Royal Tern
252
+ Sharp-shinned Hawk
253
+ Black-legged Kittiwake
254
+ Pileated Woodpecker
255
+ Hermit Thrush
256
+ Northern Gannet
257
+ Western Kingbird
258
+ Green-tailed Towhee
259
+ Pine Grosbeak
260
+ Harris's Sparrow
261
+ Bullock's Oriole
262
+ Brown-headed Nuthatch
263
+ Cinnamon Teal
264
+ Eastern Phoebe
265
+ Gambel's Quail
266
+ Nashville Warbler
267
+ Baltimore Oriole
268
+ Eastern Screech-Owl
269
+ American Oystercatcher
270
+ Ash-throated Flycatcher
271
+ Inca Dove
272
+ Anna's Hummingbird
273
+ Black-headed Grosbeak
274
+ Canada Goose
275
+ Ruby-throated Hummingbird
276
+ California Quail
277
+ American Woodcock
278
+ Spotted Sandpiper
279
+ Blue-headed Vireo
280
+ Wood Duck
281
+ Summer Tanager
282
+ Black-capped Chickadee
283
+ Black-tailed Gnatcatcher
284
+ Juniper Titmouse
285
+ Red-throated Loon
286
+ White-throated Sparrow
287
+ Pacific-slope Flycatcher
288
+ Brown-capped Rosy-Finch
289
+ Canyon Wren
290
+ Say's Phoebe
291
+ Blue-winged Warbler
292
+ Abert's Towhee
293
+ Greater Yellowlegs
294
+ Lazuli Bunting
295
+ Red-breasted Nuthatch
296
+ Carolina Wren
297
+ Red-eyed Vireo
298
+ Yellow-throated Vireo
299
+ Least Sandpiper
300
+ Roseate Spoonbill
301
+ Mallard
302
+ Vesper Sparrow
303
+ Common Redpoll
304
+ Heermann's Gull
305
+ Broad-tailed Hummingbird
306
+ Snowy Egret
307
+ Barn Swallow
308
+ Vermilion Flycatcher
309
+ Rose-breasted Grosbeak
310
+ Dark-eyed Junco
311
+ Crested Caracara
312
+ Gray Jay
313
+ Purple Martin
314
+ Magnolia Warbler
315
+ Orange-crowned Warbler
316
+ Broad-billed Hummingbird
317
+ Painted Bunting
318
+ American Black Duck
319
+ Vaux's Swift
320
+ Northern Bobwhite
321
+ Black-throated Gray Warbler
322
+ Red-winged Blackbird
323
+ Black-crowned Night-Heron
324
+ California Gull
325
+ Common Raven
326
+ Brewer's Blackbird
327
+ Purple Finch
328
+ Northern Cardinal
329
+ Western Scrub-Jay
330
+ Western Bluebird
331
+ Northern Parula
332
+ Northern Pygmy-Owl
333
+ Palm Warbler
334
+ Violet-green Swallow
335
+ Great Crested Flycatcher
336
+ Rough-legged Hawk
337
+ Tufted Titmouse
338
+ MacGillivray's Warbler
339
+ Lark Bunting
340
+ Orchard Oriole
341
+ Bufflehead
342
+ Black Oystercatcher
343
+ Great Egret
344
+ Redhead
345
+ Blue-winged Teal
346
+ Curve-billed Thrasher
347
+ Scarlet Tanager
348
+ Horned Lark
349
+ Brandt's Cormorant
350
+ White-crowned Sparrow
351
+ House Wren
352
+ Chimney Swift
353
+ Black-necked Stilt
354
+ Yellow Warbler
355
+ Pygmy Nuthatch
356
+ Gray-crowned Rosy-Finch
357
+ Hutton's Vireo
358
+ Hooded Merganser
359
+ Western Grebe
360
+ Canyon Towhee
361
+ Ladder-backed Woodpecker
362
+ Bobolink
363
+ Golden-fronted Woodpecker
364
+ Prairie Falcon
365
+ Black-throated Green Warbler
366
+ Greater Roadrunner
367
+ Cedar Waxwing
368
+ Blue Grosbeak
369
+ Mew Gull
370
+ White-throated Swift
371
+ Red-breasted Merganser
372
+ Cassin's Kingbird
373
+ Green Heron
374
+ Eastern Bluebird
375
+ Eared Grebe
376
+ Fox Sparrow
377
+ Pigeon Guillemot
378
+ Black-bellied Whistling-Duck
379
+ Willet
380
+ Mountain Bluebird
381
+ Clark's Nutcracker
382
+ Northern Flicker
383
+ Bewick's Wren
384
+ Prairie Warbler
385
+ Anhinga
386
+ Ruffed Grouse
387
+ Northern Shoveler
388
+ Common Loon
389
+ Bohemian Waxwing
390
+ Peregrine Falcon
391
+ Snow Goose
392
+ Lesser Scaup
393
+ Golden-crowned Kinglet
394
+ Great Blue Heron
395
+ Ruddy Turnstone
396
+ Western Gull
397
+ Hairy Woodpecker
398
+ Black Scoter
399
+ Common Yellowthroat
400
+ Boreal Chickadee
401
+ Cave Swallow
402
+ Mottled Duck
403
+ Yellow-crowned Night-Heron
404
+ Wilson's Phalarope
405
+ Pyrrhuloxia
406
+ Sanderling
407
+ Tennessee Warbler
408
+ Cliff Swallow
409
+ Lark Sparrow
410
+ Ring-necked Pheasant
411
+ Great Horned Owl
412
+ Hermit Warbler
413
+ Yellow-throated Warbler
414
+ Eurasian Collared-Dove
415
+ Mourning Warbler
416
+ Cassin's Vireo
417
+ Cattle Egret
418
+ Cape May Warbler
419
+ European Starling
420
+ Black Rosy-Finch
421
+ White-winged Dove
422
+ Common Eider
423
+ Calliope Hummingbird
424
+ Lesser Yellowlegs
425
+ Golden-crowned Sparrow
426
+ Brown Creeper
427
+ Green-winged Teal
428
+ Red-tailed Hawk
429
+ Hooded Oriole
430
+ Caspian Tern
431
+ Trumpeter Swan
432
+ California Towhee
433
+ Wrentit
434
+ Chestnut-sided Warbler
435
+ Wilson's Warbler
436
+ Barn Owl
437
+ Herring Gull
438
+ Steller's Jay
439
+ """.splitlines()
440
+
441
  class Beans(datasets.GeneratorBasedBuilder):
442
  """Beans plant leaf images dataset."""
443
 
 
448
  {
449
  "image_file_path": datasets.Value("string"),
450
  "image": datasets.Image(),
451
+ "labels": datasets.features.ClassLabel(names=_CLASSES),
452
  }
453
  ),
454
  supervised_keys=("image", "labels"),