Spinnernicholas commited on
Commit
a13e0ba
·
1 Parent(s): 1e16a26
Files changed (2) hide show
  1. README.md +6 -2
  2. src/update_dataset.py +2 -2
README.md CHANGED
@@ -11,9 +11,13 @@ dataset_info:
11
  dtype: string
12
  configs:
13
  - config_name: default
14
- data_files: "data/images/1_pokemon/metadata.csv"
 
 
15
  - config_name: regularization
16
- data_files: "data/regularization/metadata.csv"
 
 
17
  ---
18
 
19
  ## File Structure
 
11
  dtype: string
12
  configs:
13
  - config_name: default
14
+ data_files:
15
+ - split: train
16
+ path: "data/images/1_pokemon/metadata.csv"
17
  - config_name: regularization
18
+ data_files:
19
+ - split: train
20
+ path: "data/regularization/metadata.csv"
21
  ---
22
 
23
  ## File Structure
src/update_dataset.py CHANGED
@@ -14,10 +14,10 @@ def generate_csv(directory):
14
  image = file
15
  with open(os.path.join(directory, name + '.txt'), 'r') as txt_file:
16
  caption = txt_file.read().strip()
17
- csv_data.append([image, caption])
18
  with open(os.path.join(directory, 'metadata.csv'), 'w', newline='') as csv_file:
19
  writer = csv.writer(csv_file)
20
- writer.writerow(["file_name", "caption"])
21
  writer.writerows(csv_data)
22
 
23
  def main():
 
14
  image = file
15
  with open(os.path.join(directory, name + '.txt'), 'r') as txt_file:
16
  caption = txt_file.read().strip()
17
+ csv_data.append([name, class_name, image, caption])
18
  with open(os.path.join(directory, 'metadata.csv'), 'w', newline='') as csv_file:
19
  writer = csv.writer(csv_file)
20
+ writer.writerow(["name", "class", "image", "caption"])
21
  writer.writerows(csv_data)
22
 
23
  def main():