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

Possibly wrong gradients #6

Closed
wants to merge 3 commits into from
Closed

Possibly wrong gradients #6

wants to merge 3 commits into from

Conversation

mudigonda
Copy link

Hey Matt,

We have been trying to explore opendr for modeling 3D faces and we seem to have hit a wall. In this PR, we attach two small scripts that a) takes a face and renders it at a specific position b) tries to search for gradients around known specific position.

We seem to find that the gradients are flipped on the x-direction, while they seem correct around the y-axis. We are at a loss on why this is happening and we'd appreciate any help on this (links below).

One hypothesis we toyed around with is that the number of vertices might be effecting the gradient computation. For example, we also ran a similar comparison on the earth mesh and they look right. We ran a similar one on the stanford bunny but it was a bit less clear there.

Anyway, we would really appreciate your help on this. We are pretty excited about OpenDR and would love to see it work great for our project.

Thanks!
Mayur

energy_comparison_coarse
grad_comparison_coarse

mudigonda and others added 3 commits August 7, 2015 12:04
This script creates two plots one that visualizes the landscape of the Energy function. Another that visualizes the gradients. The script evaluates values around 0,0,0 which is the known final pose. Note the plot for the gradient w.r.t x is flipped and incorrect.
This script loads a face and fixes it at a specific pose and saves the output as a pickle to prevent any possible errors to the symbolic graph while trying to test out the gradients.

All it really needs is an obj file
@mattloper
Copy link
Owner

In the attached script, the near plane in the frustum was set to zero, which means that the conversion to normalized device coordinates won't work. The geometry was also not in the frustum. When the geometry is placed in the frustum and the near plane set to nonzero, the derivatives work. I'll add a check for this (error checking the frustum near/far plane values) soon.

@mattloper mattloper closed this Sep 4, 2015
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.

None yet

2 participants