hheiden-roots commited on
Commit
fe36dbe
1 Parent(s): 918667e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -1
README.md CHANGED
@@ -58,7 +58,19 @@ This flat version of the dataset was specifically compiled to aid Large Multimod
58
  - `page_id`: str, unique ID for the particular page
59
  - `question`: str, the question to answer
60
  - `answer`: str, the actual answer
61
- - `image`: PIL.Image, the actual image to use for the question.
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  ## Data Statistics
64
 
 
58
  - `page_id`: str, unique ID for the particular page
59
  - `question`: str, the question to answer
60
  - `answer`: str, the actual answer
61
+ - `image`: str, a base64 encoded binary string of the image.
62
+
63
+ The `image` is converted back to a PIL.Image with:
64
+ ```python
65
+ import base64
66
+ import io
67
+
68
+
69
+ def decode_base64_to_image(base64_string):
70
+ img_data = base64.b64decode(base64_string)
71
+ img = Image.open(io.BytesIO(img_data))
72
+ return img
73
+ ```
74
 
75
  ## Data Statistics
76