MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / forward_condition

Method forward_condition

model/model_utils.py:597–611  ·  view source on GitHub ↗
(self, frames, depths)

Source from the content-addressed store, hash-verified

595 return output
596
597 def forward_condition(self, frames, depths):
598 # [B, V, C, H, W]
599 input_views = frames.shape[1]
600 frames = rearrange(frames, 'b v c h w -> (b v) c h w')
601 depths = rearrange(depths, 'b v c h w -> (b v) c h w')
602
603 frames = F.interpolate(frames, size=(252, 448), mode='bilinear', align_corners=False)
604 depths = F.interpolate(depths, size=(252, 448), mode='bilinear', align_corners=False)
605
606 cls_condition, frames_condition = self.condition_encoder(frames)
607
608 condition = frames_condition
609 condition = rearrange(condition, '(b v) n d -> b v n d', v=input_views)
610
611 return condition
612
613 def combine(self, pred_gs):
614 static_xyz = pred_gs.pop("xyz_static")

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected