(self, sample: dict[str, torch.Tensor])
| 150 | return {"valid": False} |
| 151 | |
| 152 | def get_camera_static(self, sample: dict[str, torch.Tensor]) -> Bool[torch.Tensor, ""]: |
| 153 | flow: Float[torch.Tensor, "l 2"] = sample["flow"] |
| 154 | return ( |
| 155 | flow.norm(dim=-1) < self.static_camera_flow_mag_threshold |
| 156 | ).float().mean() > self.static_camera_fraction_threshold |
| 157 | |
| 158 | def build_targets(self, sample: dict[str, torch.Tensor]) -> dict[str, torch.Tensor | bool]: |
| 159 | try: |