changeset 183:992ca8035a4d

Adapted pipeline to new directory structure
author boulanni <nicolas_boulanger@hotmail.com>
date Sat, 27 Feb 2010 19:21:57 -0500
parents 2b6a28e4cadc
children 81f8466dc121
files data_generation/pipeline/pipeline.py scripts/run_pipeline.sh
diffstat 2 files changed, 21 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/data_generation/pipeline/pipeline.py	Sat Feb 27 18:28:48 2010 -0500
+++ b/data_generation/pipeline/pipeline.py	Sat Feb 27 19:21:57 2010 -0500
@@ -8,7 +8,7 @@
 
 import sys, os, getopt
 import numpy
-import filetensor as ft
+import ift6266.data_generation.transformations.filetensor as ft
 import random
 
 # To debug locally, also call with -s 100 (to stop after ~100)
@@ -80,23 +80,21 @@
     import pylab
     pylab.ion()
 
-from ift6266.data_generation.transformations import *
-
-from PoivreSel import PoivreSel
-from thick import Thick
-from BruitGauss import BruitGauss
-from DistorsionGauss import DistorsionGauss
-from PermutPixel import PermutPixel
-from gimp_script import GIMP1
-from Rature import Rature
-from contrast import Contrast
-from local_elastic_distortions import LocalElasticDistorter
-from slant import Slant
-from Occlusion import Occlusion
-from add_background_image import AddBackground
-from affine_transform import AffineTransformation
-from ttf2jpg import ttf2jpg
-from Facade import generateCaptcha
+from ift6266.data_generation.transformations.PoivreSel import PoivreSel
+from ift6266.data_generation.transformations.thick import Thick
+from ift6266.data_generation.transformations.BruitGauss import BruitGauss
+from ift6266.data_generation.transformations.DistorsionGauss import DistorsionGauss
+from ift6266.data_generation.transformations.PermutPixel import PermutPixel
+from ift6266.data_generation.transformations.gimp_script import GIMP1
+from ift6266.data_generation.transformations.Rature import Rature
+from ift6266.data_generation.transformations.contrast import Contrast
+from ift6266.data_generation.transformations.local_elastic_distortions import LocalElasticDistorter
+from ift6266.data_generation.transformations.slant import Slant
+from ift6266.data_generation.transformations.Occlusion import Occlusion
+from ift6266.data_generation.transformations.add_background_image import AddBackground
+from ift6266.data_generation.transformations.affine_transform import AffineTransformation
+from ift6266.data_generation.transformations.ttf2jpg import ttf2jpg
+from ift6266.data_generation.transformations.pycaptcha.Facade import generateCaptcha
 
 if DEBUG:
     from visualizer import Visualizer
@@ -383,7 +381,10 @@
         pl.run(img_it, cpx_it)
         pl.write_output(output_file_path, params_output_file_path, labels_output_file_path)
 
-_main()
+try:
+    _main()
+except:
+    print "Unexpected error"
 
 if DEBUG_X:
     pylab.ioff()
--- a/scripts/run_pipeline.sh	Sat Feb 27 18:28:48 2010 -0500
+++ b/scripts/run_pipeline.sh	Sat Feb 27 19:21:57 2010 -0500
@@ -15,6 +15,6 @@
 	echo $arg >> $PIPELINE_ARGS_TMPFILE
 done
 
-gimp -i --batch-interpreter python-fu-eval --batch - < pipeline.py
+gimp -i --batch-interpreter python-fu-eval --batch - < ../data_generation/pipeline/pipeline.py