isaaccorley / pytorch-enhance

Open-source Library of Image Super-Resolution Models, Datasets, and Metrics for Benchmarking or Pretrained Use
Apache License 2.0
80 stars 12 forks source link

Strange results. #10

Closed sunwoo76 closed 3 years ago

sunwoo76 commented 3 years ago

Thanks for your good work.

But, when I try to use your library, this makes sr_test strange results.

I loaded the image using openCV and made it pytorch tensor which range is [0.,1.]

Is the default is un-trained model?

I followed this example below:

import torch import torch_enhance

increase resolution by factor of 2 (e.g. 128x128 -> 256x256) model = torch_enhance.models.SRResNet(scale_factor=2, channels=3)

lr = torch.randn(1, 3, 128, 128) sr = model(x) # [1, 3, 256, 256] -> model(my_img)

isaaccorley commented 3 years ago

The default models are randomly initialized (untrained) so this is expected functionality.

sunwoo76 commented 3 years ago

@isaaccorley thank you. Do you have a plan to upload pertained model weights?

isaaccorley commented 3 years ago

Yes, I'm working on a branch to which adds pretrained weights but don't have a time of completion for you.

sunwoo76 commented 3 years ago

@isaaccorley I see. I hope you to update the pre-trained weights someday :) thank you!