AvatarCLIP配置排坑

1.论文

AvatarCLIP

2.环境配置

项目使用pytorch为1.7.0版本

在环境配置时,下面这三个可以直接在安装requirements.txt时一块自动安装。

git+https://github.com/openai/CLIP.git

git+https://github.com/nghorbani/human_body_prior.git

git+https://github.com/nghorbani/body_visualizer.git

但可能因网络会出现以下问题 ,解决方法如下

#单独安装

pip install git+https://github.com/openai/CLIP.git

#或直接下载源码自己安装

git clone https://github.com/openai/CLIP.git

3.项目运行

在运行下面的代码时,如果环境没问题较快就会生成.obj文件,若长时间等待则是因为显卡和上面那个项目不兼容的问题,并且也不会生成结果。

python main.py --target_txt 'a 3d rendering of a strong man in unreal engine'

#使用abrahamlincoln的配置文件生成林肯的模型(两个不是同一个mian)

python main.py --mode train_clip --conf confs/examples/abrahamlincoln.conf

源项目配置需要使用30多g的显存,单卡生成模型要24h 

4.问题解决

问题1

出现下面的问题

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/miniconda3/envs/ACLIP/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

这样解决      解决方式

sudo apt-get install libgl1-mesa-glx

问题2 

ImportError: ('Unable to load OpenGL library', 'libgcrypt.so.11: cannot open shared object file: No such file or directory', '/root/anaconda3/envs/ACLIP/lib/libOSMesa.so.8', '/root/anaconda3/envs/ACLIP/lib/libOSMesa.so.8')

这是缺少 libgcrypt.so.11这个文件,下载后把文件复制到相应位置即可 解决办法

curl -o libgcrypt11.rpm ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/bosconovic:/branches:/home:/elimat:/lsi/openSUSE_Leap_15.1/x86_64/libgcrypt11-1.5.4-lp151.23.29.x86_64.rpm

rpm2cpio libgcrypt11.rpm | cpio -id

问题3

Exception: pyglet 2.0.5 requires Python 3.8 or newer.

将版本降为1.5.9

问题4

cuda问题。配置环境时不要用项目中给的方式安装pytorch

python main.py --target_txt 'a 3d rendering of a strong man in unreal engine'

#用带cuda版本的方式

pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

问题5

neural_renderer安装.

这个项目很老,其中AvatarCLIP项目提供的已经可以适配高版本的pytorch(但还会有警报)

特别注意:安装前检测nvcc,即cuda。如果自己安装cuda可能会有版本不对等问题,最好直接找个带nvcc的镜像。cuda11.3不代表有nvcc。

#查看版本

nvcc --version

这个项目不能使用3090等高算力显卡(>=8.0的显卡,3090是8.6)安装其他教程修改算力可以配置成功这个项目,但跑不起来AvatarCLIP 。这个跟pytorch安装方式有关

安装neural_renderer_pytorch排坑

问题6

安装skimage

pip install scikit-image

安装tensorboard

pip install tensorboard

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值