基于 Pytorch 的AI 去水印方法 Watermark-Removal-Pytorch github 还有哪些好用的方法?
Watermark Removal using Deep Image Priors with Pytorchhttps://github.com/braindotai/Watermark-Removal-Pytorch
适用于一定情景,一定的效果. 没有PS那么自由强大,但是可以代码直接使用.不用开PS.
{:1_236:} https://quququ.cn/
基于AI的 收费的 ,估计算法就是 楼上的PyTorch 的
但是做好界面,包装成网页这个是真的有门槛的, 所以高清的要收点小钱.
PS 各种水印去除, 如果能自动就这些技能就全费了
图片水印的类型很多. 很难用一招吃遍.
https://www.bilibili.com/video/BV1qu411t7CG/?spm_id_from=333.337.search-card.all.click&vd_source=ae1d5f8d0c7abdd93954ea3bcebcb863
bing_watermark_remover_pythonPublic
没有万能去水印方法.
GIT 其他方法 - 直到特定区域 的 CV2 方法.
bing_watermark_remover_python/app.py at master · AmirHosseinAsa/bing_watermark_remover_python · GitHub
import cv2
import numpy as np
import os
def remove_watermark(image_path, output_path):
# Load the image
image = cv2.imread(image_path)
# Determine the coordinates of the region to remove
bottom_left_x = 0
bottom_left_y = image.shape - 50
top_right_x = 50
top_right_y = image.shape
# Create a mask for the main region to remove
mask = np.zeros(image.shape[:2], dtype=np.uint8)
mask = 255
# Pre-process the image (optional)
# Apply image denoising or blurring techniques
# Inpaint the main region
image_without_watermark = cv2.inpaint(image, mask, 3, cv2.INPAINT_TELEA)
# Create a mask for the remaining small region to remove
small_mask = np.zeros(image.shape[:2], dtype=np.uint8)
small_mask[-60:, :15] = 255
# Inpaint the remaining small region
image_without_watermark = cv2.inpaint(image_without_watermark, small_mask, 3, cv2.INPAINT_TELEA)
# Post-process the image (optional)
# Apply additional adjustments or refinements, such as blending or texture synthesis
# Save the image without the watermark
cv2.imwrite(output_path, image_without_watermark)
# Input and output folders
input_folder = "input"
output_folder = "output"
# Iterate over the files in the input folder
for filename in os.listdir(input_folder):
if filename.endswith(".jpeg") or filename.endswith(".jpg"):
# Create the input and output paths for each image
image_path = os.path.join(input_folder, filename)
output_path = os.path.join(output_folder, filename)
# Remove watermark and save the image
remove_watermark(image_path, output_path)
页:
[1]