CoolFace
Datasetpublic

Aborevsky01/CLEVR-BT-DB

How to install? !pip install datasets -q from huggingface_hub import snapshot_download import pandas as pd import matplotlib.pyplot as plt # First step: download an entire datatset snapshot_download(repo_id="Aborevsky01/CLEVR-BT-DB", repo_type="dataset", local_dir='path-to-your-local-dir') # Second step: unarchive the images for VQA !unzip [path-to-your-local-dir]/[type-of-task]/images.zip # Example of the triplet (image - question - answer)… See the full description on the dataset page: https://huggingface.co/datasets/Aborevsky01/CLEVR-BT-DB.

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes133downloads
Dataset Card

How to install?

python
!pip install datasets -q
from huggingface_hub import snapshot_download
import pandas as pd
import matplotlib.pyplot as plt

# First step: download an entire datatset
snapshot_download(repo_id="Aborevsky01/CLEVR-BT-DB", repo_type="dataset", local_dir='path-to-your-local-dir')
# Second step: unarchive the images for VQA
!unzip [path-to-your-local-dir]/[type-of-task]/images.zip

# Example of the triplet (image - question - answer)
plt.imshow(plt.imread('[path-to-your-local-dir]/images/test/Reason_0.png'))
print(pd.read_csv('[path-to-your-local-dir]/[type-of-task]/Reason_test_questions.csv').iloc[0].question)
print([str(line) for line in open('[path-to-your-local-dir]/[type-of-task]/correct_answ.txt', 'rb')][0])

Output of code

[image]

Q: There is an object to the left of a cylinder to the right of a cylinder, what color is it?

A: b'blue\n'