Skip to content
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

output is plain images #12

Open
KoteshwarSurga opened this issue Jun 11, 2019 · 9 comments
Open

output is plain images #12

KoteshwarSurga opened this issue Jun 11, 2019 · 9 comments

Comments

@KoteshwarSurga
Copy link

Hi,

I am testing your code on some low resolution images(blur) but the output receiving is plain images.

can u please help me.

@deepak112
Copy link
Owner

Hi,

Are you using my trained model?
Can you tell me what images you are using. And please send me detailed process how you are using my model.

@KoteshwarSurga
Copy link
Author

KoteshwarSurga commented Jun 12, 2019 via email

@souradip-chakraborty
Copy link

Hi I am using your pre-trained model. Even if I am changing the image size still it is taking (96,96,3) and giving an error on mismatch.

@mrciolino
Copy link

Hi:
Trained on 500 images on 320x320 with 4x downsample png files

Using the test.py with the low res input (80x80) I'm getting an entirely white image.

python test.py --input_low_res=../../CompareGANs/shipsnet/Raw/ship/ --output_dir=../../CompareGANs/shipsnet/SRs/agriculture/ships\ SR/ --model_dir='./model/argriculture/gen_model5000.h5' --number_of_images=1000 --test_type='test_lr_images

This is the "best" image I got back:
high_res_result_image_269

When using the test.py with the high res input it works fine.
python test.py -ihr=../../CompareGANs/skysat/cities/ --output_dir=../../CompareGANs/shipsnet/SRs/agriculture/ships\ SR/ --model_dir='./model/argriculture/gen_model5000.h5' --number_of_images=500 --test_type='test_model'

@mrciolino
Copy link

mrciolino commented Aug 28, 2019

I changed the lr_images (in Utils.py) scale form 4 to 1 since the input wants 80x80 for low res instead of downsampling my already low res 80x80 images to 20x20

def load_test_data(directory, ext, number_of_images = 100):

    files = load_data_from_dirs(load_path(directory), ext)

    if len(files) < number_of_images:
        print("Number of image files are less then you specified")
        print("Please reduce number of images to %d" % len(files))
        sys.exit()
    
    x_test_lr = lr_images(files, 1)
    x_test_lr = normalize(x_test_lr)

return x_test_lr

@mrciolino
Copy link

FIxed:
On line ~221 the LR images were being "denormalized" when they didn't need to be.

image_batch_lr = denormalize(x_test_lr)

to

image_batch_lr = x_test_lr

Output is now:
high_res_result_image_2

@mrciolino
Copy link

@KoteshwarSurga I know this is an old thread but did that fix ur problem?

@BassantTolba1234
Copy link

Please all,
I need the code of implementation this part
the part is

{The SRResNet networks
were trained with a learning rate of 10−4 and 106 update
iterations. We employed the trained MSE-based SRResNet
network as initialization for the generator when training
the actual GAN to avoid undesired local optima.{

1 similar comment
@BassantTolba1234
Copy link

Please all,
I need the code of implementation this part
the part is

{The SRResNet networks
were trained with a learning rate of 10−4 and 106 update
iterations. We employed the trained MSE-based SRResNet
network as initialization for the generator when training
the actual GAN to avoid undesired local optima.{

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants