Skip to main content

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"

Optional parameters:

  • num_similar that specifies the number of similar images to return. This number is capped at 50. If you would like to get more similar images per request, please contact us at https://www.ternaus.com/#contact. default value is 1.
  • get_labels that specifies whether to return labels for the image. default value is None. Right now only coco_yolov7 is supported.`

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 >)

Metadata

Release files for getsimilar 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getsimilar 0.0.5
File Size Uploaded
getsimilar-0.0.5.tar.gz 8.5 kB Details

Release files / getsimilar-0.0.5.tar.gz

Download URL getsimilar-0.0.5.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c50b1848fbcff7e9ca898c0f0701e8b11f6fdda22f5be9358fda5a6bc8846f31
BLAKE2b-256 checksum
How to use checksums
6c5e187c5d3c35520cf5dfdc18d3bbabafb2d1ba5cf25f61f71cd47dbd8fcbae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page