The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: ValueError
Message: Invalid string class label SPEC@e6c68ae40781c23fb72da8f1d94c655cf4b6b544
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1537, in _prepare_split_single
example = self.info.features.encode_example(record) if self.info.features is not None else record
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 2162, in encode_example
return encode_nested_example(self, example)
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1446, in encode_nested_example
{k: encode_nested_example(schema[k], obj.get(k), level=level + 1) for k in schema}
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1469, in encode_nested_example
return schema.encode_example(obj) if obj is not None else None
~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1144, in encode_example
example_data = self.str2int(example_data)
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1081, in str2int
output = [self._strval2int(value) for value in values]
~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 1102, in _strval2int
raise ValueError(f"Invalid string class label {value}")
ValueError: Invalid string class label SPEC@e6c68ae40781c23fb72da8f1d94c655cf4b6b544
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1382, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1560, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
image image | label class label |
|---|---|
1,95500010019 | |
1,95500010019 | |
1,95500010019 | |
1,95700010031 | |
1,95700010031 | |
1,95700010031 | |
1,95900010054 | |
1,95900010054 | |
1,95900010054 | |
1,96600010168 | |
1,96600010168 | |
1,96600010168 | |
1,96800010183 | |
1,96800010183 | |
1,96800010183 | |
1,96900010192 | |
1,96900010192 | |
1,96900010192 | |
1,97100010224 | |
1,97100010224 | |
1,97100010224 | |
1,97300010289 | |
1,97300010289 | |
1,97300010289 | |
1,97500010296 | |
1,97500010296 | |
1,97500010296 | |
1,97700010319 | |
1,97700010319 | |
1,97700010319 | |
1,97800010332 | |
1,97800010332 | |
1,97800010332 | |
1,97900010336 | |
1,97900010336 | |
1,97900010336 | |
1,98300010373 | |
1,98300010373 | |
1,98300010373 | |
1,98400010377 | |
1,98400010377 | |
1,98400010377 | |
1,98700010416 | |
1,98700010416 | |
1,98700010416 | |
1,98800010422 | |
1,98800010422 | |
1,98800010422 | |
1,99100010532 | |
1,99100010532 | |
1,99100010532 | |
1,99200010538 | |
1,99200010538 | |
1,99200010538 | |
1,99400010563 | |
1,99400010563 | |
1,99400010563 | |
1,99500010597 | |
1,99500010597 | |
1,99500010597 | |
1,99600010600 | |
1,99600010600 | |
1,99600010600 | |
1,99700010601 | |
1,99700010601 | |
1,99700010601 | |
1,99900010622 | |
1,99900010622 | |
1,99900010622 | |
2,00000010624 | |
2,00000010624 | |
2,00000010624 | |
2,00100010625 | |
2,00100010625 | |
2,00100010625 | |
2,00300010641 | |
2,00300010641 | |
2,00300010641 | |
2,00400010650 | |
2,00400010650 | |
2,00400010650 | |
2,00500010652 | |
2,00500010652 | |
2,00500010652 | |
2,00600010659 | |
2,00600010659 | |
2,00600010659 | |
2,00800010723 | |
2,00800010723 | |
2,00800010723 | |
2,01000010760 | |
2,01000010760 | |
2,01000010760 | |
2,01100010772 | |
2,01100010772 | |
2,01100010772 | |
2,01200010789 | |
2,01200010789 | |
2,01200010789 | |
2,01300010795 |
[CVPR 2024] SPEC Benchmark: Evaluating VLMs in Fine-grained and Compositional Understanding
introduced in the CVPR 2024 paper Synthesize, Diagnose, and Optimize: Towards Fine-Grained Vision-Language Understanding
Code | π€ Paper | π arXiv
To evaluate the understanding capability of visual-language models on fine-grained concepts, we propose a new benchmark, SPEC, which consists of six distinct subsets, distributed across the dimensions of Size, Position, Existence, and Count. Each test case consists of an image candidate set, which differs only in certain visual concepts, and a text candidate set, which differs only in the corresponding language concept.
π§ Usage
install
git clone https://github.com/wjpoom/SPEC.git
cd SPEC/
pip install -e .
prepare data
- run the following code in Python shell, replace
/path/to/save/datawith a specified dir to store the data.
import zipfile
import os
from huggingface_hub import hf_hub_download
data_root = '/path/to/save/data'
hf_hub_download(repo_id='wjpoom/SPEC', repo_type='dataset', filename='data.zip', local_dir=data_root)
with zipfile.ZipFile(os.path.join(data_root, 'data.zip'), 'r') as zip_ref:
zip_ref.extractall(os.path.join(data_root))
os.remove(os.path.join(data_root, 'data.zip'))
explore the dataset
- We provide a πnotebook that enables you to visually explore the test samples in the SPEC dataset.
- Run this notebook either locally or online using Colab.
reproduce the results
- In our paper, we evaluated four popular VLMs using our SPEC dataset, namely: CLIP, BLIP, FLAVA and CoCa.
- To reproduce the results with these VLMs, you can run this script.
- You can also reproduce with this local notebook or the online Colab notebook.
evaluate custom VLMs
If you want to evaluate your custom model on SPEC, you can follow the instructions in this document.
βοΈ Citation
If you use our code or data in this repo or find our work helpful, please consider giving a citation:
@inproceedings{spec2024,
title={Synthesize Diagnose and Optimize: Towards Fine-Grained Vision-Language Understanding},
author={Peng, Wujian and Xie, Sicheng and You, Zuyao and Lan, Shiyi and Wu, Zuxuan},
booktitle={CVPR},
year={2024}
}
- Downloads last month
- 235