RCarloniGertosio / 2DecGMCA

2DecGMCA open-source code (2D adaptation of SDecGMCA)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2DecGMCA

2DecGMCA (Deconvolution Generalized Morphological Component Analysis) is an algorithm aiming at solving joint Deconvolution and Blind Source Separation (DBSS) problems. It is a 2D adaptation of SDecGMCA, which processes spherical data.

Contents

  1. Introduction
  2. Procedure
  3. Getting Started
  4. Parameters
  5. Example
  6. Authors
  7. Reference
  8. License

Introduction

Let us consider the imaging model:

equation,

where:

  • equation are the equation multiwavelength data, flattened and stacked in a matrix,
  • equation is measurement operator,
  • equation is the mixing matrix,
  • equation are the equation sources, flattened and stacked in a matrix,
  • equation is the noise.

In the following, the measurement operator is assumed channel-dependant, linear and isotropic. Thus, for channel equation:

equation,

where equation denotes the convolution product. The equation can be simplified in Fourier domain:

equation

The sources are assumed to be sparse in the starlet representation equation. DecGMCA aims at minimizing the following objective function with respect to A and S:

equation,

where equation denotes the element-wise product, equation are the sparsity regularization parameters and equation is the oblique ensemble. Moreover, non-negativity constraints on equation and/or equation may be added.

Procedure

The algorithm is built upon a sparsity-enforcing projected alternate least-square procedure, which updates iteratively the sources and the mixing matrix. In a nutshell, when either equation or equation is updated, a first least-squares estimate is computed by minimizing the data-fidelity term. This step is then followed by the application of the proximal operator of the corresponding regularization term.

In contrast to standard BSS problems, the least-square update of the sources is not necessarily stable with respect to noise. Thus, an extra Tikhonov regularization is added.

The separation is comprised of two stages. The first stage estimates a first guess of the mixing matrix and the sources (warm-up); it is required to provide robustness with respect to the initial point. The second stage refines the separation by employing a more precise Tikhonov regularization strategy (refinement). Lastly, the sources are improved during a finale step with the output mixing matrix.

During the warm-up, the Tikhonov regularization coefficients are calculated from the current estimation of the mixing matrix. During the refinement, they are rather calculated from the current estimation of the sources spectra.

Getting Started

Requirements

2DecGMCA has been developed with Python 3.7.

Prerequisites

The following Python libraries need to be installed to run the code:

  • NumPy,
  • Matplotlib [optional].

DecGMCA class

2DecGMCA is implemented in a class. The data and the parameters of the separation are provided at the initialization of the object. The separation is performed by running the method run. The results are stored in the attributes S and A.

Parameters

Below is the list of the main attributes of the DecGMCA class.

Parameter Type Information Default value
X (m,p) float numpy.ndarray input data, each row corresponds to a flattened observation N/A
Hfft (m,p) float numpy.ndarray convolution kernels in Fourier domain (flattened & with 0-frequency shifted to the center) N/A
n int number of sources to be estimated N/A
fft_in bool the data X are in Fourier domain False
M (p,) float numpy.ndarray mask None
nnegA bool non-negativity constraint on A False
nnegS bool non-negativity constraint on S False
nneg bool non-negativity constraint on A and S. If not None, overrides nnegA and nnegS None
c_wu float or (2,) numpy.ndarray Tikhonov regularization hyperparameter at warm-up 0.5
c_ref float Tikhonov regularization hyperparameter at refinement 0.5
nStd float noise standard deviation (compulsory for spectrum-based regularization & analytical estimation of the noise std in source domain) N/A
useMad bool True: noise std estimated with MAD, False: noise std estimated analytically False
nscales int number of starlet detail scales 3
k float parameter of the k-std thresholding 3
K_max float maximal L0 norm of the sources. Being a percentage, it should be between 0 and 1 0.5
thrEnd bool perform thresholding during the finale estimation of the sources True
eps (3,) float numpy.ndarray stopping criteria of (1) the warm-up, (2) the refinement and (3) the finale refinement of S [1e-2, 1e-4, 1e-4]
verb int verbosity level, from 0 (mute) to 5 (most talkative) 0

Below is the list of the other attributes of the DecGMCA class, which can reasonably be equal to their default values.

Parameter Type Information Default value
AInit (m,n) float numpy.ndarray initial value for the mixing matrix. If None, PCA-based initialization None
keepWuRegStr bool keep warm-up regularization strategy during refinement (else: spectra-based coefficients) False
cstWuRegStr bool use constant regularization coefficients during warm-up (else: mixing-matrix-based coefficients) False
minWuIt int minimum number of iterations at warm-up 100
cwuDec int number of iterations for the decrease of c_wu (if c_wu is an array) minWuIt/2
L1 bool if False, L0 rather than L1 penalization True
doRw bool do L1 reweighing during refinement (only if L1 penalization) True

Example

Perform a DBSS on the data X with 4 sources.

decgmca = DecGMCA(X, Hfft, n=4, k=3, nscales=3, c_wu=numpy.array([5, 0.5]), c_ref=0.5, nStd=1e-7)
decgmca.run()
S = decgmca.S.copy()  # estimated sources
A = decgmca.A.copy()  # estimated mixing matrix

Authors

  • Rémi Carloni Gertosio
  • Jérôme Bobin

Reference

R. Carloni Gertosio, J. Bobin, Joint deconvolution and unsupervised source separation for data on the sphere

License

This project is licensed under the LGPL-3.0 License.

About

2DecGMCA open-source code (2D adaptation of SDecGMCA)

License:GNU Lesser General Public License v3.0


Languages

Language:Jupyter Notebook 87.7%Language:Python 12.3%