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

Seamless looping? #60

Open
ProGamerGov opened this issue Jan 29, 2018 · 2 comments
Open

Seamless looping? #60

ProGamerGov opened this issue Jan 29, 2018 · 2 comments

Comments

@ProGamerGov
Copy link

Is there a way that I can make sure Artistic-Videos will make sure the final frame and starting frame of a looping video or GIF, will seamlessly blend together?

@JCBrouwer
Copy link

I've been copying the first frame to the end and calculating the flow for that as well. I've also noticed that starting each pass at a different frame index helps to smooth over loop points as the first calculated frame in a run uses frames from the previous run as initialization while all other frames in the run use the previously calculated frame.

I can post a gist with the code I'm currently using in a couple hours.

The results are still far from perfect, but I think playing around with the parameters should still yield a lot of improvement.

Example 1

Example 2

@JCBrouwer
Copy link

https://gist.github.com/JCBrouwer/709a4782a8d177557ad86a60926c890b

It's quite messy and a bit hacky in places but it works on my end. I think I've taken out all the hardcoded bits but there might still be a couple lurking around, no promises that I haven't broken any of the functionality.

The docker image I'm using to compute the optic flow can be found here (I'm on a mac, copy paste the command from the original script to run it without docker if you can).

One more example

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

2 participants