RayDF icon indicating copy to clipboard operation
RayDF copied to clipboard

How to measure the efficiency of raydf

Open unluckdog opened this issue 2 years ago • 2 comments

In table 1 of RayDF: Neural Ray-surface Distance Fields with Multi-view Consistency,it only takes 0.019 s to render an 800* 800 depth image on 3090,but it takes me 1.4s to render an 800*800 depth image of a chair on v100 gpu.Did I do anything wrong?

unluckdog avatar Nov 24 '23 08:11 unluckdog

The rendering efficiency of RayDF can be calculated as follows in the eval() function in run_mv.py:

def eval():
    ...
    cost = 0.  # new
    with torch.enable_grad():
        for i in range(0, len(rays), args.N_rand):
            ...
            t0 = time.time()  # new
            outs = model(batch_inputs)
            cost += time.time() - t0  # new
            ...
    print('rendering time:',  cost)  # new

zhuomanliu avatar Nov 24 '23 10:11 zhuomanliu

I calculated it as follows: start.record() outs = model(batch_inputs) end.record() torch.cuda.synchronize() spend = start.elapsed_time(end) the problem is it takes me 1.4s to render an 800800 depth image but in the paper it only need 0.019s to render an 800800 depth image. image why it takes me so long?

unluckdog avatar Nov 24 '23 13:11 unluckdog