If you have great ideas,
Let's talk!

blog

LRM 代码精读 4-[Rendering]

3d相关export

1. OSGDecoder

Triplane decoder that gives RGB and sigma values from sampled features.

Concatenate triplane features(3 * n_feature) to hidden_dim

linear layers(hd)

output → (hd → 1 + 3)

batch, n_planes, _M, _C = sampled_features.shape

[batch_size * num_samples, n_planes * n_features] → net() →

[batch_size, num_samples(M), output_dim]

sigmoid to clamp RGB

return RGB, sigma

2. Triplane Synthesizer

Synthesizer that renders a triplane volume with planes and a camera.

# planes: (N, 3, D', H', W')
# cameras: (N, M, D_cam)   # d_cam 包含25维 4 * 4 + 3 * 3(intrinsics)
# anchors: (N, M, 2)
# resolutions: (N, M, 1)
# bg_colors: (N, M, 1)
# region_size: int
  1. ray_sample

Create rays based on camera location and intrinsic

(cam2world, intrinsics, resolution, anchor(-1, 2))

→ (ray_origins(N * M, origin_loc_dim), ray_directions)

  1. volume rendering

https://www.bilibili.com/video/BV1f8BCY9Emh/?spm_id_from=333.337.search-card.all.click&vd_source=143a2ef0cd4b513f15da9430a5ab01fc

Kiss your perfect day goodbye —>