Inception

pip install vectorhub[encoders-image-tfhub]

Details

Release date: 2015-12-11

Vector length: 2048 (default)

Repo: https://tfhub.dev/google/imagenet/inception_v1/feature_vector/4

Paper:

Example

#pip install vectorhub[encoders-image-tfhub]
from vectorhub.encoders.image.tfhub import InceptionV32Vec
model = InceptionV32Vec()
sample = model.read('https://getvectorai.com/assets/hub-logo-with-text.png')
model.encode(sample)

Index and search vectors

Index and search your vectors easily on the cloud using 1 line of code!

username = '<your username>'
email = '<your email>'
# You can request an api_key using - type in your username and email.
api_key = model.request_api_key(username, email)

# Index in 1 line of code
items = ['https://getvectorai.com/_nuxt/img/rabbit.4a65d99.png', 'https://getvectorai.com/_nuxt/img/dog-2.b8b4cef.png', 'https://getvectorai.com/_nuxt/img/dog-1.3cc5fe1.png']
model.add_documents(user, api_key, items)

# Search in 1 line of code and get the most similar results.
model.search('https://getvectorai.com/_nuxt/img/dog-1.3cc5fe1.png')

# Add metadata to your search
metadata = [{'animal': 'rabbit', 'hat': 'no'}, {'animal': 'dog', 'hat': 'yes'}, {'animal': 'dog', 'hat': 'yes'}]
model.add_documents(user, api_key, items, metadata=metadata)

Description

We propose a deep convolutional neural network architecture codenamed "Inception", which was responsible for setting the new state of the art for classification and detection in the ImageNet Large-Scale Visual Recognition Challenge 2014 (ILSVRC 2014). The main hallmark of this architecture is the improved utilization of the computing resources inside the network. This was achieved by a carefully crafted design that allows for increasing the depth and width of the network while keeping the computational budget constant. To optimize quality, the architectural decisions were based on the Hebbian principle and the intuition of multi-scale processing. One particular incarnation used in our submission for ILSVRC 2014 is called GoogLeNet, a 22 layers deep network, the quality of which is assessed in the context of classification and detection.

Working in Colab

If you are using this in colab and want to save this so you don't have to reload, use:

import os 
os.environ['TFHUB_CACHE_DIR'] = "drive/MyDrive/"
os.environ["TFHUB_MODEL_LOAD_FORMAT"] = "COMPRESSED"