Datasets:
Commit
·
52f9f2f
1
Parent(s):
cd0a747
Update README.md
Browse files
README.md
CHANGED
@@ -12,8 +12,12 @@ from huggingface_hub import snapshot_download
|
|
12 |
import pandas as pd
|
13 |
import matplotlib.pyplot as plt
|
14 |
|
|
|
15 |
snapshot_download(repo_id="Aborevsky01/CLEVR-BT-DB", repo_type="dataset", local_dir='path-to-your-local-dir')
|
|
|
16 |
!unzip [path-to-your-local-dir]/[type-of-task]/images.zip
|
|
|
|
|
17 |
plt.imshow(plt.imread('[path-to-your-local-dir]/images/test/Reason_0.png'))
|
18 |
print(pd.read_csv('[path-to-your-local-dir]/[type-of-task]/Reason_test_questions.csv').iloc[0].question)
|
19 |
print([str(line) for line in open('[path-to-your-local-dir]/[type-of-task]/correct_answ.txt', 'rb')][0])
|
|
|
12 |
import pandas as pd
|
13 |
import matplotlib.pyplot as plt
|
14 |
|
15 |
+
# First step: download an entire datatset
|
16 |
snapshot_download(repo_id="Aborevsky01/CLEVR-BT-DB", repo_type="dataset", local_dir='path-to-your-local-dir')
|
17 |
+
# Second step: unarchive the images for VQA
|
18 |
!unzip [path-to-your-local-dir]/[type-of-task]/images.zip
|
19 |
+
|
20 |
+
# Example of the triplet (image - question - answer)
|
21 |
plt.imshow(plt.imread('[path-to-your-local-dir]/images/test/Reason_0.png'))
|
22 |
print(pd.read_csv('[path-to-your-local-dir]/[type-of-task]/Reason_test_questions.csv').iloc[0].question)
|
23 |
print([str(line) for line in open('[path-to-your-local-dir]/[type-of-task]/correct_answ.txt', 'rb')][0])
|