예제 #1
0
def test_rgb2yuv():
    img = imread(URL)
    img = img.astype('float32')

    yuv = rgb_to_yuv(img, 255, 'matlab')
    # should have the same shape
    assert yuv.shape == img.shape
예제 #2
0
 def __init__(self,
              fixed_train_hr_size=None,
              condition_img=None,
              name='self_gan',
              **kwargs):
     super(EXP2, self).__init__(**kwargs)
     self.name = name
     self.cimg = imread(condition_img)
     self.F = 64  # filters
     self.K = 3  # kernel size
     # discriminator net
     self.Disc = GAN.Discriminator(self,
                                   depth=1,
                                   input_shape=[
                                       -1, fixed_train_hr_size,
                                       fixed_train_hr_size, self.channel
                                   ])
예제 #3
0
def test_rgb2yuv():
    img = imread(URL)
    img = img.astype('float32')

    yuv = rgb_to_yuv(img, 255, 'matlab')
    array_to_img(yuv).show()