Skip to content

OpenGVLab/GenExam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo GenExam: A Multidisciplinary Text-to-Image Exam

Zhaokai Wang*, Penghao Yin*, Xiangyu Zhao, Changyao Tian, Yu Qiao, Wenhai Wang, Jifeng Dai, Gen Luo

arXiv PDF data img/data data img/data



teaser

⭐️ Introduction

Exams are a fundamental test of expert-level intelligence and require integrated understanding, reasoning, and generation. Existing exam-style benchmarks mainly focus on understanding and reasoning tasks, and current generation benchmarks emphasize the illustration of world knowledge and visual concepts, neglecting the evaluation of rigorous drawing exams.

We introduce GenExam, the first benchmark for multidisciplinary text-to-image exams, featuring 1,000 samples across 10 subjects with exam-style prompts organized under a four-level taxonomy. Each problem is equipped with ground-truth images and fine-grained scoring points to enable a precise evaluation of semantic correctness and visual plausibility.

Experiments show that even state-of-the-art models such as GPT-Image-1 and Gemini-2.5-Flash-Image achieve less than 15% strict scores, and most models yield almost 0%, suggesting the great challenge of our benchmark. By framing image generation as an exam, GenExam offers a rigorous assessment of models' ability to integrate knowledge, reasoning, and generation, providing insights on the path to general AGI.

overview

🚀 Leaderboard

Strict Score

Model         MathPhyChemBio GeoCompEngEcon MusicHistOverall
Closed-source Models
GPT-Image-18.013.213.522.815.910.313.113.09.32.412.1
Seedream 4.02.63.55.918.610.66.911.75.20.07.37.2
Imagen-4-Ultra2.69.79.314.77.62.912.69.10.00.06.9
Gemini-2.5-Flash-Image0.77.14.25.14.54.910.01.31.50.03.9
Seedream 3.00.70.00.80.00.00.00.00.00.00.00.2
FLUX.1 Kontext max0.00.00.00.00.00.00.00.00.00.00.0
Open-source T2I Models
Qwen-Image0.00.00.00.03.00.00.00.00.00.00.3
HiDream-I1-Full0.00.00.00.00.00.00.00.00.00.00.0
FLUX.1 dev0.00.00.00.00.00.00.00.00.00.00.0
FLUX.1 Krea0.00.00.00.00.00.00.00.00.00.00.0
Stable Diffusion 3.5 Large0.00.00.00.00.00.00.00.00.00.00.0
Open-source Unified MLLMs
BAGEL (thinking)0.00.00.00.00.00.00.00.00.00.00.0
BAGEL0.00.00.00.00.00.00.00.00.00.00.0
Show-o2-7B0.00.00.00.00.00.00.00.00.00.00.0
Show-o2-1.5B-HQ0.00.00.00.00.00.00.00.00.00.00.0
BLIP3o-NEXT-GRPO-Text-30.00.00.00.00.00.00.00.00.00.00.0
BLIP3o-8B0.00.00.00.00.00.00.00.00.00.00.0
Janus-Pro0.00.00.00.00.00.00.00.00.00.00.0
Emu30.00.00.00.00.00.00.00.00.00.00.0

Relaxed Score

Model MathPhyChemBio GeoCompEngEcon MusicHistOverall
Closed-source Models
GPT-Image-152.066.453.474.673.955.665.565.852.667.462.6
Seedream 4.039.849.046.171.065.152.260.056.034.556.753.0
Imagen-4-Ultra35.957.444.568.166.940.165.659.738.457.853.4
Gemini-2.5-Flash-Image43.160.945.372.670.247.465.859.837.057.155.9
Seedream 3.018.621.518.332.238.215.326.512.521.629.223.4
FLUX.1 Kontext max23.525.619.238.347.520.928.922.325.433.528.5
Open-source T2I Models
Qwen-Image18.926.315.332.149.618.932.020.323.438.627.5
HiDream-I1-Full16.717.713.527.336.215.424.418.821.331.822.3
FLUX.1 dev12.214.412.522.836.411.014.09.221.321.717.6
FLUX.1 Krea7.014.08.526.538.48.415.411.116.817.416.4
Stable Diffusion 3.5 Large12.213.210.721.838.86.616.38.024.118.017.0
Open-source Unified MLLMs
BAGEL (thinking)11.713.811.915.228.56.210.76.314.716.013.5
BAGEL14.710.67.910.824.56.810.25.313.714.411.9
Show-o2-7B10.811.94.812.833.34.711.87.08.814.512.0
Show-o2-1.5B-HQ7.37.56.215.025.34.39.37.37.619.811.0
BLIP3o-NEXT-GRPO-Text-315.510.59.215.523.78.210.18.115.210.212.6
BLIP3o-8B6.45.54.77.016.73.68.42.56.011.27.2
Janus-Pro13.78.88.27.218.83.910.54.214.56.69.6
Emu311.30.60.65.634.65.116.51.95.86.28.8

Comparison Across Four Dimensions

🛠️ Usage

Our data is stored in data/. You can also download them from Huggingface. Additionally, images organized by taxonomy can be found here.

1. Prerequisites

  1. Install requirements: pip install requests tqdm pillow

  2. Set openai_api_key and openai_base_url (optional, if you want to use proxy) in run_eval.py for the gpt-5-20250807 evaluator and inference of gpt-image-1.

  3. Generate the images offline with your model based on the prompt values in data/annotations/All_Subjects.jsonl. Save paths should be like gen_imgs/{id}.png.

2. Run Evaluation

Offline Inference

Run evaluation offline if images are already generated in gen_imgs/:

python run_eval.py --data_dir ./data/ --img_save_dir ./gen_imgs --eval_save_dir ./eval_results

The eval results are saved to separate jsons under ./eval_results for each sample.

The run_eval.py script supports resuming from breakpoints. If your evaluation encounters an error midway, simply re-run the script.

Online Inference

Alternatively, you can add --run_inference to inference and evaluation together (generate images online):

python run_eval.py --run_inference --data_dir ./data/ --img_save_dir ./gen_imgs --eval_save_dir ./eval_results

This script runs gpt-image-1 by default, which costs $185 on the full set ($160 for inference and $25 for evaluation). You can replace the inference_function in the script with customized function for your model's inference.

3. Calculate Scores

Run the script to generate a detailed report for the eval results:

python cal_score.py --eval_results_dir ./eval_results

This should give a report like:

Report Example
================================================================================
Each score dimension:
- semantic_correctness: 0.47
- spelling: 1.48
- readability: 1.55
- logical_consistency: 0.7
================================================================================
Each score dimension (average) for each subject:
- Computer_Science:
  semantic_correctness: 0.53
  spelling: 1.68
  readability: 1.43
  logical_consistency: 0.66
- Physics:
  semantic_correctness: 0.4
  spelling: 1.7
  readability: 1.41
  logical_consistency: 0.5
- Biology:
  semantic_correctness: 0.72
  spelling: 1.28
  readability: 1.59
  logical_consistency: 1.02
- History:
  semantic_correctness: 0.53
  spelling: 1.32
  readability: 1.68
  logical_consistency: 0.85
- Math:
  semantic_correctness: 0.24
  spelling: 1.5
  readability: 1.65
  logical_consistency: 0.29
- Geography:
  semantic_correctness: 0.62
  spelling: 1.27
  readability: 1.69
  logical_consistency: 0.98
- Economics:
  semantic_correctness: 0.56
  spelling: 1.77
  readability: 1.58
  logical_consistency: 0.75
- Chemistry:
  semantic_correctness: 0.33
  spelling: 1.33
  readability: 1.52
  logical_consistency: 0.6
- Music:
  semantic_correctness: 0.26
  spelling: 1.42
  readability: 1.5
  logical_consistency: 0.46
- Engineering:
  semantic_correctness: 0.56
  spelling: 1.49
  readability: 1.43
  logical_consistency: 0.94
--------------------------------------------------------------------------------
Total number of eval results:  487
--------------------------------------------------------------------------------
Strict score:
- Computer_Science(47 samples): 10.2% - Physics(46 samples): 3.5% - Biology(46 samples): 12.2% - History(41 samples): 5.9% - Math(52 samples): 0.0% - Geography(52 samples): 7.7% - Economics(52 samples): 3.1% - Chemistry(52 samples): 4.6% - Music(52 samples): 0.0% - Engineering(47 samples): 6.8% 
Average strict score: 5.4%
--------------------------------------------------------------------------------
Relaxed score:
- Computer_Science(47 samples): 44.8% - Physics(46 samples): 36.9% - Biology(46 samples): 56.1% - History(41 samples): 45.4% - Math(52 samples): 27.2% - Geography(52 samples): 50.7% - Economics(52 samples): 47.6% - Chemistry(52 samples): 32.4% - Music(52 samples): 27.8% - Engineering(47 samples): 47.0% 
Average relaxed score: 41.6%

Run on GenExam-Mini

To run evaluation on the mini subset, you can add a --mini argument when running run_eval.py:

python run_eval.py --mini --data_dir ./data/ --img_save_dir ./gen_imgs --eval_save_dir ./eval_results

If you have already run evaluation on the full set, you can alternatively add --mini when running cal_score.py:

python cal_score.py --mini --eval_results_dir ./eval_results

Speed Up Evaluation

Run the two commands simultaneously with --start_index and --end_index to split the evaluation into two parts:

# in window 1
python run_eval.py --start_index 0 --end_index 500 --data_dir ./data/ --img_save_dir ./gen_imgs --eval_save_dir ./eval_results
# in window 2
python run_eval.py --start_index 500 --end_index 1000 --data_dir ./data/ --img_save_dir ./gen_imgs --eval_save_dir ./eval_results

You can split evaluator into more parts for further speed-up.

🖼 Examples of Generated Images

For more examples, please refer to the appendix in our paper.

math math

📃 License

This project is released under the MIT license.

🖊️ Citation

If you find our work helpful, please consider giving us a ⭐ and citing our paper:

@article{GenExam,
  title={GenExam: A Multidisciplinary Text-to-Image Exam},
  author = {Wang, Zhaokai and Yin, Penghao and Zhao, Xiangyu and Tian, Changyao and Qiao, Yu and Wang, Wenhai and Dai, Jifeng and Luo, Gen},
  journal={arXiv preprint arXiv:2509.14232},
  year={2025}
}