-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issues about why it always skips the images that I upload #3
Comments
Hi, |
Thanks a lot, it works well after I reduce the input size! |
@HengjieWang which is the max image size in bytes it can be handled?
while without the option it works for that size:
while if the size is < 500KB it works:
|
I need to test it more. It might just be a file size thing. But I found that as long as one of the dimensions is either 256 or 512 it works (Divisable by 256). Like 512px wide by 683 px high. 1024 seems to be too high in resolution for colab. |
I have reduced my images to 288 × 368 and 480 × 656 (less than 200KB) for --with_scratch, it works well. By the way, I do not think the file size would matter, I guess the key is to make the width and height to be reduced, because your images would become matrices in the code. Therefore, just try to simply reduce the total pixels by reducing the size and see if it works :) |
I added a log to the Skipped *.jpg output and the reason the model fails is that its trying to allocate more memory than is available in the collab. For example
So from that im pretty sure that the issue will not be the file size but rather the number of pixels in the image. As jpeg is compressed the input file size could be deceiving. Along with the fact that the image will most likely be upscaled to some power of 2. Based on trial/error I was for example able to process 1127x742 but not 1278x842 (without scratch, scratch seems to up the memory requirements significantly). |
I confirm that when using the option --with_scratch will significantly increase the memory pressure and therefore reduce the file size. |
Hi, recently I tried your Colab demo to restore some of my old images, but here comes the issue. When I follow the steps and run the code, it always prints skip the my uploaded images like the following shows:
Running Stage 1: Overall restoration
initializing the dataloader
model weights loaded
directory of testing image: /content/photo_restoration/test_images/upload
processing testScratch.png
You are using NL + Res
Now you are processing testScratch.png
Skip testScratch.png
Finish Stage 1 ...
Running Stage 2: Face Detection
Finish Stage 2 ...
Running Stage 3: Face Enhancement
The main GPU is
0
dataset [FaceTestDataset] of size 0 was created
The size of the latent vector size is [8,8]
Network [SPADEGenerator] was created. Total number of parameters: 92.1 million. To see the architecture, do print(network).
hi :)
Finish Stage 3 ...
Running Stage 4: Blending
Finish Stage 4 ...
All the processing is done. Please check the results.
Therefore, I'd like to know whether there are any requirements that the uploaded images have to satisfy or did I make some mistakes ? Thanks a lot.
The text was updated successfully, but these errors were encountered: