Closed sxyu closed 4 years ago
Good question. I found that zero at the center of body results in faster convergence and better reconstruction accuracy. Generally taking random z-translation without normalization deteriorates reconstruction as the network cannot leverage spatial consistency across data samples.
Ah so it is the center of body. Thanks!
class DepthNormalizer(nn.Module): def init(self, opt): super(DepthNormalizer, self).init() self.opt = opt
def forward(self, z, calibs=None, index_feat=None):
'''
Normalize z_feature
:param z_feat: [B, 1, N] depth value for z in the image coordinate system
:return:
'''
# Personal understanding: first change z * loadsize to the state before the operation of uv_intrinsic (uv_intrinsic is normalized xy, that is, the model is scaled after scale/ortho_ratio)
z_feat = z * (self.opt.loadSize // 2) / self.opt.z_size
return z_feat
What does this code mean? Why does normalization need to be normalized and why normalization needs to be divided by self.opt.z_size
Hi,
As I understand it, the x,y positions of PIFu's output are image-aligned; then, I was wondering what the z-position corresponds to. Is it meant to be zero at the center the body, or does it just follow some arbitrary translation from the dataset?
Thanks, Alex