CLIP到底有多强,让我们来试试吧!
CLIP模型及代码地址:GitHub - openai/CLIP: Contrastive Language-Image Pretraining
一、准备环境
先创建一个anaconda虚拟环境,包含python=3.7版本,将该环境命名为clip。成功。
( pytorch=1.7.1 所需 python 版本 >=3.6,本博客决定安装 py3.7 )
conda create --name clip python=3.7
# 切换到虚拟环境clip中
conda activate clip
根据CLIP的github上指示,安装pytorch=1.7.1 及其他所需库。成功。
conda install --yes -c pytorch pytorch=1.7.1 torchvision cudatoolkit=11.0
pip install ftfy regex tqdm
最后,从github上直接安装CLIP。这一步可能会失败。
pip install git+https://github.com/openai/CLIP.git
如果无法访问github网址,会出现如下错误:

解决方法是从github镜像网站上拉取CLIP项目的完整zip包,将下载到的CLIP-main.zip文件保存在本地路径中
1659



被折叠的 条评论
为什么被折叠?



