Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to measure the efficiency of raydf #4

Open
unluckdog opened this issue Nov 24, 2023 · 2 comments
Open

How to measure the efficiency of raydf #4

unluckdog opened this issue Nov 24, 2023 · 2 comments

Comments

@unluckdog
Copy link

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?

@zhuomanliu
Copy link
Member

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
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants