-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any ways to increase resolution? #6
Comments
In our project, we would resize an image if it's too large. So if you input a 700x700 image, the program will resize it. Did you get this error using our resize codes or without those codes? |
The reason could be cuDNN, you can check a similar issue here BVLC/caffe#2197. |
This error does occur sometimes at higher ratios with your resizing code. I had just assumed that my particular case (about 10GB of video memory free) was not perfectly protected by the resize, which was perhaps written for the 12GB commonly available. If I manually resize the images down myself to a lower resolution than your code does I can usually get the ratio that failed to work (e.g. 1.0) I will see if I can resolve that particular error by leaving out CUDNN (or perhaps using a different version, I am on 5.1). But the larger issue for me is breaking through the limitation that requires the resizing in the first place. To put my question more simply, why do you have to resize the images down, and is there a way to increase that maximum resolution? Though the final results are upsized in your code as a last step, they only have the detail and information of at most a 700x500 image. I would like to run 1000x1000 and larger source and style images through the system at full resolution for even better results. |
Update! I built Caffe without CUDNN and was able to get higher resolutions. Also, I get a more sensible error that I am out of memory (and can see the memory approach the limit using nvidia-smi). I still suspect the CUDNN error above was about memory, as it occurred only with increased image size and/or scale. It seems that CUDNN uses additional memory in this case. By raising the resize limits in your code I was able to work with content and style images close to 1000x1000 up to a ratio of .7. With CUDNN I was only able to get up to ratio .3 with the same images. I'll try testing with different versions of CUDNN (I used 5.1) to see if any have better memory performance. The performance with CUDNN was faster, but not substantially so (29 seconds vs 34 without in one case) -- not enough to give up the higher resolution possibilities. I'd still love to be able to go higher than this improved resolution. I wonder if changing out VGG-19 for a less resource intensive trained net would help (as it does with Neural Style and other style transfer systems). I tried replacing it with VGG-16 to test but it did not work. I guess there are more code changes required to utilize a different trained net. |
Yeah, you are right. CUDNN exactly uses additional memory so it may cause such error when the size become larger.
|
I tried reducing the threads in a block, but got no noticeable reduction in memory usage. Perhaps I changed it incorrectly. I edited only DeepAnalogy.cu I changed the 6 lines like: This did not get me any noticeable memory reduction. I also then changed the surrounding lines like: I replaced the 20 with a 10 in those lines, in case that was necessary. Again, no noticeable memory reduction. As far as the better GPU, I can get occasional access to a P5000 with 16GB of memory, which will certainly help. Thanks for your help -- I am getting some stunning results. |
I don't believe that you are running out of memory. The source code for resizing the input images is in lines 104 through 229 in DeepAnalogy.cu. |
same problem, the memory is like the following:
why the model take so much memory? |
Actually the feature maps and the VGG model take much memory. |
@jpcreamer what changes did you have to make in VS to get the deep_image_analogy project to build without CUDA? I was successfully able to build Caffe with CPU only via |
Hi everyone Im so much fascinated by this technology, after 22 years in computer graphics for films and TV, i feel as motived as in my early start :) Now i don't have enough knowledge and experience, maybe neither the right side of the brain too :) to fully be confortable enought with all of this to build a new version of the exe which will allow me to raise the resolution, to be able to choose it by a parameters ideally... I would be immensively thanksfull if by chance someone could do this for me and i imagine for the joy of all Github's community Many thanks vincent |
I am getting some fascinating results with this (quite amazing at times), but the resolution is somewhat limited. When I attempt higher resolutions (near the 700x700 limit) or ratios (over 1.0) I get what I assume are GPU out of memory errors like: "cudnn_conv_layer.cu:28] Check failed: status == CUDNN_STATUS_SUCCESS (8 vs. 0) CUDNN_STATUS_EXECUTION_FAILED)". These occur at the later layers of PatchMatch (usually layer:conv2_1).
Are there any possible avenues to increase the resolution of content and style and output? Where are the main memory bottlenecks? Is it within PatchMatch or elsewhere? It's a little confusing because my GPU memory consumption seems quite low (2-3GB) even right before the error occurs.
I am running on a 1080ti (11GB), and I would love to be able to generate higher resolution output if at all possible. Any further guidance or info would be much appreciated.
The text was updated successfully, but these errors were encountered: