Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpolate entire sequence #30

Closed
Jerchongkong opened this issue Nov 8, 2019 · 6 comments
Closed

Interpolate entire sequence #30

Jerchongkong opened this issue Nov 8, 2019 · 6 comments

Comments

@Jerchongkong
Copy link

when I try to interpolate a sequence (1 minute of video) it only interpolates the first frame and nothing else.
example: if the interpolation is at 0.25 it only interpolates the first 4 frames and the process stops.

what's the problem in this?

@Jerchongkong
Copy link
Author

It seems that nobody knows the solution, or perhaps it is a question too stupid to be taken in the field. I don't know if it has to do with ubuntu 18.04 and cuda 9

@vincentleon
Copy link

It interpolates between the two frames defined in arguments_strFirst and arguments_strSecond. If you want to do for a whole sequence, you have to change the code, add a "for" loop, and interpolate between each pair of frames.

@Jerchongkong
Copy link
Author

It interpolates between the two frames defined in arguments_strFirst and arguments_strSecond. If you want to do for a whole sequence, you have to change the code, add a "for" loop, and interpolate between each pair of frames.

I'm sorry, I'm a complete noob on this :v

How am I supposed to do that? Do you think you can send the edited code to interpolate the entire sequence of images?

@fathomson
Copy link

fathomson commented Mar 6, 2020

How am I supposed to do that? Do you think you can send the edited code to interpolate the entire sequence of images?

I ran into the same, and solved it with a for loop:

frames = sorted(os.listdir(os.path.join(MB_Other_DATA, dir)))
for i in range(0, len(frames)-1):
    arguments_strFirst = os.path.join(MB_Other_DATA, dir, frames[i])
    arguments_strSecond = os.path.join(MB_Other_DATA, dir, frames[i+1])

Note that at the end of the script you also need to modify the count in order to save time images, so:

count = i * (numFrames+1)

@Jerchongkong
Copy link
Author

How am I supposed to do that? Do you think you can send the edited code to interpolate the entire sequence of images?

I ran into the same, and solved it with a for loop:

frames = sorted(os.listdir(os.path.join(MB_Other_DATA, dir)))
for i in range(0, len(frames)-1):
    arguments_strFirst = os.path.join(MB_Other_DATA, dir, frames[i])
    arguments_strSecond = os.path.join(MB_Other_DATA, dir, frames[i+1])

Note that at the end of the script you also need to modify the count in order to save time images, so:

count = i * (numFrames+1)

It seems that it does not work, it only interpolates the first 3 frames.

I was able to run DAIN on google colab, giving the same result. For anything I leave the link. Maybe you can solve the problem.

https://colab.research.google.com/drive/1_Yf6IY3Nbc-Jtn91qx0wcwWOVe0Zkbgl?authuser=2

@WMCh
Copy link

WMCh commented Mar 10, 2020

How am I supposed to do that? Do you think you can send the edited code to interpolate the entire sequence of images?

I ran into the same, and solved it with a for loop:

frames = sorted(os.listdir(os.path.join(MB_Other_DATA, dir)))
for i in range(0, len(frames)-1):
    arguments_strFirst = os.path.join(MB_Other_DATA, dir, frames[i])
    arguments_strSecond = os.path.join(MB_Other_DATA, dir, frames[i+1])

Note that at the end of the script you also need to modify the count in order to save time images, so:

count = i * (numFrames+1)

It seems that it does not work, it only interpolates the first 3 frames.

I was able to run DAIN on google colab, giving the same result. For anything I leave the link. Maybe you can solve the problem.

https://colab.research.google.com/drive/1_Yf6IY3Nbc-Jtn91qx0wcwWOVe0Zkbgl?authuser=2

I am not sure if I understand your needs. Demo_MiddleBury.py is used for 1-frame interpolation and demo_MiddleBury_slowmotion.py is used for multi-frame interpolation between two ajacent frames by setting time_step. nframe=(1/time_step)-1. Maybe you can refer to @fathomson's comments and modify the corresponding script to suit your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants