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

visualizing results #18

Open
ucb-pb opened this issue Apr 6, 2020 · 4 comments
Open

visualizing results #18

ucb-pb opened this issue Apr 6, 2020 · 4 comments

Comments

@ucb-pb
Copy link

ucb-pb commented Apr 6, 2020

Setting --visualize to True doesn't appear to do anything.

@HYOJINPARK
Copy link
Collaborator

Setting --visualize to True doesn't appear to do anything.

Do you mean that the visdom not working?
when you run : python -m visdom.server ???

@ucb-pb
Copy link
Author

ucb-pb commented Apr 13, 2020

Sorry, I mean for running Test_model.py

@HYOJINPARK
Copy link
Collaborator

HYOJINPARK commented Apr 14, 2020

Oh yes I did not add the visualization code in Test_model.py

You can edit by referring the main.py
like this (line 487)

if args.visualize:
            if train_config["loss"] == "Lovasz":
                grid_outputs = torchvision.utils.make_grid(color_transform((save_est[0] > 0).cpu().data), nrow=6)
            else:
                grid_outputs = torchvision.utils.make_grid(color_transform(save_est[0].unsqueeze(0).cpu().max(1)[1].data), nrow=6)

            my_logger.image_summary(torchvision.utils.make_grid(save_input[0], normalize=True),
                             opts = dict(title=f'VAL img (epoch: {epoch})',caption=f'VAL img (epoch: {epoch})'))
            my_logger.image_summary(grid_outputs,
                                      opts=dict(title=f'VAL output (epoch: {epoch}, step: {str(mIOU_val)})',
                                                caption=f'VAL output (epoch: {epoch}, step: {str(mIOU_val)})', ))

            grid_gt = torchvision.utils.make_grid((100 * save_gt[0].cpu()).type('torch.ByteTensor').data,
                                                  nrow=6)
            my_logger.image_summary(grid_gt,
                                      opts=dict(title=f'VAL gt (epoch: {epoch}, step: {str(mIOU_val)})',
                                                caption=f'VAL gt (epoch: {epoch}, step: {str(mIOU_val)})', ))

@HYOJINPARK
Copy link
Collaborator

HYOJINPARK commented Aug 23, 2020 via email

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

2 participants