Paper: https://huggingface.co/papers/2306.14899. Github: https://github.com/Nicous20/FunQA.
Update: The dataset format has been changed to Parquet; the old version (JSON) can be found in the “raw” folder.
from datasets import load_dataset
train_ds = load_dataset("fesvhtr/FunQA", "standard", split="train")
val_ds = load_dataset("fesvhtr/FunQA", "standard", split="validation")
test_ds = load_dataset("fesvhtr/FunQA", "standard", split="test")
mcqa_ds = load_dataset("fesvhtr/FunQA", "mcqa", split="mcqa_test")
For the video files, download the split archives explicitly from the dataset repository.
Download one archive into the Hugging Face cache:
from huggingface_hub import hf_hub_download
zip_path = hf_hub_download(
repo_id="fesvhtr/FunQA",
repo_type="dataset",
filename="raw/test.zip",
)
print(zip_path)
Download the whole repository snapshot:
from huggingface_hub import snapshot_download
repo_dir = snapshot_download(
repo_id="fesvhtr/FunQA",
repo_type="dataset",
)
print(repo_dir)
If needed, download files to a specific local folder instead of only using the default cache:
from huggingface_hub import snapshot_download
repo_dir = snapshot_download(
repo_id="fesvhtr/FunQA",
repo_type="dataset",
local_dir="funqa_local",
)
After extracting the archives, locate a video by combining the split directory with visual_input:
from pathlib import Path
sample = test_ds[0]
video_name = sample["visual_input"]
video_path = next(Path("videos/test").rglob(video_name))
print(video_path)
from datasets import load_dataset
standard_ds = load_dataset(
"parquet",
data_files={
"train": "data/train.parquet",
"validation": "data/validation.parquet",
"test": "data/test.parquet",
},
)
mcqa_ds = load_dataset(
"parquet",
data_files={"mcqa_test": "data/mcqa_test.parquet"},
)
standardSplits:
trainvalidationtestColumns:
instructionvisual_inputoutputtaskmcqaSplits:
mcqa_testColumns:
instructionvisual_inputgtidstandard and mcqa are separated into different configs because they use different schemas.huggingface_hub if you need the raw videos.Paper: https://huggingface.co/papers/2306.14899. Github: https://github.com/Nicous20/FunQA.
Update: The dataset format has been changed to Parquet; the old version (JSON) can be found in the “raw” folder.
from datasets import load_dataset
train_ds = load_dataset("fesvhtr/FunQA", "standard", split="train")
val_ds = load_dataset("fesvhtr/FunQA", "standard", split="validation")
test_ds = load_dataset("fesvhtr/FunQA", "standard", split="test")
mcqa_ds = load_dataset("fesvhtr/FunQA", "mcqa", split="mcqa_test")
For the video files, download the split archives explicitly from the dataset repository.
Download one archive into the Hugging Face cache:
from huggingface_hub import hf_hub_download
zip_path = hf_hub_download(
repo_id="fesvhtr/FunQA",
repo_type="dataset",
filename="raw/test.zip",
)
print(zip_path)
Download the whole repository snapshot:
from huggingface_hub import snapshot_download
repo_dir = snapshot_download(
repo_id="fesvhtr/FunQA",
repo_type="dataset",
)
print(repo_dir)
If needed, download files to a specific local folder instead of only using the default cache:
from huggingface_hub import snapshot_download
repo_dir = snapshot_download(
repo_id="fesvhtr/FunQA",
repo_type="dataset",
local_dir="funqa_local",
)
After extracting the archives, locate a video by combining the split directory with visual_input:
from pathlib import Path
sample = test_ds[0]
video_name = sample["visual_input"]
video_path = next(Path("videos/test").rglob(video_name))
print(video_path)
from datasets import load_dataset
standard_ds = load_dataset(
"parquet",
data_files={
"train": "data/train.parquet",
"validation": "data/validation.parquet",
"test": "data/test.parquet",
},
)
mcqa_ds = load_dataset(
"parquet",
data_files={"mcqa_test": "data/mcqa_test.parquet"},
)
standardSplits:
trainvalidationtestColumns:
instructionvisual_inputoutputtaskmcqaSplits:
mcqa_testColumns:
instructionvisual_inputgtidstandard and mcqa are separated into different configs because they use different schemas.huggingface_hub if you need the raw videos.