MCPcopy Create free account
hub / github.com/CompVis/flow-poke-transformer / get_camera_static

Method get_camera_static

flow_poke/data.py:152–156  ·  view source on GitHub ↗
(self, sample: dict[str, torch.Tensor])

Source from the content-addressed store, hash-verified

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:

Callers 1

build_targetsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected