Datasets:
Tasks:
Image Classification
Modalities:
Image
Formats:
imagefolder
Languages:
Georgian
Size:
10K - 100K
Commit
•
a6b9e4b
1
Parent(s):
97412a6
Update handwriting_dataset.py
Browse files- handwriting_dataset.py +2 -2
handwriting_dataset.py
CHANGED
@@ -28,7 +28,7 @@ class HandwritingData(datasets.GeneratorBasedBuilder):
|
|
28 |
}
|
29 |
),
|
30 |
supervised_keys=("image", "label"),
|
31 |
-
homepage="https://huggingface.co/datasets/AnaChikashua/
|
32 |
task_templates=[ImageClassification(image_column="image", label_column="label")],
|
33 |
|
34 |
)
|
@@ -48,7 +48,7 @@ class HandwritingData(datasets.GeneratorBasedBuilder):
|
|
48 |
# Iterate through images
|
49 |
for idx, filepath, image in enumerate(images):
|
50 |
# extract the text from the filename
|
51 |
-
text = [c for c in filepath if not 0 <= ord(c) <= 127][0]
|
52 |
yield idx, {
|
53 |
"label": text,
|
54 |
"image": {"path": filepath, "bytes": image.read()}
|
|
|
28 |
}
|
29 |
),
|
30 |
supervised_keys=("image", "label"),
|
31 |
+
homepage="https://huggingface.co/datasets/AnaChikashua/alphabet",
|
32 |
task_templates=[ImageClassification(image_column="image", label_column="label")],
|
33 |
|
34 |
)
|
|
|
48 |
# Iterate through images
|
49 |
for idx, filepath, image in enumerate(images):
|
50 |
# extract the text from the filename
|
51 |
+
text = [c for c in str(filepath) if not 0 <= ord(c) <= 127][0]
|
52 |
yield idx, {
|
53 |
"label": text,
|
54 |
"image": {"path": filepath, "bytes": image.read()}
|