示例#1
0
def init_dae_exp(pre_load=None, regularizer_list=[]):
    '''
	These are the training setting. 
	'''
    batch_size = 16

    epochs = 1
    img_width, img_height = 64, 64
    hor_flip = False

    initial_epoch = 0

    dset = 'UR-Filled'  #Choose data set here

    autoencooder, model_name, model_type = DAE(
        img_width=img_width,
        img_height=img_height,
        regularizer_list=regularizer_list)

    DAE_exp = AEExp(model = autoencooder, img_width = img_width,\
    img_height = img_height, model_name = model_name, model_type = model_type, \
    pre_load = pre_load, initial_epoch = initial_epoch,\
    epochs = epochs, batch_size = batch_size, dset = dset, hor_flip = hor_flip
    )

    return DAE_exp
示例#2
0
def init_dae_exp(pre_load=None, regularizer_list=[]):
    batch_size = 16

    epochs = 1
    img_width, img_height = 64, 64
    hor_flip = False

    misc_save_info = None
    quick_test = False
    initial_epoch = 0

    dset = 'UR-Filled'  #Choose dset here

    autoencooder, model_name, model_type = DAE(
        img_width=img_width,
        img_height=img_height,
        regularizer_list=regularizer_list)

    DAE_exp = AEExp(model = autoencooder, img_width = img_width,\
    img_height = img_height, model_name = model_name, model_type = model_type, \
    pre_load = pre_load, initial_epoch = initial_epoch,\
    epochs = epochs, batch_size = batch_size, dset = dset, hor_flip = hor_flip
    )

    return DAE_exp
def init_cae_exp(pre_load = None):
	'''
	These are the training setting. 
	'''
	batch_size = 32

	hor_flip = True
	zoom_range = 0

	regularizer_list = []
	epochs = 2
	img_width, img_height = 64,64

	dset = 'UR-Filled'
	initial_epoch = 0

	#Convautoencooder-------------------

	model, model_name, model_type = CAE(img_width = img_width, 
		img_height = img_height)

	convautoencoder_experiment = AEExp(model = model, img_width = img_width,\
	img_height = img_height, model_name = model_name, model_type = model_type, \
	pre_load = pre_load, initial_epoch = initial_epoch,\
	epochs = epochs, batch_size = batch_size, hor_flip = hor_flip, zoom_range = zoom_range, dset = dset
	)

	return convautoencoder_experiment
示例#4
0
if __name__ == "__main__":

    models_root = 'O:/AIRR/FallDetection-current/Jacob/Camera-FD/JNogasPy/Models'
    pre_load = None  #Put path to your saved model here!! It will be in Models/{dset}/model_name.h5
    pre_load = models_root + '/UR-Filled/DAE-relu_tanh-Dropout-UR-Filled.h5'  #paper? Y

    pre_load = models_root + '/SDU-Filled/DAE-relu_tanh-Dropout-hor_flip.h5'
    pre_load = models_root + '/UR-Filled/DAE-relu_tanh-Dropout-500-hor_flip.hdf5'  #paper? Y
    pre_load = models_root + '/SDU-Filled/DAE-relu_tanh-Dropout-400-hflip.hdf5'  #paper? Y
    pre_load = models_root + '/UR/DAE-relu_tanh-Dropout-hor_flip-500-0.005.hdf5'  #paper? Y
    pre_load = models_root + '/Thermal/DAE-relu_tanh-Dropout-Thermal.h5'

    pre_load = pre_load

    if pre_load == None:
        print(
            'No model path given, please update pre_load variable in dae_main_test.py'
        )

    else:
        hor_flip = True
        dset = 'Thermal'

        img_width, img_height = 64, 64

        dae_exp = AEExp(pre_load = pre_load, hor_flip = hor_flip, dset = dset,\
         img_width = img_width, img_height = img_height)

        dae_exp.test(raw=False, animate=False)