Git Product home page Git Product logo

Comments (8)

1996scarlet avatar 1996scarlet commented on August 14, 2024

For "sparse" and "pose" mode, the landmarks are provided by

class DepthFacialLandmarks(BaseTFLiteFaceAlignment):

we return the vector points which is of shape N, 2, the coordinate z is dropped in the tflite model.


However, for "dense" and "mesh" mode, we can get the landmarks via

class DenseFaceReconstruction(BaseTFLiteFaceAlignment):

as show in:

you need to hold the points[:, 2] for getting coordinate z

from dense-head-pose-estimation.

tkzky avatar tkzky commented on August 14, 2024

感谢您的回答,意思就是"sparse" and "pose" mode估计出的特征点只是二维的吗?
如果想要得到三维坐标,就必须是"dense" and "mesh" mode?

from dense-head-pose-estimation.

1996scarlet avatar 1996scarlet commented on August 14, 2024

"sparse" 和 "pose" 模式下的二维坐标也是通过三维坐标投影计算出来的
也就是说,tflite模型可以输出三维坐标,
但为了方便,现在上传的版本是二次封装后的,只能输出二维坐标

其实 "sparse" 和 "dense" 是没有区别的,都是从 3DMM 模型上按照一定规则采样几个点,
你完全可以通过对"dense"的结果 index pick 来得到 "sparse" 的三维坐标

from dense-head-pose-estimation.

tkzky avatar tkzky commented on August 14, 2024

好的,非常感谢!

from dense-head-pose-estimation.

tkzky avatar tkzky commented on August 14, 2024

抱歉再次打扰您
如何通过dense结果找到对应的sparse的68个点呢?也就是说如何知道"dense"中68个特征点的index呀?目前查找了一些资料,发现对dense facial landmark没有明确的编号。

from dense-head-pose-estimation.

tkzky avatar tkzky commented on August 14, 2024

您好,目前通过比较特征点的(x,y)坐标找到了对应的密集特征点的三维坐标。
但是目前仍有一个疑问就是这个Z坐标是深度值吗?我看了下结果,感觉不是相机到特征点的实际距离呀?

from dense-head-pose-estimation.

1996scarlet avatar 1996scarlet commented on August 14, 2024

我建议参考 https://github.com/cleardusk/3DDFA_V2/blob/master/demo.ipynb 里面有能够渲染深度的demo

我们这两个repo实现的是同一篇论文,只不过我为了部署方便将BFM模型和后处理shape矩阵整合到tflite模型里了,而且由于我用不到z轴,所以模型里输出的z其实是未经过后处理的,你需要通过矩阵乘法将z轴还原到真实坐标,但我不建议这么做

如果你非要手动处理,我建议仔细看这个源码 来理解从模型输出线性变换到特征点(稠密、稀疏)的过程

from dense-head-pose-estimation.

tkzky avatar tkzky commented on August 14, 2024

我这两天参考了3DDFA_V2的代码也尝试跑了一下,不过发现他渲染深度得到的Z值不是相机到特征点的深度值,而是相对于空间中某个坐标系的Z值,不知道我的理解是否有误,还是说无法估计特征点距离相机的深度值?

from dense-head-pose-estimation.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.