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

Improve 8/12FPS anime inference (一拍二、一拍三) #23

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

steelywing
Copy link

@steelywing steelywing commented Mar 4, 2023

New method find the next key frame (the frame is not same as previous frame) to inference (max skip 2 frames).
Normally anime use 1 image for 2~3 frames (8/12 FPS) in 24FPS video.

Demo

see about 00:07

the upside is inference with current method, the down side is inference with new method.

out.mp4

Original video (not inferenced)

test.mp4

Model before 3.9

The model before 3.9 seem does not have timestep parameter, I have not tested for model < 3.9

@steelywing
Copy link
Author

steelywing commented Mar 4, 2023

This should fix #22 and #15

the current code use the next frame even the next frame is changed scene, so it will be distorted.

@steelywing
Copy link
Author

Some scene change still cannot be detected

@routineLife1
Copy link

routineLife1 commented Oct 30, 2023

Perhaps we can take a look at how this new project AFI-ForwardDeduplicate may help further improve the smoothess

@AhmedAhmedEG
Copy link
Contributor

AhmedAhmedEG commented Aug 30, 2024

Perhaps we can take a look at how this new project AFI-ForwardDeduplicate may help further improve the smoothess
Problem with integrating features is messy code, making the process extremely annoying, that project is amazing but the code is:-

1-all written in a single file with no classes.
2-functions placed around everywhere.
3-big chucks of code under each other.
4-vairables defined inside the coded are used inside functions and other pieces of code.
5-asserts used rather than exceptions.

I spend two days to refactor this project, that one have the same problems.

I guess we can start by the refactor of this project first (I will post it soon), then we can integrate AFI-ForwardDeduplicate

@routineLife1
Copy link

routineLife1 commented Jan 12, 2025

Perhaps we can take a look at how this new project AFI-ForwardDeduplicate may help further improve the smoothess
Problem with integrating features is messy code, making the process extremely annoying, that project is amazing but the code is:-

1-all written in a single file with no classes. 2-functions placed around everywhere. 3-big chucks of code under each other. 4-vairables defined inside the coded are used inside functions and other pieces of code. 5-asserts used rather than exceptions.

I spend two days to refactor this project, that one have the same problems.

I guess we can start by the refactor of this project first (I will post it soon), then we can integrate AFI-ForwardDeduplicate

I have completed the refactoring of the AFI-ForwardDedup, and now it looks much more concise. Moreover, I renamed it to MultiPassDedup, which is more accurate.

Additionally, I have developed a new project called DRBA, which focuses on compensating only background motion without interpolating anime characters. It is suitable for frame interpolation of entire anime episodes.

MultiPassDedup is used for deduplication during the frame interpolation process, while DRBA is designed to preserve the original rhythm of anime. Both projects provide support for RIFE.

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

Successfully merging this pull request may close these issues.

3 participants