Datasets:
michelecafagna26
commited on
Commit
•
f56d96d
1
Parent(s):
97f6d6b
Update hl.py
Browse files
hl.py
CHANGED
@@ -116,9 +116,9 @@ class HL(datasets.GeneratorBasedBuilder):
|
|
116 |
# Annotation files come first, then the images.
|
117 |
for img_file_path, img_obj in images:
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
yield idx, {
|
123 |
"file_name": file_name,
|
124 |
"image": {"path": img_file_path, "bytes": img_obj.read()},
|
|
|
116 |
# Annotation files come first, then the images.
|
117 |
for img_file_path, img_obj in images:
|
118 |
|
119 |
+
file_name = Path(img_file_path).name
|
120 |
+
|
121 |
+
if file_name in metadata:
|
122 |
yield idx, {
|
123 |
"file_name": file_name,
|
124 |
"image": {"path": img_file_path, "bytes": img_obj.read()},
|