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
Shape from shading example does not work #146
Comments
I found that the number of linear iterations and whether to use preconditioner means a lot to the convergence. Reducing nLinearIterations from 10 to 3 and disable preconditioner can make Opt work on the sfs example. |
What version of terra are you using? This is a problem, the default parameters should work fine. For the LM solver, what happens if you set the residual_reset_period to 1? |
Thanks for your reply. My terra is cloned from its github master branch, built from source with LLVM 6.0.1 and VS2015. I tried setting residual_reset_period to 1, but OptLM still reverts every iteration. virtual void combinedSolveInit() override {
m_solverParams.set("nIterations", &m_combinedSolverParameters.nonLinearIter);
m_solverParams.set("lIterations", &m_combinedSolverParameters.linearIter);
m_solverParams.set("residual_reset_period", &m_combinedSolverParameters.residual_reset_period);
}
...
struct CombinedSolverParameters {
bool useCUDA = false;
bool useOpt = true;
bool useOptLM = false;
bool useCeres = false;
bool earlyOut = false;
unsigned int numIter = 1;
unsigned int nonLinearIter = 3;
unsigned int linearIter = 200;
unsigned int patchIter = 32;
bool profileSolve = true;
bool optDoublePrecision = false;
float residual_reset_period = 1;
}; And here is the output.
|
Also I don't understand why when I enable preconditioner or increase nLinearIteration, the loss increases and solution drifts. Is there anything underlining mathematical principle of PCG algorithm? |
Using Opt with LLVM 6.0.1 and CUDA 10.0 on Windows 10. Other examples work fine, but when running shape from shading exmple, OptGN method cannot converge and cost rises. OptLM reverts every iteration, so the final solution remains identical to the initial one. However, CUDA method and ceres method works fine.
Can anyone please explain why Opt fails on sfs examples? If I plan to solve sfs problem with Opt, can I? What should I be careful of?
Here is my screenshot:
The text was updated successfully, but these errors were encountered: