vanhuyz / CycleGAN-TensorFlow

An implementation of CycleGan using TensorFlow
MIT License
1.19k stars 436 forks source link

Is it possible to process different size by pre-trained model? #95

Closed ray1422 closed 5 years ago

ray1422 commented 5 years ago

Hello, I want to process full-HD images by the model which trained with patches sized 256x256, is it possible? And how to do that? Thanks!

ray1422 commented 5 years ago

I just modified something in inference.py, and change placeholder shape in export_grphy.py to None. It can accept any size now.

export_grphy.py (on about line 30)

    input_image = tf.placeholder(tf.float32, shape=[None, None, 3], name='input_image')

inference.py (on about line 28)

input_image = tf.image.decode_jpeg(image_data, channels=3)
input_image = tf.image.resize_images(input_image, size=(FLAGS.height, FLAGS.width))
input_image = utils.convert2float(input_image)
input_image.set_shape([FLAGS.height, FLAGS.width, 3])