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 images ? #15

Open
kanika02 opened this issue Sep 28, 2021 · 3 comments
Open

Output images ? #15

kanika02 opened this issue Sep 28, 2021 · 3 comments

Comments

@kanika02
Copy link

Hey,
How can we visualize the output images after the demo command?

@JingyeChen
Copy link
Member

You could modify the function "demo" in super_resolution.py to achieve this

@kanika02
Copy link
Author

Can you give the code for the following?

@steven8274
Copy link

steven8274 commented Mar 23, 2022

You can add this line:
torchvision.utils.save_image(images_sr[:, :3, :, :], os.path.join(self.args.demo_dir, 'sr_'+im_name), padding=0)
just after 'images_sr' generated at:
for im_name in tqdm(os.listdir(self.args.demo_dir)): images_lr = transform_(os.path.join(self.args.demo_dir, im_name)) images_lr = images_lr.to(self.device) sr_beigin = time.time() images_sr = model(images_lr)

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

3 participants