almost ready

parent 07186c51
......@@ -26,20 +26,19 @@ Akprox_e = Akprox[i,:]
Ekprox_e = Ekprox[i,:]
Amob_e = Amob[i,:]
Emob_e = Emob[i,:]
pnm.imsave('dict-mnist-fwd-mob.pbm',Dmob,maxval=1)
pnm.imsave('dict-mnist-fwd-kprox.pbm',Dkprox,maxval=1)
pnm.imsave('Akprox_e.pbm',Akprox_e,maxval=1)
pnm.imsave('Ekprox_e.pbm',Ekprox_e,maxval=1)
pnm.imsave('Amob_e.pbm',Amob_e,maxval=1)
pnm.imsave('Emob_e.pbm',Emob_e,maxval=1)
pnm.imsave('mnist_e.pbm',X_e,maxval=1)
pnm.imsave('mnist-dict-fwd-mob.pbm',Dmob,maxval=1)
pnm.imsave('mnist-dict-fwd-kprox.pbm',Dkprox,maxval=1)
pnm.imsave('mnist-coeff-kprox-extract.pbm',Akprox_e,maxval=1)
pnm.imsave('mnist-residual-kprox-extract.pbm',Ekprox_e,maxval=1)
pnm.imsave('mnist-coeff-mob-extract.pbm',Amob_e,maxval=1)
pnm.imsave('mnist-residual-mob-extract.pbm',Emob_e,maxval=1)
pnm.imsave('mnist-extract.pbm',X_e,maxval=1)
os.system('../src/mosaic_tool Akprox_e.pbm Akprox_mosaic.pbm 40')
os.system('../src/mosaic_tool Ekprox_e.pbm Ekprox_mosaic.pbm 40')
os.system('../src/mosaic_tool Amob_e.pbm Amob_mosaic.pbm 40')
os.system('../src/mosaic_tool Emob_e.pbm Emob_mosaic.pbm 40')
os.system('../src/mosaic_tool mnist_e.pbm mnist_mosaic.pbm 10')
os.system('../src/mosaic_tool mnist_e.pbm mnist_e_mosaic.pbm 40')
os.system('../src/mosaic_tool mnist-coeff-kprox-extract.pbm mnist-coeff-kprox-mosaic.pbm 40')
os.system('../src/mosaic_tool mnist-residual-kprox-extract.pbm mnist-residual_kprox-mosaic.pbm 40')
os.system('../src/mosaic_tool mnist-coeff-mob-extract.pbm mnist-coeff-mob-mosaic.pbm 40')
os.system('../src/mosaic_tool mnist-residual-mob-extract.pbm mnist-residual-mob-mosaic.pbm 40')
os.system('../src/mosaic_tool mnist-extract.pbm mnist-mosaic.pbm 40')
#
# initialization results
#
......@@ -61,7 +60,11 @@ pnm.imsave('mnist-init-samp-mob.pbm',D_samp_mob,maxval=1)
#
#
# main falta
#
# image of 1160 x 896 broken into 16x16 patches.
# That is 56 patches wide
# we chose a stripe of 40 patches starting at (y=432,x=128)
# that is row 27, col 8 in the patches grid
# so the linear patch position is 27*56+8 = 1520
X = pnm.imread('../data/einstein.pbm')
Akprox = pnm.imread('./paper/conv-einstein-fwd-kprox/__final_coeffs__.pbm')
Ekprox = pnm.imread('./paper/conv-einstein-fwd-kprox/__final_residual__.pbm')
......@@ -70,6 +73,25 @@ Dkprox = pnm.imread('./paper/conv-einstein-fwd-kprox/__final_dict_mosaic__.pbm')
Amob = pnm.imread('./paper/conv-einstein-fwd-mob/__final_coeffs__.pbm')
Emob = pnm.imread('./paper/conv-einstein-fwd-mob/__final_residual__.pbm')
Dmob = pnm.imread('./paper/conv-einstein-fwd-mob/__final_dict_mosaic__.pbm')
i = range(1520,1560)
X_e = X[i,:]
Akprox_e = Akprox[i,:]
Ekprox_e = Ekprox[i,:]
Amob_e = Amob[i,:]
Emob_e = Emob[i,:]
pnm.imsave('einstein-dict-fwd-mob.pbm',Dmob,maxval=1)
pnm.imsave('einstein-dict-fwd-kprox.pbm',Dkprox,maxval=1)
pnm.imsave('einstein-coeff-kprox-extract.pbm',Akprox_e,maxval=1)
pnm.imsave('einstein-residual-kprox-extract.pbm',Ekprox_e,maxval=1)
pnm.imsave('einstein-coeff-mob-extract.pbm',Amob_e,maxval=1)
pnm.imsave('einstein-residual-mob-extract.pbm',Emob_e,maxval=1)
pnm.imsave('einstein-extract.pbm',X_e,maxval=1)
os.system('../src/mosaic_tool einstein-coeff-kprox-extract.pbm einstein-coeff-kprox-mosaic.pbm 40')
os.system('../src/mosaic_tool einstein-residual-kprox-extract.pbm einstein-residual_kprox-mosaic.pbm 40')
os.system('../src/mosaic_tool einstein-coeff-mob-extract.pbm einstein-coeff-mob-mosaic.pbm 40')
os.system('../src/mosaic_tool einstein-residual-mob-extract.pbm einstein-residual-mob-mosaic.pbm 40')
os.system('../src/mosaic_tool einstein-extract.pbm einstein-mosaic.pbm 40')
#
# einstein init (OK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment