๐ŸŒŸ [ICCV 2025] Few-Shot Image Quality Assessment via Adaptation of Vision-Language Models

January 19, 2026 ยท View on GitHub

image

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

GitHub stars arXiv Python PyTorch CLIP Hugging Face

๐Ÿ“– 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 ๐Ÿ“Š

  1. Download Datasets:
  1. 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)
    
  2. 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:


โญ If this project helps you, please give us a Star! โญ