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

Problem about runtime of base model #10

Closed
fangchuan opened this issue Nov 19, 2021 · 4 comments
Closed

Problem about runtime of base model #10

fangchuan opened this issue Nov 19, 2021 · 4 comments

Comments

@fangchuan
Copy link

fangchuan commented Nov 19, 2021

Hi, thank you for sharing the awesome work.
I have run the basemodel raftstereo-middlebury.pth without any refinement on my costume dataset. The precision of results are pretty good, But the runtime of model prediction seems does not match that described in the article.
I add some time-analysis snippet in demo.py:
image

The command predicts stereo on custome data is :
python demo.py --restore_ckpt models/raftstereo-middlebury.pth -l=output_xvisio/rect_cam0/*.jpg -r=output_xvisio/rect_cam1/*.jpg --corr_implementation alt --mixed_precision

The configuration of my local machine:

  • image resolution: 640 x 400;
  • CPU: Intel® Core™ i7-8700K CPU @ 3.70GHz × 12
  • GPU: NVIDIA GeForce GTX 1080
    Runtime of base model:
    image

The configuration of my server machine:

  • image resolution: 640 x 400;
  • CPU:Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz
  • GPU: NVIDIA Tesla P100
    Runtime of base model:
    image

Could you help me to figure out what mistake I made caused this problem? I really appreciate your help!

@lahavlipson
Copy link
Collaborator

--corr_implementation alt saves memory but is slower, although you shouldn't need it for individual 640 x 400 resolution images. Timings in the paper were measured using --corr_implementation reg_cuda, using an NVIDIA RTX-2080ti

@fangchuan
Copy link
Author

--corr_implementation alt saves memory but is slower, although you shouldn't need it for individual 640 x 400 resolution images. Timings in the paper were measured using --corr_implementation reg_cuda, using an NVIDIA RTX-2080ti

thank your reply. I follow your advice to adjust the --corr_implementation reg_cuda command, the runtime of raftstereo-middlebury.pth on Tesla P100 is about 400ms.

image

Another problem is about model raftstereo-realtime.pth, I load this model but consistently run into Errors when loading state_dict, the github page gives no clue about how to run the realtime model, can you help me?

@lahavlipson
Copy link
Collaborator

lahavlipson commented Nov 23, 2021

Are you able to run
python demo.py --restore_ckpt models/raftstereo-realtime.pth --shared_backbone --n_downsample 3 --n_gru_layers 2 --slow_fast_gru --valid_iters 7 --corr_implementation reg_cuda --mixed_precision
from the README? If not, can you post the error message?

@lahavlipson
Copy link
Collaborator

Closing this issue due to inactivity. Feel free to reopen if you still have problems or questions.

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