Skip to content

Rocketloop/img2vec-keras

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img2vec-keras

Image to dense vector embedding. This library uses the ResNet50 model in 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 Keras users.

Install

First you need a Keras backend installed. I have only tested with TensorFlow. Then,

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%