def __init__(self, reader, window_sizes, batch_size=1, windows_per_image=1, queue_length=10, name='weighted_sampler'): UniformSampler.__init__(self, reader=reader, window_sizes=window_sizes, batch_size=batch_size, windows_per_image=windows_per_image, queue_length=queue_length, name=name) tf.logging.info('Initialised weighted sampler window instance') self.window_centers_sampler = weighted_spatial_coordinates
def __init__(self, reader, data_param, batch_size, windows_per_image, constraint, random_windows_per_image=0, queue_length=10): UniformSampler.__init__(self, reader=reader, data_param=data_param, batch_size=batch_size, windows_per_image=windows_per_image, queue_length=queue_length) self.constraint = constraint self.n_samples_rand = random_windows_per_image self.spatial_coordinates_generator = \ self.selective_spatial_coordinates() tf.logging.info('initialised selective sampling')