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.51k stars 745 forks source link

Mapping pixels to voxels #71

Closed aggarwal-himanshu closed 6 years ago

aggarwal-himanshu commented 6 years ago

Hi Aaron, Thanks for sharing the code. I would like to know, how can I map pixels in the scaled image to voxels in the raw file. Like if I localize a face feature lets say nose in jpg, how can I know which part of raw file correspond to that region. I am planning to interpolate 2 raw files for specific features like nose etc. to simulate aesthetic surgery results. Do you have any tips. Thanks.

AaronJackson commented 6 years ago

A pre-processing step crops the image. The volume is in direct correspondence with this image. If you load the raw file using readvol and take sum(vol,3) you will see that it is in correspondence.

aggarwal-himanshu commented 6 years ago

Hi Aaron, Can you tell me what does values at a particular voxel in raw file signify? Earlier I thought there are only two values 0 and 255, indicating whether the voxel is filled or not. Am I correct? I see multiple different values, and dont know how isosurface differentiate between them

aggarwal-himanshu commented 6 years ago

Never mind. I figured

AaronJackson commented 6 years ago

Some isosurface functions use it for smoothing. Matlab does a very nice job of this.