Skip to content

jaredwinick/img2vec-keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img2vec-keras

Image to dense vector embedding. This library uses the ResNet50 model in TensorFlow Keras, pre-trained on Imagenet, to generate image embeddings via https://keras.io/getting-started/faq/#how-can-i-obtain-the-output-of-an-intermediate-layer. Basically a clone of https://github.com/christiansafka/img2vec for TensorFlow Keras users.

Install

img2vec_keras uses the keras module shipped with tensorflow. To install img2vec_keras and its dependencies

pip install git+git://github.com/jaredwinick/img2vec-keras.git

Usage

from img2vec_keras import Img2Vec
img2vec = Img2Vec()
x = img2vec.get_vec('/path/to/image/dog1.jpg')

Examples

Basic example with cosine similarity of vectors

Colab notebook using t-SNE to visualize image vectors

Contributors

  • Thanks to @gmgeorg for upgrading to TensorFlow 2.0

About

Image to dense vector embedding. Clone of https://github.com/christiansafka/img2vec for Keras users

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages