๐ [ICCV 2025] Few-Shot Image Quality Assessment via Adaptation of Vision-Language Models
January 19, 2026 ยท View on GitHub
Figure 1: Overview of our GRMP-IQA framework. (a) Pre-training stage: Meta-Prompt Pre-training Module; (b) Fine-tuning stage: Quality-Aware Gradient Regularization
๐ Introduction
This repository contains the official open-source code implementation for the paper "Few-Shot Image Quality Assessment via Adaptation of Vision-Language Models" (ICCV 2025).
We propose GRMP-IQA, a few-shot image quality assessment framework based on vision-language model adaptation. Our method achieves superior IQA performance on new datasets using only a small number of labeled samples through meta-learning pre-training and quality-aware gradient regularization.
๐ ๏ธ Environment Setup
# Create virtual environment
conda create -n grmp_iqa python=3.8
conda activate grmp_iqa
# Install dependencies
pip install -r requirements.txt
๐ Project Structure
ICCV_opensource_code/
โโโ README.md # Project documentation
โโโ requirements.txt # ๐ ๏ธ Environment dependencies
โโโ pretrain.py # ๐ฅ Meta-learning pre-training script
โโโ finetune.py # ๐ฏ Few-shot fine-tuning script
โโโ logger.py # Logging utility
โโโ CLIP/ # ๐ CLIP model related code
โ โโโ clip.py # CLIP core implementation
โ โโโ model.py # Model architecture definition
โ โโโ simple_tokenizer.py # Text tokenizer
โโโ livew_244.mat # ๐ CLIVE dataset
โโโ Koniq_244.mat # ๐ KonIQ dataset
โโโ model_checkpoint/ # ๐พ Pre-trained model checkpoints
๐ Quick Start
Step 1: Data Preparation ๐
- Download Datasets:
- Data Preprocessing:
# Data has been preprocessed into .mat format, ready to use # livew_244.mat - CLIVE dataset (244x244 resolution) # Koniq_244.mat - KonIQ dataset (244x244 resolution) - Model Weights and Dataset Available on Hugging Face ๐ค
Step 2:๐ฅ Download Resources
All pre-trained model weights (.pt files) and dataset files (.mat files) are now available on the Hugging Face Model Hub:
Repository: zzhowe/GRMP-IQA
Available Files
- Model weights: Pre-trained checkpoints (.pt files) for different datasets and configurations
- Dataset files: Processed dataset files (.mat files) including LIVE_224.mat and others
Quick Download Examples
from huggingface_hub import hf_hub_download
import torch
import scipy.io as sio
# Download pre-trained model weights
model_path = hf_hub_download(
repo_id="zzhowe/GRMP-IQA",
filename="clive_50_prompt_lda_5.0.pt"
)
# Download dataset file
dataset_path = hf_hub_download(
repo_id="zzhowe/GRMP-IQA",
filename="LIVE_224.mat"
)
# Load model
model = torch.load(model_path, map_location='cpu')
# Load dataset
dataset = sio.loadmat(dataset_path)
Step 3: Meta-Learning Pre-training ๐
# Run meta-learning pre-training (on TID2013 and KADID-10K)
python pretrain.py
Step 4: Few-Shot Fine-tuning ๐ฏ
# 50-shot fine-tuning on CLIVE dataset
python finetune.py --dataset clive --num_image 50 --lda 5.0
# Fine-tuning on KonIQ dataset
python finetune.py --dataset koniq --num_image 50 --lda 5.0
Fine-tuning Parameters โ๏ธ:
--dataset: Target dataset [clive|koniq|pipal]--num_image: Number of few-shot samples (default: 50)--pretrained: Whether to use a pre-trained image quality assessment model as a regularizer--lda: Gradient regularization weight (default: 5.0)
๐ Citation
If our work is helpful for your research, please consider citing:
@article{li2024boosting,
title={Few-Shot Image Quality Assessment via Adaptation of Vision-Language Models},
author={Li, Xudong and Huang, Zihao and Hu, Runze and Zhang, Yan and Cao, Liujuan and Ji, Rongrong},
journal={arXiv preprint arXiv:2409.05381},
year={2024}
}
๐ License
This project is licensed under the MIT License.
๐ Contact
For any questions, please feel free to contact us via:
- ๐ง Email: [lxd761050753@gmail.com] [huangzihhhh@gmail.com]
- ๐ Issue: GitHub Issues
โญ If this project helps you, please give us a Star! โญ