美文网首页
如何安装rembg

如何安装rembg

作者: 郭彦超 | 来源:发表于2020-11-10 10:51 被阅读0次

rembg是一款不错的背景移除工具,其采用UNet网络进行训练得到分割模型,精度相当高,本人安装过程遇到一些问题,先简单总结如下:

安装依赖

# torch 相关
pip install torch torchvision -f https://download.pytorch.org/whl/torch_stable.html
# 安装pymatting模型
pip install pymatting
# 安装zlib
yum -y install zlib*

安装

pip -y install rembg # --no-deps

下载u2net

将下载后的u2net保存到前用户目录的.u2net\u2net文件中

https://docs.google.com/uc?export=download&id=1ao1ovG1Qtx4b7EoskHXmi2E9rp5CHLcZ

或者使用anaconda进行安装

wget http://10.0.20.11:8899/Anaconda3-2020.07-Linux-x86_64.sh
bash Anaconda3-2020.07-Linux-x86_64.sh
/root/anaconda3/bin/conda
/root/anaconda3/bin/python3
/root/anaconda3/bin/pip install rembg -i https://mirror.baidu.com/pypi/simple

相关文章

网友评论

      本文标题:如何安装rembg

      本文链接:https://www.haomeiwen.com/subject/vmidbktx.html