Closed xolott closed 7 years ago
Hi
The partial output of the program should be stored in the folder samples
. Can you tell if there are 1067 files in the folder?
Also, can you tell what the dimensions of /home/jose/Desktop/o.jpg
are? Based on the number of iterations it is taking, I am assuming one of your image dimensions is greater than 1024. This program was built while training and testing on smaller images. One negative of the current version of this program is that it stores the partial outputs in the RAM, which is unnecessary, as they are anyways being stored in the hard disk too, and so can be loaded later for the final processing.
Also
python main.py --test_image /home/jose/Desktop/o.jpg
or
python main.py --test_image /home/jose/Desktop/o.jpg
(which uses the semi-trained model that comes in the repo) The pre trained model that comes with the repo has been trained purely on faces (celeb A), and so could lead to weird artefacts on images containing anything but faces.If you would like to enhance a general purpose image, I recommend training on a dataset like ImageNet, which contains images containing all sorts of subjects
Hi,
There are 1067 test_ouput images in the samples folder. The dimensions of the o.jpg image are 1920x1080.
I directly run the main.py
.
Today I tested your repo with some 160x160's faces, and runned without problem. I'm assuming that the enhanced image is the file sample/joined_output_resized.jpg
file
Is there a way to avoid the grey border? I'm currently playing with your code, trying to make some changes and check the behavior. How can I change the dimensions of the generated image file?
Regards,
@xolott I've made a couple of changes:
I've modified the code so that the grey border does not come in. It was coming in in the first place because of the padding that was being done to make each dimension of the image a multiple of 32. If you would like to play around with this part of the code, the parts you would need to modify are primarily the functions make_grid()
and join_grid()
in utils.py
.
I've also stopped loading the downsized and upsampled inputs in the RAM unnecssarily. You could try running the program on your full sized image now. It should be able to do more of the smaller images, but probably still not the entire image. The way to go around completely overcoming the RAM usage problem would be to simply comment out the line output_list.append(output[0])
in model.py
, and instead just read the partial outputs written in the samples folder at the end of the program and modify join_grid to work upon them. If you are up for doing that, do send a pull request later :smile:
Previously, the joined_output_resized.jpg
image was being forced to the size 128x128x3. I've changed that, and the resized image will now be of the size of the input image
Do pull the repo so that the changes are reflected on your side to
"I directly run the main.py" - I am guessing you meant you ran python main.py --test_image /home/jose/Desktop/o.jpg
. If you would like better results, do also try training the model with your own dataset first, which also runs main.py
, but with different parameters (See training section in usage)
Also, the final output is not samples/joined_output_resized.jpg
, but samples/joined_output_resized_full_resolution.jpg
(before today's update, it was simply called samples/joined_output.jpg
)
Do note however that when running on bigger images, this program will give good results, but with a rectangular grid artefact. This is the next item in the list of future updates, and you can refer to point 1 in the To-Do section in the readme for more info
Hi,
After download this repo, and try the example, I get:
With full RAM memory usage (32GB), hanging out my PC