MCPcopy
hub / github.com/SizheAn/PanoHead / sample

Method sample

training/triplane.py:141–146  ·  view source on GitHub ↗
(self, coordinates, directions, z, c, truncation_psi=1, truncation_cutoff=None, update_emas=False, **synthesis_kwargs)

Source from the content-addressed store, hash-verified

139 return {'image': sr_image, 'image_raw': rgb_image, 'image_depth': depth_image, "image_mask": mask_image}
140
141 def sample(self, coordinates, directions, z, c, truncation_psi=1, truncation_cutoff=None, update_emas=False, **synthesis_kwargs):
142 # Compute RGB features, density for arbitrary 3D coordinates. Mostly used for extracting shapes.
143 ws = self.mapping(z, c, truncation_psi=truncation_psi, truncation_cutoff=truncation_cutoff, update_emas=update_emas)
144 planes = self.backbone.synthesis(ws, update_emas=update_emas, **synthesis_kwargs)
145 planes = planes.view(len(planes), 3, 32 * self.rendering_kwargs['triplane_depth'], planes.shape[-2], planes.shape[-1])
146 return self.renderer.run_model(planes, self.decoder, coordinates, directions, self.rendering_kwargs)
147
148 def sample_mixed(self, coordinates, directions, ws, truncation_psi=1, truncation_cutoff=None, update_emas=False, **synthesis_kwargs):
149 # Same as sample, but expects latent vectors 'ws' instead of Gaussian noise 'z'

Callers

nothing calls this directly

Calls 3

mappingMethod · 0.95
synthesisMethod · 0.80
run_modelMethod · 0.80

Tested by

no test coverage detected