pavancm / CONTRIQUE

Official implementation for "Image Quality Assessment using Contrastive Learning"
122 stars 12 forks source link

why we need to concat syn and ugc together #23

Closed chenyu1014 closed 4 months ago

chenyu1014 commented 4 months ago

Please tell me why we need to concat syn and ugc together syn_i1 = syn_i1.cuda(non_blocking=True) ugc_i1 = ugc_i1.cuda(non_blocking=True) x_i1 = torch.cat((syn_i1,ugc_i1),dim=0)

    #image 2
    syn_i2 = syn_i2.cuda(non_blocking=True)
    ugc_i2 = ugc_i2.cuda(non_blocking=True)
    x_i2 = torch.cat((syn_i2,ugc_i2),dim=0)
pavancm commented 4 months ago

This is done only during training. This is done to ensure that the model learns equally from both syn and ugc images. We observed that using only one of them was making the model biased towards those kind of distortions, so we concatenated syn and ugc features to alleviate this issue

chenyu1014 commented 4 months ago

Thank you!!!