{"id":21969162,"url":"https://github.com/routineLife1/MultiPassDedup","last_synced_at":"2025-07-22T16:32:59.579Z","repository":{"id":204330629,"uuid":"711592939","full_name":"routineLife1/AFI-ForwardDeduplicate","owner":"routineLife1","description":"Efficient Deduplicate for Anime Video Frame Interpolation","archived":false,"fork":false,"pushed_at":"2024-09-10T19:02:21.000Z","size":177,"stargazers_count":36,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-10T21:24:04.346Z","etag":null,"topics":["animation","anime","deduplicate","gmfss","rife","slomo","smooth","vfi","video-frame-interpolation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/routineLife1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-29T18:25:36.000Z","updated_at":"2024-09-10T19:02:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"e69f19fa-7133-411f-8b51-4c27e210dc47","html_url":"https://github.com/routineLife1/AFI-ForwardDeduplicate","commit_stats":null,"previous_names":["hyw-dev/afi-forwarddeduplicate","routinelife1/afi-forwarddeduplicate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routineLife1%2FAFI-ForwardDeduplicate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routineLife1%2FAFI-ForwardDeduplicate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routineLife1%2FAFI-ForwardDeduplicate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routineLife1%2FAFI-ForwardDeduplicate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/routineLife1","download_url":"https://codeload.github.com/routineLife1/AFI-ForwardDeduplicate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227140570,"owners_count":17736658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","anime","deduplicate","gmfss","rife","slomo","smooth","vfi","video-frame-interpolation"],"created_at":"2024-11-29T14:07:43.312Z","updated_at":"2025-07-22T16:32:49.565Z","avatar_url":"https://github.com/routineLife1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📖AFI-ForwardDeduplicate\n\n### Efficient Deduplicate for Anime Video Frame Interpolation\n\u003e When performing frame interpolation on anime footage, conventional de-duplicate approach such as locating duplicate frames and removal, time remapping, have many drawbacks, like losing textures of background, failure to correctly handle multiple characters drawn in different cadence in a single scene. Therefore, they cannot be applied in production effectively. \nHowever, with the advancement of video frame interpolation technology based on AI, it is proved feasible to repeatedly update the original frames to obtain high quality interpolated output of anime. \nThis project proposes a novel anime deduplication method based on a decent VFI algorithm of GMFSS. It does not require additional procedure of processing the frame sequence or deep neural networks, and produces smooth, high quality output by removing duplicate frames in anime adequately.\n\n![ezgif com-video-to-gif](https://github.com/hyw-dev/AFI-ForwardDeduplicate/assets/68835291/6f03dfd8-99f4-48ad-871e-91cbd704c1e5)\n\nOnline Colab demo for AFI-ForwardDeduplicate: [[Colab]](https://github.com/Q8sh2ing/AFI-ForwardDeduplicate-Colab/blob/main/forward_dedup_Colab.ipynb)\n\n## 👀Demos Videos\n### [Jujutsu Kaisen S2 NCOP](https://www.bilibili.com/video/BV16W421N7s5/?share_source=copy_web\u0026vd_source=8a8926eb0f1d5f0f1cab7529c8f51282)\n### [Houseki no Kuni NCOP](https://www.bilibili.com/video/BV1py4y1A7qj/?share_source=copy_web\u0026vd_source=8a8926eb0f1d5f0f1cab7529c8f51282)\n\n## 🔧Dependencies\n- ffmpeg\n- same as [GMFSS](https://github.com/98mxr/GMFSS_Fortuna)\n- download the [weights](https://drive.google.com/file/d/157M4i1B9hjWs1K2AZVArSulkM9qV2sdH/view?usp=sharing) and unzip it, put them to ./weights/\n \n## ⚡Usage \n- normalize the source video to 24000/1001 fps by following command using ffmpeg **(If the INPUT video framerate is around 23.976, skip this step.)**\n  ```bash\n  ffmpeg -i INPUT -crf 16 -r 24000/1001 -preset slow -c:v libx265 -x265-params profile=main10 -c:a copy OUTPUT\n  ```\n- open the video and check out it's max consistent deduplication counts, (3 -\u003e on Three, 2 -\u003e on Two, 0 -\u003e AUTO) **(If the INPUT video framerate is around 23.976, skip this step.)**\n- run the follwing command to finish interpolation\n  (N_FORWARD = max_consistent_deduplication_counts - 1) **(Under the most circumstances, -nf 0 can automatically determine an appropriate n_forward value)**\n  ```bash\n  python interpolate_video_forward.py -i [VIDEO] -o [OUTPUTDIR] -nf [N_FORWARD] -t [TIMES] -m [MODEL_TYPE] -s -st 12 -scale [SCALE] -stf -c -half\n  # or use the following command to export video at any frame rate\n  python interpolate_video_forward_anyfps.py -i [VIDEO] -o [OUTPUTDIR] -nf [N_FORWARD] -fps [OUTPUT_FPS] -m [MODEL_TYPE] -s -st 12 -scale [SCALE] -stf -c\n  ```\n  \n- run the follwing command or custom command to merge the output frames with the audio of source video\n  ```bash\n  ffmpeg -r [24000/1001 * TIMES] -i [OUTPUTDIR]/%09d.png -i [VIDEO] -map 0:v -map 1:a -crf 16 -preset slow -c:v libx265 -x265-params profile=main10 -c:a copy [FINAL_OUTPUT]\n  # or use the following command to export video at any frame rate\n  ffmpeg -r [OUTPUT_FPS] -i [OUTPUTDIR]/%09d.png -i [VIDEO] -map 0:v -map 1:a -crf 16 -preset slow -c:v libx265 -x265-params profile=main10 -c:a copy [FINAL_OUTPUT]\n  ```\n  \n **example(smooth a 23.976fps video with on three and interpolate it to 60fps):**\n\n  ```bash\n  ffmpeg -i E:/Myvideo/01_src.mkv -crf 16 -r 24000/1001 -preset slow -c:v libx265 -x265-params profile=main10 -c:a copy E:/Myvideo/01.mkv\n\n  python interpolate_video_forward_anyfps.py -i E:/MyVideo/01.mkv -o E:/frame_seq_output -nf 2 -fps 60 -m gmfss -s -st 12 -scale 1.0 -stf -c\n\n  ffmpeg -r 60 -i E:/frame_seq_output/%09d.png -i E:/MyVideo/01.mkv -map 0:v -map 1:a -crf 16 -preset slow -c:v libx265 -x265-params profile=main10 -c:a copy E:/final_output/01.mkv\n  ```\n  \n\n## todo list\n- [ ] ~~**Efficiency optimization**~~ (No significant efficiency gains and increased risk of vram overflow.)\n- [ ] ~~**Attempt to accurately determine transition even in the queue_input**~~ (The implementation code is too complex, and it's effect is not obvious to improve)\n- [x] **Improve the smoothness By reducing transition frames to one frame and allocate them to the end of the scene**\n- [ ] **Explain why this method is effective and write a guidence on how to support other vfi algorithms**\n- [x] **Implement any framerate support for ForwardDeduplicate (smooth interpolation method)**\n\n## limitations\n\u003e The \"n_forward\" parameter acts like the number of times the algorithm performs Spatiotemporal TTA (Spatiotemporal Test Time Augmentation) operations.\n\u003e Performing too many TTA operations may further improve smoothness and interpolation performance but lead to blurriness.\n\u003e \n\u003e This method will change the animation rhythm to a certain extent\n\n## Projects that use AFI-ForwardDeduplicate\n[SVFI(commercial software)](https://store.steampowered.com/app/1692080/SVFI/)\n\n## 🤗 Acknowledgement\n\nThanks for [Q8sh2ing](https://github.com/Q8sh2ing) implement the Online Colab Demo.\n\n## Reference\n[SpatiotemporalResampling](https://github.com/hyw-dev/SpatiotemporalResampling) [GMFSS](https://github.com/98mxr/GMFSS_Fortuna) [Practical-RIFE](https://github.com/hzwer/Practical-RIFE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FroutineLife1%2FMultiPassDedup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FroutineLife1%2FMultiPassDedup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FroutineLife1%2FMultiPassDedup/lists"}