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

what is theta_generator role in stage 2? #3

Closed
shufangxun opened this issue Jun 29, 2020 · 2 comments
Closed

what is theta_generator role in stage 2? #3

shufangxun opened this issue Jun 29, 2020 · 2 comments

Comments

@shufangxun
Copy link

what is theta_generator role in stage 2?
I think it is a pretrained model. after it, the processed input will feed in flownet model.

theta_generator = ClothNormalizer(nc=nc)
load_checkpoint(theta_generator, init_CN)

theta = theta_generator(con_cloth_mask, tar_cloth_mask)
grid1 = projection_grid(theta, con_cloth_mask.shape)
grid2 = projection_grid(theta, con_cloth.shape)
con_cloth_mask = Ft.grid_sample(con_cloth_mask, grid1).detach()
con_cloth = Ft.grid_sample(con_cloth, grid2, padding_mode="border").detach()
con_cloth = con_cloth * con_cloth_mask + (1 - con_cloth_mask)

[F, warp_cloth, warp_mask] = model(torch.cat([con_cloth, con_cloth_mask], 1), tar_cloth_mask)
@adldotori
Copy link
Owner

Thank you for reading my work. ClothNormalizer resizes cloth original image to person's body size. If use this, the network don't have to reduce clothes' size, so it will be concentrate learning flow. This is an experiment-based opinion. If you have any questions, don't hesitate to ask me. This answer is late, but I will answer the next one right away. I hope this reply was helpful to you.

@shufangxun
Copy link
Author

thanks~

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