超强图像处理神器:支持去水印、去背景、物体擦除、局部重绘等,开源且免费!


IOPaint[1] 是一个免费、开源且完全可以自行托管的图像修复和图像扩展工具,支持 CPU 和 GPU。
近期热文
当 AI 遇上爬虫:让数据提取变得前所未有的简单!
超强 OCR 神器:支持批量 OCR、文档识别、公式识别,离线可用、完全免费!
2024 年最完整的 AI Agents 清单来了,涉及 13 个领域,上百个 Agents!
IOPaint 主要功能
你可以在 IOPaint 中使用多种模型来处理图像,实现以下几种功能:
擦除:移除图像上任何不需要的物体、缺陷、水印或人物。
重绘:对图像的特定部分进行修改,添加新物体,或替换图像中的任何内容。
扩展:在图像周围生成新的像素,使其变得更大。
除了上述的功能之外,IOPaint 提供了强大的插件机制,来扩展 IOPaint 的功能。
Segment Anything[2]:精准且快速的物体分割。
RemoveBG[3]:移除图片背景或为前景对象生成蒙版。
Anime Segmentation[4]:与 RemoveBG 功能类似,该模型是专门针对动漫图像训练的。
RealESRGAN[5]:超分辨率(图像高清化)。
GFPGAN[6]/RestoreFormer[7]:脸部修复。
IOPaint 使用示例
物体擦除
使用 LaMa[8] 模型,擦除不想要的物体。
除了 LaMa 模型之外,IOPaint 还支持使用 MAT[9]、MIGAN[10]、LDM[11]、ZITS[12]、FcF[13] 和 Manga[14] 等模型来实现物体擦除。
物体替换
使用 PowerPaint[15] 模型,把小狗狗替换成达斯·维德(星球大战电影中的虚构人物)。
图像扩展
使用 PowerPaint 模型来扩展图像。
绘制文本
使用 AnyText[16] 模型,替换图像上已有的文本。
IOPaint 快速上手
启动 WebUI
IOPaint 提供了一个方便的 WebUI,让你可以使用最新的 AI 模型编辑图像。运行以下命令即可轻松安装并启动 IOPaint:
# In order to use GPU, install cuda version of pytorch first.# pip3 install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/cu118# AMD GPU users, please utilize the following command, only works on linux, as pytorch is not yet supported on Windows with ROCm.# pip3 install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/rocm5.6pip3 install iopaintiopaint start --model=lama --device=cpu --port=8080
之后,你就可以在浏览器中打开 http://localhost:8080 地址,开始使用 IOPaint。所有模型将在启动时会自动下载,如果要更改下载目录,可以添加 --model-dir 参数。
使用插件
您可以在启动服务时指定使用哪些插件,也可以使用 iopaint start --help 查看启用插件的命令。
iopaint start --enable-interactive-seg --interactive-seg-device=cuda
批量处理图像
你还可以在命令行中使用 IOPaint 批量处理图像:
iopaint run --model=lama --device=cpu \--image=/path/to/image_folder \--mask=/path/to/mask_folder \--output=output_dir
--image 是包含输入图像的文件夹,--mask 是包含相应遮罩图像的文件夹。当 --mask 是遮罩文件的路径时,所有图像都将使用该遮罩进行处理。
往期文章
开源流式数字人来了:实现音视频同步对话,基本可达商用效果!
PDF 转 Markdown 神器,精准且快速:支持 90 多种语言 OCR,还支持提取表格、图片和公式!
自动化爬虫神器:把网页转成大模型所需数据,助力 AI 应用与大模型训练全面优化!
Text2SQL 效果不好?不要错过这个神器!自带 RAG、复杂数据集准确度高,还能自训练模型
3 款强大的开源低代码 LLM 编排工具,可视化定制专属 AI Agent 和 AI 工作流!
25.4K Star 低代码LLM编排工具:终于支持 Multi Agent,内置 5 大 Multi Agent 开箱即用!
欢迎您与我交流 AI 技术/工具

关注 AI 真好玩,带你玩转各类 AI 工具,掌控数字未来!
如果这篇文章对您有所帮助,请点赞、关注,并分享给您的朋友。感谢您的支持!
参考资料
[1] 
IOPaint: https://github.com/Sanster/IOPaint[2] 
Segment Anything: https://iopaint.com/plugins/interactive_seg[3] 
RemoveBG: https://iopaint.com/plugins/rembg[4] 
Anime Segmentation: https://iopaint.com/plugins/anime_seg[5] 
RealESRGAN: https://iopaint.com/plugins/RealESRGAN[6] 
GFPGAN: https://iopaint.com/plugins/GFPGAN[7] 
RestoreFormer: https://iopaint.com/plugins/RestoreFormer[8] 
LaMa: https://www.iopaint.com/models/erase/lama[9] 
MAT: https://www.iopaint.com/models/erase/mat[10] 
MIGAN: https://www.iopaint.com/models/erase/migan[11] 
LDM: https://www.iopaint.com/models/erase/ldm[12] 
ZITS: https://www.iopaint.com/models/erase/zits[13] 
FcF: https://www.iopaint.com/models/erase/fcf[14] 
Manga: https://www.iopaint.com/models/erase/manga[15] 
PowerPaint: https://www.iopaint.com/models/diffusion/powerpaint[16] 
AnyText: https://www.iopaint.com/models/diffusion/anytext
到顶部