Code Monkey home page Code Monkey logo

anime4k's People

Contributors

azhao12345 avatar bloc97 avatar bradybromley avatar cyl0 avatar dextrosere avatar fannovel16 avatar greywing3 avatar importtaste avatar k4yt3x avatar lukad avatar medhefgo avatar mrstandu33 avatar neurowhai avatar payne911 avatar pinnouse avatar piroton avatar rjworks avatar slagrave avatar tama47 avatar tianzerl avatar wasteofo2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anime4k's Issues

Question: MPC-HC install with mad-vr

Hello,
this is a bit of a noob question but does those shaders work with mpc-hc?
From what i understand of the install process in mpc-be one only has to add the shaders and add them to the post-resize.
However after doing this in mpc-hc i don't see any difference :D
Wondering if there is something special to do or if they simply do not work out of the box with this player.
Any help would be appreciated, have a good day guys.

Question: Type of algorithm

Why describe this algorithm an as upscaling algorithm and not a sharpening algorithm? From what I understand it doesn't have anything to do with the actual scaling process and relies on conventional scaling algorithms.

Lots of Exception when start NextGenAnimeEnhancer-1.0-SNAPSHOT.jar on windows 10

Exception in thread "main" java.lang.NoClassDefFoundError: com/aparapi/Kernel
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.bloc97.anime4k.Main.(Main.java:24)
Caused by: java.lang.ClassNotFoundException: com.aparapi.Kernel
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 10 more

Reduce oversharpening of edges

Possibly create a second variant for those who find the aliased edges distracting.
The aliasing is noticeable at display densities of under 150 pixels per inch when viewed at typical distances.

Example of oversharpened edges:
Oversharp

Can this be used to encode to allow for later playback?

Is your feature request related to a problem? Please describe.
A way to encode the video to be later viewed on something like Plex.

Describe the solution you'd like
A way to encode the video into a 4k resolution video file to be viewed later or on other players.

Describe alternatives you've considered
A have used it and it works great but only works in players that I don't normally or can't use sometimes.

Additional context
A script or even some workaround like using a video player, that currently works with the plugin, to encode and save the video file. I know you can do some encoding with VLC.

Wonder if the glsl is properly setup

I follow the instruction and check the profile.
Screenshot from 2020-03-01 20-17-37
As the image shows, it shows different shaders, but no usage ?
Thus, I wonder if the shaders are actually working.

Thank you

Enhanced bob deinterlacing

I believe Anime4K can be applied to another use case where a video signal has sharp edges and reduced color spaces: retro video games. Many retro video games were designed to have part or all of their video signal output 480i/576i, a signal that modern displays cannot natively interpret. While complex deinterlacing algorithms exist and may be suitable for full motion video, they introduce too much latency to video games to be desirable.

The current solution used by enthusiast retro gamers is to use devices like the Retro Tink 2x or the Open Source Scan Converter (OSSC) to perform an operation known as "bob deinterlacing" (so-named because of the noticeable up-and-down bobbing of stationary parts of the screen that have edges changing their height between fields). It is, intentionally, the most naive version of line-doubling, and produces usually-good-enough results with acceptably little image processing time.

The upscaling method described by Anime4k might be able to noticeably improve the visual quality of line-doubling without introducing a significant amount of signal latency by treating the 240/288 line resolution of each field as the source and the 480/576 line resolution as the target.

Prior to finding Anime4k, I also investigated alternative methods of deinterlacing. The best quality results, as with anime, were achieved with AI[0]. Unfortunately, the lowest latency achieved for SD content was between 13-14ms (nearly a full frame of delay for 60fps content), and was only possible using a workstation with an Intel i7-5930, 65GiB of RAM, and an Nvidia Titan GPU[0, pg 8]. Like with anime, real-time results will require a more direct approach. The low latency of Anime4k and the consistent edges of video game content may make Anime4k a viable alternative to bob deinterlacing.

If you decide that you are interested in possibly integrating Anime4k into realtime video game deinterlacing solutions, a good person to contact would be Markus Hiienkari (marqs on the Video Game Perfection forums), as he is the designer of the OSSC.

[0] Real-time Deep Video Deinterlacing by Zhu, Liu, Mao, and Wong from The Chinese University of Hong Kong

Noob here, Can someone giude me to run this?

Hi,

Noob here so please avoid my ignorance. I am not well versed with the field but would like to convert &/or view Anime. Even to 1080p of old once from 480p will be awesome!

I own a 2017 macPro with Raedon 560.

Thanks!

Improve performance for stable v1.0 release.

Improve line detection speed as it does not need to be pixel precise. The underlying line refinement and FXAA algorithms are already robust enough. False positives are less harmful than false negatives. (eg. use smaller gaussian kernel, or even use lower luma resolution)

Use line detection to skip processing some parts of the picture all together when the probability of finding a line is lower than some threshold. (eg. 10% when refining and applying FXAA)

Combine similar passes into a single pass if possible. This will reduce the time needed to copy textures between separate passes. On 4K+ resolutions image processing is often memory-bound and not compute-bound.

The target should be 4-5ms.

MPV not working with glsl shaders

Bug: When you follow the instructions to add glsl shaders, the shaders do not end up working

I discovered the solution.

profile=gpu-hq
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
video-sync=display-resample
interpolation
tscale=oversample
glsl-shaders-append="%AppData%\mpv\Shaders\Anime4K_Hybrid_v2.glsl"

here is a sample config file for mpv
so the config file is called mpv.config and it is stored in %AppData%\mpv
and the shaders can be where you want, you just have to make sure to change whats in the quotes to point to the shader files

Why video performs no differences on Ubuntu with MPV?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Premier pro or openshot video plugin port?

This just came to mind... can this be ported to be used as a premier pro or vegas plug in?

or heck openshot or shotcut video plugins if you dont want to deal with pay programs.

I think it would be really useful to be able to edit video with anime4k up scaling on the fly. at least i would find it very useful.

MPV Black in Fullscreen

I followed the installation instructions and when using the MPV profiler i can see that the shaders are running
However in fullscreen mode the video is completely black and i can only hear the audio track
i tried various files and none of them are working
Ialso tried to change the mpv.conf settings however i was not able to find a solution to the problem

web cannot run

chrome cannot run with error on console

Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded. at createTexture (file:///E:/Download/Anime4K-master/Anime4K-master/web/main.js:56:12) at Scaler.inputImage (file:///E:/Download/Anime4K-master/Anime4K-master/web/main.js:487:21) at Image.inputImg.onload (file:///E:/Download/Anime4K-master/Anime4K-master/web/main.js:693:16) createTexture @ main.js:56 Scaler.inputImage @ main.js:487 inputImg.onload @ main.js:693 load (async) onLoad @ main.js:689 onload @ index.html:11

How to use it in SMPlayer?

SMPlayer is a GUI of Mplayer and mpv, I can add option of mpv in advanced preference, but has no effect with Anime4K. Is there any one know how to use?

java version seems to only upscale images

Using the build gotten from the "How to Use" page the program seems to only upscale images.

using the following commands on a given test image,
java -jar Anime4K.jar test.png out_1.png 2 0.6 0
java -jar Anime4K.jar test.png out_2.png 2 1 1
yields no visual difference between out_1.png or out_2.png, and running
diff out_1.png out_2.png
shows that they are the same file.

They were up scaled though.

I tried other images and numbers too, but this example I think gives a concise presentation of my problem and uses almost the same numbers that were on the download page (i had to change the scale)

Looking at the code in the Main file it seems that while actions are run with the 'kernel' variable, it never interacts with the 'img' variable before it is resaved, though I don't have much faith in my assessment of the problem's origin as I don't understand most of the code.

sorry if I've made some simple mistake, I tried to make sure that it wasn't the case but it easily could be.

  • OS: Manjaro Linux
  • Java Version: java-12-openjdk
  • Jar Source: here

Refinement pass is run on unscaled video

When using the version 2.0RC2 version of the shader, the final pass (Anime4K-Hybrid-Refine-v2.0RC2) is run on unscaled or downscaled video.

I would expect nothing at all to be run in these situations.

Tested on Windows 10 20H1 with v.2.0RC2 and mpv version 0.31 and 0.32.

(On a side note, the shader seems to work perfectly well with mpv 0.32 using the Vulkan and OpenGL backends-- it seems only the D3D11 backend is affected.)

Severe aliasing in specific anime.

Hi,
I have switched over to MPV from my older madvr setup in order to use the latest version of Anime4k.
It's working fine for most anime but I came across this severe case of aliasing today:
Magia Record - Mahou Shoujo Madoka Magica Gaiden - 04 / 07:31
Screenshot (10)

Same scene with Madvr ngu standard:
Screenshot (11)

I was wondering if there is something wrong with the way I set up mpv, I am going to attach the configuration file.
mpv.zip

Clip: http://www.mediafire.com/file/xbz14aq5t5u9pu7/a.mkv/file

Docker Container variant

Seems like it requires OpenCL, but is it possible to run it in docker containers for easier deployment on servers or cross-platform development?

A Python Version

I was wondering if there is a programmatic python version for anime4k in the works? Maybe using something like cv2? The glsl/mpv results are super cool but it's limited to just real time upscaling on your own desktop. I think there is a use case for having this as one part of an image processing pipeline.

Update for GLSL (v2.0 Release Candidate) Experimental

I tested it out and it seems to be using the gpu as intended.

However, I am not sure if it occurs that in times the entire frame looks like it was upscaled bilinearly, while at other times it feels like the image is significantly improved. I have tested it by moving back and forth between the video and on video formats smaller than 480p and it seems to be working, but not much effect had applied to those videos since they have a small resolution

My movies aren't being improved properly

Describe the bug
I passed this over my hentai and it didn't made me nut faster, what the fuck!

To Reproduce
Steps to reproduce the behavior:

  1. Get your hentai
  2. Pass this boi over it
  3. Watch it and see what you last
  4. No nut in wanted time range, expected: < 20s got: > 20s

Expected behavior
A big nut in less than the previous best time

Screenshots
If applicable, add screenshots to help explain your problem.
activated+nut

Desktop (please complete the following information):

  • OS: [e.g. iOS] Arch Linux with some fancy tiling WM
  • Browser [e.g. chrome, safari] chrome
  • Version [e.g. 22] the one and only latest

Additional context
inconceivable!

Rust implementation

I just made the Rust lang implementation. You might want to check it

Anime4K-rs

Can I make a pull request to add it under "Projects that use Anime4K" on README.md ?

Will there be an update for the hlsl version?

Hi, I have been using your algorithm on top of NGU for the past 3 months or so.
I have noticed that the hlsl version has not been updated in quite a while.
I tried to convert the glsl shader to hlsl using glslang and SPIRV-Cross but I failed.
I would like to know if you are going to update the hlsl version in the future or if there is an easier way to convert the glsl shader.

Web demo cannot run (different Error)

chrome cannot run with error on console

VM797 main.js:705 Uncaught TypeError: Cannot read property 'inputImage' of null
at Image.inputImg.onload (VM797 main.js:705)
inputImg.onload @ VM797 main.js:705
load (async)
changeImage @ VM797 main.js:702
reader.onload @ VM797 main.js:736
load (async)
onSelectFile @ VM797 main.js:733
onchange @ index.html:17

Add //!DESC Anime4K

Currently when looking at stats in mpv this shader has no proper name
shows:
user shader:(unknown)

By adding //!DESC Anime4K
shows:
user shader:Anime4k

Needs to be added to each set

//!HOOK SCALED
//!BIND HOOKED
//!BIND POSTKERNEL
//!SAVE POSTKERNEL

Failed to try on both GLSL and HLSL.

Hi, It is a really wonderful project!!

Following the tutorial, I tried to run Anime4k on MHC-HC and MPV, but they all failed to transfer the video. There was no difference after running the algorithm, and I did not get any error or warning. Could you give me some advice for any possible reason?

Environment: MHC-HC on Win10 & MPV on Ubuntu 18.04
Version: All latest

Thanks a lot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.