The Watermark Removal model is an image processing model based on neural networks. It is designed to remove watermarks from images while preserving the original image quality. The model utilizes an encoder-decoder structure with skip connections to maintain fine details during the watermark removal process.
import torch
from torchvision import transforms
from PIL import Image
from watermark_remover import WatermarkRemover
import numpy as np
image_path = "path to your test image"# Replace with the path to your test image
device = torch.device("cuda"if torch.cuda.is_available() else"cpu")
# Load the trained model
model = WatermarkRemover().to(device)
model_path = "path to your model.pth"# Replace with the path to your saved model
model.load_state_dict(torch.load(model_path, map_location=device))
model.eval()
transform = transforms.Compose([transforms.Resize((256, 256)),
transforms.ToTensor(),])
watermarked_image = Image.open(image_path).convert("RGB")
original_size = watermarked_image.size
input_tensor = transform(watermarked_image).unsqueeze(0).to(device)
with torch.no_grad():
output_tensor = model(input_tensor)
predicted_image = output_tensor.squeeze(0).cpu().permute(1, 2, 0).clamp(0, 1).numpy()
predicted_pil = Image.fromarray((predicted_image * 255).astype(np.uint8))
predicted_pil = predicted_pil.resize(original_size, Image.Resampling.LANCZOS)
predicted_pil.save("predicted_image.jpg", quality=100)
Limitations and Considerations
Performance may vary depending on watermark complexity and opacity
Best results achieved with semi-transparent watermarks
Model trained on 256x256 images; performance may vary with different resolutions
GPU recommended for faster inference
Training Details
Dataset
: The model was trained on a custom dataset consisting of 20,000 images with watermarks in various styles and intensities.
Training Time
: The model was trained for 200 epochs on an NVIDIA GeForce RTX 3060 GPU.
Loss Function
: The model uses a combination of MSE (Mean Squared Error) and perceptual loss to optimize watermark removal quality.
Model Evaluation
The model has been evaluated using Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) on a test set of watermarked images, achieving an average PSNR of 30.5 dB and an SSIM of 0.92.
Compute Infrastructure
Hardware
NVIDIA GeForce RTX 3060 card
Software
The model was trained on Jupyter Notebook environment.
Model Card Contact
For inquiries and contributions, please contact us at
[email protected]
@ModelCard{
author = {Nehul Agrawal and
Priyal Mehta},
title = {Watermark Removal Using Neural Networks},
year = {2025}
}
Runs of foduucom Watermark_Removal on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About Watermark_Removal huggingface.co Model
Watermark_Removal huggingface.co is an AI model on huggingface.co that provides Watermark_Removal's model effect (), which can be used instantly with this foduucom Watermark_Removal model. huggingface.co supports a free trial of the Watermark_Removal model, and also provides paid use of the Watermark_Removal. Support call Watermark_Removal model through api, including Node.js, Python, http.
Watermark_Removal huggingface.co is an online trial and call api platform, which integrates Watermark_Removal's modeling effects, including api services, and provides a free online trial of Watermark_Removal, you can try Watermark_Removal online for free by clicking the link below.
foduucom Watermark_Removal online free url in huggingface.co:
Watermark_Removal is an open source model from GitHub that offers a free installation service, and any user can find Watermark_Removal on GitHub to install. At the same time, huggingface.co provides the effect of Watermark_Removal install, users can directly use Watermark_Removal installed effect in huggingface.co for debugging and trial. It also supports api for free installation.