get number of valid points (excluding point at inf) but including the invalid points.
(self, bidx: int)
| 109 | return self.xyz_w.size(1) |
| 110 | |
| 111 | def get_num_valid_points(self, bidx: int) -> int: |
| 112 | """ |
| 113 | get number of valid points (excluding point at inf) |
| 114 | but including the invalid points. |
| 115 | """ |
| 116 | if self.valid_mask is None: |
| 117 | if self.included_point_at_inf: |
| 118 | return self.xyz_w.size(1) - 1 |
| 119 | else: |
| 120 | return self.xyz_w.size(1) |
| 121 | else: |
| 122 | return self.valid_mask[bidx, :].sum().detach().cpu().item() |
| 123 | |
| 124 | def to(self, device: torch.device) -> 'PointCloud': |
| 125 | for attr_name in self.attr_names: |