MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / test_mid

Function test_mid

utils/common.py:2112–2127  ·  view source on GitHub ↗
(
        target_path = "",
        save_path = "",
        rate=4
)

Source from the content-addressed store, hash-verified

2110 return points
2111
2112def test_mid(
2113 target_path = "",
2114 save_path = "",
2115 rate=4
2116):
2117 target = read_ply(target_path)
2118 target = torch.from_numpy(target).unsqueeze(0).permute(0,2,1).cuda()
2119
2120 points = midpoint_interpolate(target, up_rate=rate)
2121
2122 points = points.cpu().permute(0,2,1).squeeze()
2123 pc = open3d.geometry.PointCloud()
2124 pc.points = open3d.utility.Vector3dVector(points)
2125
2126 open3d.io.write_point_cloud(filename=save_path, pointcloud=pc)
2127 print(f"Saved : {save_path}")
2128
2129if __name__ == '__main__':
2130

Callers

nothing calls this directly

Calls 2

read_plyFunction · 0.85
midpoint_interpolateFunction · 0.85

Tested by

no test coverage detected