Cannot run the web_demo issue
The web_demo return this when I try running it I cant figure out what's wrong the mean image should be the same size as the input but I get this error
Traceback (most recent call last):
File "./examples/web_demo/app.py", line 222, in <module> start_from_terminal(app)
File "./examples/web_demo/app.py", line 210, in start_from_terminal app.clf = ImagenetClassifier(**ImagenetClassifier.default_args)
File "./examples/web_demo/app.py", line 125, in __init__ mean=np.load(mean_file), channel_swap=(2, 1, 0)
File "/home/ubuntu/caffe/python/caffe/classifier.py", line 34, in __init__ self.transformer.set_mean(in_, mean)
File "/home/ubuntu/caffe/python/caffe/io.py", line 254, in set_mean raise ValueError('Mean shape incompatible with input shape.')
ValueError: Mean shape incompatible with input shape.
Duplicate of #1937 -- fix is in #2058.
In case anyone doesn't know where to look. The fix is in https://github.com/shelhamer/caffe/commit/5c84795572cf08f020dab31af43e7d8478628f44 Where all you need to do is to change this: mean=np.load(mean_file) to this: mean=np.load(mean_file).mean(1).mean(1)