andersbll / neural_artistic_style

Neural Artistic Style in Python
MIT License
2.18k stars 482 forks source link

KeyError: 'meta' #57

Open foolself opened 7 years ago

foolself commented 7 years ago

I just have try to run the example:

python neural_artistic_style.py --subject images/tuebingen.jpg --style images/starry_night.jpg

and I get the error:

CUDArray: CUDA back-end not available, using NumPy.
Traceback (most recent call last):
  File "neural_artistic_style.py", line 138, in <module>
    run()
  File "neural_artistic_style.py", line 99, in run
    layers, pixel_mean = vgg_net(args.network, pool_method=args.pool_method)
  File "/home/john/code/pycode/neural_artistic_style/matconvnet.py", line 27, in vgg_net
    img_mean = matconvnet['meta'][0][0][2][0][0][2]
KeyError: 'meta'

Anybody same? What mean is here of key "meta"?

foolself commented 7 years ago

I got it, because I downloaded a wrong imagenet-vgg-verydeep-19.mat file, there is none a key named "meta" in this file, so had better download the file from the link README provide.