Yuliang commited on
Commit
7fba717
1 Parent(s): 905b94d

cmap ~ [0.0, 1.0]

Browse files
Files changed (1) hide show
  1. lib/dataset/mesh_util.py +1 -1
lib/dataset/mesh_util.py CHANGED
@@ -396,7 +396,7 @@ def cal_sdf_batch(verts, faces, cmaps, vis, points):
396
  bary_weights = barycentric_coordinates_of_projection(
397
  points.view(-1, 3), closest_triangles)
398
 
399
- pts_cmap = (closest_cmaps*bary_weights[:, :, None]).sum(1).unsqueeze(0)
400
  pts_vis = (closest_vis*bary_weights[:,
401
  :, None]).sum(1).unsqueeze(0).ge(1e-1)
402
  pts_norm = (closest_normals*bary_weights[:, :, None]).sum(
 
396
  bary_weights = barycentric_coordinates_of_projection(
397
  points.view(-1, 3), closest_triangles)
398
 
399
+ pts_cmap = (closest_cmaps*bary_weights[:, :, None]).sum(1).unsqueeze(0).clamp_(min=0.0, max=1.0)
400
  pts_vis = (closest_vis*bary_weights[:,
401
  :, None]).sum(1).unsqueeze(0).ge(1e-1)
402
  pts_norm = (closest_normals*bary_weights[:, :, None]).sum(