File size: 277 Bytes
637af2f
31e192b
 
 
637af2f
 
31e192b
 
637af2f
31e192b
637af2f
31e192b
 
 
 
637af2f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import io
import os
import re
import sys

import cv2
import numpy as np
import pyiqa
import timm
import torch
from sentence_transformers import SentenceTransformer

device = "cuda" if torch.cuda.is_available() else "cpu"


image_sim_model = SentenceTransformer("clip-ViT-B-32")