Git Product home page Git Product logo

proximal's Introduction

ProxImaL

Build Status

ProxImaL is a Python-embedded modeling language for image optimization problems. It allows you to express your problem in a natural way that follows the math, and automatically determines an efficient method for solving the problem. ProxImaL makes it easy to experiment with many different priors and other problem reformulations, without worrying about the details of how the problem is solved.

For example, the following code denoises an image using simple sparse gradient and nonnegativity priors:

from proximal import *
import numpy as np
import scipy.misc
import matplotlib.pyplot as plt

# Generate data.
I = scipy.misc.ascent()
np.random.seed(1)
b = I + 10*np.random.randn(*I.shape)

# Construct and solve problem.
x = Variable(I.shape)
prob = Problem(sum_squares(x - b/255) + .1 * norm1(grad(x)) + nonneg(x))
prob.solve()

# Plot the original, noisy, and denoised images.
plt.figure(figsize=(15, 8))
plt.subplot(131)
plt.gray()
plt.imshow(I)
plt.title('Original image')

plt.subplot(132)
plt.gray()
plt.imshow(b)
plt.title('Noisy image')

plt.subplot(133)
plt.gray()
plt.imshow(x.value * 255)  # x.value is the optimal value of x.
plt.title('Denoising results')
plt.show()

Optimization results

The example above uses simple, well-known priors. Much better results can be obtained using the more sophisticated priors provided in ProxImaL.

ProxImaL was designed and implemented by Felix Heide and Steven Diamond. See the accompanying paper for a full discussion of ProxImaL's design and examples of state-of-the-art results obtained with ProxImaL.

A tutorial and other documentation can be found at proximal-lang.org.

This git repository holds the latest development version of ProxImaL. For installation instructions, see the install guide at proximal-lang.org.

proximal's People

Contributors

adler-j avatar gfacciol avatar grlee77 avatar hayatoikoma avatar stevediamond avatar

Watchers

 avatar  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.