This project is designed to evaluate the performance of multimodal large language models on the SpatialViz-Bench benchmark.
Clone the Repository
Create and Activate a Virtual Environment and Install Dependencies:
You should follow all the requirements specified in the code repositories of the open-source models when setting up the environment. For the evaluation of closed-source models, only the following packages are required.
openai
datasets
tqdm
Before running the script, you may need to configure API keys. The script accepts these keys via command-line arguments.
Please ensure you have valid API keys for the models you intend to use.
You can use evaluation/evaluate.py to run evaluations for closed-source or API-served models. This script supports two modes:
modify (default): re-evaluate missing/failed entries in existing results.evaluate: run a fresh evaluation.The basic command structure is as follows:
python evaluation/evaluate.py \
--model_list "qwen2.5-vl-3b-instruct" "gpt-4o" \
--benchmark_test_path "path/to/your/SpatialVizBench/SpatialViz_Bench_images" \
--save_dir "path/to/your/results_directory" \
--data_file "SpatialViz_Bench_test.json" \
--run_mode "evaluate"
Common optional flags:
--text_only: skip images and run text-only prompts--use_direct_answer: use direct-answer prompts when available--choice_prompt / --direct_prompt: select prompt keys or pass raw prompt text--enable_sampling --sample_per_level N --sample_seed S: subsample per (Category, Task, Level)--logprobs --top_logprobs K: request log probabilities (if the API supports it)You can use the evaluation/evaluate_xxx.py scripts to run evaluations for specific open-source models. Available scripts:
evaluation/evaluate_deepseekvl.pyevaluation/evaluate_internvl.pyevaluation/evaluate_kimivl.pyevaluation/evaluate_llava_ov.pyevaluation/evaluate_sail.pyThe basic command structure is as follows:
python evaluation/evaluate_xxxvl.py \
--model_paths "path/to/download/xxx/models" \
--benchmark_test_path "path/to/your/SpatialVizBench/SpatialViz_Bench_images" \
--results_dir "path/to/your/results_directory" \
--data_file "SpatialViz_Bench_test.json"
These scripts share common flags such as --run_mode, --text_only, --enable_sampling, and --enable_tail_fallback.
The get_answer function in evaluate.py processes a results file (in JSONL format) generated by model inference. Its main purposes are:
<answer> tags, attempting to find the answer even in less structured responses.overall: Accuracy across all test instances.category: Accuracy for each main category in the benchmark.task: Accuracy for each specific task type.level: Accuracy for combined category-task-level instances.positives (correctly answered) and negatives (incorrectly answered).DataID, InputText, Answer (ground truth), and the model's Response or ThinkingProcess and FinalAnswer.results_MODELNAME_counting.json) in the specified counting subdirectory.results_MODELNAME_samples.json) in the specified samples subdirectory.If you use SpatialViz-Bench in your research, please cite our paper:
@misc{wang2026spatialvizbenchcognitivelygroundedbenchmarkdiagnosing,
title={SpatialViz-Bench: A Cognitively-Grounded Benchmark for Diagnosing Spatial Visualization in MLLMs},
author={Siting Wang and Minnan Pei and Luoyang Sun and Cheng Deng and Yuchen Li and Kun Shao and Zheng Tian and Haifeng Zhang and Jun Wang},
year={2026},
eprint={2507.07610},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2507.07610},
}
24 commits
1 commits
Python
100.0%
This project is designed to evaluate the performance of multimodal large language models on the SpatialViz-Bench benchmark.
Clone the Repository
Create and Activate a Virtual Environment and Install Dependencies:
You should follow all the requirements specified in the code repositories of the open-source models when setting up the environment. For the evaluation of closed-source models, only the following packages are required.
openai
datasets
tqdm
Before running the script, you may need to configure API keys. The script accepts these keys via command-line arguments.
Please ensure you have valid API keys for the models you intend to use.
You can use evaluation/evaluate.py to run evaluations for closed-source or API-served models. This script supports two modes:
modify (default): re-evaluate missing/failed entries in existing results.evaluate: run a fresh evaluation.The basic command structure is as follows:
python evaluation/evaluate.py \
--model_list "qwen2.5-vl-3b-instruct" "gpt-4o" \
--benchmark_test_path "path/to/your/SpatialVizBench/SpatialViz_Bench_images" \
--save_dir "path/to/your/results_directory" \
--data_file "SpatialViz_Bench_test.json" \
--run_mode "evaluate"
Common optional flags:
--text_only: skip images and run text-only prompts--use_direct_answer: use direct-answer prompts when available--choice_prompt / --direct_prompt: select prompt keys or pass raw prompt text--enable_sampling --sample_per_level N --sample_seed S: subsample per (Category, Task, Level)--logprobs --top_logprobs K: request log probabilities (if the API supports it)You can use the evaluation/evaluate_xxx.py scripts to run evaluations for specific open-source models. Available scripts:
evaluation/evaluate_deepseekvl.pyevaluation/evaluate_internvl.pyevaluation/evaluate_kimivl.pyevaluation/evaluate_llava_ov.pyevaluation/evaluate_sail.pyThe basic command structure is as follows:
python evaluation/evaluate_xxxvl.py \
--model_paths "path/to/download/xxx/models" \
--benchmark_test_path "path/to/your/SpatialVizBench/SpatialViz_Bench_images" \
--results_dir "path/to/your/results_directory" \
--data_file "SpatialViz_Bench_test.json"
These scripts share common flags such as --run_mode, --text_only, --enable_sampling, and --enable_tail_fallback.
The get_answer function in evaluate.py processes a results file (in JSONL format) generated by model inference. Its main purposes are:
<answer> tags, attempting to find the answer even in less structured responses.overall: Accuracy across all test instances.category: Accuracy for each main category in the benchmark.task: Accuracy for each specific task type.level: Accuracy for combined category-task-level instances.positives (correctly answered) and negatives (incorrectly answered).DataID, InputText, Answer (ground truth), and the model's Response or ThinkingProcess and FinalAnswer.results_MODELNAME_counting.json) in the specified counting subdirectory.results_MODELNAME_samples.json) in the specified samples subdirectory.If you use SpatialViz-Bench in your research, please cite our paper:
@misc{wang2026spatialvizbenchcognitivelygroundedbenchmarkdiagnosing,
title={SpatialViz-Bench: A Cognitively-Grounded Benchmark for Diagnosing Spatial Visualization in MLLMs},
author={Siting Wang and Minnan Pei and Luoyang Sun and Cheng Deng and Yuchen Li and Kun Shao and Zheng Tian and Haifeng Zhang and Jun Wang},
year={2026},
eprint={2507.07610},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2507.07610},
}
24 commits
1 commits
Python
100.0%