Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. python -m pip install -U pip setuptools
  2. python -m pip install matplotlib
  3.  
  4. import numpy as np
  5. import matplotlib.pyplot as plt
  6. caffe_root = './'
  7. import sys
  8. sys.path.insert(0, caffe_root + 'python')
  9. import caffe
  10. plt.rcParams['figure.figsize'] = (10, 10)
  11. plt.rcParams['image.interpolation'] = 'nearest'
  12. plt.rcParams['image.cmap'] = 'gray'
  13. im = np.array(caffe.io.load_image('./examples/images/cat_gray.jpg', color=False)).squeeze()
  14. plt.title("original image")
  15. plt.axis('off')
  16. plt.imshow(im)
  17.  
  18. >>> plt.imshow(im)
  19. <matplotlib.image.AxesImage object at 0x7f16184622d0>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement