In [1]:
import tensorflow as tf
from scipy.misc import imread, imresize, imshow
import numpy as np
import matplotlib.pyplot as plt
In [2]:
img = imread('hen.jpg', mode='RGB')
print 'shape = ', img.shape
plt.imshow(img)
plt.show()
Obtain embeddings from vgg net, input is image matrix and output is a vector image.
In [3]:
from dvd import dvd
img_embedding = dvd.get_embedding_x(img)
print img_embedding.shape
In [ ]: