1

My goal is to identify true 4K images from images that have been upscaled from a lower resolution with methods such as Bicubic, Billinear, Lanczos, EDSR and so on.

I have a dataset of 200 4K images that I have downscaled to 1080p and back to 4K with Lanczos and Bicubic interpolation.

My idea is to use the BRISQUE features of these images to identify if the images have been upscaled or not.

This is what I currently have:

Density plot of BRISQUE features from pybrisque

I used the python implementation of BRISQUE to get the BRISQUE features of 3 same images and scaled them;

import brisque 
brisq = BRISQUE()
features = brisq.get_feature('path_to_img')
features = brisq._scale_feature(features)
# This gives me a vector of [36,], some examples shown in code block below

2 of them have been upscaled from a resolution of 1080p as labelled. From the density plot, we can clearly see that there is a difference between true 4K images and upscaled images.

My question is; Now what? I have these features, and we can see the distinction from the density plot, but I have not been able to find a way to classify these images. I am open to any alternative methods that I can use. I will greatly appreciate any help/suggestions!

In the actual BRISQUE implementation, they have used a Support Vector Regression model to return a quality score of [0,100]. However, what I want to be able to do is for a model to be able to classify the image as upscaled/original based on these features; a vector of [36,]

What I've tried:

I tried using a Support Vector Classifier to classify these images, but I must have done something wrong as all images were classified as Upscaled. My guess is that it is due to the features being too close to one another and not dense in different areas for upscaled/original. So it seems like SVC is definitely not the way to go.

I tried adding the abs() of all the features, hoping that this would allow me to have a scatter plot of 2 dense clusters, but the features are still scattered around.

clf = svm.SVC(gamma='auto') 
X = np.asarray(X)
X = X.squeeze()
y = np.asarray(y)
clf = clf.fit(X,y.ravel())
print(X)

# These are the scaled feature vectors of [36,] y contains my categories Upscaled/Original

[[-0.65742082 -0.60651108 -0.38406828 ...  0.13391201 -0.77064699
  -0.66440166]
 [-0.67936245 -0.66312799 -0.40825036 ... -0.04571298 -0.75259527
  -0.72149044]
 [-0.6176775  -0.3162819  -0.25604552 ... -0.08188693 -0.22914459
  -0.04314284]
 ...
 [-0.58745601 -0.65824511 -0.31152205 ...  0.53725558 -0.73736713
  -0.40638184]
 [-0.65079694 -0.84827717 -0.41251778 ...  0.40268912 -0.94145548
  -0.83813568]
 [-0.64831298 -0.74385767 -0.41820768 ...  0.38536    -0.83109257
  -0.6435719 ]]

Scatter plot of BRISQUE Features

J.W Ngo
  • 66
  • 6

0 Answers0