Sparse modeling The dictionary learning algorithm of Chapter 12 was implemented in jupyter notebook. Link to jupyter notebook
About 25,000 8x8 patches were extracted from Barbara and dictionary learning was performed.
Two-dimensional separable DCT dictionary as the initial value A dictionary learned from patches using the K-SVD method
Dictionary learning reduced sparse expression errors.
Sparsely represent $ y_i $ with $ x_i $ where only $ k_0 $ elements are nonzero.
\min_{A,\{x_i\}^{M}_{1}} \Sigma_{i=1}^{M} ||y_i-Ax_i|| \text{ subject to } ||x_{i}||_0 \leq k_{0}, 1 \leq i \leq M
As $ k = 0 $
Is. Kronecker product, subtracting the average except for the first atom
An initial dictionary was generated using.
Set $ k \ leftarrow k + 1 $ and perform the following steps.
\hat{x_{i}} = \arg \min_{x} ||y_{i} - Ax||_{2}^{2} \text{ subject to } ||x||_{0} \leq k_{0}
Then we get the sparse representation vector $ \ hat {x} _ {i} $ for $ 1 \ leq i \ leq M $. Use these to construct the matrix $ X $.
Define a case set using atom $ a_ {j_ {0}}
Calculate the residual matrix.
Extract only the column corresponding to $ \ Omega_ {j_ {0}} $ from $ E_ {j_ {0}} $ and set it as $ E_ {j_ {0}} ^ {R} $.
Apply $ SVD $ and set $ E_ {j_ {0}} ^ {R} = U \ Delta V $. And the dictionary atom $ a_ {j_ {0}} = u_ {1} $, the expression vector is $ x_ {j_ {0}} ^ {R} = \ Delta [1, 1] v_ {1} ^ {T } Update as $.
*Stop condition: If
Get the result $ A $.
Recommended Posts