Kiyamou / VapourSynth-RealSR-ncnn-Vulkan

RealSR super resolution plugin for VapourSynth implemented with ncnn library
MIT License
19 stars 3 forks source link

Question regarding the relation to the samples from the paper,... #2

Open Selur opened 3 years ago

Selur commented 3 years ago

I took: https://raw.githubusercontent.com/jixiaozhong/RealSR/master/figures/0935.png cropped 1040 pixel from the left and ran it through

# Imports
import vapoursynth as vs
core = vs.get_core()
# source: 'C:/Users/Selur/Desktop/Origin.png'
# current color space: RGB24, bit depth: 8, resolution: 2040x1368, fps: 25, color matrix: 709, yuv luminance scale: full, scanorder: progressive
# Loading C:\Users\Selur\Desktop\Origin.png using vsImageReader
clip = core.imwri.Read(["C:/Users/Selur/Desktop/Origin.png"])
clip = core.std.Loop(clip=clip, times=100)
# Input color space is assumed to be RGB24
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to PC (full) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0)
# cropping the video to 1000x1368
clip = core.std.CropRel(clip=clip, left=1040, right=0, top=0, bottom=0)
# convert to RGBS for RealSR
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/RealSR/rsnv.dll")
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS)
clip =core.rsnv.RealSR(clip=clip,tilesize_x=100,tilesize_y=100)
# Output
clip.set_output()

then I downscaled the size additionally by a factor of 2:

# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
# source: 'C:/Users/Selur/Desktop/Origin.png'
# current color space: RGB24, bit depth: 8, resolution: 2040x1368, fps: 25, color matrix: 709, yuv luminance scale: full, scanorder: progressive
# Loading C:\Users\Selur\Desktop\Origin.png using vsImageReader
clip = core.imwri.Read(["C:/Users/Selur/Desktop/Origin.png"])
clip = core.std.Loop(clip=clip, times=100)
# Input color space is assumed to be RGB24
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to PC (full) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0)
# cropping the video to 1000x1368
clip = core.std.CropRel(clip=clip, left=1040, right=0, top=0, bottom=0)
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=500, h=684, interlaced=False, interlacedd=False)
# convert to RGBS for RealSR
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/RealSR/rsnv.dll")
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS)
#clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
clip =core.rsnv.RealSR(clip=clip,tilesize_x=100,tilesize_y=100)
# Output
clip.set_output()

still the results are both worlds apart from what is shown in the original (https://raw.githubusercontent.com/jixiaozhong/RealSR/master/figures/0935.png). enabling tta doesn't help either -> Should it be possible to reproduce the results?