Giter Site home page Giter Site logo

Comments (6)

JohnTravolski avatar JohnTravolski commented on June 14, 2024 1

A small modification you could make to your approach: have the quadrants overlap and blend the overlapping regions. Still not the best solution but it should hide obvious seams between the quadrants.

My code did something very similar to your suggestion. The quadrants do overlap, but they aren't blended together at the end; the overlapping region is just cut off. This prevented the seams, but I didn't try it on any videos with fast motion.
Also, I shouldn't have said quadrants either, because the code can divide the source frames any integer number of times (into fourths, ninths, sixteenths, etc.).

from sepconv-slomo.

sniklaus avatar sniklaus commented on June 14, 2024

Yes, you would have to get a graphics card with more memory. Alternatively, you could choose to not use the graphics card at all by removing the .cuda() calls. Keep in mind though, that not using a graphics card will increase the inference time.

from sepconv-slomo.

deama avatar deama commented on June 14, 2024

Ah, I see. What should I replace the .cuda() calls to, to get the CPU to work instead? Also, would 8GB of VRAM be enough for 1080p images or how much would you need roughly?

from sepconv-slomo.

sniklaus avatar sniklaus commented on June 14, 2024

You can just remove them. However, I just remembered that you will have to provide a CPU implementation for the adaptive convolution as well.

https://github.com/sniklaus/pytorch-sepconv/blob/26b411e7776c444303e667d128ab0ad14a8439c2/sepconv/sepconv.py#L115

from sepconv-slomo.

JohnTravolski avatar JohnTravolski commented on June 14, 2024

You can just remove them. However, I just remembered that you will have to provide a CPU implementation for the adaptive convolution as well.

https://github.com/sniklaus/pytorch-sepconv/blob/26b411e7776c444303e667d128ab0ad14a8439c2/sepconv/sepconv.py#L115

I don't understand the code well enough to write my own cpu implementation for this. The only way I could get this to work for higher resolution images was to slice the images into quadrants and upscale each slice separately and then stitch them back together. See this code.
https://pastebin.com/SBPxnQd0
I'm sure there's a better way, but that was the only way I could interpolate a 4k image sequence with 4GB of VRAM. This method probably won't work if there's too much motion but it works fine when there's not. Does anybody have a better recommendation?

from sepconv-slomo.

sniklaus avatar sniklaus commented on June 14, 2024

A small modification you could make to your approach: have the quadrants overlap and blend the overlapping regions. Still not the best solution but it should hide obvious seams between the quadrants.

from sepconv-slomo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.