alkzar90 commited on
Commit
ad90602
1 Parent(s): 883a303

Update CC6204-Hackaton-Cub-Dataset.py

Browse files
Files changed (1) hide show
  1. CC6204-Hackaton-Cub-Dataset.py +7 -7
CC6204-Hackaton-Cub-Dataset.py CHANGED
@@ -103,20 +103,20 @@ class CubDataset(datasets.GeneratorBasedBuilder):
103
  # Download images
104
  img_data_files = dl_manager.download_and_extract(_URLS["image_urls"])
105
  text_data_files = dl_manager.download_and_extract(_URLS["text_urls"])
106
- logger.info(f"text_data_files: {text_data_files}")
107
- logger.info(f"text_data_files: {text_data_files[10]}")
108
 
109
 
110
  img_path_files = dl_manager.iter_files(img_data_files)
111
  text_path_files = dl_manager.iter_files(text_data_files)
112
 
113
- #for img, text in zip(img_path_files, text_path_files):
114
- for img in img_path_files:
115
  print(img)
116
  print(os.path.basename(img))
117
- print(next(text_path_files))
118
- print(next(text_path_files))
119
- text = text_path_files[text_path_files.index(os.path.basename(img).replace("jpg", "txt"))]
120
  img_idx = _IMGNAME2ID[os.path.basename(img)]
121
  if img_idx in _TRAIN_IDX_SET:
122
  train_files.append((img, text))
 
103
  # Download images
104
  img_data_files = dl_manager.download_and_extract(_URLS["image_urls"])
105
  text_data_files = dl_manager.download_and_extract(_URLS["text_urls"])
106
+ #logger.info(f"text_data_files: {text_data_files}")
107
+ #logger.info(f"text_data_files: {text_data_files[10]}")
108
 
109
 
110
  img_path_files = dl_manager.iter_files(img_data_files)
111
  text_path_files = dl_manager.iter_files(text_data_files)
112
 
113
+ for img, text in zip(img_path_files, text_path_files):
114
+ #for img in img_path_files:
115
  print(img)
116
  print(os.path.basename(img))
117
+ print(text)
118
+ print(os.path.basename(text))
119
+ #text = text_path_files[text_path_files.index(os.path.basename(img).replace("jpg", "txt"))]
120
  img_idx = _IMGNAME2ID[os.path.basename(img)]
121
  if img_idx in _TRAIN_IDX_SET:
122
  train_files.append((img, text))