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

higher resolution #6

Closed
Yijunmaverick opened this issue May 20, 2021 · 4 comments
Closed

higher resolution #6

Yijunmaverick opened this issue May 20, 2021 · 4 comments

Comments

@Yijunmaverick
Copy link

Thanks for sharing.

Is it possible to run this method on higher-resolution input? or 256 only?

@thaoshibe
Copy link
Collaborator

thaoshibe commented May 20, 2021

Appreciate your question!
Resolution is not a fundamental constraint of CPM. We can use a higher resolution for sharper images.
For example, by using 512x512 UV maps, we can get higher resolution images, as shown in the following figure.

higher_resolution
(From left to right: 256x256 UV map (as shown in the paper), 512x512 UV map, and reference image)

@Yijunmaverick
Copy link
Author

Thanks for the quick reply. Is 512 UV map obtained by another PRNet model or some upsampling technique? I may want to try ever larger size :)

@thaoshibe
Copy link
Collaborator

For the 512x512 UV map, I used the same PRNet model (no need to retrain).
There's will be another face_ind_512.txt, uv_kpt_ind_512.txt files. (As your request, I'll upload it later).


But it worth noting about this method:

  • [01] Basic (As shown in the paper):
    Input -> UV (256) -> Color (256) | Pattern (256) -> Output Image (256)
  • [02] Higher resolution UV (As shown in previous figure):
    Input -> UV (512) -> Color (256) | Pattern (256)-> Output Image (512)
    (Upsampling used in Pattern Mask & Color transferred TsmC)
  • [3] "Wholesome" Solution:
    Input -> UV (512) -> Color (512) | Pattern (512) -> Output Image (512)

I'm using [2] because that requires no re-train step (PRNet, Color, Pattern).
To be specific, I do use upsampling for intermediate output (Color Transferred (bicubic resize), Pattern Mask (nearest neighbor resize)). (See attached image)
image
(Getting higher resolution, based on [2])


You might wonder why didn't I use [3]? Isn't it the best solution?
To do [3], we'll need to re-train Color Branch & Pattern Branch.
It's feasible, but I haven't done the job due to: time-efficiency (it'll be super slow), dataset (most of the makeup datasets are 256x256 only), etc. ugh!

Hope this helps!

@Yijunmaverick
Copy link
Author

Got it, thanks for explanation. The upsampling makes sense.

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