Skip to content
Extract deep learning features from images using simple python interface
Python
Branch: master
Clone or download
Latest commit d82fb55 Aug 31, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
image_features Add more documentation and util to filter invalid images Aug 31, 2019
tests Add more documentation and util to filter invalid images Aug 31, 2019
.gitignore
README.md Readme edits Aug 31, 2019
requirements.txt initial commit Aug 31, 2019
setup.py initial commit Aug 31, 2019

README.md

Deep Learning Image Embeddings/Features That Work

You are looking for generic image features for

  1. Image classification
  2. Image retrieval
  3. Image similarity and so on.

Sometimes, you are not looking for latest and greatest. You just need something that just works. With image_features, you can extract such deep learning based features from images in a single line of code:

from image_features import image_features
features = image_features(['your_image_1.png', 'your_image_2.jpg'])

You can use these features to train a scikit-learn classification model:

from sklearn import linear_model
from image_features import image_features
X_train = image_features(['your_image_1.png', 'your_image_2.jpg'])
y_train = ['cat', 'dog']
clf = linear_model.LogisticRegression()
clf.fit(X_train, y_train)

Package internally uses PyTorch and imagenet pretrained deep learning model like resnet50 (default).

Install

pip install -U git+https://github.com/chsasank/image_features.git

Tutorial

I have written an accompanying tutorial to help you get started.

Aim

  • Inspired by face_recognition and how it just works most of the time.
  • Simple yet fairly complete implementation.
  • If there is enough interest in this, put on pypi
You can’t perform that action at this time.