hydrus icon indicating copy to clipboard operation
hydrus copied to clipboard

Duplicates :: Provide automatic guess of a low quality identical image with BRISQUE score

Open bbappserver opened this issue 5 years ago • 1 comments

Hydrus can find image pairs by using their DHash, but after that it takes a lot of effort to figure out exactly how the images are related.

Images found to be similar could be further refined to determine whether hydrus believes they are alternates by doing a pixel by pixel comparison after scaling matching the dimensions of the images, and doing a pixel by pixel compare. An alternate should cause there to be some locations in the image where the error is considerable, whereas for a downsample the error will be uniform without outliers.

After evaluating whether the images are potential duplicates rather than potential alternates, hydrus should evaluate the BRISQUE score of each to determine which it thinks is the downsampled version.

BRISQUE is a predictor trained to with images and various generated images that blur, downsample and distort them. It assigns higher scores to images it believes have been distorted.

Consequently an image of lower quality should get a higher score than a one of better quality. BRISQUE is trained on noise introduced into photographs, and may evaluate illustrations as having a higher than normal BRISQUE score, however an illustration that has been downsampled should still get a higher score.

Empirically it seems that if an image is twice as blurry, it gets about twice the BRISQUE score. https://www.mathworks.com/help/images/ref/brisque.html Some research would need to be done to see how it evaluates downsampled illustrations, but I imagine that if the score differs more than 5 then statistically the worse image will have the higher of the two scores.

A python BRISQUE implementation. https://github.com/bukalapak/pybrisque

See Also https://www.mathworks.com/help/images/image-quality-metrics.html#mw_2ebd06de-46dc-4394-9fd9-9c2ad8e84e10

bbappserver avatar Dec 29 '20 03:12 bbappserver

@hydrusnetwork Modern OpenCV provides a BRISQUE estimator https://docs.opencv.org/4.2.0/d8/d99/classcv_1_1quality_1_1QualityBRISQUE.html#a011769e13ad8537dcec8f698a298ab1b

bbappserver avatar May 15 '22 23:05 bbappserver