Giter VIP home page Giter VIP logo

png-upscale's Introduction

🔥 PNG Upscale - AI Super Resolution 🔥

Small tool using pretrained models to upscale images

Download is available from the Releases Page or Google Drive or MediaFire

  • Hosted Folder include full "Models" folder 📁 and executable Files 🖼️ to download

  • Windows 64bit [Exe] / [Jar]

  • Linux 64bit [Jar]

  • macOS 64bit [Jar]

  • :electron: Download the executable corresponding with your operating system, and the Models folder

  • It's possible to download only some of the models if you want (It just wont let you use them inside the program)

  • The Models folder needs to be in the same directory as the Jar/Exe to use them


  • ⚠️ Be careful when trying to resize very large pictures, it can take considerable time and resources ⚠️
  • To upscale an image you just need to choose a mode, load a picture and press start
  • Save button can be used to choose an output folder and filename before you start the process (either just name or .png)
  • You can double click the text box to change [Dark <-> Light] theme (disabled when upScaling)
  • Use PNG images for best results
  • if faced with a JNI Error see this issue for a possible fix #33

Models

all of the model download links below are already included in the MediaFire folder.

There are four trained models integrated into the program :

EDSR

[Best Quality]+[Slowest]

Trained models can be downloaded from here.

ESPCN

[Fast]

Trained models can be downloaded from here.

FSRCNN

[Fast]

Trained models can be downloaded from here.

LapSRN

[Has x8]
  • Size of the model: between 1-5Mb x3
  • This model was trained for ~50 iterations with a batch size of 32
  • Link to implementation code: https://github.com/fannymonori/TF-LAPSRN
  • x2, x4, x8 trained models available
  • Advantage: The model can do multi-scale super-resolution with one forward pass. It can now support 2x, 4x, 8x, and [2x, 4x] and [2x, 4x, 8x] super-resolution.
  • Disadvantage: It is slower than ESPCN and FSRCNN, and the accuracy is worse than EDSR.
  • Speed: < 0.1 sec for every scaling factor on 256x256 images on an Intel i7-9700K CPU.
  • Original paper: Deep laplacian pyramid networks for fast and accurate super-resolution [4]

Trained models can be downloaded from here.


Benchmarks

Comparing different algorithms. Scale x4 on monarch.png

Inference time in seconds (CPU) PSNR SSIM
ESPCN 0.01159 26.5471 0.88116
EDSR 3.26758 29.2404 0.92112
FSRCNN 0.01298 26.5646 0.88064
LapSRN 0.28257 26.7330 0.88622
Bicubic 0.00031 26.0635 0.87537
Nearest neighbor 0.00014 23.5628 0.81741
Lanczos 0.00101 25.9115 0.87057

As a Demo this image was resized from 256x256 to 85x85, and then upscaled using this program

Original

x2 Demo (85x85 -> 170x170)

Original Bicubic Interpolation EDSR
Original Bicubic EDSR
ESPCN FSRCNN LapSRN
ESPCN FSRCNN LapSRN

Bicubic Interpolation is the standart resizing technique used by most editing tools like photoship etc..

x4 Demo (85x85 -> 340x340)

Original Bicubic Interpolation EDSR
Original Bicubic EDSR
ESPCN FSRCNN LapSRN
ESPCN FSRCNN LapSRN

References

[1] Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Kyoung Mu Lee, "Enhanced Deep Residual Networks for Single Image Super-Resolution", 2nd NTIRE: New Trends in Image Restoration and Enhancement workshop and challenge on image super-resolution in conjunction with CVPR 2017. [PDF] [arXiv] [Slide]

[2] Shi, W., Caballero, J., Huszár, F., Totz, J., Aitken, A., Bishop, R., Rueckert, D. and Wang, Z., "Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network", Proceedings of the IEEE conference on computer vision and pattern recognition CVPR 2016. [PDF] [arXiv]

[3] Chao Dong, Chen Change Loy, Xiaoou Tang. "Accelerating the Super-Resolution Convolutional Neural Network", in Proceedings of European Conference on Computer Vision ECCV 2016. [PDF] [arXiv] [Project Page]

[4] Lai, W. S., Huang, J. B., Ahuja, N., and Yang, M. H., "Deep laplacian pyramid networks for fast and accurate super-resolution", In Proceedings of the IEEE conference on computer vision and pattern recognition CVPR 2017. [PDF] [arXiv] [Project Page]

png-upscale's People

Contributors

araxeus avatar dependabot[bot] avatar imgbotapp 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

png-upscale's Issues

Question: how do I use this exactly, and can it be used on Android?

As Android is based on Linux, I wonder how can I use it within an Android app.

My questions:

  1. Is it possible?
  2. What are the requirements?
  3. Suppose I want to upscale some small images to 512x512 pixels, would such a thing take a lot of resources/time?
  4. Are there any examples of how to use it on Java?

Files for installation missing

Hello, i have this issue where i download the folder, but in the folder there's no .exe file to install the application. Could you help me find the .exe file?

Load button not working on Windows

The Windows releases, .exe or .jar, don't show the file chooser when you click the Load button.
I assume this has something to do with LWJGL libraries because I saw the other issues. But the readme does not mention LWJGL as a dependency or anything.

Windows 10 x64 22H2

EDIT: I didn't have the JRE/JDK x64 versions installed apparently, I did and it's working now.

Batch Processing

Is it possible to scale images using command line ?
passing the png file name, the model as arguments or something of that sort to process multiple images?

liblwjgl.so

How to reproduce:

  1. Run Manjaro

  2. Install aur helper "yay" (pacman -Sy yay)

  3. Install lwjgl from aur (2, 3) or other way. (yay lwjgl)

  4. Try to run this software, PNG-Upscale)

stdout:

[LWJGL] Failed to load a library. Possible solutions:
	a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
	b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
	at org.lwjgl.system.Library.loadSystem(Library.java:162)
	at org.lwjgl.system.Library.loadSystem(Library.java:62)
	at org.lwjgl.system.Library.<clinit>(Library.java:50)
	at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:97)
	at core.MainApp.lambda$initialize$2(MainApp.java:380)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6614)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6379)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4990)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4919)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4548)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4489)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2769)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Mac: Load & Save buttons don't do anything

System: Macbook Pro (OS: Sonoma) with Apple M2 Max chipset.

For me the app opens correctly, but clicking on Save or Load doesn't do anything--I assume they're supposed to open the system file browser.
I don't know Java well, but I can investigate it myself given some guidance.
Any idea why this may be happpening?

downloading models

mediafire requires premium subscription to download all files at once, could you please reupload them somewhere else

Java Runtime Error

I always get the following error message on Windows x64.
Which Java Runtime is needed please?

Java Version: jre-8u341-windows-x64.exe
JAVA Virtual Machine Launcher
Error: A JNI error has occurred, please check your installation and try again.
A Java Exception has accurred.

JNI Error

System: Windows 10
When I try to start the Exe file and windows pop up said Error: A JNI error has occurred, please check your installation and try again, this happened on both Jar and exe.
2021-08-26_14-46-57

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.