Update README.md
Browse files123---license: apache-2.0---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119---tags:- watermark-removal- image-enhancement- watermark-removal- image-deblurring- watermark-cleaner- ai-image-enhancement- watermarked-image-processing- watermark-free-images- image-restoration- neural-networks- computer-vision- watermark-remover- image-processing- image-reconstruction- supervised-learninglicense: apache-2.0language:- en---# Watermark Removal Model## Model SummaryThe 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.<div align="center"><img width="640" alt="foduucom/Watermark_Removal" src="https://huggingface.co/foduucom/Watermark_Removal/resolve/main/output.png"></div>## Model Details### Model Description- **Developed by:** FODUU AI- **Model type:** Computer Vision - Image Processing- **Task:** Remove watermark from image## Usage Guide### Installation Requirements```bashpip install torch torchvisionpip install Pillow matplotlib numpy```or you can run :```bashpip install -r requirements.txt```### Model Loading and Inference```pythonimport torchfrom torchvision import transformsfrom PIL import Imagefrom watermark_remover import WatermarkRemoverimport numpy as npimage_path = "path to your test image" # Replace with the path to your test imagedevice = torch.device("cuda" if torch.cuda.is_available() else "cpu")# Load the trained modelmodel = WatermarkRemover().to(device)model_path = "path to your model.pth" # Replace with the path to your saved modelmodel.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.sizeinput_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 EvaluationThe 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### HardwareNVIDIA GeForce RTX 3060 card### SoftwareThe model was trained on Jupyter Notebook environment.### Model Card ContactFor inquiries and contributions, please contact us at info@foduu.com```bibtex@ModelCard{author = {Nehul Agrawal andPriyal Mehta},title = {Watermark Removal Using Neural Networks},year = {2025}}```
README.md+119-3