Code Monkey home page Code Monkey logo

jax-enhance's Introduction

jax-enhance


jax-enhance is a jax implementation of the pytorch-enhance library. This is mostly for my own education/experimentation with jax however you may find these implementations useful.

Installation

pip install git+https://github.com/isaaccorley/jax-enhance

Models

The following models are currently implemented:

import jax
import jax.numpy as jnp
from jax.random import PRNGKey

import jax_enhance

# increase resolution by factor of 2 (e.g. 128x128 -> 256x256)
model = jax_enhance.models.SRResNet(scale_factor=2, channels=3, dtype=jnp.float32)

lr = jnp.ones((1, 128, 128, 3), dtype=jnp.float32)
params = model.init(PRNGKey(0), lr)
sr = model.apply(params, lr) #[1, 256, 256, 3]

State-of-the-Art

Not sure which models are currently the best? Check out the PapersWithCode Image Super-Resolution Leaderboards

Losses

  • Perceptual Loss (VGG16)
  • L1 Loss
  • L2 Loss
  • Peak-Signal-Noise-Ratio (PSNR) Loss

Metrics

  • Mean Squared Error (MSE)
  • Mean Absolute Error (MAE)
  • PSNR

Other layers not available in Flax

  • PixelShuffle
  • Upsample
  • Sequential
  • PReLU

jax-enhance's People

Contributors

isaaccorley avatar mcsmart76 avatar

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.