在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):albarji/proxTV开源软件地址(OpenSource Url):https://github.com/albarji/proxTV开源编程语言(OpenSource Language):C++ 79.2%开源软件介绍(OpenSource Introduction):
proxTV is a toolbox implementing blazing fast implementations of Total Variation proximity operators, which form the basic building blocks for applications such as image denoising, image deconvolution, image inpainting, video denoising, or fused lasso models, to name a few. While the core algorithms are implemented in C to achieve top efficiency, Matlab and Python interfaces are provided for ease of use. Some examples of applications using proxTV: and others, such as Fused Lasso signal filtering, Fused Lasso classification and regression, lp-norm signal filtering, weighted image denosing, video denosing, tensor denoising, ... More technically, the library provides efficient solvers for the following Total Variation proximity problems: Python interfaceInstall
Install from sourceIf the above doesn't work or you are using an unsupported operative system or Python version, you can install proxTV from souce. The following system prerequisites are necessary
Then you can clone this repository and install the library with
Additionally, if you would like to run the provided demos you will also require the following packages: UsageImport proxTV Python package as
or
for direct access to all the package routines. The documentation of use of the package functions is maintained online at http://pythonhosted.org/prox_tv/. Matlab interfaceQuick start guideTo install proxTV clone this repository and run After that the TV solver can be invoked easily through the general purpose "TV" function. For instance,
solves TV for X signal and lambda regularizer. The dimensionality of X is automatically checked and an adequate solver is applied. To solve TV for a general TV-Lp norm just add the value of p as a third argument,
Weighted versions of TV can also be solved by using exactly the same interface, but providing a vector of lambda weights instead of a scalar. For multidimensional signals the relevant weights are provided as a cell array; the "Usage" section for more details on this and more advanced uses of toolbox. InstallationTo install proxTV follow the steps:
Note: this interface has only been tested under Linux. Installation might require LAPACK (http://www.netlib.org/lapack/) and BLAS (http://www.netlib.org/blas/) libraries. UsageTwo main functions conform the Matlab interface of proxTV: TV and TVgen. The first one provides basic options over the Total Variation problem, while the second one allows a more advanced configuration. In general, the TV function should suffice for most uses. TVSolves Total Variation proximity operators for n-dimensional signals, applying a TV-Lp norm. The inputs and outputs of this function are:
Inputs
Outputs
For 1-dimensional signals the problem solved is Using p=1 results in the standard Total Variation regularizer, which generates a "blocky" reconstruction of the signal. Using p=2 instead produces a smoother reconstruction. For 2-dimensional signals (e.g. images) the problem solved is where X(i,:) is i-th row of X and X(:,j) is the j-th column of X. Using p=1 results in an anisotropic denoising filter. For D-dimensional signals the problem being solved becomes where X[d,i] is the i-th 1-dimensional fiber of X along its d-th dimension, and TV1D denotes the standard 1-dimensional Total Variation penalty applied over such fiber. If a vector of weights w is provided for the lambda parameter instead of an scalar value, the special weighted version of TV is solved, were each difference among signal entries x_i and x_(i-1) is penalized using a different weight w_i. In the case of 2D signals the weighted problem is Weight matrices are provided in the TV function as the lambda parameter through a cell array in the form {w, v} (see the examples in the "Examples" section) TVgenSolves a generalized TV proximity operator for a multidimensional signal, in the form , with X(di) every possible 1-dimensional slice of X following dimension di. The inputs and outputs of this function are:
Inputs:
Outputs:
When possible, TV should be preferred. See the Examples section next for some specific examples on using this function. Examples1D examplesFilter 1D signal using TV-L1 norm:
Filter 1D signal using weighted TV-L1 norm (for x vector of length N, weights vector of length N-1)
Filter 1D signal using TV-L2 norm:
Filter 1D signal using both TV-L1 and TV-L2 norms:
2D examplesFilter 2D signal using TV-L1 norm (image denoising):
or
Filter 2D signal using TV-L2 norm:
or
Filter 2D signal using 4 parallel threads (last argument):
or
Filter 2D signal using TV-L1 norm for the rows, TV-L2 for the columns, and different penalties:
Filter 2D signal using both TV-L1 and TV-L2 norms:
Filter 2D signal using weighted TV-L1 norm (for X image of size MxN, W1 weights of size (M-1)xN, W2 weights of size Mx(N-1))
3D examplesFilter 3D signal using TV-L1 norm (video denoising):
or
Filter 3D signal using TV-L2 norm, not penalizing over the second dimension:
DemosSome demos in the form of both Matlab and Python scripts showing how to work with proxTV are included in the subfolders /matlab/demos and /prox_tv/demos, respectively. They are:
Notes on Mac OS XUnder Mac OS X some numerical accuracy issues have been observed for TV-L2 solvers. This is due to low-level Mac numerical libraries, and may produce failures in some of proxTV tests. Other solvers should work OK. ReferencingIf you find this toolbox useful please reference the following papers:
whose Bibtex entries are
AcknowledgementsWe wish to thank the following people for helping us in debugging and extending the toolbox:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论