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

Method forward_encoder

model/model_utils.py:491–501  ·  view source on GitHub ↗
(self, frames, depths, cond_times=None)

Source from the content-addressed store, hash-verified

489 param.requires_grad = False
490
491 def forward_encoder(self, frames, depths, cond_times=None):
492 mask = torch.ones_like(depths) # dummy mask
493 max_depth = depths.flatten(1).max(dim=1)[0][:, None, None, None, None]
494 min_depth = depths.flatten(1).min(dim=1)[0][:, None, None, None, None]
495 target_depth = depths # without normalization
496 input_depth = (depths - min_depth) / (max_depth - min_depth)
497
498 frames = torch.cat([frames, input_depth], dim=2)
499 encoder_output = self.encoder(frames, cond_times)
500
501 return encoder_output, target_depth, mask
502
503 def upsampling(self, output):
504 input_views = output.shape[1]

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected