All problems
NeRF Ray Sample Count
Problem
Count the network evaluations for all rays of one NeRF image.
Each of the h * w pixels casts one ray, and every ray is sampled at n_coarse coarse points plus n_fine fine points. Return h * w * (n_coarse + n_fine).
Hint
The fine network is queried per ray as a whole, not per coarse interval.
Test cases
case 1
in: [100,100,64,128]
expected: 1920000
case 2
in: [32,32,32,0]
expected: 32768
case 3
in: [1,1,2,3]
expected: 5
case 4
in: [224,224,64,64]
expected: 6422528
Starter codePython
def nerf_sample_count(h, w, n_coarse, n_fine):
# Your code here
pass4 test cases · run your code against them in the editor