[开源] 基于 Pytorch 的AI 去水印方法 Watermark-Removal-Pytorch github 还有哪些好用的方...

查看:425 |回复:4 | 2024-2-17 20:37:47

您需要 登录 才可以下载或查看,没有账号?注册

x
Watermark Removal using Deep Image Priors with Pytorch
https://github.com/braindotai/Watermark-Removal-Pytorch

image.png

适用于一定情景,一定的效果. 没有PS那么自由强大,但是可以代码直接使用.不用开PS.
image.png


评分

参与人数 1元素币 +1 活跃度 +1 展开 理由
gxfc5688 + 1 + 1 腰间盘都没有你突出

查看全部评分

2024-2-17 20:37:47  
 赞 赞 0

使用道具 登录

4个回答,把该问题分享到群,邀请大神一起回答。
10#
回复 收起回复
2024-7-29 12:13:44   回复
 赞 赞 0

使用道具 登录

5#
https://quququ.cn/


基于AI的 收费的 ,估计算法就是 楼上的PyTorch 的
但是做好界面,包装成网页这个是真的有门槛的, 所以高清的要收点小钱.
image.png



回复 收起回复
2024-2-17 21:22:24   回复
 赞 赞 0

使用道具 登录

4#

PS 各种水印去除, 如果能自动就这些技能就全费了
图片水印的类型很多. 很难用一招吃遍.
https://www.bilibili.com/video/BV1qu411t7CG/?spm_id_from=333 ... rce=ae1d5f8d0c7abdd93954ea3bcebcb863

1708175692794.png
1708175686790.png

回复 收起回复
2024-2-17 21:16:26   回复
 赞 赞 0

使用道具 登录

3#

bing_watermark_remover_python  Public
没有万能去水印方法.

GIT 其他方法 - 直到特定区域 的 CV2 方法.

bing_watermark_remover_python/app.py at master · AmirHosseinAsa/bing_watermark_remover_python · GitHub

  1. import cv2
  2. import numpy as np
  3. import os

  4. def remove_watermark(image_path, output_path):
  5.     # Load the image
  6.     image = cv2.imread(image_path)

  7.     # Determine the coordinates of the region to remove
  8.     bottom_left_x = 0
  9.     bottom_left_y = image.shape[0] - 50
  10.     top_right_x = 50
  11.     top_right_y = image.shape[0]

  12.     # Create a mask for the main region to remove
  13.     mask = np.zeros(image.shape[:2], dtype=np.uint8)
  14.     mask[bottom_left_y:top_right_y, bottom_left_x:top_right_x] = 255

  15.     # Pre-process the image (optional)
  16.     # Apply image denoising or blurring techniques

  17.     # Inpaint the main region
  18.     image_without_watermark = cv2.inpaint(image, mask, 3, cv2.INPAINT_TELEA)

  19.     # Create a mask for the remaining small region to remove
  20.     small_mask = np.zeros(image.shape[:2], dtype=np.uint8)
  21.     small_mask[-60:, :15] = 255

  22.     # Inpaint the remaining small region
  23.     image_without_watermark = cv2.inpaint(image_without_watermark, small_mask, 3, cv2.INPAINT_TELEA)

  24.     # Post-process the image (optional)
  25.     # Apply additional adjustments or refinements, such as blending or texture synthesis

  26.     # Save the image without the watermark
  27.     cv2.imwrite(output_path, image_without_watermark)

  28. # Input and output folders
  29. input_folder = "input"
  30. output_folder = "output"

  31. # Iterate over the files in the input folder
  32. for filename in os.listdir(input_folder):
  33.     if filename.endswith(".jpeg") or filename.endswith(".jpg"):
  34.         # Create the input and output paths for each image
  35.         image_path = os.path.join(input_folder, filename)
  36.         output_path = os.path.join(output_folder, filename)

  37.         # Remove watermark and save the image
  38.         remove_watermark(image_path, output_path)
点击此处复制文本

回复 收起回复
2024-2-17 20:57:58   回复
 赞 赞 0

使用道具 登录

CG 游戏行业专业问题

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表