Skip to content

Repository files navigation

License Framework

Regression Over Classification: Assessing Image Aesthetics via Multimodal Large Language Models

Xingyuan Ma, Shuai He, Anlong Ming, Haobin Zhong, Huadong Ma

Beijing University of Posts and Telecommunications


国内的小伙伴可以看这 This repo contains the official implementation of the AAAI 2026 paper.

Introduction

image

Image Aesthetics Assessment (IAA) evaluates visual quality through user-centered perceptual analysis and can guide various applications. Recent advances in Multimodal Large Language Models (MLLMs) have sparked interest in adapting them for IAA. However, two critical limitations persist in applying MLLMs to IAA:

  1. the tokenization strategy leads to insensitivity to scores
  2. the classification-based decoding mechanisms introduce score quantization errors
  3. Current MLLM-based IAA methods treat the task as coarse rating classification followed by probability-to-score mapping, which loses fine-grained information.

To address these challenges, we propose ROC4MLLM, offering complementary solutions from two perspectives:

  1. Representation: We separate scores from the word token space to avoid tokenizing scores as text. An independent position token bridges these spaces, improving the model’s sensitivity to score positions in text.
  2. Computation: We apply distinct loss functions for text and score predictions to enhance the model’s sensitivity to score gradients. Decoupling scores from text ensures effective supervision while preventing interference between scores and text in the loss computation.

Extensive experiments across five datasets demonstrate ROC4MLLM’s state-of-the-art performance without requiring additional training data. Additionally, ROC4MLLM’s plug-and-play design ensures seamless integration with existing MLLMs, boosting their IAA performance.

method

Checkpoints

Usage

Install

  1. Clone this repository and navigate to ROC4MLLM folder
git clone https://github.com/woshidandan/Assessing-Image-Aesthetics-via-Multimodal-Large-Language-Models.git
cd ROC4MLLM
  1. Install Package
conda create -n roc4mllm python=3.10 -y
conda activate roc4mllm
pip install --upgrade pip
pip install -e .
  1. Install additional packages for training cases
pip install -e ".[train]"
pip install flash-attn --no-build-isolation

Quick Start Code

from mplug_owl2.assessor import Assessment
from PIL import Image

assessment=Assessment(pretrained="Ricardo-M/ROC4MLLM")
images=["test_images/1_-10.jpg","test_images/1_-10.jpg"]
input_img=[]
for image in images:
    img=Image.open(image).convert('RGB')
    input_img.append(img)
answer=assessment(input_img,precision=4)
print(answer)

Training

Prepare Training Data

Please refer to mPLUG-Owl2 for data preparation.

Notes: We have added a gt_score field. If you intend to use CE loss or EMD loss, the target field is required.

Below is an example of a data sample in AVA:

{
  "image": "771257.jpg",
  "gt_score": 3.463414634146341,
  "conversations": [{"from": "human", "value": "<|image|>Could you evaluate the aesthetics of this image?"}, {"from": "gpt", "value": "The aesthetic rate of the image is [SCORE]. "}],
  "target": [0.15853658536585366, 0.10975609756097561, 0.2073170731707317, 0.2926829268292683, 0.16463414634146342, 0.04878048780487805, 0.0, 0.0, 0.006097560975609756, 0.012195121951219513]
}

Place your data file path in the DATA_FILE within scripts/finetune.sh. You also need to update the Image_root in the same script to point to the directory where your original images are stored.

Prepare model checkpoint

Download the pretrained model checkpoints and update the LOAD in scripts/finetune.sh accordingly.

Training scripts

Run the following command to start training:

bash scripts/finetune.sh

You can modify min_score and max_score to define the score range in your dataset. Use l1_weight, ce_weight, and emd_weight to configure the loss functions and their respective weights for the score loss.

Important Note: If you use CE or EMD loss, ensure that the num_tokens matches the length of the target field in your training data.

If you find our work is useful, pleaes cite our paper:

@inproceedings{ma2026regression,
  title={Regression over Classification: Assessing Image Aesthetics via Multimodal Large Language Models},
  author={Ma, Xingyuan and He, Shuai and Ming, Anlong and Zhong, Haobin and Ma, Huadong},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={40},
  number={10},
  pages={7827--7835},
  year={2026}
}
🎁 Projects 📚 Publication 🌈 Content ⭐ Stars
Assessing Aesthetics via MLLMs【解决MLLMs对分数不敏感问题】 AAAI 2026 (Oral) Code Stars
Aesthetics of Image Color Temperature【色温美学评估】 AAAI 2026 Code, Dataset Stars
Attacker Against IAA Model【美学模型的攻击和安全评估框架】 TIP 2025 Code, Dataset Stars
Personalized Aesthetics Assessment【个性化美学评估新范式】 CVPR 2025 (Highlight) Code, Dataset Stars
Pixel-level image exposure assessment【首个像素级曝光评估】 NIPS 2024 Code, Dataset Stars
Long-tail solution for image aesthetics assessment【美学评估数据不平衡解决方案】 ICML 2024 Code Stars
CLIP-based image aesthetics assessment【基于CLIP多因素色彩美学评估】 Information Fusion 2024 Code, Dataset Stars
Compare-based image aesthetics assessment【基于对比学习的多因素美学评估】 ACMMM 2024 Code Stars
Image color aesthetics assessment【首个色彩美学评估】 ICCV 2023 Code, Dataset Stars
Image aesthetics assessment【通用美学评估】 ACMMM 2023 Code Stars
Theme-oriented image aesthetics assessment【首个多主题美学评估】 IJCAI 2022 Code, Dataset Stars
Select prompt based on image aesthetics assessment【基于美学评估的提示词筛选】 IJCAI 2024 Code Stars
Motion rhythm synchronization with beats【动作与韵律对齐】 IJCAI 2024 Code, Dataset Stars
Champion Solution for AIGC Image Quality Assessment【NTIRE AIGC图像质量评估赛道冠军】 CVPRW NTIRE 2024 Code Stars
ITU Standard for Image Aesthetics Assessment Metadata【首个图像美学元数据国际标准】 ITU 2023 - -

About

🔥[AAAI 2026, Official Code] Regression Over Classification: Assessing Image Aesthetics via Multimodal Large Language Models. 克服大模型在美学评估过程中对分数不敏感的问题

Topics

Resources

Stars

32 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages