---
title: q-future_Compare2Score
canonical_url: "https://www.modelscope.cn/models/mirror013/q-future_Compare2Score"
md_url: "https://www.modelscope.cn/models/mirror013/q-future_Compare2Score.md"
repository: mirror013/q-future_Compare2Score
chinese_name: q-future_Compare2Score
last_updated: 2025-06-29
license: mit
pipeline_tag: image-text-to-text
tasks:
  - image-text-to-text
model_type:
  - mplug_owl2
architectures:
  - MPLUGOwl2LlamaForCausalLM
library_name:
  - pytorch
  - transformer
frameworks:
  - Pytorch
downloads: 27
stars: 0
---

# q-future_Compare2Score

> q-future_Compare2Score - mirror013 在 ModelScope 开源的模型。The model corresponds to Compare2Score.

mirror013/q-future_Compare2Score 是 ModelScope 魔搭社区上的image-text-to-text模型，采用 mit 许可。

- **Repository**: mirror013/q-future_Compare2Score
- **License**: mit
- **Tasks**: image-text-to-text
- **Downloads**: 27
- **Stars**: 0
- **Last updated**: 2025-06-29

Source: https://www.modelscope.cn/models/mirror013/q-future_Compare2Score

---

The model corresponds to [Compare2Score](https://compare2score.github.io/).

## Quick Start with AutoModel

<!-- For this image, ![](https://raw.githubusercontent.com/Q-Future/Q-Align/main/fig/singapore_flyer.jpg) start an AutoModel scorer with `transformers==4.36.1`:
 -->
```python
import requests
import torch
from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("q-future/Compare2Score", trust_remote_code=True, attn_implementation="eager", 
                                             torch_dtype=torch.float16, device_map="auto")

from PIL import Image
image_path_url = "https://raw.githubusercontent.com/Q-Future/Q-Align/main/fig/singapore_flyer.jpg"
print("The quality score of this image is {}".format(model.score(image_path_url)) 
```

## Evaluation with GitHub
```shell
git clone https://github.com/Q-Future/Compare2Score.git
cd Compare2Score
pip install -e .
```

```python
from q_align import Compare2Scorer
from PIL import Image

scorer = Compare2Scorer()
image_path = "figs/i04_03_4.bmp"
print("The quality score of this image is {}.".format(scorer(image_path)))
```

## Citation

```bibtex
@article{zhu2024adaptive,
  title={Adaptive Image Quality Assessment via Teaching Large Multimodal Model to Compare},
  author={Zhu, Hanwei and Wu, Haoning and Li, Yixuan and Zhang, Zicheng and Chen, Baoliang and Zhu, Lingyu and Fang, Yuming and Zhai, Guangtao and Lin, Weisi and Wang, Shiqi},
  journal={arXiv preprint arXiv:2405.19298},
  year={2024},
}
```
