alkzar90 commited on
Commit
0dd571a
1 Parent(s): 17acea3

Update CC6204-Hackaton-Cub-Dataset.py

Browse files
Files changed (1) hide show
  1. CC6204-Hackaton-Cub-Dataset.py +6 -6
CC6204-Hackaton-Cub-Dataset.py CHANGED
@@ -95,12 +95,12 @@ class CubDataset(datasets.GeneratorBasedBuilder):
95
  for batch in data_files:
96
  path_files = dl_manager.iter_files(batch)
97
  for img in path_files:
98
- logger.info(f"img: {img}")
99
- img_idx = _IMGNAME2ID[img]
100
- if img_idx in _TRAIN_IDX_SET:
101
- train_files.append(img)
102
- else:
103
- test_files.append(img)
104
 
105
  return [
106
  datasets.SplitGenerator(
 
95
  for batch in data_files:
96
  path_files = dl_manager.iter_files(batch)
97
  for img in path_files:
98
+ if img.endswith(".jpg"):
99
+ img_idx = _IMGNAME2ID[img]
100
+ if img_idx in _TRAIN_IDX_SET:
101
+ train_files.append(img)
102
+ else:
103
+ test_files.append(img)
104
 
105
  return [
106
  datasets.SplitGenerator(