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

I have a question. #35

Open
hw1204 opened this issue Sep 1, 2022 · 1 comment
Open

I have a question. #35

hw1204 opened this issue Sep 1, 2022 · 1 comment

Comments

@hw1204
Copy link

hw1204 commented Sep 1, 2022

Hello, I am a Korean university student who is interested in your project.
I'm analyzing the code because your project is so impressive.
I want to make sure that I understood it correctly, so I'm leaving a message.

I'm trying to make various facial expressions, but I'm asking because there's no change.
If I make the code like this, is the flow right?

# happy
def make_happy(self):
    selected_morph_index = 1      # eye_happy_wink
    param_group = self.param_groups[selected_morph_index]   

    param_range = param_group.get_range()
    pose = [0.0 for i in range(poser.get_num_parameters())]

    pose[14] = param_range[0] + (param_range[1] - param_range[0]) * self.alpha
    pose[15] = param_range[0] + (param_range[1] - param_range[0]) * self.alpha

    self.save_img('happy')

Thank you.

@dragonmeteor
Copy link
Collaborator

I don't quite understand what you are trying to do.

However, you might want to take a look at the Poser interface (https://github.com/pkhungurn/talking-head-anime-2-demo/blob/main/tha2/poser/poser.py#L129), which encapsulates the neural networks in a way that it can be used to pose a character. The important method is the "pose" method, which takes an image, a pose, and an optional output index. The method should then output an image, which is the input image with the right modification.

You should identify in the code base where the pose method is called. Then, try to make sure that the right information gets to this method. That's basically the general advise that I can give.

You sample code does not use an instance of the Poser class, so I cannot see how it can generate an image.

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