Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python -m pip install -U pip setuptools
- python -m pip install matplotlib
- import numpy as np
- import matplotlib.pyplot as plt
- caffe_root = './'
- import sys
- sys.path.insert(0, caffe_root + 'python')
- import caffe
- plt.rcParams['figure.figsize'] = (10, 10)
- plt.rcParams['image.interpolation'] = 'nearest'
- plt.rcParams['image.cmap'] = 'gray'
- im = np.array(caffe.io.load_image('./examples/images/cat_gray.jpg', color=False)).squeeze()
- plt.title("original image")
- plt.axis('off')
- plt.imshow(im)
- >>> plt.imshow(im)
- <matplotlib.image.AxesImage object at 0x7f16184622d0>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement