from vapoursynth import core
import chainer
# chainer.global_config.cudnn_deterministic = False
from vs_wadiqam_chainer import wadiqam_fr, wadiqam_nr
model_folder_path = "deepIQA-master\models" # path to the folder that contains model's parameter files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vapoursynth as vs | |
from vapoursynth import core as _vscore | |
class _Plugin: | |
def __init__(self, namespace): | |
self.__dict__.update((name, getattr(namespace, name)) for name in dir(namespace)) # func_name : func | |
class _Core: | |
def __init__(self): | |
self.__dict__.update((name, get_plugin(name)) for name in dir(_vscore)) # (namespace : (func_name : func)) or (attr_name : attr) |
fmtconv | equivalent | remarks |
---|---|---|
impulse=[1, 1, 1], fv=-1, fh=-1 |
std.Convolution([1]*9) or rgvs.RemoveGrain(20) |
Radius=1 box filtering. fv and fh are required to force the processing. |
scale=1/2, kernel='box' |
scale=1/2, kernel='impulse', impulse=[1]*3, kovrspl=3 |
Box downscaling with a factor of 2 |
scale=1/4, kernel='box' |
scale=1/4, kernel='impulse', impulse=[1]*5, kovrspl=5 |
Box downscaling with a factor of 4 |
scale=1/2, kernel='bilinear' |
scale=1/2, impulse=[0.5, 1, 0.5], kovrspl=2 |
Bilinear downscaling with a factor of 2 |
scale=1/3, kernel='bilinear' |
scale=1/3, impulse=[0.5, 1, 0.5], kovrspl=2 |
Bilinear downscaling with a factor of 3 |
scale=1/4, kernel='bilinear' |
scale=1/4, impulse=[0.5, 1, 0.5], kovrspl=2 |
Bilinear downscaling with a factor of 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodes": [ | |
{ | |
"op": "null", | |
"name": "data", | |
"inputs": [] | |
}, | |
{ | |
"op": "_plus_scalar", | |
"name": "_plusscalar0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import scipy as sp | |
from scipy import misc | |
import sympy as sym | |
import math | |
# Helper functions | |
# https://en.wikipedia.org/wiki/Norm_(mathematics) | |
def calculate_error(diff, norm=0): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Parameters | |
input = YUV420P16 | |
# matrix = "709" | |
matrix = mvf.GetMatrix(input, matrix, True) | |
process_y = True | |
sigma_y = 2.0 | |
basic_y_args = dict(profile="fast", group_size=8, bm_range=6) | |
process_uv = False |