python-face-relighting
python-face-relighting copied to clipboard
My test results are as shown in the figure. It feels like the value overflows. How can I solve this problem?
My test results are as shown in the figure. It feels like the value overflows. How can I solve this problem?Thanks!
![]()
![]()
![]()
My test results are as shown in the figure. It feels like the value overflows. How can I solve this problem?Thanks!
The relighting algorithm combines (colors, 3d-vertices, normals) as features, you can try to use colors alone as features and check the results, which should works independent of the 3d reconstruction process.
Thank you for your reply. I have reorganized and calculated the three features of the color, 3d-vertices, and normals separately, but it is still the wrong result before. The error results are the same when there are the color characteristics. I don't understand the code that you put on git to modify those color parameters, which caused me to have such error results. I hope to hear your answer, thank you!
At 2020-03-11 22:16:20, "PengBo" [email protected] wrote:
My test results are as shown in the figure. It feels like the value overflows. How can I solve this problem?Thanks!
The relighting algorithm combines (colors, 3d-vertices, normals) as features, you can try to use colors alone as features and check the results, which should works independent of the 3d reconstruction process.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Thank you for your reply. I have reorganized and calculated the three features of the color, 3d-vertices, and normals separately, but it is still the wrong result before. The error results are the same when there are the color characteristics. I don't understand the code that you put on git to modify those color parameters, which caused me to have such error results. I hope to hear your answer, thank you! At 2020-03-11 22:16:20, "PengBo" [email protected] wrote: My test results are as shown in the figure. It feels like the value overflows. How can I solve this problem?Thanks! The relighting algorithm combines (colors, 3d-vertices, normals) as features, you can try to use colors alone as features and check the results, which should works independent of the 3d reconstruction process. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
"I don't understand the code that you put on git to modify those color parameters, which caused me to have such error results". You could paste the lines of code which is confusing so we can discuss better. The colors are normalized to [0, 1], relighted, constrained to [0, 1], then transformed back to [0, 255].
This has already been done in the code you provided, and it seems that this is not the cause. out_colors[out_colors < 0] = 0;out_colors[out_colors > 1] = 1;out_colors = (out_colors*255).astype('uint8').
At 2020-03-13 11:30:49, "PengBo" [email protected] wrote:
Thank you for your reply. I have reorganized and calculated the three features of the color, 3d-vertices, and normals separately, but it is still the wrong result before. The error results are the same when there are the color characteristics. I don't understand the code that you put on git to modify those color parameters, which caused me to have such error results. I hope to hear your answer, thank you! At 2020-03-11 22:16:20, "PengBo" [email protected] wrote: My test results are as shown in the figure. It feels like the value overflows. How can I solve this problem?Thanks! The relighting algorithm combines (colors, 3d-vertices, normals) as features, you can try to use colors alone as features and check the results, which should works independent of the 3d reconstruction process. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
"I don't understand the code that you put on git to modify those color parameters, which caused me to have such error results". You could paste the lines of code which is confusing so we can discuss better. The colors are normalized to [0, 1], relighted, constrained to [0, 1], then transformed back to [0, 255].
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Try to change the line
out_colors = (out_colors*255).astype('uint8')
to
out_colors = (out_colors*255).astype('float')
The problem comes from numeric overflow of the 'uint8' data type