This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

2D Cleaners and Rescale!!
#2
Okay,... I don't think any normal filter can clean this up properly.
That said using
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
from vsgan import VSGAN

# Import scripts
import adjust

clip = core.lsmas.LibavSMASHSource(source="C:/Users/Selur/Desktop/Hora.de.Aventura-00.03.05.366-00.04.05.766.mp4")
# making sure input color matrix is set as 709
clip = core.resize.Point(clip, matrix_in_s="709",range_s="limited")
# making sure frame rate is set to 30
clip = core.std.AssumeFPS(clip=clip, fpsnum=30, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)

# needed since otherwise vsgan will crash on my GPU due to VRAM shortage
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=720, h=406, interlaced=False, interlacedd=False)

# adjusting color space from YUV420P8 to RGB24 for vsLevels
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_s="limited")

# creating a VSGAN instance
vsgan = VSGAN("cuda")
# setting model
model = "J:/VapourSynth64Portable_VSGAN/vsgan_models/BSRGAN.pth"
vsgan.load_model(model)
# running vsgan with the selected model
clip = vsgan.run(clip=clip)

# convert to YUV420P10 for encoding
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited")

clip.set_output()
Produces really nice output:
[Image: bsrgan.png]
Problem is:
a. BSRGAN increases width&height by a factor of 4 (so if you want a lower resolution additional resizing your be needed
b. I had to reduce the resolution to now run out of VRAM and at least on my Geforce GTX 1070ti, I get ~0.23fps for this (cpu isn't really used) Encoding the 1822 frames is estimated to take ~2hours.

There probably is a way to get this done without using BSRGAN (https://github.com/cszn/BSRGAN) or the way I use it through vsgan, my cleverly creating some mask and similar, but I don't know a simple filter I could add for Hybrid that would directly help with this.


Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
2D Cleaners and Rescale!! - by Cauptain - 07.06.2021, 23:51
RE: 2D Cleaners and Rescale!! - by Selur - 08.06.2021, 18:23
RE: 2D Cleaners and Rescale!! - by Selur - 08.06.2021, 20:05
RE: 2D Cleaners and Rescale!! - by Cauptain - 10.06.2021, 11:12
RE: 2D Cleaners and Rescale!! - by Selur - 10.06.2021, 13:35
RE: 2D Cleaners and Rescale!! - by Selur - 11.06.2021, 19:11
RE: 2D Cleaners and Rescale!! - by Selur - 13.06.2021, 18:52
RE: 2D Cleaners and Rescale!! - by sowbran - 16.06.2021, 01:49
RE: 2D Cleaners and Rescale!! - by Selur - 16.06.2021, 05:22
RE: 2D Cleaners and Rescale!! - by Selur - 25.07.2021, 18:15
RE: 2D Cleaners and Rescale!! - by Lyra - 25.07.2021, 23:45
RE: 2D Cleaners and Rescale!! - by sowbran - 05.09.2021, 03:18
RE: 2D Cleaners and Rescale!! - by Selur - 05.09.2021, 10:40
RE: 2D Cleaners and Rescale!! - by sowbran - 05.09.2021, 21:41
RE: 2D Cleaners and Rescale!! - by Selur - 05.09.2021, 21:57
RE: 2D Cleaners and Rescale!! - by Selur - 06.09.2021, 15:26

Forum Jump:


Users browsing this thread: 1 Guest(s)