摘要: !pip install scikit-image from skimage import io, img_as_float from skimage.metrics import structural_similarity as ssim import matplotlib.pyplot as p 阅读全文
posted @ 2024-07-01 16:26 Anonytt 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 如果两张图片不一样大,预处理: !pip install Pillow from PIL import Image # 打开图像 img1 = Image.open('img1.jpg') img2 = Image.open('img2.jpg') # 调整图像大小,统一为img1的大小 img2 阅读全文
posted @ 2024-07-01 16:19 Anonytt 阅读(4) 评论(0) 推荐(0) 编辑
摘要: !git clone https://github.com/facebookresearch/dino.git !pip install timm import torch import timm from PIL import Image from torchvision import trans 阅读全文
posted @ 2024-07-01 16:11 Anonytt 阅读(7) 评论(0) 推荐(0) 编辑
摘要: !pip install torch torchvision ftfy regex !pip install git+https://github.com/openai/CLIP.git import torch import clip from PIL import Image from io i 阅读全文
posted @ 2024-07-01 16:04 Anonytt 阅读(3) 评论(0) 推荐(0) 编辑