This repository provides a batch-wise quick processing for calculating CLIP scores. It uses the pretrained CLIP model to measure the cosine similarity between two modalities. The project structure is adapted frompytorch-fidandCLIP. Installation
Create a similarity matrix:matrix = model.similarity_matrixFind the similarity of two documents in the matrix:matrix[model.document_index(document1), model.document_index(document2)]Print the tf*idf values for terms in a document:tfidf_by_term = {} document1.terms.each do |term| tfidf_by...