(
self,
encoder_freeze: bool = False,
encoder_model_name: str = 'facebook/dino-vitb16',
encoder_feat_dim: int = 768,
transformer_dim: int = 1024,
transformer_layers: int = 16,
transformer_heads: int = 16,
triplane_low_res: int = 32,
triplane_high_res: int = 64,
triplane_dim: int = 80,
rendering_samples_per_ray: int = 128,
)
| 30 | Full model of the large reconstruction model. |
| 31 | """ |
| 32 | def __init__( |
| 33 | self, |
| 34 | encoder_freeze: bool = False, |
| 35 | encoder_model_name: str = 'facebook/dino-vitb16', |
| 36 | encoder_feat_dim: int = 768, |
| 37 | transformer_dim: int = 1024, |
| 38 | transformer_layers: int = 16, |
| 39 | transformer_heads: int = 16, |
| 40 | triplane_low_res: int = 32, |
| 41 | triplane_high_res: int = 64, |
| 42 | triplane_dim: int = 80, |
| 43 | rendering_samples_per_ray: int = 128, |
| 44 | ): |
| 45 | super().__init__() |
| 46 | |
| 47 | # modules |
| 48 | self.encoder = DinoWrapper( |
| 49 | model_name=encoder_model_name, |
| 50 | freeze=encoder_freeze, |
| 51 | ) |
| 52 | |
| 53 | self.transformer = TriplaneTransformer( |
| 54 | inner_dim=transformer_dim, |
| 55 | num_layers=transformer_layers, |
| 56 | num_heads=transformer_heads, |
| 57 | image_feat_dim=encoder_feat_dim, |
| 58 | triplane_low_res=triplane_low_res, |
| 59 | triplane_high_res=triplane_high_res, |
| 60 | triplane_dim=triplane_dim, |
| 61 | ) |
| 62 | |
| 63 | self.synthesizer = TriplaneSynthesizer( |
| 64 | triplane_dim=triplane_dim, |
| 65 | samples_per_ray=rendering_samples_per_ray, |
| 66 | ) |
| 67 | |
| 68 | def forward_planes(self, images, cameras): |
| 69 | # images: [B, V, C_img, H_img, W_img] |
nothing calls this directly
no test coverage detected