首页 > 其他分享 >照片去水印神器

照片去水印神器

时间:2023-01-19 14:22:05浏览次数:36  
标签:照片 lama -- zlib 水印 devel 神器 usr python3

yum -y install wget zlib zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel gcc gcc-c++ vim mesa-libGL.x86_64
mkdir /usr/local/python3 && cd /usr/local/python3
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
tar xf Python-3.9.0.tgz
cd /usr/local/python3/Python-3.9.0
./configure prefix=/usr/local/python3 --with-ensurepip=install
make -j 4 && make install

vim /etc/profile
export PYTHON_HOME=/usr/local/python3
export PATH=$PYTHON_HOME/bin:$PATH

source /etc/profile


wget https://bootstrap.pypa.io/pip/3.6/get-pip.py
python3  get-pip.py           # 服务器默认有了pip了 
pip3 install lama-cleaner
# Models will be downloaded at first time used
lama-cleaner --model=lama --device=cpu --port=8080
# Lama Cleaner is now running at http://localhost:8080

# 报错
ImportError: /lib64/libz.so.1: version `ZLIB_1.2.9' not found
# 解决
wget http://www.zlib.net/fossils/zlib-1.2.9.tar.gz 
tar xf zlib-1.2.9.tar.gz
cd zlib-1.2.9/
./configure && make && make install
cp libz.so.1.2.9  /usr/lib64/
cd /usr/lib64/
rm -f libz.so.1
ln -s  libz.so.1.2.9 libz.so.1

# 再来执行
lama-cleaner --model=lama --device=cpu --host=192.168.1.121 --port=8080

=============================================
第二种安装方法
# 创建虚拟环境
conda create -n lamaCleaner python==3.8
# 激活环境
conda activate lamaCleaner
# 安装库
pip install lama-cleaner
# 启动web
# Models will be downloaded at first time used
lama-cleaner --model=lama --device=cpu --host=192.168.1.121 --port=8080
# Lama Cleaner is now running at http://localhost:8080
=============================================

打开浏览器访问 192.168.1.121:8080

标签:照片,lama,--,zlib,水印,devel,神器,usr,python3
From: https://www.cnblogs.com/smlile-you-me/p/17061410.html

相关文章