Skip to content

different NIQE with Matlab #28

@greatlog

Description

@greatlog

Thanks for your awesome work.

I find some problems when I use pyiqa to calculate the NIQE score. It seems the result calculated by pyiqa is different from that of Matlab.

import matlab.engine
import matlab

import torch
import pyiqa

im = cv2.imread("img.png")


## calculate via matlab
eng = matlab.engine.start_matlab()
im_m = matlab.uint8(im.tolist())
niqe_matlab = eng.niqe(im_m)

## calculate via pyiqa
im_t = torch.FloatTensor(im.transpose(2,0,1)[None]).cuda() / 255.0
niqe_fn = pyiqa.create_metric("niqe")
niqe_pyiqa = niqe_fn(im_t)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions