Skip to content

cobanov/clip-image-similarity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Similarity Calculator

This project provides a simple image similarity calculator using the CLIP (Contrastive Language-Image Pre-training) model. It consists of two Python scripts, predictor.py and app.py, that allow you to calculate the cosine similarity between two images.

Requirements

  • Python 3.7+
  • PyTorch
  • CLIP (PyTorch)
  • PIL (Python Imaging Library)
  • FastAPI (for running app.py)

Getting Started

  1. Clone this repository to your local machine:
git clone https://github.com/cobanov/clip-image-similarity
cd clip-image-similarity
  1. Build and run the docker image
docker build -t image_similarity .
docker run -d -p 8002:8002 image_similarity