All problems
NeRF Density Integration
Problem
Compute the per-sample weights of volume rendering: alpha_i = 1 - exp(-sigma_i * delta_i), transmittance T_i = prod_{j<i} (1 - alpha_j), and weight_i = T_i * alpha_i.
The signature is nerf_density_integration(sigmas, deltas). Return the list of weights.
Hint
The weights sum to the total opacity along the ray and are used to composite colors.
Test cases
case 1
in: [[1,1,1],[1,1,1]]
expected: [0.6321205588,0.2325441579,0.0855482149]
case 2
in: [[0,0],[1,1]]
expected: [0,0]
case 3
in: [[1],[2]]
expected: [0.8646647168]
case 4
in: [[2,0,1],[0.5,1,0.5]]
expected: [0.6321205588,0,0.144749281]
Starter codePython
import math
def nerf_density_integration(sigmas, deltas):
# Your code here
pass4 test cases · run your code against them in the editor