Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
image-quality-assessment
iqa
mr-iqa
conversational
Instructions to use RobinY99/MR-IQA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RobinY99/MR-IQA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="RobinY99/MR-IQA") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("RobinY99/MR-IQA") model = AutoModelForMultimodalLM.from_pretrained("RobinY99/MR-IQA", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RobinY99/MR-IQA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RobinY99/MR-IQA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RobinY99/MR-IQA", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/RobinY99/MR-IQA
- SGLang
How to use RobinY99/MR-IQA with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RobinY99/MR-IQA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RobinY99/MR-IQA", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RobinY99/MR-IQA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RobinY99/MR-IQA", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use RobinY99/MR-IQA with Docker Model Runner:
docker model run hf.co/RobinY99/MR-IQA
RobinY99 commited on
Commit ·
03310c4
1
Parent(s): e2bbe5d
Refine model card and add training guidance
Browse files- README.md +3 -19
- training_guidance/README.md +11 -0
- training_guidance/training_config.json +19 -0
- training_guidance/validation_history.csv +11 -0
- training_guidance/validation_history.json +24 -0
README.md
CHANGED
|
@@ -8,7 +8,7 @@ tags:
|
|
| 8 |
- mr-iqa
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# MR-IQA
|
| 12 |
|
| 13 |
<p align="center">
|
| 14 |
<a href="https://github.com/RobinY99/MR-IQA/blob/main/assets/mr_iqa_overview.pdf">
|
|
@@ -16,26 +16,10 @@ tags:
|
|
| 16 |
</a>
|
| 17 |
</p>
|
| 18 |
|
| 19 |
-
|
| 20 |
-
<strong>MR-IQA: A Unified Margin View for Image Quality Assessment</strong><br>
|
| 21 |
-
A compact vision-language checkpoint for margin-aware no-reference image quality scoring.
|
| 22 |
-
</p>
|
| 23 |
-
|
| 24 |
-
MR-IQA predicts perceptual image quality scores while preserving calibrated score margins between images. The training objective uses distributional margin consistency: it compares the model's predicted score gap with the human opinion gap normalized by annotation uncertainty. This helps the model learn not only which image should score higher, but also how far apart two scores should be.
|
| 25 |
|
| 26 |
The overview PDF and repository code are available on [GitHub](https://github.com/RobinY99/MR-IQA).
|
| 27 |
|
| 28 |
-
## Why MR-IQA
|
| 29 |
-
|
| 30 |
-
MR-IQA is designed for practical image quality assessment when reference images are unavailable. It provides direct perceptual scoring, stable numeric outputs, and simple integration into evaluation pipelines.
|
| 31 |
-
|
| 32 |
-
Typical use cases include:
|
| 33 |
-
|
| 34 |
-
- Ranking generated, restored, or compressed images by perceptual quality.
|
| 35 |
-
- Auditing image datasets before training or release.
|
| 36 |
-
- Comparing image enhancement or restoration systems.
|
| 37 |
-
- Adding an interpretable quality signal to automated review workflows.
|
| 38 |
-
|
| 39 |
## Validation Snapshot
|
| 40 |
|
| 41 |
The released checkpoint was evaluated with an 8-shard validation setup on a held-out KONIQ split.
|
|
@@ -44,7 +28,7 @@ The released checkpoint was evaluated with an 8-shard validation setup on a held
|
|
| 44 |
| --- | ---: | ---: | ---: | ---: |
|
| 45 |
| KONIQ validation | 200 | 0.9251 | 0.9421 | 8 |
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
## Quick Start
|
| 50 |
|
|
|
|
| 8 |
- mr-iqa
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# MR-IQA: A Unified Margin View of Regression and Ranking for Blind Image Quality Assessment
|
| 12 |
|
| 13 |
<p align="center">
|
| 14 |
<a href="https://github.com/RobinY99/MR-IQA/blob/main/assets/mr_iqa_overview.pdf">
|
|
|
|
| 16 |
</a>
|
| 17 |
</p>
|
| 18 |
|
| 19 |
+
We derive that regression and ranking are approximately equivalent under a unified margin view. Based on this observation, we propose MR-IQA for margin learning in blind image quality assessment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
The overview PDF and repository code are available on [GitHub](https://github.com/RobinY99/MR-IQA).
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
## Validation Snapshot
|
| 24 |
|
| 25 |
The released checkpoint was evaluated with an 8-shard validation setup on a held-out KONIQ split.
|
|
|
|
| 28 |
| --- | ---: | ---: | ---: | ---: |
|
| 29 |
| KONIQ validation | 200 | 0.9251 | 0.9421 | 8 |
|
| 30 |
|
| 31 |
+
The per-epoch validation curve and sanitized training metadata are available in [`training_guidance/`](training_guidance/).
|
| 32 |
|
| 33 |
## Quick Start
|
| 34 |
|
training_guidance/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Training Guidance
|
| 2 |
+
|
| 3 |
+
This folder provides sanitized training-process metadata for the released MR-IQA 2B checkpoint. It is intended as lightweight reproduction guidance, not as a full experiment archive.
|
| 4 |
+
|
| 5 |
+
Files:
|
| 6 |
+
|
| 7 |
+
- `training_config.json`: core training hyperparameters and distributed setup.
|
| 8 |
+
- `validation_history.csv`: per-epoch validation curve in table form.
|
| 9 |
+
- `validation_history.json`: the same validation curve with summary metadata.
|
| 10 |
+
|
| 11 |
+
The validation curve uses a held-out KONIQ split with 200 valid samples and 8 evaluation shards for every epoch. No machine-specific paths, private dataset roots, cache directories, or internal experiment names are included.
|
training_guidance/training_config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"description": "Sanitized training recipe for reproducing the released MR-IQA 2B run.",
|
| 3 |
+
"model_scale": "2B vision-language backbone",
|
| 4 |
+
"training_epochs": 10,
|
| 5 |
+
"per_device_train_batch_size": 48,
|
| 6 |
+
"num_generations": 6,
|
| 7 |
+
"num_iterations": 4,
|
| 8 |
+
"learning_rate": 0.00001,
|
| 9 |
+
"kl_beta": 0.02,
|
| 10 |
+
"temperature": 0.7,
|
| 11 |
+
"max_completion_length": 256,
|
| 12 |
+
"reward_terms": ["margin_consistency", "format"],
|
| 13 |
+
"margin_weight": 1.0,
|
| 14 |
+
"ranking_weight": 0.0,
|
| 15 |
+
"min_ground_truth_std": 0.0001,
|
| 16 |
+
"distributed_training": "8 GPUs with ZeRO-3 offload",
|
| 17 |
+
"validation": "8-shard validation after each epoch",
|
| 18 |
+
"path_policy": "All paths are intentionally omitted. Bind your own model, image root, manifest, output, and cache directories when launching."
|
| 19 |
+
}
|
training_guidance/validation_history.csv
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
epoch,srcc,plcc,valid_count,shards
|
| 2 |
+
1,0.8840,0.8894,200,8
|
| 3 |
+
2,0.9213,0.9302,200,8
|
| 4 |
+
3,0.9318,0.9392,200,8
|
| 5 |
+
4,0.9274,0.9340,200,8
|
| 6 |
+
5,0.9271,0.9409,200,8
|
| 7 |
+
6,0.9249,0.9406,200,8
|
| 8 |
+
7,0.9205,0.9408,200,8
|
| 9 |
+
8,0.9288,0.9465,200,8
|
| 10 |
+
9,0.9307,0.9450,200,8
|
| 11 |
+
10,0.9251,0.9421,200,8
|
training_guidance/validation_history.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"description": "Validation history for the original released MR-IQA 2B training run.",
|
| 3 |
+
"validation_split": "KONIQ held-out validation split",
|
| 4 |
+
"valid_count": 200,
|
| 5 |
+
"shards": 8,
|
| 6 |
+
"best_epoch": 3,
|
| 7 |
+
"best_srcc": 0.9318,
|
| 8 |
+
"best_plcc": 0.9392,
|
| 9 |
+
"final_epoch": 10,
|
| 10 |
+
"final_srcc": 0.9251,
|
| 11 |
+
"final_plcc": 0.9421,
|
| 12 |
+
"epochs": [
|
| 13 |
+
{"epoch": 1, "srcc": 0.8840, "plcc": 0.8894, "valid_count": 200, "shards": 8},
|
| 14 |
+
{"epoch": 2, "srcc": 0.9213, "plcc": 0.9302, "valid_count": 200, "shards": 8},
|
| 15 |
+
{"epoch": 3, "srcc": 0.9318, "plcc": 0.9392, "valid_count": 200, "shards": 8},
|
| 16 |
+
{"epoch": 4, "srcc": 0.9274, "plcc": 0.9340, "valid_count": 200, "shards": 8},
|
| 17 |
+
{"epoch": 5, "srcc": 0.9271, "plcc": 0.9409, "valid_count": 200, "shards": 8},
|
| 18 |
+
{"epoch": 6, "srcc": 0.9249, "plcc": 0.9406, "valid_count": 200, "shards": 8},
|
| 19 |
+
{"epoch": 7, "srcc": 0.9205, "plcc": 0.9408, "valid_count": 200, "shards": 8},
|
| 20 |
+
{"epoch": 8, "srcc": 0.9288, "plcc": 0.9465, "valid_count": 200, "shards": 8},
|
| 21 |
+
{"epoch": 9, "srcc": 0.9307, "plcc": 0.9450, "valid_count": 200, "shards": 8},
|
| 22 |
+
{"epoch": 10, "srcc": 0.9251, "plcc": 0.9421, "valid_count": 200, "shards": 8}
|
| 23 |
+
]
|
| 24 |
+
}
|