Git Product home page Git Product logo

Comments (2)

zhangzhenyu-zzy avatar zhangzhenyu-zzy commented on September 27, 2024

Thanks for releasing the fitting code! I found that the implementation of weakProjection_gpu is "not" correct. In simple terms, in your implementation, the projection is computed as spts + t. In the original HMR/SPIN implementation, it implies that the projection should be s(pts + t). In this way, this projection can be perfectly converted to perspective projection by setting the camera translation to [tx, ty, 2*f/s * img_res].

https://github.com/MandyMo/pytorch_HMR/blob/7bf18d619aeafd97e9df7364e354cd7e9480966f/src/util.py#L117

Anyway, it a fitting procedure, the network's parameters will be updated to output the correct t under this projection.

您好,我在使用作者制造的数据集标签的时候,我想利用它的弱透视标签对网格进行渲染,但是我遇到了一些问题,可以向您请教一下吗,如果可以的话加我一个微信,谢谢啦,我的微信号是zzydddd

from eft.

raulTrial avatar raulTrial commented on September 27, 2024

The easiest way to convert it to a weak perspective would be to get 2D image space cordinates as target_2d = ((scale * joint3d)[...,2] + translation) and original 3D joints as origin_2d = joint3d[...,:2] and estimate weak perspective translation

tmp_o = origin_2d - origin_2d.mean(axis=0)
tmp_t = target_2d - target_2d.mean(axis=0)
scale = (tmp_t * tmp_o).sum() / (tmp_o * tmp_o).sum()
trans = target_2d.mean(axis=0) / scale - origin_2d.mean(axis=0)
cam = np.zeros(3)
cam[0] = scale
cam[1:] = trans
#cam[0] = 2 * focal_length / (img_res * cam[0] + 1e-9)

from eft.

Related Issues (20)

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.