1 Micha Feigin, Danny Feldman, Nir Sochen. 2 3 4.
-
Upload
juliana-davidson -
Category
Documents
-
view
216 -
download
0
Transcript of 1 Micha Feigin, Danny Feldman, Nir Sochen. 2 3 4.
1
From High Definition Image to
Low SpaceOptimization
Micha Feigin, Danny Feldman, Nir Sochen
2
Coresets
3
² Input: P in RdMean Queries
4
² Input: P in Rd
² Query: a pointq2 Rd
q
Mean Queries
5
² Input: P in Rd
² Query: a pointq2 Rd
q
Mean Queries
6
Definition
C is an "-coreset for (P;Q; f )
if for every q 2 Q we have w.h.p
f (P;q) » f (C;q);
where the approximation depends on ".
7
² AssumeP
p2P = 0.
Oterwise, translate P .¡dist(p;q)
¢2= kp¡ qk2
= kpk2 +kqk2 ¡ 2p¢q
q
²
Coresets for Mean Queries
8
² AssumeP
p2P = 0.
Oterwise, translate P .¡dist(p;q)
¢2= kp¡ qk2
= kpk2 +kqk2 ¡ 2p¢q
²
X
p2P
¡dist(p;q)
¢2=
X
p2P
kpk2 +X
p2P
kqk2 ¡ 2q¢X
p2P
p
=X
p2P
kpk2 +jP j kqk2
²
Coresets for Mean Queries
9
f (P;q) =X
p2P
kpk2 +jP j ¢kqk2
= g(C;q)
where C =P
p2P p= 0,
g(C;q) = jP j ¢dist(C;q) +P
p2P kpk2
Coresets for Mean Queries
10
(C;g) is an "-coreset for (P;Q;F )
if for every q 2 Q we have w.h.p
f (P;q) » g(C;q);
where the approximation depends on ".
A More General Definition
11
² k-mean/ median of a graph
² k-line median/ means
² Matrix low-rank approximations
² Regression/ Subspace approximations
² Google's PageRank
² Supported vector machines
² Diameter/ width of a point set
² Dealing with insertions/ deletions, outliers, ...
Other Coresets
12
KSVD
13
Sparse Reconstruction• Defined as a set {D,X,Y} such that
DY t X
Figure courtesy Michael Elad
14
Sparse Coding• Given a D and yi, how to find xi
• Constraint : xi is sufficiently sparse
• Finding exact solution difficult
• Approximate solution good enough ?
15
Orthogonal Matching Pursuit (OMP)
Select dk with maxprojection on residue
xk = arg min ||y-Dkxk||
Update residue
r = y - Dkxk
Check terminating condition
D, y x
16
OMP : features
• Greedy algorithm
• Can find approximate solution
• Close solution if T is small enough
• Simplistic in nature
• Tends to be unstable for large T
17
K-SVD Algorithm
• Select atoms from input
• Atoms can be patches from the image
• Patches are overlapping
Initialize Dictionary
Sparse Coding(OMP)
Update Dictionary
One atom at a time
18
K-SVD Algorithm
• Use OMP or any other fast method
• Output gives sparse code for all signals
• Minimize error in representation
Initialize Dictionary
Sparse Coding(OMP)
Update Dictionary
One atom at a time
19
K-SVD Algorithm
• Replace unused atom with minimally represented signal
• Identify signals that use k-th atom (non zero entries in rows of X)
Initialize Dictionary
Sparse Coding(OMP)
Update Dictionary
One atom at a time
20
K-SVD Algorithm
• Deselect k-th atom from dictionary
• Find coding error matrix of these signals
• Minimize this error matrix with rank-1 approx from SVD
Initialize Dictionary
Sparse Coding(OMP)
Update Dictionary
One atom at a time
21
K-SVD Algorithm
• [U,S,V] = svd(Ek)
• Replace coeff of atom dk in X with entries of s1v1
• dk = u1/u12
Initialize Dictionary
Sparse Coding(OMP)
Update Dictionary
One atom at a time
22
Denoising framework• A cost function for : Y = Z + n
• Solve for Prior term
23
Denoising Framework• Break problem into smaller
problems
• Aim at minimization at the patch level
Select i-th patch of Z accounted for
implicitly by OMP
24
Denoising Framework
• Solution :
• Denoising by normalized weighted averaging
Initialize Dictionary
Sparse Coding(OMP)
Update Dictionary
One atom at a time
Averaging of patches
25
Coresets for the KSVD
26
Coresets for the KSVD• Replace input set Y with a weighted
set C• Construct an optimal dictionary for
C (instead of Y)• Compute coefficients for Y based on
this dictionaryAdvantages:• The coreset C is much smaller than
Y• Constructing C is much cheaper
than solving the original problem
27
3000x4000 pixels
Denoising High Definition Images
28
K-SVD Denoiser for LD images [Michael Elad et
al.]
ε-Coreset for HD Images
29
Algorithm: Coreset (Y,D0,c)
Input: A matrix Y, and integer and a matrix D0 (of arbitrary size)
• The columns of Y are the image patches
• c is the size of the coreset• D0 is an approximated dictionary
Output: A weighted matrix C – a coreset for Y for the K-SVD algorithm (with probability )
30
Algorithm: Coreset (Y,D0,c)
• Pick a non-uniform random sample S of c i.i.d columns from Y
• The probability of choosing is
• The coreset C is constructed from the columns of S along with corresponding weights:
31
Choosing D0
• The ideal choice for D0 is the optimal dictionaryo This will allow to best predict which vectors
are important to construct this dictionary
• Problem: we don’t want to solve the problem in order to find a coreset to solve the problem
• Two first order approximations:o An all ones vectoro The most significant singular vector for Y
32
Random Sampling• Uniform random sampling generally
does not produce a good coresetoFor a mostly uniform image (such as line
drawings), patches with features will be chosen with low probability
oEssential to choose them to reconstruct the image
• To construct a good dictionary, we need tooMake sure outliers are representedoGive them low priority for affecting the
final outcome
33
Experimental Results
34
Streaming• Single pass over data• Requires only space• Fast processing time per ellement• Allows handling data sets that don’t
fit in memoryoK-SVD choked on HD images without
coresetsoWe managed to run on full length movie
(VGA resolution) with atoms being full frames (not patches)
35
Tree Computation
p1 p2 p3 p4 p5 p7p6 p8 p9 p10 p11 p12 p13 p15p14 p16
From a presentation by Piotr Indyk
36
Conclusion• Coresets greatly speed up
calculation• Allow handling much larger inputs
(at lower running times)• Can stabilize random seeded and
greedy algorithms due to smaller input
• Allow multiple runs on random seeded methods to allow majority vote methods (at a lower total run time)
37
Thank You