yossigandelsman / doubledip Goto Github PK
View Code? Open in Web Editor NEWOfficial implementation of the paper "Double-DIP: Unsupervised Image Decomposition via Coupled Deep-Image-Priors"
Official implementation of the paper "Double-DIP: Unsupervised Image Decomposition via Coupled Deep-Image-Priors"
Hi, author:
I don't know how to use the code. Can you write a demo to run this code? Thank you very much.
Can you provide a detailed readme? thanks
Error when running watermarks_removal.py:
C:\.....\DoubleDIP\DoubleDIP-master>python watermarks_removal.py Traceback (most recent call last): File "watermarks_removal.py", line 567, in <module> remove_watermark_many_images(['f1'], [im1], "fotolia_many_images") File "watermarks_removal.py", line 544, in remove_watermark_many_images s.optimize() File "watermarks_removal.py", line 440, in optimize self._optimization_closure(j, step) File "watermarks_removal.py", line 502, in _optimization_closure self.watermark_net_output = self.watermark_net(watermark_net_input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\Documents\machine_learning\DoubleDIP\DoubleDIP-master\net\layers.py", line 54, in forward inputs.append(module_(input_)) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\container.py", line 100, in forward input = module(input) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\conv.py", line 349, in forward return self._conv_forward(input, self.weight) File "C:\Users\youre\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\conv.py", line 346, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 4.00 GiB total capacity; 815.82 MiB already allocated; 0 bytes free; 2.42 GiB reserved in total by PyTorch)
On the web I found solutions like reducing the batch size, but in this case I can not find anything I could change to a lower value that might not take that much memory.
Any suggestion I could do?
posted by mistake
完全复现不出论文里的结果,这作者纯纯乱写的,大家别信,别引用对比这篇工作了
Yossi Gandelsman, shame on u!!!!!!!!
Are there plans to release an image segmentation example ?
Thanks for the amazing work and code provided.
I found that the exclusion loss in this work seems not so similar to the provided reference paper, I can't understand how the exclusion loss works in this paper, may someone explain it?
Thanks to all who help me with this issue.
in dehazing.py, What is the meaning of gt_ambient? and why gt_ambient=np.array([0.5600084 , 0.64564645, 0.72515032]), please...
Hi authors. I am interested in using the code for image segmentation. Could you provide the example image and the whole code for segmentation. There seems to be that the main function for segmentation is lost. Thanks in advance.
Traceback (most recent call last):
File "", line 1, in
runfile('E:/Projects/AI/DoubleDIP-master/watermarks_removal.py', wdir='E:/Projects/AI/DoubleDIP-master')File "C:\Users\Kinjal\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)File "E:/Projects/AI/DoubleDIP-master/watermarks_removal.py", line 567, in
remove_watermark_many_images(['f1', 'f2', 'f3'], [im1, im2, im3], "fotolia_many_images")File "E:/Projects/AI/DoubleDIP-master/watermarks_removal.py", line 544, in remove_watermark_many_images
s.optimize()File "E:/Projects/AI/DoubleDIP-master/watermarks_removal.py", line 440, in optimize
self._optimization_closure(j, step)File "E:/Projects/AI/DoubleDIP-master/watermarks_removal.py", line 503, in _optimization_closure
self.mask_net_output = self.mask_net(mask_net_input)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 493, in call
result = self.forward(*input, **kwargs)File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\modules\padding.py", line 171, in forward
return F.pad(input, self.padding, 'reflect')File "C:\Users\Kinjal\Anaconda3\lib\site-packages\torch\nn\functional.py", line 2817, in pad
ret = torch._C._nn.reflection_pad2d(input, pad)
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.30 GiB already allocated; 13.37 MiB free; 29.76 MiB cached)
Hi :) First, I'd like to appreciate authors to present sample codes!
As I'm a lot interested in "Double-DIP' structure for image segmentation,
I'm trying to reproduce the results reported in the original paper!
Especially, I'm trying to reproduce zebra segmentation, but I couldn't make it with provided sample codes ("segmentation.py"), same model configurations, network structures, etc.
Could you please check them if the sample codes properly generate reported layer images and the binary mask?
Thanks in advance :)
Hi,
Interesting work! I would like to follow your work. But I did not find an example for the segmentation. Can you help me?
Hi, @yossigandelsman !
Thanks for sharing the code!
I am trying to run the watermark removal script with the following pip packages installed:
torch==1.4.0
scikit-image==0.16.2
torchvision==0.5.0
sk-video==1.1.10
However, when running it on a server with a GPU, it outputs 3 original images to output/ folder, hangs and never stops. What could be the issue?
(Running on a laptop I get "CUDA driver insufficient", which I do expect and which I hope means that my server is actually using CUDA).
Thanks in advance
Hello, I installed python on my PC, set up environmental variables and try to run dehazing.py, but get:
Traceback (most recent call last):
File "c:\Users\Matas Liutikas\source\repos\DoubleDIP\dehazing.py", line 3, in
from cv2.ximgproc import guidedFilter
ModuleNotFoundError: No module named 'cv2.ximgproc'
I cannot find anything online and I assume there are more dependencies I have to install. Is there a way to do it easily?
Hi,
I try to use the provided setup of segmentation for the bird segmentation task.
Saliency maps are processed by the given "bg_fg_prep.py" before being fed to segmentation.py.
It seems like the generated mask has a very rough estimation of the object boundaries, compared to the sharp and crisp mask in the paper (Figure 4).
Solider image has worse result and the network cannot separate soldiers and background.
Could you please tell me what are the potential problems and some advice to improve it?
Thanks.
Greetings!
I'm highly interested in your work, especially the image dehazing part.
I tried to use the results you posted on the project page to compare the results of mine,
but I found that those show different resolutions compared to the original hazy inputs.
I wonder if I could know the early stopping rule to reproduce the in-paper results.
Or if that's impossible could I get the original results of your paper?
Thanks.
It is quite painful to install the packages one by one :(
Interesting and amazing project!
Would you mind providing any information about the code for video transparency separation, please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.