Large Multimodal Models (LMMs) demonstrate impressive capabilities. However, current benchmarks predominantly focus on image comprehension in specific domains, and these benchmarks are labor-intensive to construct. Moreover, their answers tend to be brief, making it difficult to assess the ability of LMMs to generate detailed descriptions of images. To address these limitations, we propose the MMGenBench-Pipeline, a straightforward and fully automated evaluation pipeline. This involves generating textual descriptions from input images, using these descriptions to create auxiliary images via text-to-image generative models, and then comparing the original and generated images. Furthermore, to ensure the effectiveness of MMGenBench-Pipeline, we design MMGenBench-Test, evaluating LMMs across 13 distinct image patterns, and MMGenBench-Domain, focusing on generative image performance. A thorough evaluation involving over 50 popular LMMs demonstrates the effectiveness and reliability of both the pipeline and benchmark. Our observations indicate that numerous LMMs excelling in existing benchmarks fail to adequately complete the basic tasks related to image understanding and description. This finding highlights the substantial potential for performance improvement in current LMMs and suggests avenues for future model optimization. Concurrently, MMGenBench-Pipeline can efficiently assess the performance of LMMs across diverse domains using only image inputs. All code and data will be released.
------
# Usage
## Getting Started
### Environment Installation
Clone this repository
```bash
git clone git@github.com:lerogo/MMGenBench.git
cd MMGenBench
```
Download dataset
```bash
huggingface-cli download --repo-type dataset lerogo/MMGenBench --local-dir MMGenBench-data
```
**Install the relevant environment, including torch, transformers, diffusers and [unicom](https://github.com/deepglint/unicom) (used to extract image representation).**
### Preliminary
We use the `InternVL2-2B` as an example. The structure of the code and data is as follows.
```bash
.
├── MMGenBench-data # The MMGenBench-Test/Domain dataset we downloaded from huggingface
│ ├── MMGenBench-Domain.json
│ ├── MMGenBench-Domain.tsv
│ ├── MMGenBench-Test-label-count.json
│ ├── MMGenBench-Test-label-index.json
│ ├── MMGenBench-Test.json
│ ├── MMGenBench-Test.tsv
│ ├── README.md
│ └── check.py
├── README.md # This file
├── evalimg # For extracting features and calculating metrics using the image representation model
│ ├── metric_fid.py
│ ├── output
│ │ ├── InternVL2-2B_MMGenBench-Domain.json
│ │ └── InternVL2-2B_MMGenBench-Test.json
│ ├── requirements.txt
│ ├── run.py
│ └── run.sh
├── generate # For processing LMMs' output with the text-to-image models
│ ├── flux.py
│ ├── input
│ │ ├── InternVL2-2B_MMGenBench-Domain.xlsx
│ │ └── InternVL2-2B_MMGenBench-Test.xlsx
│ ├── kolors.py
│ ├── lumina.py
│ ├── output
│ │ ├── InternVL2-2B_MMGenBench-Domain.tsv
│ │ └── InternVL2-2B_MMGenBench-Test.tsv
│ ├── requirements.txt
│ ├── run.py
│ ├── run.sh
│ ├── sd.py
│ └── tools.py
└── visual # For visualization
├── outputs
│ ├── InternVL2-2B_MMGenBench-Domain.json
│ ├── InternVL2-2B_MMGenBench-Domain.xlsx
│ ├── InternVL2-2B_MMGenBench-Test.json
│ └── InternVL2-2B_MMGenBench-Test.xlsx
├── run.py
└── run.sh
```
## Evaluation Pipeline
### Stage 1
Adapt your model in [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) and use MMGenBench for inference.
Run command:
```bash
torchrun --nproc-per-node=4 run.py --model