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

bug fix: concat along the batch dimension #232

Closed
wants to merge 1 commit into from

Conversation

jonbakerfish
Copy link

concat the img_list along the batch dimension for better visualization when the number of images is more than 4.

@LeoXing1996
Copy link
Collaborator

Thank you for your interest in our project.

In the current version, MMGenVisualizationHook or VisualizationHook is only used in translation models, SinGAN and DDPM, and both these models visualize less than or equal to 4 images.

You may use VisualizeUnconditionalSamples if you want to modify the output shape of visualization results.

You may open an issue and explain your usage scenarios if VisualizeUnconditionalSamples can't meet your usage needs.

@jonbakerfish
Copy link
Author

Hi @LeoXing1996 , this hook is used in cyclegan with an option res_name_list specifying the order of the images to be collected. Besides changing the concat dimension to 0 is more flexible for the downstream make_grid IMHO.

@LeoXing1996
Copy link
Collaborator

Can you provide some visualization comparison results?

@jonbakerfish
Copy link
Author

E.g., given 8 images with shape HxW, the current implementation will generate a long Hx(8W) image, and the nrow is not used.
If concat along dim=0 and setting nrow=4, this will generate a (2
H x 4*W) image.

LeoXing1996 pushed a commit to LeoXing1996/mmgeneration that referenced this pull request Oct 27, 2022
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

Successfully merging this pull request may close these issues.

2 participants