(
target_path = "",
save_path = "",
rate=4
)
| 2110 | return points |
| 2111 | |
| 2112 | def 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 | |
| 2129 | if __name__ == '__main__': |
| 2130 |
nothing calls this directly
no test coverage detected