Ejemplo n.º 1
0
 def compile(self, image_shape=(3060, 4060)):
     self.logger.info('Compiling saliency network convolution function...')
     ratio = config.filtersize[0] / config.data_imsize[0]
     targetsize = np.round(np.array(image_shape) * ratio).astype(int)
     saliency_conv_model = models.get_saliency_network(train=False, shape=targetsize)
     self.convolution_function = keras_helpers.get_convolution_function(
         self.saliency_network, saliency_conv_model)
Ejemplo n.º 2
0
    def __init__(self, logger='default'):
        if logger == 'default':
            self.logger = util.get_default_logger()
        else:
            self.logger = logger

        self.saliency_network = models.get_saliency_network(
            train=True, compile=False)