diff data_generation/pipeline/testtransformations.py @ 245:0de14b2034c6

change in testtransformation to test PNIST pipeline
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Tue, 16 Mar 2010 12:13:49 -0400
parents 5e0e5f1860ec
children
line wrap: on
line diff
--- a/data_generation/pipeline/testtransformations.py	Tue Mar 16 12:12:20 2010 -0400
+++ b/data_generation/pipeline/testtransformations.py	Tue Mar 16 12:13:49 2010 -0400
@@ -28,7 +28,7 @@
 from affine_transform import AffineTransformation
 
 ###---------------------order of transformation module
-MODULE_INSTANCES = [Slant(),Thick(),AffineTransformation(),LocalElasticDistorter(),GIMP1(),Rature(),Occlusion(), PermutPixel(),DistorsionGauss(),AddBackground(), PoivreSel(), BruitGauss(), Contrast()]
+MODULE_INSTANCES = [Slant(),Thick(),AffineTransformation(),LocalElasticDistorter(),GIMP1(False)]
 
 ###---------------------complexity associated to each of them
 complexity = 0.7
@@ -111,11 +111,11 @@
 
 d = N.zeros((n,1024))
 
-datapath = '/data/lisa/data/ocr_breuel/filetensor/unlv-corrected-2010-02-01-shuffled.ft'
-f = open(datapath)
-d = ft.read(f)
-d = d[0:n,:]/255.0
-createimage('/u/glorotxa/transf/OCR',d)
+#datapath = '/data/lisa/data/ocr_breuel/filetensor/unlv-corrected-2010-02-01-shuffled.ft'
+#f = open(datapath)
+#d = ft.read(f)
+#d = d[0:n,:]/255.0
+#createimage('/u/glorotxa/transf/OCR',d)
 
 
 
@@ -133,18 +133,18 @@
 d = d[0:n,:]/255.0
 createimage('/u/glorotxa/transf/NIST_upper',d)
 
-from Facade import *
+#from Facade import *
 
-for i in range(n):
-    d[i,:]=N.asarray(N.reshape(generateCaptcha(0.8,0),(1,1024))/255.0,dtype='float32')
+#for i in range(n):
+    #d[i,:]=N.asarray(N.reshape(generateCaptcha(0.8,0),(1,1024))/255.0,dtype='float32')
 
-createimage('/u/glorotxa/transf/capcha',d)
+#createimage('/u/glorotxa/transf/capcha',d)
 
 
-for i in range(n):
-    myttf2jpg = ttf2jpg()
-    d[i,:]=N.reshape(myttf2jpg.generate_image()[0],(1,1024))
-createimage('/u/glorotxa/transf/fonts',d)
+#for i in range(n):
+    #myttf2jpg = ttf2jpg()
+    #d[i,:]=N.reshape(myttf2jpg.generate_image()[0],(1,1024))
+#createimage('/u/glorotxa/transf/fonts',d)
 
 datapath = '/data/lisa/data/nist/by_class/'
 f = open(datapath+'lower/lower_train_data.ft')