新建环境: conda create -n rembg python=3.8
激活环境 activate rembg
cmd输入 pip install torch1.7.1+cpu torchvision0.8.2+cpu -f https://download.pytorch.org/whl/torch_stable.html
下载rembg pip install rembg
下载模型 https://pan.baidu.com/s/1IJOZiELPL9KJ8andi9fpyA 密码lgug
放在用户下面新建文件夹 .u2net
cd 到桌面 cd Desktop
处理图片 rembg -o output_test.jpg test.jpg
效果   

|