Datasets:

Modalities:
Image
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
Dask
License:
SushantGautam commited on
Commit
4821949
1 Parent(s): 785c41b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -48,14 +48,14 @@ ds = load_dataset("SimulaMet-HOST/Kvasir-VQA")
48
  ```
49
  d_path ="./" #existing folder where you want to save images and metadata.csv
50
 
51
- df = ds['train'].select_columns(['source', 'question', 'answer', 'img_id']).to_pandas()
52
  df.to_csv(f"{d_path}/metadata.csv", index=False)
53
 
54
  import os
55
  os.makedirs(f"{d_path}/images", exist_ok=True)
56
 
57
  for i, row in df.groupby('img_id').nth(0).iterrows(): # for images
58
- image = ds['train'][i]['image'].save(f"{d_path}/images/{row['img_id']}.jpg")
59
  ```
60
 
61
  The total image size is around 1.5 GB. The CSV file will have 58,849 rows.
 
48
  ```
49
  d_path ="./" #existing folder where you want to save images and metadata.csv
50
 
51
+ df = ds['raw'].select_columns(['source', 'question', 'answer', 'img_id']).to_pandas()
52
  df.to_csv(f"{d_path}/metadata.csv", index=False)
53
 
54
  import os
55
  os.makedirs(f"{d_path}/images", exist_ok=True)
56
 
57
  for i, row in df.groupby('img_id').nth(0).iterrows(): # for images
58
+ image = ds['raw'][i]['image'].save(f"{d_path}/images/{row['img_id']}.jpg")
59
  ```
60
 
61
  The total image size is around 1.5 GB. The CSV file will have 58,849 rows.