Code Monkey home page Code Monkey logo

chainer_stylenet's People

Contributors

apple2373 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chainer_stylenet's Issues

arr does not have a suitable array shape for any mode

 chainer_stylenet-master>  sudo python style_net.py -g -1 -c kinkaku.jpg -s style.png -d kinkaku
Traceback (most recent call last):
  File "style_net.py", line 130, in 
    p=readimage(content_image)#read content image
  File "style_net.py", line 62, in readimage
    img = imresize(img,[224, 224])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/misc/pilutil.py", line 411, in imresize
    im = toimage(arr, mode=mode)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/misc/pilutil.py", line 228, in toimage
    raise ValueError("'arr' does not have a suitable array shape for any mode.")
ValueError: 'arr' does not have a suitable array shape for any mode.

MemoryError when Loading caffe model

After installing all the dependencies, the demo command
"python style_net.py -g -1 -c kinkaku.jpg -s style.png -d kinkaku"
seems begin to work correctly.
And I got:
Loading caffe model.It takes time...
Then got the error:
—————————————————————————————————————————————
Traceback (most recent call last):
File "style_net.py", line 134, in
func = caffe.CaffeFunction('VGG_ILSVRC_19_layers.caffemodel')
File "/usr/lib/python2.6/site-packages/chainer/functions/caffe/caffe_function.py", line 108, in init
net.MergeFromString(model_file.read())
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 841, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 874, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/decoder.py", line 633, in DecodeRepeatedField
if value.add()._InternalParse(buffer, pos, new_pos) != new_pos:
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 874, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/decoder.py", line 633, in DecodeRepeatedField
if value.add()._InternalParse(buffer, pos, new_pos) != new_pos:
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/python_message.py", line 874, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/decoder.py", line 220, in DecodePackedField
value.append(element)
File "/usr/lib/python2.6/site-packages/google/protobuf/internal/containers.py", line 111, in append
self._values.append(self._type_checker.CheckValue(value))
MemoryError
—————————————————————————————————————————————
And I have observed the memory usage,it's not exhausted. So anyone have the same problem?

Muted colours

Hello, thanks for publishing this.

I tested the model and seems the resulting image is a little muted. For example this is the result from the model

img19500_360

If you change the colour profile a little in a editor

img19500_360-1
then you end up with some thing truer to the original style

van-gogh

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.