使用超分辨率来对图像进行重建
Project description
title: imageBuild emoji: 🏃 colorFrom: blue colorTo: blue sdk: gradio sdk_version: 0.2.3.0 app_file: app.py pinned: false
imageBuild
该功能是使用超分辨率来对图像进行重建,可以简单理解成让图片变大变清晰。
效果
重建前 与 重建后
食用方法 - Hugging Face
简单介绍下 Hugging Face
中文名:拥抱脸 ,英文名就和这个表情包一样🤗同样的名字。
Hugging Face 在国内应用非常广泛,入门者可以用它快速用得上科研大牛们训练出的超牛模型,你甚至不需要知道什么是GPT,BERT就可以用他的模型了
Hugging Face 官网:https://huggingface.co/
安装拥抱脸
- 使用 pip 安装
(不建议从 pip 安装,推荐将源码部署在 huggingface 中使用,简单快捷)
pip install imageBuild
- 从 Github 安装
git clone https://github.com/mute23-code/imageBuild.git
- 从 HuggingFace 安装
git clone https://huggingface.co/mute23/imageBuild
别忘了切换文件夹 cd imageBuild
下载 huggingface hub Cli
pip install huggingface_hub
登录
huggingface-cli login
创建存储库
和 Github 差不多,不多赘述
点此创建
添加存储库
git lfs install
推送
git add .
git commit -f "first commit"
git push
到此,你的图像重建的工具就搭建完成了,拥抱脸贴心的为你准备了api,你也可以通过它实现图像重建。不过,由于使用api,线上算力存在限制,所以调用的是较小的模型,导致线上的模型似乎没有本地推断那么好,事实上,效果差距还是很大的。想要获得更好的重建效果,还是得靠你刚才搭建的程序
API = "https://hf.space/embed/{你的id名}/{你的仓库名}/api/predict/"
鸣谢
- xinntao/Real-ESRGAN 超分辨率原理便是基于该仓库
- ppxxxg22/nonebot_plugin_RealESRGAN 提供了封装后的执行文件
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imageBuild-0.2.3.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for imageBuild-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e4ab119568e4959cd22713bb9dc5b18c353f70f5e3371a24a29e387733ca60e |
|
MD5 | bf334758323c6926c81cfe3935979565 |
|
BLAKE2b-256 | e65335a68e4b772cb99462f7c6b03cc1facd92db8c6a15e5d8725ac7c675ed59 |