Commit ·
c7c00da
1
Parent(s): 48e81e9
update
Browse files
data/images/1_pokemon/metadata.csv
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
|
| 2 |
-
bulbasaur
|
|
|
|
| 1 |
+
file_name,caption
|
| 2 |
+
bulbasaur.jpg,"Bulbasaur, the Seed Pokémon, smiles with bright red eyes and a leafy green back, ready for its next friendly battle."
|
data/regularization/metadata.csv
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
file_name,caption
|
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([
|
| 18 |
with open(os.path.join(directory, 'metadata.csv'), 'w', newline='') as csv_file:
|
| 19 |
writer = csv.writer(csv_file)
|
| 20 |
-
writer.writerow(["
|
| 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([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():
|