Skip to content

Seed image with arbitrary images#3

Open
ghost wants to merge 6 commits into
wxs:developfrom
MikeHeald:master
Open

Seed image with arbitrary images#3
ghost wants to merge 6 commits into
wxs:developfrom
MikeHeald:master

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jan 25, 2018

I don't know if you're interested in this at all, but I wanted to play around with it and thought you might find it useful. Add the argument "--seed-image /path/to/seed/image.jpg" to seed with an arbitrary image file. Note that adjusting the output size can only be done with "output_width" and maintains the aspect ratio of the input image. So, if you give a seed image and specify only output_height, the original image size is used.

ryanfb and others added 6 commits October 17, 2017 16:51
You might want to make the version number even higher here, but before keras 1.1.0 you'll get the error: `ModuleNotFoundError: No module named 'keras.applications'`. Before keras 2.0.0 you'll get the error: `ImportError: cannot import name 'conv_utils'`
If I let this default to the the Theano backend, I get:

```
Traceback (most recent call last):
  File "synthesize.py", line 91, in <module>
    pyramid_model = gram.make_pyramid_model(args.octaves, args.padding_mode)
  File "/Users/ryan/mess/2017/42/subjective-functions/gram.py", line 242, in make_pyramid_model
    level = reduce_layer(padding_mode=padding_mode)(gaussian_pyramid[-1])
  File "/usr/local/lib/python3.6/site-packages/keras/engine/topology.py", line 602, in __call__
    output = self.call(inputs, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/keras/layers/core.py", line 650, in call
    return self.function(inputs, **arguments)
  File "/Users/ryan/mess/2017/42/subjective-functions/gram.py", line 150, in fn
    return K.conv2d(K.conv2d(x, kernel_3d, strides=(2,1)),
  File "/usr/local/lib/python3.6/site-packages/keras/backend/theano_backend.py", line 1878, in conv2d
    kernel_shape = kernel.eval().shape
AttributeError: 'numpy.ndarray' object has no attribute 'eval'
```
Specify TensorFlow backend in README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants