patrikhuber / eos

A lightweight 3D Morphable Face Model library in modern C++
Apache License 2.0
1.89k stars 596 forks source link

How to compute image texture loss? #281

Closed ZHANG-SHI-CHANG closed 4 years ago

ZHANG-SHI-CHANG commented 4 years ago

thx~ for your greate job! Can this work compute image texture loss to get texture coeffs?

ZHANG-SHI-CHANG commented 4 years ago

thx~ for your greate job! Can this work compute image texture loss to get texture coeffs?

image similar lmks but big diff, i think texture loss maybe work it.

patrikhuber commented 4 years ago

Hi,

Texture loss is not one of the main functionalities of eos. But eos is a lightweight framework that gives you all the infrastructure that you need to write a texture loss by yourself. I could recommend Ceres - you could have a look at https://github.com/patrikhuber/eos/blob/13f3add0bd570855cb3d339f659694a25d366c49/include/eos/fitting/ceres_nonlinear.hpp#L203-L212 and fit-model-ceres (read through the fit-model-ceres example carefully, line-by-line! It's not a ready-made, "does-everything" example.)