MCPcopy Create free account
hub / github.com/Inception3D/TTT3R / __init__

Method __init__

src/dust3r/utils/camera.py:47–72  ·  view source on GitHub ↗
(
        self,
        hidden_size=768,
        mlp_ratio=4,
        pose_mode=("exp", -inf, inf),
        pose_encoding_type="absT_quaR",
    )

Source from the content-addressed store, hash-verified

45
46class PoseEncoder(nn.Module):
47 def __init__(
48 self,
49 hidden_size=768,
50 mlp_ratio=4,
51 pose_mode=("exp", -inf, inf),
52 pose_encoding_type="absT_quaR",
53 ):
54 super().__init__()
55 self.pose_encoding_type = pose_encoding_type
56 self.pose_mode = pose_mode
57
58 if self.pose_encoding_type == "absT_quaR":
59 self.target_dim = 7
60
61 self.embed_pose = PoseEmbedding(
62 target_dim=self.target_dim,
63 out_dim=hidden_size,
64 n_harmonic_functions=10,
65 append_input=True,
66 )
67 self.pose_encoder = Mlp(
68 in_features=self.embed_pose.out_dim,
69 hidden_features=int(hidden_size * mlp_ratio),
70 out_features=hidden_size,
71 drop=0,
72 )
73
74 def forward(self, camera):
75 pose_enc = camera_to_pose_encoding(

Callers

nothing calls this directly

Calls 3

MlpClass · 0.90
PoseEmbeddingClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected