Update RDD_2020.py
Browse files- RDD_2020.py +2 -2
RDD_2020.py
CHANGED
@@ -139,8 +139,8 @@ class RDD2020_Dataset(datasets.GeneratorBasedBuilder):
|
|
139 |
image_id = f"{image_file.split('.')[0]}"
|
140 |
|
141 |
image_path = os.path.join(images_dir, image_file)
|
142 |
-
|
143 |
img = Image.open(image_path)
|
|
|
144 |
if annotations_dir:
|
145 |
annotation_file = image_id + '.xml'
|
146 |
annotation_path = os.path.join(annotations_dir, annotation_file)
|
@@ -169,7 +169,7 @@ class RDD2020_Dataset(datasets.GeneratorBasedBuilder):
|
|
169 |
"country": country_dir,
|
170 |
"type": split,
|
171 |
"image_path": image_path,
|
172 |
-
'image'
|
173 |
"crack_type": crack_type,
|
174 |
"crack_coordinates": crack_coordinates,
|
175 |
}
|
|
|
139 |
image_id = f"{image_file.split('.')[0]}"
|
140 |
|
141 |
image_path = os.path.join(images_dir, image_file)
|
|
|
142 |
img = Image.open(image_path)
|
143 |
+
|
144 |
if annotations_dir:
|
145 |
annotation_file = image_id + '.xml'
|
146 |
annotation_path = os.path.join(annotations_dir, annotation_file)
|
|
|
169 |
"country": country_dir,
|
170 |
"type": split,
|
171 |
"image_path": image_path,
|
172 |
+
'image' : img,
|
173 |
"crack_type": crack_type,
|
174 |
"crack_coordinates": crack_coordinates,
|
175 |
}
|