
批量去水印的軟件github

在 GitHub 上,有許多開(kāi)源的批量去水印工具和庫(kù),以下是幾個(gè)值得關(guān)注的資源:1. ImageAI 基于OpenCV的水印去除項(xiàng)目地址: github.com/hea...
在 GitHub 上,有許多開(kāi)源的批量去水印工具和庫(kù),以下是幾個(gè)值得關(guān)注的資源:
1. ImageAI 基于OpenCV的水印去除
- 項(xiàng)目地址: github.com/heartexlabs/imageai
- 特點(diǎn):
- 提供
remove_watermark
方法,支持自動(dòng)檢測(cè)并去除圖片中的水印。 - 支持批量處理(通過(guò)遍歷文件夾)。
- 需要安裝 OpenCV 和 Python 3.6+。
- 提供
示例代碼:
```python
from imageai import ImageAI
import os
def remove_watermark(input_path, output_path):
ai = ImageAI(input_path)
results = ai.remove_watermark(input_path)
for r in results:
r.save(output_path + '/' + r.get_file_name())
if name == "main":
input_dir = "input_images/"
output_dir = "output_images/"
os.makedirs(output_dir, exist_ok=True)
for filename in os.listdir(input_dir):
if filename.lower().endswith(('.png', '.jpg', '.jpeg')):
input_path = os.path.join(input_dir, filename)
output_path = os.path.join(output_dir, filename)
remove_watermark(input_path, output_path)
```
本文鏈接:http://www.wzyaohuidianqi.cn/gong/424949.html
下一篇:翰文軟件打印如何去水印
