本案例通过Deep3DFaceRecon_pytorch实现
前置文档:
https://github.com/sicxu/Deep3DFaceRecon_pytorch
https://blog.csdn.net/flyfish1986/article/details/121861086
本文是在本地没有gpu硬件的支持下的实现方案,并不具体描述部署过程,部署过程建议看上面两个文档地址
准备工程文件
将下载好的Deep3DFaceRecon_pytorch工程文件(详见https://blog.csdn.net/flyfish1986/article/details/121861086中百度网盘的地址)
解压到本地(这个工程已经包含20epoch模型,不用再去谷歌网盘下载了)
项目根目录创建environment.sh
apt-get update && apt-get install -y --no-install-recommends \ pkg-config \ libglvnd0 \ libgl1 \ libglx0 \ libegl1 \ libgles2 \ libglvnd-dev \ libgl1-mesa-dev \ libegl1-mesa-dev \ libgles2-mesa-dev \ cmake \ curl \ libsm6 \ libxext6 \ libxrender-dev # export PYTHONDONTWRITEBYTECODE=1 export PYTHONUNBUFFERED=1 # for GLEW export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH # nvidia-container-runtime export NVIDIA_VISIBLE_DEVICES=all export NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics # Default pyopengl to EGL for good headless rendering support export PYOPENGL_PLATFORM=egl cp docker/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json pip install --upgrade pip pip install ninja imageio imageio-ffmpeg
pip install trimesh==3.9.20 -i https://pypi.douban.com/simple
pip install dominate==2.6.0 -i https://pypi.douban.com/simple
pip install kornia==0.5.5 -i https://pypi.douban.com/simple
pip install scikit-image==0.16.2 -i https://pypi.douban.com/simple
pip install numpy==1.18.1 -i https://pypi.douban.com/simple
pip install matplotlib==2.2.5 -i https://pypi.douban.com/simple
pip install opencv-python==3.4.9.33 -i https://pypi.douban.com/simple
pip install tensorboard==1.15.0 -i https://pypi.douban.com/simple
pip install tensorflow==1.15.0 -i https://pypi.douban.com/simple
pip install kornia==0.5.5 -i https://pypi.douban.com/simple
pip install nvdiffrast==0.2.7 -i https://pypi.douban.com/simple
pip install ninja -i https://pypi.douban.com/simple
这一步主要是初始化环境,包含:安装python库等
在openbayes上申请帐号
https://openbayes.com/注册帐号,充值一些钱(用于租赁gpu服务器)
数据仓库-数据集中将刚才准备好的工程目录打包成zip并上传(会自动解压)
模型训练-创建新容器
启动等待分配资源,启动成功后进入shell
容器中运行
因为我们把数据集挂载到了/openbayes/home
所以我们的工程也在
标签:douban,https,simplepip,pypi,2D,Deep3DFaceRecon,install,com,3D From: https://www.cnblogs.com/zxporz/p/17999691