# Anime4K
Anime4K is a state-of-the-art*, open-source, high-quality real-time anime upscaling algorithm that can be implemented in any programming language.
![Thumbnail Image](results/Main.png?raw=true)
*\*State of the art as of August 2019 in the real-time anime 4K upscaling category, the fastest at acheiving reasonable quality. We do not claim this is a superior quality general purpose SISR algorithm compared to machine learning approaches.*
***Disclaimer: All art assets used are for demonstration and educational purposes. All rights are reserved to their original owners. If you (as a person or a company) own the art and do not wish it to be associated with this project, please contact us at anime4k.upscale@gmail.com and we will gladly take it down.***
![Comparison](results/Comparisons/1_time.png?raw=true)
## v1.0 Release Candidate
Reduced texture loss, aliasing and banding in Anime4K v1.0 RC at the cost of performance. It now takes 6ms. +2ms for line detection and +1ms for line targeted FXAA.
What's new:
- A line detection algorithm.
- Gradient maximization is only applied near lines using the line detector, instead of indiscriminately affecting the entire image. This has the effect of ignoring textures and out of focus elements.
- Finally, one iteration of targeted FXAA is applied on the lines using the line detector to reduce aliasing.
![ComparisonRC](https://raw.githubusercontent.com/bloc97/Anime4K/master/results/Comparisons/0.9-1.0/0_RC.png)
![ComparisonRC](https://raw.githubusercontent.com/bloc97/Anime4K/master/results/Comparisons/0.9-1.0/1_RC.png)
![ComparisonRC](https://raw.githubusercontent.com/bloc97/Anime4K/master/results/Comparisons/0.9-1.0/2_RC.png)
![ComparisonRC](https://raw.githubusercontent.com/bloc97/Anime4K/master/results/Comparisons/0.9-1.0/3_RC.png)
## HLSL Usage Instructions (MPC-BE with madVR)
This implementation is **only for Windows**.
### [HLSL Installation](HLSL_Instructions.md)
Note for developers: For performance, the HLSL shaders use the Alpha channel to store the gradient, you might need to make a backup of the the alpha channel before applying these shaders and restore it after if your rendering engine uses the alpha channel for other purposes. (In MPC-BE's case, it gets ignored.)
## GLSL Usage Instructions (MPV)
This implementation is **cross platform**.
### [GLSL Installation](GLSL_Instructions.md)
Note for developers: For performance, the GLSL shaders use the `POSTKERNEL` texture to store the gradient, you might need to make a backup of the the `POSTKERNEL` texture before applying these shaders and restore it after if your other shaders or rendering engine uses the `POSTKERNEL` texture for other purposes. (In MPV's case, it gets ignored.)
## Java Usage Instructions (Standalone)
### [Java Installation](Java_Instructions.md)
Click on the link above to read Java version installation and usage instructions.
## Pseudo-Preprint Preview
### [Read Full Pseudo-Preprint](Preprint.md)
B. Peng
August 2019
*Ad perpetuam memoriam of all who perished in the Kyoto Animation arson attack.*
### Table of Contents
- [Abstract](Preprint.md#abstract)
- [Introduction](Preprint.md#introduction)
- [Proposed Method](Preprint.md#proposed-method)
- [Results and Upscale Examples](Preprint.md#results)
- [Discussion](Preprint.md#discussion)
- [Analysis and Comparison to Other Algorithms](Preprint.md#analysis)
### Abstract
We present a state-of-the-art high-quality real-time SISR algorithm designed to work with japanese animation and cartoons that is extremely fast *(~3ms with Vega 64 GPU)*, temporally coherent, simple to implement *(~100 lines of code)*, yet very effective. We find it surprising that this method is not currently used 'en masse', since the intuition leading us to this algorithm is very straightforward.
Remarkably, the proposed method does not use any machine-learning or statistical approach, and is tailored to content that puts importance to well defined lines/edges while tolerates a sacrifice of the finer textures. The proposed algorithm can be quickly described as an iterative algorithm that treats color information as a heightmap and 'pushes' pixels towards probable edges using gradient-ascent. This is very likely what learning-based approaches are already doing under the hood (eg. VDSR<sup>**[1]**</sup>, waifu2x<sup>**[2]**</sup>).
## FAQ
### Why not just use waifu2x
waifu2x is too slow for real time applications.
### Why not just use madVR with NGU
NGU is proprietary, this algorithm is licensed under MIT.
### How does FSRCNNX compare to this
Since it performs poorly (perceptually, for anime) compared to other algorithms, it was left out of our visual comparisons.
![ComparisonRC](https://raw.githubusercontent.com/bloc97/Anime4K/master/results/Comparisons/FSRCNNX.png)
*Note: FSRCNNX was not specifically trained/designed for anime. It is however a good general-purpose SISR algorithm for video.*
### Where are the PSNR/SSIM metrics
There are no ground truths of 4K anime.
### Why not do PSNR/SSIM on 480p->720p upscaling
[Story Time](FAQ_Detail.md)
Comparing PSNR/SSIM on 480p->720p upscales does not prove and is not a good indicator of 1080p->2160p upscaling quality. (Eg. poor performance of waifu2x on 1080p anime) 480p anime images have a lot of high frequency information (lines might be thinner than 1 pixel), while 1080p anime images have a lot of redundant information. 1080p->2160p upscaling on anime is thus objectively easier than 480p->720p.
### I think the results are worse than \<x>
Surely some people like sharper edges, some like softer ones. Do try it yourself on a few anime before reaching a definite conclusion. People *tend* to prefer sharper edges. Also, seeing the comparisons on a 1080p screen is not representative of the final results on a 4K screen, the pixel density and sharpness of the final image is simply not comparable.
没有合适的资源?快使用搜索试试~ 我知道了~
Anime4K,高质量的实时动画升级程序.zip
共186个文件
png:157个
md:9个
hlsl:6个
需积分: 50 14 下载量 52 浏览量
2019-09-25
08:21:51
上传
评论 3
收藏 522.77MB ZIP 举报
温馨提示
anime4k是一种最先进的、开源的、高质量的实时动画放大算法,可以用任何编程语言实现。
资源推荐
资源详情
资源评论
收起资源包目录
Anime4K,高质量的实时动画升级程序.zip (186个子文件)
build.cmd 162B
main.css 154B
.gitignore 291B
Anime4K_Adaptive_v1.0RC.glsl 14KB
Anime4K_Adaptive_v0.9.glsl 8KB
Anime4K_Push.hlsl 4KB
Anime4K_Push_Weak.hlsl 4KB
Anime4K_PushGrad_Weak.hlsl 3KB
Anime4K_PushGrad.hlsl 3KB
Anime4K_ComputeGradient.hlsl 1KB
Anime4K_ComputeLum.hlsl 585B
index.html 1KB
ImageKernel.java 20KB
Main.java 2KB
main.js 20KB
LICENSE 1KB
Preprint.md 14KB
README.md 6KB
FAQ_Detail.md 5KB
CODE_OF_CONDUCT.md 3KB
HLSL_Instructions.md 1KB
GLSL_Instructions.md 889B
Java_Instructions.md 851B
bug_report.md 740B
feature_request.md 595B
12.png 7.88MB
11.png 7.71MB
6.png 7.43MB
11.png 7.4MB
Art_0.png 7.37MB
Art_0.png 7.31MB
11.png 7.25MB
Art_0.png 7.25MB
11.png 7.24MB
2.png 7.22MB
0.png 6.95MB
6.png 6.93MB
6.png 6.83MB
6.png 6.83MB
12.png 6.7MB
12.png 6.58MB
12.png 6.55MB
8.png 6.55MB
0.png 6.52MB
0.png 6.52MB
0.png 6.51MB
8.png 6.41MB
8.png 6.37MB
8.png 6.36MB
14.png 6.35MB
2.png 6.24MB
7.png 6.21MB
14.png 6.21MB
10.png 6.2MB
14.png 6.19MB
1.png 6.19MB
14.png 6.18MB
1.png 6.18MB
3.png 6.17MB
2.png 6.16MB
1.png 6.16MB
10.png 6.14MB
3.png 6.14MB
10.png 6.13MB
10.png 6.12MB
7.png 6.11MB
2.png 6.08MB
7.png 6.07MB
3.png 6.06MB
3.png 6.05MB
1.png 6.03MB
5.png 5.99MB
5.png 5.94MB
5.png 5.92MB
5.png 5.91MB
13.png 5.89MB
13.png 5.87MB
13.png 5.86MB
13.png 5.86MB
7.png 5.8MB
11.png 5.76MB
Art_1.png 5.61MB
6.png 5.55MB
Art_1.png 5.4MB
Art_1.png 5.4MB
12.png 5.07MB
1.png 4.99MB
14.png 4.96MB
0.png 4.92MB
15.png 4.9MB
15.png 4.87MB
15.png 4.86MB
2.png 4.8MB
Art_1.png 4.64MB
15.png 4.62MB
13.png 4.55MB
10.png 3.56MB
3.png 3.29MB
5.png 3.09MB
8.png 3.08MB
共 186 条
- 1
- 2
资源评论
weixin_38743481
- 粉丝: 694
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功