diff transformations/testtransformations.py @ 120:5e00ed18ae32

changed some transformation paramters to better fit with visualization
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Wed, 17 Feb 2010 17:45:48 -0500
parents 0d083964af4b
children a507adba0ce3
line wrap: on
line diff
--- a/transformations/testtransformations.py	Wed Feb 17 17:06:54 2010 -0500
+++ b/transformations/testtransformations.py	Wed Feb 17 17:45:48 2010 -0500
@@ -31,7 +31,7 @@
 MODULE_INSTANCES = [Slant(),Thick(),AffineTransformation(),LocalElasticDistorter(),GIMP1(),Rature(),Occlusion(), PermutPixel(),DistorsionGauss(),AddBackground(), PoivreSel(), BruitGauss(), Contrast()]
 
 ###---------------------complexity associated to each of them
-complexity = 0.6
+complexity = 0.7
 #complexity = [0.5]*len(MODULE_INSTANCES)
 #complexity = [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.]
 n=100
@@ -109,17 +109,10 @@
 
 d = N.zeros((n,1024))
 
-
-datapath = '/data/lisa/data/nist/by_class/'
-f = open(datapath+'digits_reshuffled/digits_reshuffled_train_data.ft')
-d = ft.read(f)
-d = d[0:n,:]/255.0
-createimage('/u/glorotxa/transf/NIST_digits',d)
-
 from Facade import *
 
 for i in range(n):
-    d[i,:]=N.asarray(N.reshape(generateCaptcha(0.5,0),(1,1024))/255.0,dtype='float32')
+    d[i,:]=N.asarray(N.reshape(generateCaptcha(0.8,0),(1,1024))/255.0,dtype='float32')
 
 createimage('/u/glorotxa/transf/capcha',d)
 
@@ -130,6 +123,12 @@
 createimage('/u/glorotxa/transf/fonts',d)
 
 
+datapath = '/data/lisa/data/nist/by_class/'
+f = open(datapath+'digits_reshuffled/digits_reshuffled_train_data.ft')
+d = ft.read(f)
+d = d[0:n,:]/255.0
+createimage('/u/glorotxa/transf/NIST_digits',d)
+
 
 datapath = '/data/lisa/data/nist/by_class/'
 f = open(datapath+'lower/lower_train_data.ft')