image quality assement


image quality assement

一、Face QA

1. SER-FIQ (2020 CVPR):

《SER-FIQ: Unsupervised Estimation of Face Image Quality Based on Stochastic Embedding Robustness》
《Face Quality Estimation and Its Correlation to Demographic and Non-Demographic Bias in Face Recognition》

github: https://github.com/pterhoer/FaceImageQuality

由於很難有一個明確的質量定義,人工標注可能很難有正確統一的標准,使用非監督學習,不需要人工標注。

ser-fiq
ser-fiq

這篇文章是評估人臉區域的圖像質量。
方法是必須使用帶有dropout的FR網絡,這樣同樣的輸入圖片會產生不同的輸出結果。
然后將輸入圖像運行100次,得到100個人臉的embedding,如果這100張人臉之間的歐式距離差距比較大,則圖片質量較差;如果相差比較小,則說明結果比較穩定,圖像質量較好。

所以,最后的圖像質量score由100個embedding的距離計算得到的。

norm = normalize(X, axis=1)

# Only get the upper triangle of the distance matrix
eucl_dist = euclidean_distances(norm, norm)[np.triu_indices(T, k=1)]

# Calculate score as given in the paper
score = 2*(1/(1+np.exp(np.mean(eucl_dist))))
# Normalize value based on alpha and r
return 1 / (1+np.exp(-(alpha * (score - r))))

2. FaceQnet (2020)

《FaceQnet: Quality Assessment for Face Recognition based on Deep Learning》
《Biometric Quality: Review and Application to Face Recognition with FaceQnet》

github: https://github.com/uam-biometrics/FaceQnet

主要兩方面工作:

  1. 如何標記圖像,即對圖像質量打分
  2. 使用上面標記的數據,微調了一個FR網絡(resnet50)用於圖片打分

主要是在vggface2上進行。

如下圖是打分過程,主要是使用ICAO(美國民航組織)軟件挑選符合ICAO要求的圖片做為一個300人的子集數據庫,這些圖片相當於是質量較好的圖片,然后使用facenet網絡求得ICAO圖片與普通圖片的embedding,然后計算圖像與最好圖像emb的距離做為圖像質量得分。

label_score
label_score

3. EQFace (2021 CVPR)

《EQFace: A Simple Explicit Quality Network for Face Recognition》

github: https://github.com/deepcam-cn/facequality

實現比較簡單,就是加了一個質量評估分支:

EQ-quality-branch
EQ-quality-branch

主要分三步去訓練這個網絡:

4. MagFace (2021 CVPR)

《MagFace:A Universal Representation for Face Recognition and Quality Assessment》 CVPR 2021

github: https://github.com/IrvingMeng/MagFace

5. SDD-FIQA (2021 CVPR)

《SDD-FIQA: Unsupervised Face Image Quality Assessment with Similarity Distribution Distance》

github: https://github.com/Tencent/TFace/tree/quality

https://blog.csdn.net/cnnmena/article/details/115264690?spm=1001.2014.3001.5501

二、Image QA

1. brisque (2012 SPS)

《No-Reference Image Quality Assessment in the Spatial Domain》
github: https://github.com/ocampor/image-quality

BRISQUE的意思是Blind/Referenceless Image Spatial QUality Evaluator,一種無參考的空間域圖像質量評估算法。算法總體原理就是從圖像中提取mean subtracted contrast normalized (MSCN) coefficients,將MSCN系數擬合成asymmetric generalized Gaussian distribution(AGGD)非對稱性廣義高斯分布,提取擬合的高斯分布的特征,輸入到支持向量機SVM中做回歸,從而得到圖像質量的評估結果。

2. NIMA (2017 TIP)

《NIMA: Neural Image Assessment》

兩份實現代碼:
github:

  1. https://github.com/idealo/image-quality-assessment
  2. https://github.com/titu1994/neural-image-assessment/

NIMA算法是對任意圖像都生成評分直方圖–即對圖像進行1-10分的打分,並直接比較同一主題的圖像, 這種設計跟人的評分系統產生的直方圖在形式上吻合,且評估效果更接近人類評估的結果。而且這篇論文側重的是從美學角度進行評分。

只測試了第一個實現,需要創建docker image,主要依賴tensorflow:

./predict  \
>     --docker-image nima-cpu \
>     --base-model-name MobileNet \
>     --weights-file $(pwd)/models/MobileNet/weights_mobilenet_technical_0.11.hdf5 \
>     --image-source $(pwd)/src/tests/test_images/42039.jpg


2021-12-22 01:08:12.668230: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2021-12-22 01:08:12.697949: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3400340000 Hz
2021-12-22 01:08:12.698905: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4ac9840 executing computations on platform Host. Devices:
2021-12-22 01:08:12.698943: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Host, Default Version
1/1 [==============================] - 1s 663ms/step
[
  {
    "image_id": "42039",
    "mean_score_prediction": 4.705008000135422
  }
]

3. DeepBIQ (2017)

https://github.com/zhl2007/pytorch-image-quality-param-ctrl

4. RankIQA (2017 ICCV)

《RankIQA: Learning from Rankings for No-reference Image Quality Assessment》

https://github.com/xialeiliu/RankIQA

這篇文章主要針對數據集不足的問題,很難獲得一個客觀的打分的問題,提出了使用Ranking的方法解決。
作者使用places2場景大數據集,對圖像進行了不同等級的失真處理,然后輸入一對失真圖像,要保證失真小的圖片得分要更高,否則就會產生loss進行訓練:

rankiqa_loss
rankiqa_loss

學習好的model要在人工標記的IQA數據集上進行finetune,利用mse loss學習。

代碼需要caffe支持,如下使用conda創建環境:

# 新建python2.7 caffe gpu環境
> conda create -n caffe_gpu -c defaults python=2.7 caffe-gpu

> source activate caffe_gpu

> python src/eval/Rank_eval_all_tid2013.py
%   LCC of mean : 0.545884235756
% SROCC of mean: 0.603059949975
%   LCC of median: 0.546604782272
% SROCC of median: 0.603837377213

5. DIQA (2018 NNLS)

IEEE Transactions on Image Processing 2019 : J. Kim, A. Nguyen and S. Lee
《Deep CNN-Based Blind Image Quality Predictor》

github: https://github.com/lllllllllllll-llll/DIQA

DIQA
DIQA

CNN廣泛應用於計算機視覺任務,將CNN用到IQA的一個問題是:IQA數據集較小,標注困難。作者提出第一階段使用objective error map(失真圖片和原始圖片做差)作為代理訓練目標,訓練CNN網絡,pixelwise相當於擴大了數據集;第二階段再利用第一階段的CNN模型fituning圖片到質量分數的模型。
當圖片嚴重失真時,失真圖片缺少高頻細節信息,error map就會有很多高頻成分,很難從失真圖片預測error map,作者提出了reliability map,認為模糊區域有低的reliability。

參考: https://www.cnblogs.com/buyizhiyou/p/12566520.html

6. WaDIQaM (2018 TIP)

Bosse S, Maniry D, Müller K R, et al. IEEE Transactions on Image Processing, 2018, 27(1): 206-219.
《Deep neural networks for no-reference and full-reference image quality assessment》
github: https://github.com/lidq92/WaDIQaM

DIQaM_FR
DIQaM_FR

DIQaM_NR
DIQaM_NR

詳細配置:
L1 loss
batch_size: 4
network input_size: 32x32

參考:https://blog.csdn.net/edogawachia/article/details/80705360

7. DBCNN (2020 TCSVT)

IEEE Transactions on Circuits and Systems for Video Technology (TCSVT), Volume: 30 , Issue: 1 , Jan. 2020.
《Blind Image Quality Assessment Using A Deep Bilinear Convolutional Neural Network》

github: https://github.com/zwx8981/DBCNN-PyTorch

DBCNN
DBCNN

這篇的出發點就是基於合成失真和真實失真不同。對兩種情況做了兩個網絡,然后用bilinear pooling 結合。

  1. synthetic distortions人造的數據集(S-CNN)

    用PASCAL VOC 2012 數據集訓練,輸出39維的one-hot向量,39=75+22,采用的是分類的方式。

  2. authentic distortions真實的數據集(VGG16)

    用的是在ImageNet上預訓練過的vgg16

參考: https://blog.csdn.net/gwplovekimi/article/details/95378251

8. KonCept512 (2020 TIP)

《KonIQ-10k: An ecologically valid database for deep learning of blind image quality assessment》
github: https://github.com/ZhengyuZhao/koniq-PyTorch
github: https://github.com/subpic/koniq

(1)本文提出了一種系統的、可擴展的方法用於創建目前為止最大的 IQA(Image Quality Assessment)數據集——KonIQ-10k。

該數據集共包含10073張圖片樣本,且確保圖像內容和失真多樣性。
對於每一張圖片樣本,由1459名工作者通過眾包的方式給出120個較可靠的質量評級標注。
(2)本文提出了一種基於端到端深度學習的BIQA方法——KonCept512。

運用遷移學習的方式微調CNN
與5種目前最先進的CNN結構進行效果對比
比較了五個損失函數的性能,其中兩個用於直接預測MOS,另外三個用於預測評級分布。
探討了訓練集大小對所提出的模型——KonCept512 性能的影響。
顯示了 KonCept512 模型在 KonIQ-10k 訓練,在其他的 IQA 數據集上也表現良好,即跨數據集測試效果優異。

KonCept512
KonCept512

參考: https://blog.csdn.net/huangfei711/article/details/109146292

KonCept512已經取得了比較好的結果了:

koncept_result
koncept_result

文章分別分析了不同規格的圖像輸入對實驗結果的影響,如下圖所示,發現512X384能獲得相對更好的 SROCC,224X224的輸入規格丟失了過多的圖像信息,而512X384較1024X768更好,分析原因可能是所有的CNN都針對小圖像輸入做了優化,而對於太大的圖像輸入性能反而不盡人意。另一個可能的原因是,大尺寸的圖像因GPU顯存的限制,往往只能輸入較小的 batch_size,而較小的 batch_size 可能從一定程度上限制了網絡的性能。

different_resolution
different_resolution

9. Norm-in-Norm (2020 MM)

《Norm-in-Norm Loss with Faster Convergence and Better Performance for Image Quality Assessment》

https://github.com/lidq92/LinearityIQA

使用resnet101,太復雜了。

10. HyperIQA (2020 CVPR)

《Blindly Assess Image Quality in the Wild Guided by A Self-Adaptive Hyper Network》

github: https://github.com/SSL92/hyperIQA

分兩個步驟,先用hyperNet預測得到網絡參數,再用這些參數初始化targetNet,並利用targetNet計算得到score:

    img = torch.tensor(img.cuda()).unsqueeze(0)
    paras = model_hyper(img)  # 'paras' contains the network weights conveyed to target network

    # Building target network
    model_target = models.TargetNet(paras).cuda()
    for param in model_target.parameters():
        param.requires_grad = False

    # Quality prediction
    pred = model_target(paras['target_in_vec'])  # 'paras['target_in_vec']' is the input to target net
    pred_scores.append(float(pred.item()))

targetNet實現如下:

class TargetNet(nn.Module):
    """ Target network for quality prediction. """
    def __init__(self, paras):
        super(TargetNet, self).__init__()
        self.l1 = nn.Sequential(
            TargetFC(paras['target_fc1w'], paras['target_fc1b']),
            nn.Sigmoid(),
        )
        self.l2 = nn.Sequential(
            TargetFC(paras['target_fc2w'], paras['target_fc2b']),
            nn.Sigmoid(),
        )

        self.l3 = nn.Sequential(
            TargetFC(paras['target_fc3w'], paras['target_fc3b']),
            nn.Sigmoid(),
        )

        self.l4 = nn.Sequential(
            TargetFC(paras['target_fc4w'], paras['target_fc4b']),
            nn.Sigmoid(),
            TargetFC(paras['target_fc5w'], paras['target_fc5b']),
        )

    def forward(self, x):
        q = self.l1(x)
        # q = F.dropout(q)
        q = self.l2(q)
        q = self.l3(q)
        q = self.l4(q).squeeze()
        return q


class TargetFC(nn.Module):
    """ Fully connection operations for target net Note: Weights & biases are different for different images in a batch, thus here we use group convolution for calculating images in a batch with individual weights & biases. """
    def __init__(self, weight, bias):
        super(TargetFC, self).__init__()
        self.weight = weight
        self.bias = bias

    def forward(self, input_):

        input_re = input_.view(-1, input_.shape[0] * input_.shape[1], input_.shape[2], input_.shape[3])
        weight_re = self.weight.view(self.weight.shape[0] * self.weight.shape[1], self.weight.shape[2], self.weight.shape[3], self.weight.shape[4])
        bias_re = self.bias.view(self.bias.shape[0] * self.bias.shape[1])
        out = F.conv2d(input=input_re, weight=weight_re, bias=bias_re, groups=self.weight.shape[0])

        return out.view(input_.shape[0], self.weight.shape[1], input_.shape[2], input_.shape[3])

11. GraphIQA (2021-arxiv)

https://github.com/geekyutao/GraphIQA

graphIQA_result
graphIQA_result

12. MUSIQ (2021 ICCV)

《MUSIQ: Multi-Scale Image Quality Transformer》

https://github.com/anse3832/MUSIQ

過程太復雜了,不適合實際部署。先run原始圖和兩個scale后的圖片,最后再利用這三個結果計算得分:

        feat_dis_org = model_backbone(d_img_org)
        feat_dis_scale_1 = model_backbone(d_img_scale_1)
        feat_dis_scale_2 = model_backbone(d_img_scale_2)

        # quality prediction
        pred = model_transformer(mask_inputs, feat_dis_org, feat_dis_scale_1, feat_dis_scale_2)
        pred_total = np.append(pred_total, float(pred.item()))

結果:

musiq_result
musiq_result

13. KonIQ++ (2021 BMVC)

《KonIQ++: Boosting No-Reference Image Quality Assessment in the Wild by Jointly Predicting Image Quality and Defects》

https://github.com/SSL92/koniqplusplus

結果,整體上看Koncept512已經取得較好的結果(注意,這篇論文的結果普遍要比其它的論文結果高,可能是評估代碼不一樣):

KonIQ++-result
KonIQ++-result

14. TRanSLA (2021 ICCV)

《Saliency-Guided Transformer Network combined with Local Embedding for
No-Reference Image Quality Assessment》

目前還沒有release代碼

Saliency_result
Saliency_result

三、Video QA

1. VSFA

《Quality Assessment of In-the-Wild Videos》
https://github.com/lidq92/VSFA

2. metric

相關系數值越大,說明越相關:
PLCC (線性相關性)
SROCC (srocc主要評價的是兩組數據的等級相關性)
KROCC

MSE 均方差

四、project

1. image-quality-assessment

github: https://github.com/idealo/image-quality-assessment

python demo.py 
/home/guru_ge/workspace/image-quality/hyperIQA/demo.py:32: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
  img = torch.tensor(img.cuda()).unsqueeze(0)
[77.90652465820312]
Predicted quality score: 77.91

五、數據集

TID2013

TID2013包括25幅參考圖像,3000幅失真圖像(25參考圖像X24種失真×5失真水平)。失真類型有24種,增加了包括:改變色彩飽和度、多重高斯噪聲、舒適噪聲、有損壓縮、彩色圖像量化、色差以及稀疏采樣。該數據庫的DMOS值由971觀察者給出524340個數據統計得到,MOS取值范圍為[0,9]。所有圖像都以Bitmap格式保存在數據庫中,沒有任何壓縮。

https://blog.csdn.net/lanmengyiyu/article/details/53332680


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM