Skip to main content

Image search: image/text => images.

Project description

Get similar images

This tool is a wrapper over an API that returns URLs and similarity scores for similar images for a given image.

You can find a demo of the tool here.

The description of the API can be found here.

Installation

pip install -U getsimilar

Get an API token

Usage

You pass:

  • Image in the form of the numpy array or PIL image.
  • URL to the image:
  • Text query, for example: "Girls in weird hats"

All requests have a parameter num_similar that specifies the number of similar images to return. This number is capped at 20. If you would like to get more similar images per request, please contact us at https://www.ternaus.com/#contact.

From image

from getsimilar.get import from_image

urls = from_image(<numpy or PIL image>, num_similar=<the number of similar images>)

From URL

from getsimilar.get import from_url

urls = from_url(url, num_similar=<the number of similar images>)

From text

from getsimilar.get import from_text

urls = from_text(text, num_similar=<the number of similar images>)

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

getsimilar-0.0.4.tar.gz (8.1 kB view details)

Uploaded Source

File details

Details for the file getsimilar-0.0.4.tar.gz.

File metadata

  • Download URL: getsimilar-0.0.4.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.8.2 requests/2.23.0 setuptools/63.4.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.3

File hashes

Hashes for getsimilar-0.0.4.tar.gz
Algorithm Hash digest
SHA256 36e89c5f6ffb5952b2bd34c29894c66af52e3e492633bb81b9a24836b1b781b6
MD5 e83c5fbceab90cb1f0956e15be9c3a38
BLAKE2b-256 3e47410af1cbfe07c08af1dbf5c117eae40dfd43565ba083379e783262e6b447

See more details on using hashes here.

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