Update README.md
Browse files
README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
<div align="center">
|
| 3 |
<img src="./assets/logo1.png" alt="IQA Logo" width="1200"/>
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
</strong></h3>
|
| 7 |
|
| 8 |
[](https://huggingface.co/datasets/xiaoqi-wang/miqd-2.5m)
|
| 9 |
[](https://arxiv.org/abs/2508.19850)
|
|
@@ -11,32 +14,31 @@
|
|
| 11 |
[](https://github.com/XiaoqiWang/MIQA)
|
| 12 |
|
| 13 |
[δΈζ](README_CN.md) | [English](README.md) | [Model](https://huggingface.co/xiaoqi-wang/miqa) | [Dataset](https://huggingface.co/datasets/xiaoqi-wang/miqd-2.5m)
|
|
|
|
| 14 |
</div>
|
| 15 |
-
<div style="font-size:
|
| 16 |
π― Project Overview
|
| 17 |
-
|
| 18 |
- π€ Machine-Centric: We bypass human perception to evaluate images from the perspective of the deep learning models that use them.
|
| 19 |
- π Task-Driven Metrics: Directly measure how degradations like blur, noise, or compression artifacts impact the performance of downstream vision tasks.
|
| 20 |
- π‘ A New Paradigm: MIQA offers a new lens for optimizing image processing pipelines where machines make the final decision.
|
| 21 |
</div>
|
| 22 |
|
| 23 |
-
---
|
| 24 |
## β¨ Does MIQA Work?
|
| 25 |
-
<
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
</
|
| 31 |
-
|
|
|
|
| 32 |
<details>
|
| 33 |
<summary> ποΈ Key Results</summary>
|
| 34 |
-
|
| 35 |
Our results provide clear evidence of MIQA's effectiveness across three representative computer vision tasks: classification, detection, and segmentation.
|
| 36 |
The framework consistently identifies images that degrade model performance. By filtering these detrimental samples, MIQA directly leads to improved outcomes and demonstrates the universal utility of a machine-centric approach. This transforms quality assessment from a passive metric into a proactive tool, safeguarding downstream models against the unpredictable image quality of real-world conditions and ensuring robust performance when it matters most.
|
| 37 |
</details>
|
| 38 |
|
| 39 |
-
---
|
| 40 |
## π οΈ Installation Guide
|
| 41 |
|
| 42 |
#### Step 1: Install Dependencies
|
|
@@ -61,7 +63,6 @@ If your CUDA version is relatively high, such as 12.7 or higher, you might encou
|
|
| 61 |
|
| 62 |
For example, if you need a specific version of **mmcv**, you can uninstall the existing versions and install a compatible one as follows:
|
| 63 |
|
| 64 |
-
|
| 65 |
```bash
|
| 66 |
pip uninstall mmcv mmcv-full -y
|
| 67 |
mim install "mmcv>=2.0.0rc4,<2.2.0" # The version specified here is just an example. You should choose a version that is compatible with your CUDA and PyTorch setup.*
|
|
@@ -75,31 +76,40 @@ pip install -r requirements.txt
|
|
| 75 |
```
|
| 76 |
|
| 77 |
## π¦ Model Weights & Performance
|
| 78 |
-
|
| 79 |
### Where things live
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
| **MIQD-2.5M database** | **Hugging Face** dataset: [xiaoqi-wang/miqd-2.5m](https://huggingface.co/datasets/xiaoqi-wang/miqd-2.5m) |
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
### Naming & cache
|
| 89 |
|
| 90 |
-
Checkpoint pattern on the Hub:
|
| 91 |
-
|
| 92 |
-
`miqa_ra_miqa_{cls|det|ins}_{composite|consistency|accuracy}_metric.pth.tar`
|
| 93 |
|
| 94 |
Examples:
|
| 95 |
-
|
| 96 |
- `miqa_ra_miqa_cls_composite_metric.pth.tar`
|
| 97 |
- `miqa_ra_miqa_det_consistency_metric.pth.tar`
|
| 98 |
- `miqa_ra_miqa_ins_accuracy_metric.pth.tar`
|
| 99 |
|
| 100 |
On first run, `huggingface_hub` downloads into `models/checkpoints/{composite|consistency|accuracy}_metric/`.
|
| 101 |
|
| 102 |
-
|
| 103 |
## π Quick Start
|
| 104 |
|
| 105 |
### Assess a Single Image
|
|
@@ -132,7 +142,6 @@ python img_inference.py --input path/to/image.jpg --task cls --model ra_miqa --s
|
|
| 132 |
python img_inference.py --input ./assets/demo_images/imagenet_demo --task ins --save-results --visualize
|
| 133 |
```
|
| 134 |
|
| 135 |
-
|
| 136 |
### π¬ Video Assessment
|
| 137 |
|
| 138 |
Video Quality Assessment offers two workflows: **(1) Frame-by-Frame Annotation**: Generates fully annotated videos for detailed visual inspection. Suitable for demos and qualitative analysis but computationally intensive.
|
|
@@ -159,9 +168,18 @@ The primary output is a new `.mp4` video file. This video shows the original foo
|
|
| 159 |
|
| 160 |
<summary>π₯ <b>Example: Frame-wise MIQA Predictions on Videos</b></summary>
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
|
| 166 |
</details>
|
| 167 |
|
|
@@ -182,7 +200,6 @@ This workflow is highly optimized for batch processing.
|
|
| 182 |
# Analyze all videos in a directory, sampling 120 frames from each
|
| 183 |
python video_analytics_inference.py --input assets/demo_video/ --task det --video-frames 120 --visualize
|
| 184 |
|
| 185 |
-
|
| 186 |
python video_analytics_inference.py --input assets/demo_video/jpeg_distorted.mp4 --task det --visualize --viz-granularity both
|
| 187 |
# viz-granularity both : Specifies the type of plot to generate. 'composite' creates a comprehensive, side-by-side comparison chart showing:
|
| 188 |
#1. The raw, frame-level quality scores. 2. The smoothed, per-second average quality scores.
|
|
@@ -192,15 +209,22 @@ This process **does not create a new video**. Instead, it generates two key outp
|
|
| 192 |
1. A **`.png` image**: A detailed time-series plot showing the quality score fluctuation over the video's duration.
|
| 193 |
2. A **`.json` file**: A structured data file containing per-second aggregated scores, overall statistics (average, min, max, std. dev), and video metadata.
|
| 194 |
|
| 195 |
-
|
| 196 |
-
|
| 197 |
<details>
|
| 198 |
<summary>π₯ <b>Example: Frame-wise MIQA Predictions on Videos</b></summary>
|
| 199 |
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
</details>
|
| 205 |
|
| 206 |
## π Training and Evaluation
|
|
@@ -762,4 +786,4 @@ If you find this work useful in your research, please consider citing:
|
|
| 762 |
## π§ Contact
|
| 763 |
|
| 764 |
- **Project Maintainer**: [Xiaoqi Wang](mailto:wangxq79@mail2.sysu.edu.cn)
|
| 765 |
-
- **Issues**: Please use [GitHub Issues](https://github.com/XiaoqiWang/MIQA/issues) for bug reports and feature requests
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- xiaoqi-wang/miqd-2.5m
|
| 4 |
+
---
|
| 5 |
|
| 6 |
<div align="center">
|
| 7 |
<img src="./assets/logo1.png" alt="IQA Logo" width="1200"/>
|
| 8 |
+
<h2><strong> Image Quality Assessment for Machines: Paradigm, Large-scale Database, and Models
|
| 9 |
+
</strong></h2>
|
|
|
|
| 10 |
|
| 11 |
[](https://huggingface.co/datasets/xiaoqi-wang/miqd-2.5m)
|
| 12 |
[](https://arxiv.org/abs/2508.19850)
|
|
|
|
| 14 |
[](https://github.com/XiaoqiWang/MIQA)
|
| 15 |
|
| 16 |
[δΈζ](README_CN.md) | [English](README.md) | [Model](https://huggingface.co/xiaoqi-wang/miqa) | [Dataset](https://huggingface.co/datasets/xiaoqi-wang/miqd-2.5m)
|
| 17 |
+
|
| 18 |
</div>
|
| 19 |
+
<div style="font-size: 15px;">
|
| 20 |
π― Project Overview
|
| 21 |
+
|
| 22 |
- π€ Machine-Centric: We bypass human perception to evaluate images from the perspective of the deep learning models that use them.
|
| 23 |
- π Task-Driven Metrics: Directly measure how degradations like blur, noise, or compression artifacts impact the performance of downstream vision tasks.
|
| 24 |
- π‘ A New Paradigm: MIQA offers a new lens for optimizing image processing pipelines where machines make the final decision.
|
| 25 |
</div>
|
| 26 |
|
|
|
|
| 27 |
## β¨ Does MIQA Work?
|
| 28 |
+
<table>
|
| 29 |
+
<tr>
|
| 30 |
+
<td><img src="./assets/cls_ratio.png" width="100%"></td>
|
| 31 |
+
<td><img src="./assets/det_ratio_ap75.png" width="100%"></td>
|
| 32 |
+
<td><img src="./assets/ins_ratio_ap75.png" width="100%"></td>
|
| 33 |
+
</tr>
|
| 34 |
+
</table>
|
| 35 |
+
<p align="center"><em>Performance improvement across tasks when filtering low-quality images using MIQA scores</em></p>
|
| 36 |
<details>
|
| 37 |
<summary> ποΈ Key Results</summary>
|
|
|
|
| 38 |
Our results provide clear evidence of MIQA's effectiveness across three representative computer vision tasks: classification, detection, and segmentation.
|
| 39 |
The framework consistently identifies images that degrade model performance. By filtering these detrimental samples, MIQA directly leads to improved outcomes and demonstrates the universal utility of a machine-centric approach. This transforms quality assessment from a passive metric into a proactive tool, safeguarding downstream models against the unpredictable image quality of real-world conditions and ensuring robust performance when it matters most.
|
| 40 |
</details>
|
| 41 |
|
|
|
|
| 42 |
## π οΈ Installation Guide
|
| 43 |
|
| 44 |
#### Step 1: Install Dependencies
|
|
|
|
| 63 |
|
| 64 |
For example, if you need a specific version of **mmcv**, you can uninstall the existing versions and install a compatible one as follows:
|
| 65 |
|
|
|
|
| 66 |
```bash
|
| 67 |
pip uninstall mmcv mmcv-full -y
|
| 68 |
mim install "mmcv>=2.0.0rc4,<2.2.0" # The version specified here is just an example. You should choose a version that is compatible with your CUDA and PyTorch setup.*
|
|
|
|
| 76 |
```
|
| 77 |
|
| 78 |
## π¦ Model Weights & Performance
|
|
|
|
| 79 |
### Where things live
|
| 80 |
+
<table width="100%">
|
| 81 |
+
<tr>
|
| 82 |
+
<th align="left">Role</th>
|
| 83 |
+
<th align="left">Location</th>
|
| 84 |
+
</tr>
|
| 85 |
+
|
| 86 |
+
<tr>
|
| 87 |
+
<td><b>Application code</b> (training, inference, evaluation)</td>
|
| 88 |
+
<td>This <b>GitHub</b> repository: <a href="https://github.com/XiaoqiWang/MIQA">github.com/XiaoqiWang/MIQA</a></td>
|
| 89 |
+
</tr>
|
| 90 |
|
| 91 |
+
<tr>
|
| 92 |
+
<td><b>Published RA-MIQA checkpoints</b> (9 files)</td>
|
| 93 |
+
<td><b>Hugging Face</b> model repo: <a href="https://huggingface.co/xiaoqi-wang/miqa">xiaoqi-wang/miqa</a></td>
|
| 94 |
+
</tr>
|
|
|
|
| 95 |
|
| 96 |
+
<tr>
|
| 97 |
+
<td><b>MIQD-2.5M database</b></td>
|
| 98 |
+
<td><b>Hugging Face</b> dataset: <a href="https://huggingface.co/datasets/xiaoqi-wang/miqd-2.5m">xiaoqi-wang/miqd-2.5m</a></td>
|
| 99 |
+
</tr>
|
| 100 |
+
</table>
|
| 101 |
|
| 102 |
### Naming & cache
|
| 103 |
|
| 104 |
+
Checkpoint pattern on the Hub: `miqa_ra_miqa_{cls|det|ins}_{composite|consistency|accuracy}_metric.pth.tar`
|
|
|
|
|
|
|
| 105 |
|
| 106 |
Examples:
|
|
|
|
| 107 |
- `miqa_ra_miqa_cls_composite_metric.pth.tar`
|
| 108 |
- `miqa_ra_miqa_det_consistency_metric.pth.tar`
|
| 109 |
- `miqa_ra_miqa_ins_accuracy_metric.pth.tar`
|
| 110 |
|
| 111 |
On first run, `huggingface_hub` downloads into `models/checkpoints/{composite|consistency|accuracy}_metric/`.
|
| 112 |
|
|
|
|
| 113 |
## π Quick Start
|
| 114 |
|
| 115 |
### Assess a Single Image
|
|
|
|
| 142 |
python img_inference.py --input ./assets/demo_images/imagenet_demo --task ins --save-results --visualize
|
| 143 |
```
|
| 144 |
|
|
|
|
| 145 |
### π¬ Video Assessment
|
| 146 |
|
| 147 |
Video Quality Assessment offers two workflows: **(1) Frame-by-Frame Annotation**: Generates fully annotated videos for detailed visual inspection. Suitable for demos and qualitative analysis but computationally intensive.
|
|
|
|
| 168 |
|
| 169 |
<summary>π₯ <b>Example: Frame-wise MIQA Predictions on Videos</b></summary>
|
| 170 |
|
| 171 |
+
<table>
|
| 172 |
+
<tr>
|
| 173 |
+
<td align="center"><b>Brightness Variation</b></td>
|
| 174 |
+
<td align="center"><b>Compression Artifacts</b></td>
|
| 175 |
+
<td align="center"><b>Minimal Perceptual Distortion</b></td>
|
| 176 |
+
</tr>
|
| 177 |
+
<tr>
|
| 178 |
+
<td><video src="https://github.com/user-attachments/assets/9b20cbc4-3baf-4d57-8d5f-49acd6873725" width="100%" controls></video></td>
|
| 179 |
+
<td><video src="https://github.com/user-attachments/assets/c2fc142b-6889-4451-8a05-fb93e0ec0656" width="100%" controls></video></td>
|
| 180 |
+
<td><video src="https://github.com/user-attachments/assets/14f4fc37-5ae5-4068-81f2-6f86bec30a27" width="100%" controls></video></td>
|
| 181 |
+
</tr>
|
| 182 |
+
</table>
|
| 183 |
|
| 184 |
</details>
|
| 185 |
|
|
|
|
| 200 |
# Analyze all videos in a directory, sampling 120 frames from each
|
| 201 |
python video_analytics_inference.py --input assets/demo_video/ --task det --video-frames 120 --visualize
|
| 202 |
|
|
|
|
| 203 |
python video_analytics_inference.py --input assets/demo_video/jpeg_distorted.mp4 --task det --visualize --viz-granularity both
|
| 204 |
# viz-granularity both : Specifies the type of plot to generate. 'composite' creates a comprehensive, side-by-side comparison chart showing:
|
| 205 |
#1. The raw, frame-level quality scores. 2. The smoothed, per-second average quality scores.
|
|
|
|
| 209 |
1. A **`.png` image**: A detailed time-series plot showing the quality score fluctuation over the video's duration.
|
| 210 |
2. A **`.json` file**: A structured data file containing per-second aggregated scores, overall statistics (average, min, max, std. dev), and video metadata.
|
| 211 |
|
|
|
|
|
|
|
| 212 |
<details>
|
| 213 |
<summary>π₯ <b>Example: Frame-wise MIQA Predictions on Videos</b></summary>
|
| 214 |
|
| 215 |
+
<table>
|
| 216 |
+
<tr>
|
| 217 |
+
<td align="center"><b>Brightness Variation</b></td>
|
| 218 |
+
<td align="center"><b>Compression Artifacts</b></td>
|
| 219 |
+
<td align="center"><b>Minimal Perceptual Distortion</b></td>
|
| 220 |
+
</tr>
|
| 221 |
+
<tr>
|
| 222 |
+
<td><img src="inference_results/brightness_distorted_composite_quality_comparison.png" width="100%"></td>
|
| 223 |
+
<td><img src="inference_results/jpeg_distorted_composite_quality_comparison.png" width="100%"></td>
|
| 224 |
+
<td><img src="inference_results/B314_composite_quality_comparison.png" width="100%"></td>
|
| 225 |
+
</tr>
|
| 226 |
+
</table>
|
| 227 |
+
|
| 228 |
</details>
|
| 229 |
|
| 230 |
## π Training and Evaluation
|
|
|
|
| 786 |
## π§ Contact
|
| 787 |
|
| 788 |
- **Project Maintainer**: [Xiaoqi Wang](mailto:wangxq79@mail2.sysu.edu.cn)
|
| 789 |
+
- **Issues**: Please use [GitHub Issues](https://github.com/XiaoqiWang/MIQA/issues) for bug reports and feature requests
|