Save the ib-th point cloud as a ply file.
(
self,
filenames: T.List[str],
overwrite: bool = False,
)
| 678 | torch.save(state_dict, filename) |
| 679 | |
| 680 | def save_as_npbgpp( |
| 681 | self, |
| 682 | filenames: T.List[str], |
| 683 | overwrite: bool = False, |
| 684 | ): |
| 685 | """Save the ib-th point cloud as a ply file.""" |
| 686 | assert len(filenames) == self.xyz_w.size(0) |
| 687 | for filename in filenames: |
| 688 | if os.path.exists(filename) and not overwrite: |
| 689 | raise RuntimeError |
| 690 | |
| 691 | # o3d point cloud |
| 692 | o3d_pcds = self.get_o3d_pcds() |
| 693 | for i in range(self.xyz_w.size(0)): |
| 694 | o3d.io.write_point_cloud( |
| 695 | filename=filenames[i], |
| 696 | pointcloud=o3d_pcds[i], |
| 697 | ) |
| 698 | |
| 699 | def realize_valid_mask(self): |
| 700 | if self.valid_mask is not None: |
no test coverage detected