vLAR-group / RayDF

🔥RayDF in PyTorch (NeurIPS 2023)
Other
103 stars 4 forks source link

How to measure the efficiency of raydf #4

Open unluckdog opened 11 months ago

unluckdog commented 11 months ago

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 800800 depth image of a chair on v100 gpu.Did I do anything wrong?

zhuomanliu commented 11 months ago

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
unluckdog commented 11 months ago

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?