Skip to main content

Image classifier with zero-shot learning.

Project description

Zeroshot (Python)

Image classification for the masses

Installation

Install via pip: pip install zeroshot

Usage

First, go to usezeroshot.com and create a classifier. See here for more instructions.

Then, in Python (image should be an RGB numpy array with channels last):

import zeroshot

# Create the classifier and preprocessing function.
classifier = zeroshot.Classifier("your model string or path")
preprocess_fn = zeroshot.create_preprocess_fn()

# Run the model!
prediction = classifier.predict(preprocess_fn(image))
print(f"The image is class {prediction}")

Read the docs

See the docs folder for some details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeroshot-0.1.6.tar.gz (20.2 kB view hashes)

Uploaded Source

Built Distribution

zeroshot-0.1.6-py3-none-any.whl (22.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page