Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
1K<n<10K
Tags:
biology
License:
remove os
Browse files- bird-species-dataset.py +2 -2
bird-species-dataset.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import os
|
2 |
import datasets
|
3 |
from datasets import SplitGenerator, Split, ImageClassification
|
4 |
|
@@ -601,7 +600,8 @@ class BirdSpeciesDataset(datasets.GeneratorBasedBuilder):
|
|
601 |
idx = 0
|
602 |
for path, fo in files:
|
603 |
|
604 |
-
|
|
|
605 |
|
606 |
record = {
|
607 |
"image": {"path": path, "bytes": fo.read()},
|
|
|
|
|
1 |
import datasets
|
2 |
from datasets import SplitGenerator, Split, ImageClassification
|
3 |
|
|
|
600 |
idx = 0
|
601 |
for path, fo in files:
|
602 |
|
603 |
+
parts = path.split('/')
|
604 |
+
label = parts[-2]
|
605 |
|
606 |
record = {
|
607 |
"image": {"path": path, "bytes": fo.read()},
|