AaronJackson / vrn

:man: Code for "Large Pose 3D Face Reconstruction from a Single Image via Direct Volumetric CNN Regression"
http://aaronsplace.co.uk/papers/jackson2017recon/
MIT License
4.52k stars 742 forks source link

Apply scale transform to visvis #40

Closed cloudhan closed 6 years ago

cloudhan commented 6 years ago

In vis.py,

# Worth mentioning that the Z component (axis=0) is twice as deep as
# the X and Y components are wide/tall. I'm going to leave these
# unscaled for now, but if you know how to scale the mesh from
# showvol, I would love to know.

Here is it:

# add the following line just below
# v = vv.volshow(volRGB, renderStyle='iso')
# will do the scale transform.
v.transformations[1].sz = 0.5

from v.transformations: [<visvis.core.misc.Transform_Translate at 0x7effcb6c7890>, <visvis.core.misc.Transform_Scale at 0x7effcb6c7b50>]

As you can see from it, the first is translate and second is scale, and it can be simply modified.

AaronJackson commented 6 years ago

Excellent, thank you. I've added this: c728916740c6415a10c58dab5d627ff33636e049