Thera图像超分辨率模型使用

1 什么是 Thera

Thera:可能是目前最好的图像超分辨率技术
介绍: therasr.github.io/
demo: huggingface.co/spaces/prs-eth/thera ​​​
在这里插入图片描述

2 准备工作

2.1 python 执行环境

# 创建并激活虚拟环境
conda create -n py310 python=3.10
conda activate py310

# 代码下载
git clone https://github.com/prs-eth/thera.git

# 修改安装包文件  requirements.txt
# 将 jaxlib==0.4.11+cuda11.cudnn86 修改为 jax==0.4.11 CPU版本
# 安装依赖包
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple 

2.2 模型下载

访问 hugging face 镜像网站下载模型文件https://hf-mirror.com/prs-eth/thera-rdn-pro/tree/main,下载模型文件 model.pkl,并将其放在 super_resolve.py 同级目录下
在这里插入图片描述

3 模型使用

# 准备工作就绪之后 执行命令
# scale 为图像缩放参数
./super_resolve.py sample.jpg sample_res.jpg --scale 3.14 --checkpoint model.pkl

参考:
https://therasr.github.io/
https://github.com/prs-eth/thera
https://hf-mirror.com/prs-eth/thera-rdn-pro/tree/main

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值