|
| 1 | +# WISE |
| 2 | + |
| 3 | +WISE is a knowledge-intensive text-to-image benchmark that evaluates whether models can use commonsense, cultural, scientific, spatial, and temporal knowledge to generate correct images. |
| 4 | + |
| 5 | +- Paper: https://arxiv.org/abs/2503.07265 |
| 6 | +- Dataset: https://huggingface.co/datasets/Yuwei-Niu/WISE |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +**Dataset:** 1000 prompts loaded from the Hugging Face `test` split across 6 categories (Culture, Time, Space, Biology, Physics, Chemistry) |
| 11 | + |
| 12 | +**Evaluation:** GPT-4o judges each generated image on three dimensions: |
| 13 | +- **Consistency** (0-2): How well the image matches the prompt |
| 14 | +- **Realism** (0-2): Visual quality and photorealism |
| 15 | +- **Aesthetic Quality** (0-2): Artistic appeal and composition |
| 16 | + |
| 17 | +**WiScore Formula:** `(0.7 × consistency + 0.2 × realism + 0.1 × aesthetic) / 2` |
| 18 | + |
| 19 | +**Final Score:** Weighted average across categories (Culture: 0.4, Time: 0.167, Space: 0.133, Biology/Physics/Chemistry: 0.1 each) |
| 20 | + |
| 21 | +## Environment Variables |
| 22 | + |
| 23 | +```bash |
| 24 | +export WISE_API_KEY="your-api-key" # Judge API key |
| 25 | +export WISE_BASE_URL="https://api.openai.com/v1" # Judge API endpoint |
| 26 | +export WISE_MODEL_NAME="gpt-4o-2024-05-13" # Judge model name |
| 27 | +``` |
| 28 | + |
| 29 | +## Image Generation Integration |
| 30 | + |
| 31 | +WISE uses `output_type: generate_until` because lmms-eval routes both text-only generation and image-capable model generation through the same request type. |
| 32 | +Image-generation model wrappers should save generated images to disk and return a JSON string like: |
| 33 | + |
| 34 | +```json |
| 35 | +{"text": "", "images": ["/path/to/model/output/WISE_0.png"]} |
| 36 | +``` |
| 37 | + |
| 38 | +During scoring, WISE reads the first path in `images` and sends that file to the judge. Models that only write files without returning this JSON format are not supported by this task. |
| 39 | + |
| 40 | +## Usage |
| 41 | + |
| 42 | +### Full Evaluation with an Image-Generation Model |
| 43 | + |
| 44 | +```bash |
| 45 | +cd /path/to/lmms-eval |
| 46 | + |
| 47 | +export WISE_API_KEY="your-api-key" |
| 48 | +export WISE_BASE_URL="https://api.openai.com/v1" |
| 49 | +export WISE_MODEL_NAME="gpt-4o-2024-05-13" |
| 50 | + |
| 51 | +python -m lmms_eval \ |
| 52 | + --model your_image_generation_model \ |
| 53 | + --model_args pretrained=/path/to/checkpoint,mode=generate,output_dir=/path/to/lmms-eval/outputs/WISE_raw/model_name \ |
| 54 | + --tasks WISE \ |
| 55 | + --batch_size 1 \ |
| 56 | + --log_samples \ |
| 57 | + --output_path /path/to/lmms-eval/outputs/WISE_eval/model_name |
| 58 | +``` |
| 59 | + |
| 60 | +## Metrics |
| 61 | + |
| 62 | +- `WISE_culture_score`: Culture category score (prompt_id 1-400) |
| 63 | +- `WISE_time_score`: Time category score (prompt_id 401-567) |
| 64 | +- `WISE_space_score`: Space category score (prompt_id 568-700) |
| 65 | +- `WISE_biology_score`: Biology category score (prompt_id 701-800) |
| 66 | +- `WISE_physics_score`: Physics category score (prompt_id 801-900) |
| 67 | +- `WISE_chemistry_score`: Chemistry category score (prompt_id 901-1000) |
| 68 | +- `WISE_overall_wiscore`: Weighted overall score (main metric) |
| 69 | + |
| 70 | +All scores are in the range [0.0, 1.0]. |
| 71 | + |
| 72 | +Do not use VQA-only models or image-editing models for this task. |
0 commit comments