Giter Site home page Giter Site logo

huagliu / 2013-siims-ot-splitting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gpeyre/2013-siims-ot-splitting

0.0 0.0 0.0 4.11 MB

N. Papadakis, G. Peyré, E. Oudet. Optimal Transport with Proximal Splitting. SIAM Journal on Imaging Sciences, 7(1), pp. 212–238, 2014.

Home Page: https://hal.archives-ouvertes.fr/hal-00816211

MATLAB 22.21% TeX 77.79%

2013-siims-ot-splitting's Introduction

This Matlab package contains the source code to reproduce the figure of the article:

N. Papadakis, G. Peyré, E. Oudet. Optimal Transport with Proximal Splitting. SIAM Journal on Imaging Sciences, 7(1), pp. 212–238, 2014.

Example of OT interpolation

Copyright (c) 2009 Gabriel Peyré

============= Description

This archive contains the Douglas-Rachford (DR) and Primal-Dual (PD) solvers applied to the Benamou-Brenier (BB) problem discretized on a staggered grid.

They can be tested with:

  • test_bb_dr.m: DR algorithm.
  • test_bb_pd.m: DR algorithm.

============= Principal options

The principal options are the following:

  1. chose your test case with

test = 'gaussian';

(you can create your own scenario by defining f0 and f1 the initial and final densities)

  1. chose the dimension of the problem:

N=32; P=32; Q=32;

(N and P are the discrete spatial dimensions and Q is the temporal discretization)

  1. Parameterization of the solver:

For DR:

mu = 1.98; % should be in ]0,2[ gamma = 1./230.; % should be >0 niter = 1000;

For PD:

sigma=85; niter = 1000; % (increase the maximum number of iteration to have better results)

  1. Generalized cost functions:

Minimize \sum_k w_k f_k^\alpha |v_k|^2

alpha= 1; % should be in [0;1];

alpha=1 computes the L2-Wasserstein distance, 0 is for the H^-1 one and intermediate values gives interpolations between the norms

obstacle=zeros(N,P,Q);

Define the points of the 3D volume where the mass can not pass. For instance, setting

obstacle(N/2,P/2,:)=1;

will create an obstacle in the middle of the spatial domain.

============= Exemples of settings:

test = 'gaussian'; N=32; P=32; Q=32;
niter = 200;

test = 'obstacle'; niter = 2000;

2013-siims-ot-splitting's People

Contributors

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