curvature training
This commit is contained in:
@@ -40,7 +40,7 @@ class UV2Mesh(nn.Module):
|
||||
|
||||
|
||||
def uv_to_mesh(self, uv):
|
||||
if uv.shape[1] == 3:
|
||||
if uv.shape[1] == 3 or uv.shape[1] == 7:
|
||||
uv = torch.permute(uv, [0,2,3,1])
|
||||
if uv.shape[1] != 512:
|
||||
uv = Resize(uv[:,:,None], size=(512, 256), interpolation=InterpolationMode.BILINEAR)
|
||||
@@ -65,7 +65,7 @@ class UV2Mesh(nn.Module):
|
||||
# p1 = tf.stack((x1, y1, z1), axis=-1)
|
||||
# p2 = tf.stack((x2, y2, z2), axis=-1)
|
||||
|
||||
mesh = torch.mean(uv[:, self.uv_pixels[:,:,0], self.uv_pixels[:,:,1]], dim=2)
|
||||
mesh = torch.mean(uv[:, self.uv_pixels[:,:,0], self.uv_pixels[:,:,1]].float(), dim=2)
|
||||
return mesh
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user