Ejemplo n.º 1
0
def archExperiments(ds):
    group = "arch384_total_color2"
    tags = TAG_SETS["color2"]
    #outputs = [ ('baselines_7', 1.), ('boundary_mask', 0.5), ('comment_mask', 1.),
    #			('inverted_background_mask', 1.), ('decoration_mask', 1.), ('text_mask', 1.)  ]
    outputs = [('baselines_7', 1.)]
    round_weights = [0.5, 1]

    for depth in [7]:
        for num_filters in [48]:
            for kernel_size in [7]:
                for scale in [4]:
                    for mse_lambda in [0.1]:
                        name = "arch_%d_%d_%d_%d_%f" % (
                            depth, num_filters, kernel_size, scale, mse_lambda)
                        print "createExperiment(%r, %r, %r, %r)" % (
                            ds, tags, group, name)
                        createNetwork.createExperiment(
                            ds,
                            ds,
                            tags,
                            outputs,
                            group,
                            name,
                            num_experiments=3,
                            kernel_size=kernel_size,
                            depth=depth,
                            num_filters=num_filters,
                            num_scales=scale,
                            train_batch_size=5,
                            input_size=384,
                            num_upsample_filters=num_filters / 2,
                            mse_lambda=mse_lambda,
                            avg_fm=False,
                            round_weights=round_weights)
Ejemplo n.º 2
0
def augmentation3Experiments():
	group = "aug_combined"
	
	experiments = EXPERIMENTS['combined']
	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 3
0
def hdibcoRoundExperiments(ds):
    group = "round_back"
    tags = TAG_SETS["original"] + TAG_SETS["relative_darkness2"] + TAG_SETS[
        "howe"]
    outputs = [('processed_gt', 1., 'recall_weights', 'precision_weights')]

    for num_rounds in [9]:
        name = "round_%d" % num_rounds
        round_weights = [
            2**-(num_rounds - idx - 1) for idx in xrange(num_rounds)
        ]
        print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags,
                                       outputs,
                                       group,
                                       name,
                                       num_experiments=5,
                                       kernel_size=9,
                                       depth=7,
                                       num_filters=64,
                                       num_scales=4,
                                       train_batch_size=5,
                                       iter_size=2,
                                       input_size=256,
                                       num_upsample_filters=32,
                                       lr=0.001,
                                       mse_lambda=0,
                                       avg_fm=False,
                                       round_weights=round_weights,
                                       backprop_probs=True,
                                       recurrent_rounds=False,
                                       skip_zero_loss=False)
Ejemplo n.º 4
0
def hdibcoExperiments(ds):
    group = "output2"
    tags = TAG_SETS["original"] + TAG_SETS["relative_darkness2"] + TAG_SETS[
        "howe"]
    base_outputs = [('processed_gt', 1., 'recall_weights', 'precision_weights')
                    ]
    outputs = [  #('processed_gt', 1., 'recall_weights', 'precision_weights'), 
        ('left_edges', 0.05), ('right_edges', 0.05), ('top_edges', 0.05),
        ('bottom_edges', 0.05), ('convex_hull', 0.05), ('skeleton', 0.05),
        ('dilated_skeleton', 0.05), ('holes', 0.05)
    ]

    for output in outputs:
        name = "output_%s" % output[0]
        output = base_outputs + [output]
        print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags,
                                       output,
                                       group,
                                       name,
                                       num_experiments=3,
                                       kernel_size=9,
                                       depth=7,
                                       num_filters=64,
                                       num_scales=4,
                                       train_batch_size=10,
                                       input_size=256,
                                       num_upsample_filters=32,
                                       lr=0.001)
Ejemplo n.º 5
0
def roundBaselineExperiments(ds):
    group = "base_weights_back"
    tags = TAG_SETS["color2"]
    outputs = [('baselines_7', 1., 'baselines_7_recall_weights',
                'baselines_7_precision_weights')]

    for num_rounds in xrange(1, 4):
        name = "round_weighted_%d" % num_rounds
        round_weights = [
            2**-(num_rounds - idx - 1) for idx in xrange(num_rounds)
        ]
        print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags,
                                       outputs,
                                       group,
                                       name,
                                       num_experiments=3,
                                       kernel_size=7,
                                       depth=7,
                                       num_filters=32,
                                       num_scales=5,
                                       train_batch_size=5,
                                       iter_size=1,
                                       input_size=384,
                                       num_upsample_filters=32,
                                       lr=0.001,
                                       mse_lambda=0,
                                       avg_fm=False,
                                       round_weights=round_weights,
                                       backprop_probs=True,
                                       recurrent_rounds=False)
Ejemplo n.º 6
0
def augmentationBaselineExperiments(ds):
    group = "augmentation"
    tags = TAG_SETS["color2"]
    outputs = [('baselines_7', 1., 'baselines_7_recall_weights',
                'baselines_7_precision_weights')]

    for aug in [
            'shear', 'perspective', 'elastic', 'blur', 'noise', 'rotate',
            'color_jitter'
    ]:
        name = "aug_%s" % aug
        print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
        d = {aug: True}
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags,
                                       outputs,
                                       group,
                                       name,
                                       num_experiments=3,
                                       kernel_size=7,
                                       depth=7,
                                       num_filters=32,
                                       num_scales=5,
                                       train_batch_size=5,
                                       iter_size=1,
                                       input_size=384,
                                       num_upsample_filters=32,
                                       lr=0.001,
                                       mse_lambda=0,
                                       avg_fm=False,
                                       **d)
Ejemplo n.º 7
0
def nwayExperiments(ds):
    group = "nway_round"
    tags = TAG_SETS["color2"]
    output = [('original_classes', 1., 10)]

    for num_rounds in xrange(2, 4):
        name = "nway_round_%d" % num_rounds
        round_weights = [
            2**-(num_rounds - idx - 1) for idx in xrange(num_rounds)
        ]
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags,
                                       output,
                                       group,
                                       name,
                                       num_experiments=3,
                                       kernel_size=9,
                                       depth=7,
                                       num_filters=64,
                                       num_scales=4,
                                       train_batch_size=5,
                                       input_size=256,
                                       num_upsample_filters=32,
                                       round_weights=round_weights,
                                       backprop_probs=False,
                                       recurrent_rounds=False)
Ejemplo n.º 8
0
def bn2Experiments():
	group = "bn2"

	experiments = EXPERIMENTS["bn2"]

	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 9
0
def variantExperiments():
	group = "variants_2"
	
	experiment = {"combo_gbGB": (generateTag('gbGB'), dict(num_experiments=10, **default)),
				  "combo_gG": (generateTag('gG'), dict(num_experiments=10, **default))}

	for name, (t, tr) in experiment.items():
		createNetwork.createExperiment(ds, t, group, name, **tr)
Ejemplo n.º 10
0
def equiArchExperiments():
	group = "equi_arch"

	experiments = EXPERIMENTS["equi_arch"]

	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 11
0
def sizeExperiments():
	group = "size"

	experiments = EXPERIMENTS["size"]
	experiments.update(EXPERIMENTS["multiscale"])

	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 12
0
def dsurfExperiments():
	group = "dsurf"

	experiments = EXPERIMENTS["dsurf"]
	experiments.update(EXPERIMENTS["dsurf_gray"])

	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 13
0
def widthExperiments():
	group = "width"

	experiments = EXPERIMENTS["width"]
	experiments.update(EXPERIMENTS["width_2"])

	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 14
0
def paddingExperiments():
	group = "padding"

	experiments = EXPERIMENTS["padding"]
	#experiments = EXPERIMENTS["multiple2"]
	experiments.update(EXPERIMENTS["multiple2"])
	experiments.update(EXPERIMENTS["multiple2_crop"])

	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 15
0
def channelExperiments():
	group = "variants"
	#tags = ["gray_227","gray_227_invert", "binary_227", "binary_227_invert", "color_227", "color_227_invert"]
	#tags = {"combo_gG": [TAGS['g'], TAGS['G']], "combo_bB": [TAGS['b'], TAGS['B']], "combo_cC": [TAGS['c'], TAGS['C']],
	#		"combo_gb": [TAGS['g'], TAGS['b']], "combo_GB": [TAGS['G'], TAGS['B']], "combo_gbGB": [TAGS['g'], TAGS['b'], TAGS['B'], TAGS['G']],
	#		"combo_cg": [TAGS['c'], TAGS['g']], "combo_cb": [TAGS['c'], TAGS['b']], "combo_cgb": [TAGS['c'], TAGS['g'], TAGS['b']],
	#		"combo_CG": [TAGS['C'], TAGS['G']], "combo_CB": [TAGS['C'], TAGS['B']], "combo_CGB": [TAGS['C'], TAGS['G'], TAGS['B']],
	#		"combo_cgbCGB": [TAGS['c'], TAGS['g'], TAGS['b'], TAGS['C'], TAGS['G'], TAGS['B']]}

	experiments = {"combo_cgbcgb" : (generateTag('cgbcgb'), dict(num_experiments=10, **default))}



	for name, (t, tr) in experiments.items():
		createNetwork.createExperiment(ds, t, group, name, **tr)
Ejemplo n.º 16
0
def augmentationExperiments():
	group = "augmentation"
	
	#experiments = EXPERIMENTS["standard"]
	experiments = EXPERIMENTS['baseline']
	experiments.update(EXPERIMENTS["standard"])
	experiments.update(EXPERIMENTS["shear"])
	experiments.update(EXPERIMENTS["blur_sharp"])
	experiments.update(EXPERIMENTS["rotate"])
	experiments.update(EXPERIMENTS["shear"])
	experiments.update(EXPERIMENTS["perspective"])
	experiments.update(EXPERIMENTS["color_jitter"])
	experiments.update(EXPERIMENTS["elastic"])
	#experiments = EXPERIMENTS["combined"]

	for name, (tags, tr) in experiments.items():
		print "createNetwork.createExperiment(%r, %r, %r, %r, %r)" % (ds, tags, group, name, tr)
		createNetwork.createExperiment(ds, tags, group, name, **tr)
Ejemplo n.º 17
0
def outputSingleExperiments(ds):
    group = "output_single_256"
    tags = TAG_SETS["gray"]
    outputs = [('baselines_7', 1.), ('boundary_mask', 0.5),
               ('comment_mask', 1.), ('inverted_background_mask', 1.),
               ('decoration_mask', 1.), ('text_mask', 1.), ('task3_gt', 1.)]

    for output in outputs:
        name = "output_%s" % output[0]
        print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags, [output],
                                       group,
                                       name,
                                       num_experiments=3,
                                       kernel_size=9,
                                       depth=7,
                                       num_filters=24,
                                       num_scales=5,
                                       train_batch_size=5,
                                       input_size=256,
                                       num_upsample_filters=8,
                                       round_0_only=True,
                                       round_0_weight=1.)

    name = "output_all"
    print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
    createNetwork.createExperiment(ds,
                                   ds,
                                   tags,
                                   outputs,
                                   group,
                                   name,
                                   num_experiments=3,
                                   kernel_size=9,
                                   depth=7,
                                   num_filters=24,
                                   num_scales=5,
                                   train_batch_size=5,
                                   input_size=256,
                                   num_upsample_filters=8,
                                   round_0_only=True,
                                   round_0_weight=1.)
Ejemplo n.º 18
0
def outputExperiments(ds):
    group = "output"
    tags = TAG_SETS["color2"]
    #outputs = [ ('baselines_7', 1.), ('boundary_mask', 0.5), ('comment_mask', 1.),
    #			('inverted_background_mask', 1.), ('decoration_mask', 1.), ('text_mask', 1.),
    #			('task3_gt', 1.)]

    for output in outputs:
        name = "output_%s" % output[0]
        print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags, [output],
                                       group,
                                       name,
                                       num_experiments=3,
                                       kernel_size=9,
                                       depth=7,
                                       num_filters=48,
                                       num_scales=4,
                                       train_batch_size=5,
                                       input_size=256,
                                       num_upsample_filters=16,
                                       mse_lambda=0,
                                       avg_fm=False)

    name = "output_all"
    print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
    createNetwork.createExperiment(ds,
                                   ds,
                                   tags,
                                   outputs,
                                   group,
                                   name,
                                   num_experiments=3,
                                   kernel_size=9,
                                   depth=7,
                                   num_filters=48,
                                   num_scales=4,
                                   train_batch_size=5,
                                   input_size=256,
                                   num_upsample_filters=16,
                                   mse_lambda=0,
                                   avg_fm=False)
Ejemplo n.º 19
0
def outputPairExperiments(ds):
    group = "output_pair"
    tags = TAG_SETS["color2"]
    outputs = {
        'base': ('baselines_7', 1., 4),
        'bound': ('boundary_mask', 0.5),
        'comment': ('comment_mask', 1.),
        'back': ('inverted_background_mask', 1.),
        'dec': ('decoration_mask', 1.),
        'text': ('text_mask', 1.),
        'task3': ('task3_gt', 1.)
    }

    pairs = [('text', 'comment'), ('text', 'comment', 'base'), ('dec', 'text'),
             ('text', 'task3'), ('text', 'bound'), ('text', 'base'),
             ('dec', 'comment'), ('back', 'comment'), ('bound', 'base'),
             ('comment', 'base'), ('task3', 'base')]

    for pair in pairs:
        name = "output_%s" % "_".join(pair)
        print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
        output = [outputs[p] for p in pair]
        createNetwork.createExperiment(ds,
                                       ds,
                                       tags,
                                       output,
                                       group,
                                       name,
                                       num_experiments=3,
                                       kernel_size=9,
                                       depth=7,
                                       num_filters=64,
                                       num_scales=4,
                                       train_batch_size=5,
                                       input_size=256,
                                       num_upsample_filters=32,
                                       mse_lambda=0,
                                       avg_fm=False)
Ejemplo n.º 20
0
def featuresBaselineExperiments(ds):
    group = "binarization"
    outputs = [('baselines_7', 1., 'baselines_7_recall_weights',
                'baselines_7_precision_weights')]

    tags = TAG_SETS["color2"]
    name = "bin_none"
    print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
    createNetwork.createExperiment(ds,
                                   ds,
                                   tags,
                                   outputs,
                                   group,
                                   name,
                                   num_experiments=3,
                                   kernel_size=9,
                                   depth=7,
                                   num_filters=32,
                                   num_scales=5,
                                   train_batch_size=5,
                                   iter_size=1,
                                   input_size=384,
                                   num_upsample_filters=32,
                                   lr=0.001,
                                   mse_lambda=0,
                                   avg_fm=False)

    tags = TAG_SETS["color2"] + TAG_SETS["otsu"]
    name = "bin_otsu"
    print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
    createNetwork.createExperiment(ds,
                                   ds,
                                   tags,
                                   outputs,
                                   group,
                                   name,
                                   num_experiments=3,
                                   kernel_size=9,
                                   depth=7,
                                   num_filters=32,
                                   num_scales=5,
                                   train_batch_size=5,
                                   iter_size=1,
                                   input_size=384,
                                   num_upsample_filters=32,
                                   lr=0.001,
                                   mse_lambda=0,
                                   avg_fm=False)

    tags = TAG_SETS["color2"] + TAG_SETS["fcn_bin"]
    name = "bin_fcn"
    print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
    createNetwork.createExperiment(ds,
                                   ds,
                                   tags,
                                   outputs,
                                   group,
                                   name,
                                   num_experiments=3,
                                   kernel_size=9,
                                   depth=7,
                                   num_filters=32,
                                   num_scales=5,
                                   train_batch_size=5,
                                   iter_size=1,
                                   input_size=384,
                                   num_upsample_filters=32,
                                   lr=0.001,
                                   mse_lambda=0,
                                   avg_fm=False)

    tags = TAG_SETS["color2"] + TAG_SETS["otsu"] + TAG_SETS["fcn_bin"]
    name = "bin_both"
    print "createExperiment(%r, %r, %r, %r)" % (ds, tags, group, name)
    createNetwork.createExperiment(ds,
                                   ds,
                                   tags,
                                   outputs,
                                   group,
                                   name,
                                   num_experiments=3,
                                   kernel_size=9,
                                   depth=7,
                                   num_filters=32,
                                   num_scales=5,
                                   train_batch_size=5,
                                   iter_size=1,
                                   input_size=384,
                                   num_upsample_filters=32,
                                   lr=0.001,
                                   mse_lambda=0,
                                   avg_fm=False)
Ejemplo n.º 21
0
def channel2Experiments():
	tr = {'num_experiments': 10, 'scale': (1./255), 'shift': 'mean'} 
	createNetwork.createExperiment(ds, ['binary_227'], 'channel2', 'binary', **tr)
	createNetwork.createExperiment(ds, ['gray_227_invert'], 'channel2', 'gray_invert', **tr)
	createNetwork.createExperiment(ds, ['color_227_invert'], 'channel2', 'color_invert', **tr)
	createNetwork.createExperiment(ds, ['gray_227'], 'channel2', 'gray', **tr)
Ejemplo n.º 22
0
def hsvExperiments():
	tr = {'num_experiments': 10, 'hsv': True, 'scale': (1./255), 'shift': 'mean'} 
	createNetwork.createExperiment(ds, ['color_227'], 'channel2', 'hsv', **tr)
	createNetwork.createExperiment(ds, ['color_227', 'color_227'], 'channel2', 'hsv_rgb', **tr)