NeRF for Image Generation
Module: Generative AI | Difficulty: Advanced
3D-Aware GAN
where are camera parameters.
GRAF
GIRAFFE
Volume Rendering
def volume_render(density, color, t_values):
delta = t_values[:, 1:] - t_values[:, :-1]
alpha = 1 - torch.exp(-density * delta)
T = torch.cumprod(1 - alpha + 1e-10, dim=-1)
T = torch.cat([torch.ones_like(T[:,:1]), T[:,:-1]], dim=-1)
weights = T * alpha
return (weights * color).sum(dim=-1)
Research Insight: GIRAFFE enables compositional generation β you can change objects, backgrounds, and camera viewpoints independently. This is impossible with 2D GANs.