Update Tuberculosis_dataset.py
Browse files- Tuberculosis_dataset.py +3 -4
Tuberculosis_dataset.py
CHANGED
@@ -111,10 +111,9 @@ class TuberculosisDataset(GeneratorBasedBuilder):
|
|
111 |
# Walk through the base_path
|
112 |
for root, _, files in os.walk(base_path):
|
113 |
for file in files:
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
image_file_paths[key] = os.path.join(root, file + '.jpg')
|
118 |
|
119 |
# Cleanup if we extracted files
|
120 |
if base_path == temp_dir:
|
|
|
111 |
# Walk through the base_path
|
112 |
for root, _, files in os.walk(base_path):
|
113 |
for file in files:
|
114 |
+
key = file.split('_')[0]
|
115 |
+
if key not in image_file_paths:
|
116 |
+
image_file_paths[key] = os.path.join(root, file)
|
|
|
117 |
|
118 |
# Cleanup if we extracted files
|
119 |
if base_path == temp_dir:
|