VideoHelp Forum
+ Reply to Thread
Results 1 to 26 of 26
Thread
  1. What could be the best way to sharpen this?
    Of course face is the target.
    Thanks.
    Image Attached Files
    Quote Quote  
  2. Banned
    Join Date
    Jan 2021
    Location
    PAL
    Search Comp PM
    Originally Posted by taigi View Post
    What could be the best way to sharpen this?
    Of course face is the target.
    Thanks.
    Sharpen(0.2)
    Quote Quote  
  3. Code:
    # sharpening using DetailSharpen
    clip = G41Fun.DetailSharpen(clip=clip, sstr=5.000, power=100.000)
    also looks fine:

    I also tried how it would look like when using BSRGAN (had to div the width&height by 4 to be able to apply it without running out of memory).


    Cu Selur
    Last edited by Selur; 24th Jul 2021 at 16:06.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Looks great.
    Any other solution?
    (BTW, I sharpened one still with Gimps unsharp mask,
    result was OK, need to say).
    Because DetailSharpen creates those small bubbles
    BSRGAN reveals what Topaz is made of.
    Last edited by taigi; 25th Jul 2021 at 07:40.
    Quote Quote  
  5. Banned
    Join Date
    Jan 2021
    Location
    PAL
    Search Comp PM
    BSRGAN is so sharp
    Quote Quote  
  6. Originally Posted by pm-s View Post
    BSRGAN is so sharp
    Plasticy too.
    Quote Quote  
  7. Plasticy too.
    To be fair some of the pastic effect in BSGRAN probably comes from me having to downscale by a factor of 4 to run it.

    Any other solution?
    LimitedSharpenFaster and SeeSaw should also work fine, you probably just have to use high strength values since due to the image resolution.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  8. Banned
    Join Date
    Jan 2021
    Location
    PAL
    Search Comp PM
    Ok how do I install BSRGAN
    Last edited by pm-s; 25th Jul 2021 at 11:44.
    Quote Quote  
  9. Ok how do I install BSRGAN
    Depends on how you want to use it.
    https://forum.selur.net/thread-1858.html describes how I use it through VSGAN.
    But you could also use it directly, see: https://github.com/cszn/BSRGAN
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. Banned
    Join Date
    Jan 2021
    Location
    PAL
    Search Comp PM
    Thank you Selur
    Quote Quote  
  11. A simple fft3dfilter and unsharpmask creates halos but doesn't look too bad.

    Code:
    function UnSharpMask(clip v, float radius, float strength)
    {
      blurry = v.BinomialBlur(VarY=radius, VarC=radius, Y=3, U=3, V=3) # or GaussianBlur
      edges = Subtract(v, blurry).ColorYUV(off_y=2).ColorYUV(cont_y=(int(strength*radius*256.0)-256.0))
      Overlay(v, edges.ColorYUV(off_y=-128), mode="Add")
      Overlay(last, edges.Invert().ColorYUV(off_y=-128), mode="Subtract")
      ColorYUV(off_u=-1, off_v=-1) #overlay is causing U and V to increase by 1
    }
    
    LWLibavVideoSource("howToSharpenThis.mp4", cache=false, prefer_hw=2) 
    ConvertBits(8)
    ConvertToYV12()
    fft3dFilter(sigma=4.0, plane=4, bt=3)
    UnsharpMask(4.0, 0.7)
    Image Attached Files
    Quote Quote  
  12. thanks, @jagabo
    Quote Quote  
  13. "mcdegrainsharp(clip=clip, bblur=0.22, csharp=1.00, opencl=True)"
    also works:


    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  14. You are welcome to try them, most of them will give some improvement assuming their strength is just set high enough.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  15. Originally Posted by taigi View Post
    What could be the best way to sharpen this?
    Of course face is the target.
    There are many "AI" face upscalers - but beware many of them add fake details or change characteristics.

    I would describe the issue as softness, or general blurriness. It could even be described "out of focus". Most available machine learning deblur algorithms attempt to address motion blur, but there are a few at attempt to address out of focus. I was testing some deblurring algorithms; and your video fits the bill for the "out of focus" category

    apng should animate in most browsers (I might be concerned about the teeth on the last frame, not sure how accurate that part is...it might be a misinterpolation)



    Downscale by half (spline16), deblurred with restormer and deblurgan-v2, smoothed over with QTGMCp and oversharpened a bit in avisynth (cas and adaptive_sharpen), nnedi3_rpow2 upscaling

    https://github.com/swz30/Restormer
    https://github.com/VITA-Group/DeblurGANv2
    (I just used the python code examples in the instructions ; these ones have not been ported to vapoursynth yet. Some projects can be difficult to use - but some of them have google colab notebook or some webpage demos that make it easier to use)

    In the attached slowed down video you can see some issues with the right sideburn/temple "wobbling" or "pulsing" - normally something like that would be attributed to a mvtools2 issue such as QTGMC, or mdegrain derivatives. But in this case it was the restormer deblurring algorithm, which is a single image deblurring, not multimage/video algorithm. Those underlying artifacts predisposed QTGMC to exacerbate those artifacts more. ( maybe you can see it slightly in the source too, you don't notice it as much when blurred)
    Image Attached Files
    Quote Quote  
  16. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    There are many "AI" face upscalers - but beware many of them add fake details or change characteristics.
    Impressive result anyhow. Thanks pdr!
    Quote Quote  
  17. poisondeathray, wow, what a great, detailed analysis!
    Your reply offers me only one solution -
    to load up all these plugins and revive the work I had put off..
    Your reply after more than a year is the best example that narcissism has not yet taken over the world;
    there is still hope for the world to survive.
    More than - thank you!
    Quote Quote  
  18. Downscale by half (spline16), deblurred with restormer and deblurgan-v2, smoothed over with QTGMCp and oversharpened a bit in avisynth (cas and adaptive_sharpen), nnedi3_rpow2 upscaling
    That might be usable for one frame, but how long does that take? (how many minutes per frame are we talking here?)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  19. On that cropped area, it's pretty fast. On a UHD frame most people would be very slow because of memory. Restormer has tiling options in the original demo, deblurgan-v2 does not. I didn't measure it, but those deblurring algorithms are not as slow as some of the upscaling algos. You can batch them, but you waste time saving images and using them as input into the next (ie. it would be nicer if they were native vapoursynth ports, or if there was some GUI like chainner that could handle piping different architectures) . There is probably a way to do it directly in the vpy script if you're handy enough with python
    Quote Quote  
  20. Ah, okay, you only looked ad the cropped area and didn't process the whole image.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  21. @ poisondeathray, I can't use restormer and deblurgan-v2 because of Python.
    What could you suggest as an alternative?
    Thank you.
    Quote Quote  
  22. What is the problem specifically? One of the requirements or python in general? Did you want to try debugging it ? Or too much hassle ?

    There are alternative /traditional methods of deblurring , such as deconvolution methods . For example, focus magic, smartdeblur. Smartdeblur actually has a free older version. They can do a great job on some types of blur, but one issue tends to be oversharpening, halos. GUI based and you can make adjustments and/or post filter with other such as avisynth, dehaloing. The pro version of smartdeblur has CLI options so you can batch it
    Quote Quote  
  23. @poisondeathray, too much hassle could be an answer.
    Cos I need to start learning all the Py
    and even have no idea how to start
    (AvsP mod probably).
    That could take ages,
    but I'm sure results could be simply the best.
    So trying to escape new studies lazily.
    Quote Quote  
  24. For the fun of it, I downscaled by 4 and then upscaled using vs-femasr:
    https://imgsli.com/MTQzNTQ4

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  25. I decided to extract the video to TIFF
    and pass it through a commercial program
    because I can't handle PY.
    The process is terribly slow,
    the entire video processing will probably take half a year
    but me happy.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!