/UpscalerJS

Image Upscaling in Javascript. Increase image resolution up to 4x using Tensorflow.js.

Primary LanguageTypeScriptMIT LicenseMIT

UpscalerJS

NPM npm Tests Codecov DeepSource

UpscalerJS is a tool for increasing image resolution in Javascript via a Neural Network up to 4x.

Demo

A live demo is here.

Examples

You can view runnable code examples on CodeSandbox.

To run an example locally, navigate to the relevant folder and run:

yarn start

If you are developing UpscalerJS locally and wish to run an example during development, use the following command:

yarn example {folder-name-of-example}

This will automatically start a watcher in the example folder, as well as set the local UpscalerJS package to build in the background.

Quick Start

import Upscaler from 'upscaler';
const upscaler = new Upscaler();
upscaler.upscale('/path/to/image').then(upscaledImage => {
  console.log(upscaledImage); // base64 representation of image src
});

Models

Pre-trained models live here.

All models are trained using image-super-resolution, an implementation of ESRGAN by @idealo.

Documentation

View the docs here.

License

MIT License © Kevin Scott