-1

for j,y in enumerate(sorted(glob.glob('images/*'))):

  z=net.predict([caffe.io.load_image(y)*255.0])[0]

While the following code on Python3, I am getting this output

* self._open(**self.request.kwargs.copy()) TypeError: _open() got an unexpected keyword argument 'as_grey'*

Harald K
  • 26,314
  • 7
  • 65
  • 111
Akash
  • 1
  • 3

1 Answers1

0

I figured out the issue actually.

In caffe/python/caffe/io.py  line 302
 img = skimage.img_as_float(skimage.io.imread(filename, as_grey=not 
         color)).astype(np.float32)

I changed it to

img = skimage.img_as_float(skimage.io.imread(filename)).astype(np.float32)
Akash
  • 1
  • 3