moukaii commited on
Commit
ab8afac
1 Parent(s): 0e1145c

Update Tuberculosis_dataset.py

Browse files
Files changed (1) hide show
  1. 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
- if file.endswith('.jpg'):
115
- key = file.split('_')[0]
116
- if key not in image_file_paths:
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: