GithubHelp home page GithubHelp logo

braindotai / watermark-removal-pytorch Goto Github PK

View Code? Open in Web Editor NEW
792.0 15.0 145.0 44.21 MB

๐Ÿ”ฅ CNN for Watermark Removal using Deep Image Prior with Pytorch ๐Ÿ”ฅ.

License: MIT License

Python 46.59% Jupyter Notebook 53.41%
deep-image-priors watermark-removal pytorch watermark skip-connections artefacts-removal paper restoration-tasks deep-learning

watermark-removal-pytorch's Introduction

Welcome to BrainBust

Yo, welcome to the ๐Ÿง  BrainBust universe.

Hi there , I am Rishik, and I feel most alive ๐Ÿ˜ƒ in those 10 seconds ๐Ÿ•, that go through me running that code and seeing the loss converge ๐Ÿ“‰.


๐Ÿ‘‰๐Ÿป๐Ÿ‘ˆ๐Ÿป๐Ÿฅบ Who am I?

๐Ÿ’— Things I love

๐Ÿ’ป I'm a Full Stack ๐Ÿค– ML Engineer and ๐ŸŒŽ Web Developer. ๐ŸŽถ๐ŸŽถ in background.
๐Ÿ‘ทโ€โ™‚๏ธ Working full time with a startup โญ SkylarkLabs.ai, where I have developed and deployed 5 products to far. ๐Ÿ’ฏ% filling VRAM.
๐Ÿ† Won Covid ML Hackathon with 1st rank in my college. ๐Ÿ” Double cheeseburger.
๐ŸŒ You can check out my website, ๐Ÿ”จ built with Angular and Django. ๐Ÿฅค Chilled soda.
๐Ÿ“บ I'm the creator of BrainBust Youtube channel. I don't like that subscribe button either, so destroy it, kill it, suck its life out ๐Ÿ‘ป. ๐ŸŽน Playing Piano.
๐Ÿ“ฐ Working on my very first research publication. ๐Ÿ˜— Whistling favourite songs.
๐Ÿ”  Currently mastering NLP. ๐Ÿก And home sweet home.

๐Ÿ‘จ๐Ÿปโ€๐Ÿซ # Technical Skills

๐Ÿค– Machine Learning / Deep Learning

๐Ÿญ Backend

๐ŸŒ„ Frontend

๐Ÿ“ # Written Articles

๐Ÿ”จ # Deployed Projects

Facial Landmarks DetectionFake Anime Generation
Watermark RemovalViolence Detection
Lie DetectionNight 2 Day

๐Ÿ“Š # Profile Stats

iampawan




Wubba lubba dub dub!!! You made it to the end!!!

Congrats, you made it to the end!!!

watermark-removal-pytorch's People

Contributors

braindotai avatar edwin-yan avatar lukasjenks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

watermark-removal-pytorch's Issues

[RuntimeError: CUDA out of memory] when max dimensions of final image are increased

I am getting the following error when I increase the --max-dim parameter above 700 on a 6GiB GPU.

RuntimeError: CUDA out of memory. Tried to allocate 208.00 MiB (GPU 0; 6.00 GiB total capacity; 5.29 GiB already allocated; 0 bytes free; 5.33 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

I tried reducing the --input-depth to see if this would reduce the memory usage, but it didn't help.

Are there any other possible tweaks that would allow for processing of larger images?

Default parameters

Hi,
Could you please give us some correct, default parameters for :

max_dim=MAX_DIM,
show_step=SHOW_STEPS,
reg_noise=REG_NOISE,
input_depth=INPUT_DEPTH,
lr=LR,
training_steps=TRAINING_STEPS

on video ?

would this model be available on videos ?

Need some data on performance of this application

First of all, Thank you very much for this program. It is working great for an image.

Currently, I am running this application on a windows laptop and was able to execute the program python inference.py.
I do have training-steps as 3000 which is the default. i have prepared a masked image to remove the watermark from the original image. it is taking nearly 6hrs for an image to be processed and remove the watermark.

I wanted to know if I am doing anything wrong or will it be better if I run on some computer with good CPU power.

retrain

is it required that every time retrain for each image?

Loss of resolution

Hello,

Thank you for implementing this great pipeline! I successfully ran it but I saw the resolution of output is much lower than the original input. The loss of resolution also happended to those unmasked areas without the watermark. I set the output dimention the same as the input dimention. Is that a way to improve the resolution and avoid changing the quality of unmasked regions?

Thanks,
Shujun

Processing was stopped out , Upsampling is deprecated

Starting training...

Completed: 0%| | 0/9 [00:00<?, ?it/s]C:\Program Files\Python36\lib\site-packages\torch\nn\modules\upsampling.py:122: UserWarning: nn.Upsampling is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.Upsampling is deprecated. Use nn.functional.interpolate instead.")
Completed: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 9/9 [00:12<00:00, 1.43s/it, Loss=0.0263]

Saving final output image to: "E:\Watermark-Removal-Pytorch\demo\frames\00000-output.jpg"

Broken can't install it even with build tools

gi\gimodule.c: fatal error C1083: Impossible d'ouvrir le fichier includeรฟ: 'msvc_recommended_pragmas.h'รฟ: No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x86\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyGObject
Failed to build PyGObject
ERROR: Could not build wheels for PyGObject, which is required to install pyproject.toml-based projects 

Model learns to synthesize watermark too

Hi @braindotai ,

First of all, thank you!! This is definitely a nice wrapper for the original implementation, which is quite poorly documented.

I am in the second case: watermark not available; I am using a new file of my own. However, I am getting nowhere close to your results. The model learns to reproduce the watermark.

Am I doing sth wrong? Maybe the image format of the watermark?

Cheers.

Not an issue. wondering if the set up is correct.

after changing the image in the watermarked folder.
and masks in the masks folder.

then runpython3 inference.py

(base) x@xnoMacBook-Pro Watermark-Removal-Pytorch % python3 inference.py   
Setting device to "cpu", since torch is not built with "cuda" support...
It is recommended to use GPU if possible...
Visualizing mask overlap...

got this message for a while. Can you please confirm if the code is running as expected? Thank you.

How to use the script?

The script looks great! Unfortunately I am not a developer.
May I ask how to use it?

I first downloaded it to my Mac, with GitHub Desktop.
Then I run the following in the terminal

cd /Users/MyUserName/Documents/GitHub/Watermark-Removal-Pytorch/
python inference.py

It has the following error

Traceback (most recent call last):
File "inference.py", line 2, in
from api import remove_watermark
File "/Users/MyUserName/Documents/GitHub/Watermark-Removal-Pytorch/api.py", line 63
print(f'\nSaving final output image to: "{output_path}"\n')
^
SyntaxError: invalid syntax

Could you explain a little where I did it wrong?
Thanks in advance.
I would love to try this great script.
Thanks for sharing

Licence?

Hello,

really nice project!
Under which licence is it published?

CPU usage.

When set to CPU mode this sent a 13900k into 100% and made the cpu pulse/squeal with electronic noise.
I have never had this before even stress testing.
I thought a hard drive was getting read its that loud!

Inference time

Really nice project! Thank you for making it public!

The question is: what's the time of inference on image?
Actually my goal is to remove watermark in the bottom rigth corner of the video. I've already prepared the docker container and simple code to divide video into frames. How long will it take to run on 1k frames?

I can't actually check for now because video is not currently available. (I'll post my results when I finish)

Specs:

  • i5 12600kf
  • 16gb RAM 3200MHz
  • RTX 3080 (10 GB version)

requirements.txt

Consider adding a requirements.txt file.
Dependencies I noticed:

torch
torch vision
numpy
tqdm
pillow
matplotlib

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.