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

Error when run evaluate.py #5

Closed
zhanghm1995 opened this issue Jun 17, 2022 · 3 comments
Closed

Error when run evaluate.py #5

zhanghm1995 opened this issue Jun 17, 2022 · 3 comments

Comments

@zhanghm1995
Copy link

zhanghm1995 commented Jun 17, 2022

Hi, firstly thank you for sharing this work.

When I run the python evaluate.py --name apnet_wpdc --model APModel command in Attribute Prediction part, I got the error as follows:

Model APModel was created
  0%|                                                                                                                                                                                     | 0/199 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "evaluate.py", line 192, in <module>
    model.test_shape()
  File "evaluate.py", line 159, in test_shape
    latent_pred, params_source, params_pred = self._model.forward_test(latent, pca_id, pca_val)
TypeError: forward_test() takes 2 positional arguments but 4 were given

And when I check the code, I found the function of forward_test in APModel class exactly accept only one latent argument, however, the above function need three arguments.

I don't know how to fix this error.

@cassiePython
Copy link
Owner

@zhanghm1995 You can change it to 'model.test()' to evaluate the APModel.

@zhanghm1995
Copy link
Author

@cassiePython I also change it to model.test(), but I got the results like these:
image

The rendered 3DMM face all are front-faced, and the mouth keep the same. While in your README, the visualization is not like mine.

BTW, I train the APModel by using 4k images.

@cassiePython
Copy link
Owner

@zhanghm1995 Please refer to this issue .

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