feihuzhang / GANet

GA-Net: Guided Aggregation Net for End-to-end Stereo Matching
MIT License
554 stars 135 forks source link

Either training or testing is too slow. How to speed up? #93

Open MurrayC7 opened 4 years ago

MurrayC7 commented 4 years ago

Hello! When finetuning on my own dataset with the pre-trained GANet_deep model as "sceneflow_epoch_10.pth", the training is too slow as 10s a step for 16 batchsize on 4 1080ti. Also, evaluating (using the code "evaluate.py") on SceneFlow test set with the same pre-trained model costs 6s for a 576x960 image. This time-consuming is much bigger than that stated in the paper.

By the way, is there any approach to speed up this PyTorch code? Thanks a million!

oliverxudd commented 4 years ago

You can try fixing all the layers but the last few layers. I think the feature extraction module and cost aggregation layer can stay as they are.

MurrayC7 commented 4 years ago

@oliverxudd The case that all the layers are fixed is actually like the evaluation process, isn't it? As I found, it also costs 6s for a 576x960 image.

MurrayC7 commented 4 years ago

I have looked up #47 #53 , which discuss the similar problem of this code about its time-consuming. But I am still looking forward to fixing it. As the author said, I could try reducing the redundant computation in the code from "libs/" though, these CUDA code is a bit complicated for me. :(

oliverxudd commented 4 years ago

6 sec for a 576x960 image? that is way too slow.... couldn't help you because I, also know little about cuda code.

Diksha-Moolchandani commented 3 years ago

I am also experiencing the same problem. I am using the pretrianed model and using predict.py for a 576x960 image. It takes 5-6 sec. Any idea how to speed up?