DragGAN分析环境本地部署
有偿咨询和需求解决:如需要进行GPU环境配置,需要训练自己的图片,请留言或者直接联系本人:kriswcyYQ。今天给大家复现DragGAN实现图片拖拉拽编辑,效果如下图,如有疑问,欢迎联系本人!源代码地址:https://github.com/XingangPan/DragGAN。2.git安装及克隆代码到本地。
·
今天给大家复现DragGAN实现图片拖拉拽编辑,效果如下图,如有疑问,欢迎联系本人!!!!
源代码地址:https://github.com/XingangPan/DragGAN
1.环境配置
####安装miniconda环境,进行深度学习环境管理
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
####隔离环境
conda config --set auto_activate_base false
conda env list
####安装环境,至少是3.8以上,test是DragGAN环境名称
conda create --name test python=3.9
###激活环境test,进行DragGAN环境配置
conda activate test
2.git安装及克隆代码到本地
#####git安装,需要添加git环境变量
winget install --id Git.Git -e --source winget
#####克隆代码到本地
git clone https://github.com/XingangPan/DragGAN.git
3.清华源配置
####尝试无GPU安装环境,添加安装源加速安装
###添加清华镜像源
cd DragGAN
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
- DragGAN环境安装
####安装DragGAN环境
pip install -r requirements.txt
####下载预训练模型,模型加载会使用
python scripts/download_model.py
####使用
python visualizer_drag_gradio.py
5.代码调试与测试
报错问题:'dict' object has no attribute 'img_resolution'
初步解决方案:pip install gradio==3.36.1
问题解决参考:!python /content/DragGAN/visualizer_drag_gradio.py Problem · Issue #409 · XingangPan/DragGAN (github.com)
6.其他需求
有偿咨询和需求解决:如需要进行GPU环境配置,需要训练自己的图片,请留言或者直接联系本人:kriswcyYQ。
更多推荐
所有评论(0)